Explorar el Código

feat: 分班阅调整

zhangjie hace 3 meses
padre
commit
46e63c1e82
Se han modificado 1 ficheros con 22 adiciones y 10 borrados
  1. 22 10
      src/modules/mark/components/markParam/MarkParamClass.vue

+ 22 - 10
src/modules/mark/components/markParam/MarkParamClass.vue

@@ -32,20 +32,18 @@
     <div v-if="classMarkIsOpen" class="part-box part-box-pad class-body">
       <el-table :data="dataList" border>
         <el-table-column type="index" width="50"> </el-table-column>
-
-        <el-table-column label="试题" width="100">
-          <template slot-scope="scope">
-            {{ scope.row.marker.mainNumber }}-{{ scope.row.marker.subNumber }}
-          </template>
-        </el-table-column>
-
-        <el-table-column label="评卷员" width="300">
+        <el-table-column label="评卷员" width="200">
           <template slot-scope="scope">
             <el-tag size="medium">
               {{ scope.row.marker.name }}({{ scope.row.marker.loginName }})
             </el-tag>
           </template>
         </el-table-column>
+        <el-table-column label="评阅题目">
+          <template slot-scope="scope">
+            {{ scope.row.userQuesions.join(",") }}
+          </template>
+        </el-table-column>
         <el-table-column prop="markerClassList" label="评卷班级">
           <template slot-scope="scope">
             {{ scope.row.markerClassList.join() }}
@@ -91,7 +89,6 @@
       ref="SelectClassByCourse"
       :selected-ids="selectedClassIds"
       :class-list="classList"
-      required
       @confirm="classSelected"
     ></select-class-by-course>
   </div>
@@ -153,6 +150,7 @@ export default {
       const res = await markClassList(params);
       this.dataList = res.markerClass || [];
       this.classList = res.classNames || [];
+      this.updateUserQuestion();
 
       this.updateUnsignData();
       this.cacheDataMd5 = this.getSubmitDataMd5();
@@ -164,6 +162,20 @@ export default {
       this.unsignData = [];
       this.cacheDataMd5 = "";
     },
+    updateUserQuestion() {
+      const userQuesions = {};
+      this.subjectiveTaskList.forEach((group) => {
+        const qNo = `${group.mainNumber}-${group.subNumber}`;
+        group.markers.forEach((marker) => {
+          if (!userQuesions[marker.userId]) userQuesions[marker.userId] = [];
+          userQuesions[marker.userId].push(qNo);
+        });
+      });
+
+      this.dataList.forEach((row) => {
+        row.userQuesions = userQuesions[row.marker.userId] || [];
+      });
+    },
     getSubmitDataMd5() {
       return MD5(JSON.stringify(this.dataList));
     },
@@ -229,7 +241,7 @@ export default {
           if (unsignGroups.length) {
             const groupCont = unsignGroups
               .map((group) => group.question)
-              .join("   ");
+              .join("");
             nrow.content = `${className}班级,${groupCont},未分配评卷员`;
           }