zhangjie %!s(int64=3) %!d(string=hai) anos
pai
achega
74fe4ceb8c

+ 1 - 1
src/modules/grading/GradingAnalysis.vue

@@ -30,7 +30,7 @@
           type="success"
           icon="upload-white icon"
           @click="toExport"
-          :load="isDownload"
+          :loading="isDownload"
           >导出表格</Button
         >
       </div>

+ 18 - 20
src/modules/grading/components/GradeAnalysisExport.vue

@@ -13,40 +13,38 @@
         <div class="print-chart-title">详细数值表:</div>
         <table class="export-table">
           <tr>
+            <th>科目</th>
             <th>档位</th>
-            <th>考区试卷数量</th>
-            <th>考区试卷占比</th>
-            <th>考区阈值</th>
+            <th>范围</th>
+            <th>数量</th>
+            <th>占比</th>
+            <th>预设占比</th>
             <th>差值</th>
             <th>累计数量</th>
             <th>累计占比</th>
             <th>调整</th>
-            <th>全部试卷数量</th>
-            <th>全部试卷占比</th>
-            <th>占比阈值</th>
           </tr>
-          <tr v-for="(level, index) in chartData.levelData" :key="index">
-            <td>{{ level.code }}</td>
-            <td>{{ level.levelCount }}</td>
-            <td>{{ level.levelProp }}%</td>
-            <td>{{ level.examLevelProp }}%</td>
-            <td>{{ level.diffProp }}%</td>
-            <td>{{ level.cumulateCount }}</td>
-            <td>{{ level.cumulateProp }}%</td>
-            <td>{{ level.adjustmentCount }}</td>
-            <td class="td-bl">{{ level.gcount }}</td>
-            <td>{{ level.gpercent }}%</td>
-            <td>{{ level.pt }}%</td>
+          <tr v-for="(item, index) in chartData.levelData" :key="index">
+            <td>{{ item.subjectName }}</td>
+            <td>{{ item.code }}</td>
+            <td>{{ item.minScore }} ~ {{ item.maxScore }}</td>
+            <td>{{ item.levelCount }}</td>
+            <td>{{ item.levelProp }}%</td>
+            <td>{{ item.examLevelProp }}%</td>
+            <td>{{ item.diffProp }}%</td>
+            <td>{{ item.cumulateCount }}</td>
+            <td>{{ item.cumulateProp }}%</td>
+            <td>{{ item.adjustmentCount }}</td>
           </tr>
         </table>
       </div>
       <div class="print-chart" v-if="chartData.lineChartData">
-        <div class="print-chart-title">考区试卷数量分布图</div>
+        <div class="print-chart-title">档位分布曲线图:</div>
         <div class="print-chart-body">
           <echart-render
             :chart-data="chartData.lineChartData"
             :animation-is-open="false"
-            chart-type="darkLines"
+            chart-type="line"
             ref="lineChart"
             v-if="!showImg"
           ></echart-render>

+ 129 - 0
src/modules/grading/leader/LeaderAnalysisExport.vue

