Эх сурвалжийг харах

Merge branch 'dev_1.2.0' of http://git.qmth.com.cn/union-question/union-question-web into dev_1.2.0

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

+ 1 - 1
src/modules/questions/constants/constants.js

@@ -14,7 +14,7 @@ export const QUESTION_TYPES = [
   { value: "BOOL_ANSWER_QUESTION", label: "判断" },
   { value: "FILL_BLANK_QUESTION", label: "填空" },
   { value: "TEXT_ANSWER_QUESTION", label: "问答" },
-  { value: "READING_COMPREHENSION", label: "普通阅读" },
+  { value: "READING_COMPREHENSION", label: "阅读理解" },
   { value: "LISTENING_QUESTION", label: "听力" },
   { value: "CLOZE", label: "完形填空" },
   { value: "PARAGRAPH_MATCHING", label: "段落匹配" },

+ 13 - 9
src/modules/questions/views/EditPaper.vue

@@ -1514,7 +1514,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetailUnit/sub/" +
@@ -1531,9 +1531,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }
@@ -1570,7 +1569,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetailUnit/" +
@@ -1587,9 +1586,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }
@@ -1625,7 +1623,7 @@ export default {
         callback: (action) => {
           if (action == "confirm") {
             this.loading = true;
-            this.$http
+            this.$httpWithMsg
               .put(
                 QUESTION_API +
                   "/paperDetail/" +
@@ -1642,9 +1640,8 @@ export default {
                   message: vectorStr + "成功",
                   type: "success",
                 });
-                this.loading = false;
               })
-              .catch(() => {
+              .finally(() => {
                 this.loading = false;
               });
           }
@@ -2227,6 +2224,13 @@ export default {
     },
     //新增选项
     addQuesOption() {
+      if (this.quesModel.quesOptions.length == 20) {
+        this.$notify({
+          message: "选项最多20个",
+          type: "error",
+        });
+        return;
+      }
       this.quesModel.quesOptions.push({
         number: "",
         optionBody: "",