ソースを参照

fix: 命题任务提交问题

zhangjie 7 ヶ月 前
コミット
08621ca936

+ 8 - 7
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -799,8 +799,8 @@ export default {
       this.getCardList();
     },
     updateExamTaskDetail() {
-      if (this.examTask.openAb) {
-        this.paperAttachments.forEach((paperAttachment) => {
+      this.paperAttachments.forEach((paperAttachment) => {
+        if (this.examTask.openAb) {
           const aAttachment = paperAttachment.paperAttachmentIds[0];
           Object.assign(paperAttachment.paperAttachmentIds[1], {
             cardId: aAttachment.cardId,
@@ -810,11 +810,12 @@ export default {
             used: aAttachment.used,
             createId: aAttachment.createId,
           });
-          paperAttachment.paperType = paperAttachment.paperAttachmentIds
-            .map((item) => item.name)
-            .join();
-        });
-      }
+        }
+        paperAttachment.paperType = paperAttachment.paperAttachmentIds
+          .map((item) => item.name)
+          .join();
+      });
+
       this.examTaskDetail = this.paperAttachments.map((item) => {
         return {
           ...item,

+ 7 - 7
src/modules/exam/components/taskApply/TaskPaper.vue

@@ -1050,8 +1050,8 @@ export default {
       return data;
     },
     updateExamTaskDetail() {
-      if (this.examTask.openAb) {
-        this.paperAttachments.forEach((paperAttachment) => {
+      this.paperAttachments.forEach((paperAttachment) => {
+        if (this.examTask.openAb) {
           const aAttachment = paperAttachment.paperAttachmentIds[0];
           Object.assign(paperAttachment.paperAttachmentIds[1], {
             cardId: aAttachment.cardId,
@@ -1061,11 +1061,11 @@ export default {
             used: aAttachment.used,
             createId: aAttachment.createId,
           });
-          paperAttachment.paperType = paperAttachment.paperAttachmentIds
-            .map((item) => item.name)
-            .join();
-        });
-      }
+        }
+        paperAttachment.paperType = paperAttachment.paperAttachmentIds
+          .map((item) => item.name)
+          .join();
+      });
     },
     checkData() {
       this.updateExamTaskDetail();