소스 검색

feat: 报告新增大题分析

zhangjie 9 달 전
부모
커밋
1b296ff1c4

+ 2 - 1
src/assets/styles/element-ui-costom.scss

@@ -20,7 +20,8 @@
       border-bottom: 1px solid $--color-border;
 
       .el-dialog__headerbtn {
-        top: 8px;
+        top: 50%;
+        margin-top: -15px;
         width: auto;
         height: 30px;
         padding: 4px 10px;

+ 3 - 1
src/modules/base/components/ModifyFlowDetail.vue

@@ -15,10 +15,12 @@
       <div class="box-justify" slot="title">
         <h4 class="el-dialog__title">流程图编辑:{{ instance.name }}</h4>
         <div>
-          <el-button @click="cancel">取消</el-button>
           <el-button type="primary" :disabled="isSubmit" @click="submit"
             >发布</el-button
           >
+          <el-button class="btn-back" @click="cancel">
+            返回<i class="el-icon-arrow-right"></i>
+          </el-button>
         </div>
       </div>
 

+ 3 - 1
src/modules/exam/components/PaperApproveTable.vue

@@ -19,7 +19,9 @@
           @click="toDownload"
           >下载</el-button
         >
-        <el-button @click="cancel">取消</el-button>
+        <el-button class="btn-back" @click="cancel">
+          返回<i class="el-icon-arrow-right"></i>
+        </el-button>
       </div>
     </div>
 

+ 3 - 1
src/modules/mark/components/ModifyPaperArea.vue

@@ -14,7 +14,9 @@
       <h2 class="el-dialog__title">设置遮盖区域</h2>
       <div>
         <el-button type="success" @click="confirm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
+        <el-button class="btn-back" @click="cancel">
+          返回<i class="el-icon-arrow-right"></i>
+        </el-button>
       </div>
     </div>
     <div class="tips-info">

+ 5 - 1
src/modules/mark/components/ScoreClassDetail.vue

@@ -168,10 +168,13 @@
           </el-form-item>
         </el-form>
         <div class="part-box-action">
-          <el-button type="primary" @click="toReport">成绩报告</el-button>
+          <el-button type="primary" icon="el-icon-document" @click="toReport"
+            >成绩报告</el-button
+          >
           <el-button
             type="success"
             :disabled="downloading"
+            icon="el-icon-download"
             @click="toExportScore"
           >
             成绩导出
@@ -179,6 +182,7 @@
           <el-button
             v-if="checkPrivilege('button', 'DownloadScore')"
             type="success"
+            icon="el-icon-download"
             :disabled="downloading"
             @click="toDownloadScore"
           >

+ 8 - 2
src/modules/mark/components/ScoreReportPreview.vue

@@ -14,10 +14,16 @@
       <span>{{ title }}</span>
 
       <div>
-        <el-button type="primary" :loading="downloading" @click="toExportScore"
+        <el-button
+          type="primary"
+          :loading="downloading"
+          icon="el-icon-download"
+          @click="toExportScore"
           >下载报告</el-button
         >
-        <el-button type="danger" @click="cancel">取消</el-button>
+        <el-button class="btn-back" @click="cancel">
+          返回<i class="el-icon-arrow-right"></i>
+        </el-button>
       </div>
     </div>
 

+ 3 - 1
src/modules/mark/components/markParam/ModifyMarkArea.vue

@@ -14,7 +14,9 @@
       <h2 class="el-dialog__title">设置分组评卷区域</h2>
       <div>
         <el-button type="success" @click="confirm">确定</el-button>
-        <el-button @click="cancel">取消</el-button>
+        <el-button class="btn-back" @click="cancel">
+          返回<i class="el-icon-arrow-right"></i>
+        </el-button>
       </div>
     </div>
     <div class="tips-info">

+ 10 - 0
src/modules/mark/components/report/Report.vue

@@ -15,6 +15,9 @@
         v-if="subjective.length"
         type="subjective"
       ></report-question>
+      <report-main-question
+        v-if="mainQuestionAnalysis.length"
+      ></report-main-question>
     </template>
   </div>
 </template>
@@ -27,6 +30,7 @@ import ReportCollege from "./ReportCollege.vue";
 import ReportClass from "./ReportClass.vue";
 import ReportTeacher from "./ReportTeacher.vue";
 import ReportQuestion from "./ReportQuestion.vue";
+import ReportMainQuestion from "./ReportMainQuestion.vue";
 import { scoreReport } from "../../api";
 import previewTemp from "./previewTemp";
 
@@ -46,6 +50,7 @@ export default {
     ReportClass,
     ReportTeacher,
     ReportQuestion,
+    ReportMainQuestion,
   },
   data() {
     return {
@@ -61,6 +66,7 @@ export default {
       "teacherClass",
       "objective",
       "subjective",
+      "mainQuestionAnalysis",
     ]),
   },
   mounted() {
@@ -80,6 +86,10 @@ export default {
         },
       });
       this.dataReady = true;
