瀏覽代碼

feat: 命题任务提交校验

zhangjie 3 月之前
父節點
當前提交
2b868b5350

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

@@ -126,7 +126,7 @@ const initExamTask = {
   includePaper: false,
   customCard: false,
   // 一个命题任务至少交AB两套试卷
-  submitTwoPaper: false,
+  twoPaperEnable: false,
 };
 
 // const examTaskDetailItem = {
@@ -260,7 +260,7 @@ export default {
           uuid: randomCode(32),
           review: this.examRule.review,
           customCard: this.examRule.customCard,
-          submitTwoPaper: this.examRule.submitTwoPaper,
+          twoPaperEnable: this.examRule.twoPaperEnable,
         },
         infoExamTaskDetail: [],
         infoPrintTask: { ...initPrintTask },

+ 2 - 2
src/modules/exam/components/createExamAndPrintTask/InfoExamTask.vue

@@ -856,7 +856,7 @@ export default {
         this.examTask.review = examPrintPlan.review;
         this.examTask.includePaper =
           examPrintPlan.printContent.indexOf("PAPER") !== -1;
-        this.examTask.submitTwoPaper = examPrintPlan.submitTwoPaper;
+        this.examTask.twoPaperEnable = examPrintPlan.twoPaperEnable;
         this.updateExamTaskDetail();
 
         this.updateTaskInfo({
@@ -1020,7 +1020,7 @@ export default {
 
       this.updateExamTaskDetail();
 
-      if (this.examTask.submitTwoPaper && this.paperAttachments.length < 2) {
+      if (this.examTask.twoPaperEnable && this.paperAttachments.length < 2) {
         this.$message.error("一个命题任务至少交AB两套试卷");
         return Promise.reject();
       }

+ 1 - 1
src/modules/exam/components/taskApply/ModifyTaskApply.vue

@@ -132,7 +132,7 @@ const initTaskApply = {
   includePaper: false,
   customCard: false,
   // 一个命题任务至少交AB两套试卷
-  submitTwoPaper: false,
+  twoPaperEnable: false,
   // 作废
   taskStatus: "",
   cancelRemark: "",

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

@@ -1094,7 +1094,7 @@ export default {
       this.updateExamTaskDetail();
 
       if (
-        this.curTaskApply.submitTwoPaper &&
+        this.curTaskApply.twoPaperEnable &&
         this.paperAttachments.length < 2
       ) {
         this.$message.error("一个命题任务至少交AB两套试卷");