Ver Fonte

bug fix

刘洋 há 2 anos atrás
pai
commit
92c63a776d

+ 10 - 4
src/modules/questions/views/AddPaperSelect.vue

@@ -260,6 +260,7 @@ export default {
   watch: {
     "form.paperStructId"() {
       this.structChange();
+      this.changePaperType(true);
     },
     // "form.paperStructType"() {
     //   this.form.paperStructId = "";
@@ -412,10 +413,15 @@ export default {
           }
         });
     },
-    changePaperType() {
-      this.tableData2 = [];
-      this.multipleSelection = [];
-      this.getTable2();
+    changePaperType(bool) {
+      if (bool === true) {
+        this.handleSelectionChange([]);
+        this.$refs.table2.clearSelection();
+      } else {
+        this.tableData2 = [];
+        this.multipleSelection = [];
+        this.getTable2();
+      }
     },
     getTable3() {
       let paperIds = this.multipleSelection.map((item) => item.id);

+ 3 - 1
src/modules/questions/views/ExtractPaperInfo.vue

@@ -299,7 +299,7 @@
                     class="label"
                   >
                     难度:<span style="color: #409eff; font-weight: bold">{{
-                      curStructInfo.difficulty
+                      randomTplInfo.difficultyDegree
                     }}</span>
                   </p>
                 </el-form-item>
@@ -398,6 +398,7 @@ export default {
           { label: "中", prop: "mediumInfo", minWidth: "80" },
           { label: "易", prop: "easyInfo", minWidth: "80" },
         ],
+        difficultyDegree: "",
       },
       curStructInfo: {
         difficulty: "",
@@ -498,6 +499,7 @@ export default {
             })
             .then((res) => {
               this.randomTplInfo.tableData = res.data.structQuestionInfo || [];
+              this.randomTplInfo.difficultyDegree = res.data.difficultyDegree;
             });
         });
       }