Jelajahi Sumber

feat: 模式2学生id

zhangjie 11 bulan lalu
induk
melakukan
5714f3c8d6

+ 2 - 1
src/modules/exam/components/createExamAndPrintTask/CreateExamAndPrintTask.vue

@@ -176,7 +176,8 @@ const initPrintTask = {
   printCount: 1, // MODEL2专用
   printHouseId: "", // MODEL2专用
   classId: "", // MODEL2专用
-  teachClazzName: "", // MODEL2专用
+  className: "", // MODEL2专用
+  basicStudentIds: [], // MODEL2专用
   list: [],
 };
 

+ 8 - 4
src/modules/exam/components/createExamAndPrintTask/InfoPrintTask.vue

@@ -243,6 +243,7 @@ const initModalForm = {
   printHouseId: "",
   backupCount: null,
   className: "",
+  basicStudentIds: [],
 };
 
 export default {
@@ -494,7 +495,7 @@ export default {
       };
       return data;
     },
-    examStudentModified({ selectedStudents, isSelectStudent }) {
+    examStudentModified({ selectedStudents }) {
       if (this.IS_MODEL2 || this.IS_REBUILD) {
         this.model2ClassList = selectedStudents.map((item) => item.label);
         this.modalForm.className = this.model2ClassList.join();
@@ -504,6 +505,9 @@ export default {
           .map((item) => {
             return { ...item, enable: true };
           });
+        this.modalForm.basicStudentIds = this.model2Students.map(
+          (item) => item.id
+        );
         if (this.IS_REBUILD) {
           this.modalForm.totalSubjects = this.model2Students.length;
         }
@@ -598,12 +602,12 @@ export default {
       this.$refs.PreviewTaskStudent.open();
     },
     previewStudentClosed() {
-      const studentCount = this.examStudentList.filter(
-        (item) => item.enable
-      ).length;
+      const students = this.examStudentList.filter((item) => item.enable);
+      const studentCount = students.length;
 
       if (this.IS_MODEL2 || this.IS_REBUILD) {
         this.modalForm.totalSubjects = studentCount;
+        this.modalForm.basicStudentIds = students.map((item) => item.id);
         return;
       }