瀏覽代碼

补上字段

谢杰标 2 年之前
父節點
當前提交
8aab696cb9

+ 19 - 4
src/views/resource/bankManagement/testPaperManagement/addPaper/topicAddPaper/index.vue

@@ -371,7 +371,17 @@
                 size="mini"
               ></el-input-number>
             </div>
-            <Paper-sort ref="papersort" v-if="examsType == 2"></Paper-sort>
+            <div class="margin_bs" v-if="examsType === 2">
+              模拟做题:
+              <el-radio-group v-model="simulateStatus">
+                <el-radio :label="1">开启</el-radio>
+                <el-radio :label="0">关闭</el-radio>
+              </el-radio-group>
+            </div>
+            <Paper-sort
+              ref="papersort"
+              v-if="examsType == 2 && simulateStatus == 1"
+            ></Paper-sort>
             <div class="margin_bs" v-if="examsType === 2">
               答卷时长:
               <el-radio-group v-model="djTimeType">
@@ -957,7 +967,8 @@ export default {
       localStart: false, //定时器是否已经开始
       pageId: "", //试卷ID
       uploadStatus: false, //是否同步预览
-      simulateConfigJson: '', //随机抽题目分组排序
+      simulateConfigJson: "", //随机抽题目分组排序
+      simulateStatus: 1,
     };
   },
   computed: {
@@ -1114,7 +1125,8 @@ export default {
         this.djNum = res.data.answerNum;
         this.examsType = res.data.doType;
         this.passScore = res.data.passScore;
-        this.simulateConfigJson = res.data.simulateConfigJson || '';
+        this.simulateStatus = res.data.simulateStatus;
+        this.simulateConfigJson = res.data.simulateConfigJson || "";
       });
     },
     // --------------------------分割线---------------------------
@@ -1708,7 +1720,10 @@ export default {
         passScore: this.passScore,
         doType: this.examsType,
         simulateConfigJson:
-          this.examsType === 2 ? this.$refs["papersort"].form : null,
+          this.examsType === 2 && this.simulateStatus == 1
+            ? this.$refs["papersort"].form
+            : null,
+        simulateStatus: this.simulateStatus,
       };
       if (this.djTimeType === 0) {
         data.answerTime = 0;

+ 14 - 2
src/views/resource/bankManagement/testPaperManagement/editPaper/topicEditPaper/index.vue

@@ -374,9 +374,16 @@
                 size="mini"
               ></el-input-number>
             </div>
+            <div class="margin_bs" v-if="examsType === 2">
+              模拟做题:
+              <el-radio-group v-model="simulateStatus">
+                <el-radio :label="1">开启</el-radio>
+                <el-radio :label="0">关闭</el-radio>
+              </el-radio-group>
+            </div>
             <Paper-sort
               ref="papersort"
-              v-if="examsType == 2"
+              v-if="examsType == 2 && simulateStatus == 1"
               :formData="simulateConfigJson"
             ></Paper-sort>
             <div class="margin_bs" v-if="examsType === 2">
@@ -973,6 +980,7 @@ export default {
       pageId: "", //试卷ID
       uploadStatus: false, //是否同步预览
       simulateConfigJson: "",
+      simulateStatus: 1,
     };
   },
   computed: {
@@ -1129,6 +1137,7 @@ export default {
         this.djNum = res.data.answerNum;
         this.examsType = res.data.doType;
         this.passScore = res.data.passScore;
+        this.simulateStatus = res.data.simulateStatus;
         this.simulateConfigJson = res.data.simulateConfigJson || "";
       });
     },
@@ -1759,7 +1768,10 @@ export default {
         passScore: this.passScore,
         doType: this.examsType,
         simulateConfigJson:
-          this.examsType === 2 ? this.$refs["papersort"].form : null,
+          this.examsType === 2 && this.simulateStatus == 1
+            ? this.$refs["papersort"].form
+            : null,
+        simulateStatus: this.simulateStatus,
       };
       if (this.djTimeType === 0) {
         data.answerTime = 0;