+
+      this.$nextTick(() => {
+        this.fillCatalogNum();
+      });
     },
     async initData() {
       this.resetData();

+ 75 - 0
src/modules/mark/components/report/ReportMainQuestion.vue

@@ -0,0 +1,75 @@
+<template>
+  <div class="report-main-question report-question">
+    <report-box v-for="(page, pindex) in pages" :key="pindex" title="大题分析">
+      <table v-if="page.tables" class="report-table report-table-border">
+        <tr>
+          <th class="td-question">题目名称</th>
+          <th>题号</th>
+          <th>满分</th>
+          <th>最高分</th>
+          <th>最低分</th>
+          <th>平均分</th>
+          <th>得分率(%)</th>
+          <th>零分人数</th>
+          <th>满分人数</th>
+        </tr>
+        <tr v-for="(item, ind) in page.tables" :key="ind">
+          <td class="td-question">
+            <div>{{ item.title }}</div>
+          </td>
+          <td>{{ item.mainNumber }}</td>
+          <td>{{ item.score }}</td>
+          <td>{{ item.maxScore }}</td>
+          <td>{{ item.minScore }}</td>
+          <td>{{ item.avgScore }}</td>
+          <td>{{ item.scoreRate }}</td>
+          <td>{{ item.zeroScoreCount }}</td>
+          <td>{{ item.fullScoreCount }}</td>
+        </tr>
+      </table>
+    </report-box>
+  </div>
+</template>
+
+<script>
+import { mapState } from "vuex";
+import ReportBox from "./ReportBox.vue";
+import { sectionArr } from "./utils";
+
+export default {
+  name: "report-main-question",
+  components: { ReportBox },
+  props: {
+    type: String,
+  },
+  data() {
+    return {
+      pages: [],
+      chartSplitRange: 30,
+    };
+  },
+  computed: {
+    ...mapState("report", ["mainQuestionAnalysis"]),
+  },
+  mounted() {
+    this.initData();
+  },
+  methods: {
+    initData() {
+      const question = this.mainQuestionAnalysis;
+
+      const questionTables = sectionArr(question, this.chartSplitRange);
+
+      const pages = [];
+      questionTables.forEach((table) => {
+        pages.push({
+          charts: null,
+          tables: table,
+        });
+      });
+
+      this.pages = pages;
+    },
+  },
+};
+</script>

+ 18 - 0
src/modules/mark/components/report/data.js

@@ -122,6 +122,23 @@ for (let i = 0; i < subjectiveMainCount; i++) {
   }
 }
 
+// 大题分析
+const mainQuestionAnalysis = [];
+const mainCount = getRandomNumer(35, 50);
+for (let i = 0; i < mainCount; i++) {
+  mainQuestionAnalysis.push({
+    title: `主观主观题${i + 1}`,
+    mainNumber: i + 1,
+    score: 20,
+    maxScore: getRandomNumer(15, 20),
+    minScore: getRandomNumer(10, 20),
+    avgScore: getRandomNumer(5, 15),
+    scoreRate: getRandomNumer(20, 100, 2),
+    zeroScoreCount: getRandomNumer(0, 10),
+    fullScoreCount: getRandomNumer(0, 10),
+  });
+}
+
 const data = {
   overview,
   scoreRange,
@@ -131,6 +148,7 @@ const data = {
   teacherClass,
   objective,
   subjective,
+  mainQuestionAnalysis,
 };
 
 function getRandomNumer(min, max, precision = 0) {

+ 2 - 0
src/modules/mark/components/report/store.js

@@ -8,6 +8,7 @@ const state = {
   teacherClass: [],
   objective: [],
   subjective: [],
+  mainQuestionAnalysis: [],
 };
 
 const mutations = {
@@ -26,6 +27,7 @@ const mutations = {
     state.teacherClass = [];
     state.objective = [];
     state.subjective = [];
+    state.mainQuestionAnalysis = [];
   },
 };