@@ -0,0 +1,129 @@
+<template>
+  <div class="leader-analysis-export analysis-export-modal">
+    <div class="print-box">
+      <h1>
+        分档详情数据
+      </h1>
+      <div class="quality-info">
+        <p>科目:{{ pageInfo.subjectName }}</p>
+        <p>考区:{{ pageInfo.areaName }}</p>
+        <p>截止时间:{{ currentTime }}</p>
+      </div>
+      <div class="print-chart">
+        <div class="print-chart-title">详细数值表:</div>
+        <table class="export-table">
+          <tr>
+            <th>档位</th>
+            <th>考区试卷数量</th>
+            <th>考区试卷占比</th>
+            <th>考区阈值</th>
+            <th>差值</th>
+            <th>累计数量</th>
+            <th>累计占比</th>
+            <th>调整</th>
+            <th>全部试卷数量</th>
+            <th>全部试卷占比</th>
+            <th>占比阈值</th>
+          </tr>
+          <tr v-for="(level, index) in chartData.levelData" :key="index">
+            <td>{{ level.code }}</td>
+            <td>{{ level.levelCount }}</td>
+            <td>{{ level.levelProp }}%</td>
+            <td>{{ level.examLevelProp }}%</td>
+            <td>{{ level.diffProp }}%</td>
+            <td>{{ level.cumulateCount }}</td>
+            <td>{{ level.cumulateProp }}%</td>
+            <td>{{ level.adjustmentCount }}</td>
+            <td class="td-bl">{{ level.gcount }}</td>
+            <td>{{ level.gpercent }}%</td>
+            <td>{{ level.pt }}%</td>
+          </tr>
+        </table>
+      </div>
+      <div class="print-chart" v-if="chartData.lineChartData">
+        <div class="print-chart-title">考区试卷数量分布图</div>
+        <div class="print-chart-body">
+          <echart-render
+            :chart-data="chartData.lineChartData"
+            :animation-is-open="false"
+            chart-type="darkLines"
+            ref="lineChart"
+            v-if="!showImg"
+          ></echart-render>
+          <img src="" ref="lineChartImg" v-show="showImg" />
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import EchartRender from "@/components/EchartRender";
+import { download, formatDate } from "@/plugins/utils";
+import html2canvas from "html2canvas";
+
+export default {
+  name: "leader-analysis-export",
+  components: { EchartRender },
+  props: {
+    chartData: {
+      type: Object,
+      default() {
+        return {};
+      }
+    },
+    pageInfo: {
+      type: Object,
+      default() {
+        return {};
+      }
+    }
+  },
+  data() {
+    return {
+      currentTime: formatDate(),
+      showImg: false
+    };
+  },
+  mounted() {
+    this.$nextTick(() => {
+      this.$refs.lineChartImg.src = this.$refs.lineChart.getDataURL({
+        backgroundColor: "#fff"
+      });
+
+      this.showImg = true;
+      this.$nextTick(() => {
+        this.toExport();
+      });
+    });
+  },
+  methods: {
+    async toExport() {
+      const canvas = await html2canvas(this.$el.childNodes[0], {
+        allowTaint: true
+      }).catch(() => {});
+
+      if (!canvas) {
+        this.$emit("on-exported", false);
+        return;
+      }
+
+      let result = true;
+      const user = this.$ls.get("user", { token: "", id: "" });
+      await download({
+        type: "post",
+        url: `${this.GLOBAL.domain}/api/exportPdf`,
+        header: { Authorization: user.token, userId: user.id },
+        data: {
+          content: [canvas.toDataURL().split(",")[1]]
+        },
+        fileName: `${this.pageInfo.subjectName}-${this.pageInfo.areaName}-分档详情分析.pdf`
+      }).catch(() => {
+        result = false;
+      });
+
+      this.$emit("on-exported", result);
+    }
+  }
+};
+</script>

+ 6 - 6
src/modules/grading/leader/LeaderStatistics.vue

@@ -61,14 +61,14 @@
       ></echart-render>
     </div>
 
-    <!-- GradeAnalysisExport -->
-    <grade-analysis-export
-      ref="GradeAnalysisExport"
+    <!-- LeaderAnalysisExport -->
+    <leader-analysis-export
+      ref="LeaderAnalysisExport"
       :chart-data="renderChartData"
       :page-info="renderPageInfo"
       @on-exported="exportOver"
       v-if="renderExportPage"
-    ></grade-analysis-export>
+    ></leader-analysis-export>
   </Modal>
 </template>
 
@@ -76,11 +76,11 @@
 import { mapState } from "vuex";
 import { gradingStatData } from "@/api";
 import EchartRender from "@/components/EchartRender";
-import GradeAnalysisExport from "../components/GradeAnalysisExport";
+import LeaderAnalysisExport from "./LeaderAnalysisExport";
 
 export default {
   name: "leader-statistics",
-  components: { EchartRender, GradeAnalysisExport },
+  components: { EchartRender, LeaderAnalysisExport },
   props: {
     questionId: {
       type: [Number, String],

+ 0 - 5
src/modules/grading/marker/MarkerStandard.vue

@@ -133,11 +133,6 @@ export default {
       isSubmit: false
     };
   },
-  watch: {
-    questionId(val, oldval) {
-      if (val !== oldval) this.getPaperList();
-    }
-  },
   computed: {
     ...mapState("marker", ["IS_MARK_LEADER", "paramsSet"]),
     showStandardPaperManage() {