zhangjie 2 жил өмнө
parent
commit
ca59511948

+ 18 - 15
src/modules/questions/views/InsertBluePaperStructureInfo.vue

@@ -410,6 +410,7 @@ export default {
                 .then((response) => {
                   this.properties = response.data;
                   this.init();
+                  this.initCoursePropertyQuestionCountMap();
                 });
             } else {
               //修改
@@ -425,24 +426,11 @@ export default {
               this.noPublicDifficultyCount =
                 paperDetailStruct.noPublicDifficultyCount;
               this.initQuesNameList();
+              this.initCoursePropertyQuestionCountMap();
             }
           }
         }
       }
-
-      const coursePropertyQuestionCountMap = {};
-      for (
-        let i = 0, len = this.coursePropertyNumberDtos.length;
-        i < len;
-        i++
-      ) {
-        for (let p = 0; p < 2; p++) {
-          for (let d = 1; d < 4; d++) {
-            coursePropertyQuestionCountMap[`${i}_${p}_${d}`] = null;
-          }
-        }
-      }
-      this.coursePropertyQuestionCountMap = coursePropertyQuestionCountMap;
     },
     //初始化方法
     init() {
@@ -478,6 +466,21 @@ export default {
         i = i + 1;
       }
     },
+    initCoursePropertyQuestionCountMap() {
+      const coursePropertyQuestionCountMap = {};
+      for (
+        let i = 0, len = this.coursePropertyNumberDtos.length;
+        i < len;
+        i++
+      ) {
+        for (let p = 0; p < 2; p++) {
+          for (let d = 1; d < 4; d++) {
+            coursePropertyQuestionCountMap[`${i}_${p}_${d}`] = 0;
+          }
+        }
+      }
+      this.coursePropertyQuestionCountMap = coursePropertyQuestionCountMap;
+    },
     //初始化来源大题名称
     initQuesNameList() {
       var url =
@@ -798,7 +801,7 @@ export default {
         .get(QUESTION_API + "/question/count", { params: this.question })
         .then((response) => {
           const k = `${rindex}_${publicity}_${difficulty}`;
-          this.coursePropertyQuestionCountMap[k] = response.data;
+          this.$set(this.coursePropertyQuestionCountMap, k, response.data);
           // console.log(`${k}:`, response.data);
         });
     },

+ 1 - 0
src/modules/questions/views/user.vue

@@ -854,6 +854,7 @@ export default {
     resetEcsFormSearch() {
       this.searchForm = Object.assign(this.searchForm, {
         roleId: "",
+        courseId: "",
         loginName: "",
         name: "",
         enable: "",