Jelajahi Sumber

修复编辑试卷无法提交漏洞

Tang 2 tahun lalu
induk
melakukan
8801dd7106

+ 7 - 4
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -1767,12 +1767,15 @@ export default {
         status: 1,
         passScore: this.passScore,
         doType: this.examsType,
-        simulateConfigJson:
-          this.examsType === 2 && this.simulateStatus == 1
-            ? this.$refs["papersort"].form
-            : null,
         simulateStatus: this.simulateStatus,
       };
+      if (this.examsType === 2 && this.simulateStatus == 1) {
+        if (this.$refs["papersort"] && this.$refs["papersort"].form) {
+          data.simulateConfigJson = this.$refs["papersort"].form;
+        }
+      } else {
+        data.simulateConfigJson = null;
+      }
       if (this.djTimeType === 0) {
         data.answerTime = 0;
       } else {