zhangjie 1 рік тому
батько
коміт
d7891a1e22

+ 2 - 2
src/modules/base/components/ResetPwd.vue

@@ -190,13 +190,13 @@ export default {
     },
   },
   methods: {
-    initData(val) {
+    initData() {
       this.modalForm = { ...initModalForm };
       this.modalForm.oldPassword = this.userInfo.password || "";
       this.modalForm.id = this.userInfo.userId;
     },
     visibleChange() {
-      this.initData(this.instance);
+      this.initData();
     },
     cancel() {
       this.modalIsShow = false;

+ 8 - 4
src/modules/mark/components/markParam/MarkParamStructure.vue

@@ -288,9 +288,9 @@ export default {
     getNewRow(val) {
       return this.$objAssign(
         {
-          id: null,
+          id: this.$randomCode(),
           key: this.$randomCode(),
-          mainId: null,
+          mainId: this.$randomCode(),
           objective: true,
           mainNumber: 1,
           subNumber: 1,
@@ -333,7 +333,7 @@ export default {
     },
     toAddMain(row) {
       const startPos = this.tableData.findIndex((item) => item.id === row.id);
-      let nextMainStartPos = this.getNextMainStartPos(startPos, row.mainId);
+      const nextMainStartPos = this.getNextMainStartPos(startPos, row.mainId);
       this.tableData.splice(
         nextMainStartPos,
         0,
@@ -403,7 +403,7 @@ export default {
     },
     qTypeChange(row) {
       const curQt = this.QUESTION_TYPE_LIST.find(
-        (item) => item.code === row.type
+        (item) => item.code === row.questionType
       );
       if (!curQt) return;
 
@@ -413,6 +413,10 @@ export default {
           item.questionType = curQt.code;
           item.objective = curQt.qType === "objective";
           item.optionCount = curQt.optionCount;
+          if (item.objective) {
+            item.intervalScore = undefined;
+            this.intervalScorePerTopic[row.mainId] = undefined;
+          }
         });
     },
     optionCountChange(row) {