Răsfoiți Sursa

aorb bug fix

zhangjie 5 ani în urmă
părinte
comite
4fb825041e

+ 4 - 4
src/components/UploadButton.vue

@@ -113,7 +113,7 @@ export default {
       this.loading = false;
       this.res = {
         success: false,
-        msg: error.message
+        message: error.message
       };
       this.$emit("upload-error", error);
     },
@@ -122,7 +122,7 @@ export default {
       if (response.code === "200") {
         this.res = {
           success: true,
-          msg: "导入成功!"
+          message: "导入成功!"
         };
         this.$emit("upload-success", response);
       } else {
@@ -133,7 +133,7 @@ export default {
       const content = "只支持文件格式为" + this.format.join("/");
       this.res = {
         success: false,
-        msg: content
+        message: content
       };
       this.$emit("upload-error", content);
     },
@@ -142,7 +142,7 @@ export default {
         "文件大小不能超过" + Math.floor(this.maxSize / (1024 * 1024)) + "M";
       this.res = {
         success: false,
-        msg: content
+        message: content
       };
       this.$emit("upload-error", content);
     }

+ 4 - 7
src/modules/card/components/PagePropEdit.vue

@@ -40,10 +40,7 @@
         </el-button>
       </el-form-item>
       <el-form-item label-width="0px">
-        <el-checkbox
-          v-model="form.aOrB"
-          @change="configChange"
-          :disabled="aOrBDisabled"
+        <el-checkbox v-model="form.aOrB" @change="configChange"
           >启用A/B卷</el-checkbox
         >
       </el-form-item>
@@ -106,10 +103,10 @@ export default {
     ...mapState("card", ["curPageNo", "pages", "cardConfig", "topicNos"]),
     curPage() {
       return this.pages[this.curPageNo];
-    },
-    aOrBDisabled() {
-      return this.cardConfig.hasOwnProperty("aOrBSystem");
     }
+    // aOrBDisabled() {
+    //   return this.cardConfig.hasOwnProperty("aOrBSystem");
+    // }
   },
   watch: {
     cardConfig: {

+ 4 - 1
src/modules/card/views/CardDesign.vue

@@ -381,7 +381,10 @@ export default {
         this.initTopicNos();
       } else {
         // 没有题卡内容时,直接创建新的内容
-        this.setCardConfig({ cardName: detData.title });
+        this.setCardConfig({
+          cardName: detData.title,
+          aOrB: detData.enablePaperType === "A,B"
+        });
         this.initPageData();
       }
     },

+ 4 - 4
src/modules/exam-center/components/UploadFileView.vue

@@ -133,7 +133,7 @@ export default {
       this.loading = false;
       this.res = {
         success: false,
-        msg: error.message
+        message: error.message
       };
       this.$emit("upload-error", error);
     },
@@ -143,7 +143,7 @@ export default {
       if (response.code === "200") {
         this.res = {
           success: true,
-          msg: "导入成功!"
+          message: "导入成功!"
         };
         this.$emit("upload-success", response);
       } else {
@@ -154,7 +154,7 @@ export default {
       const content = "只支持文件格式为" + this.format.join("/");
       this.res = {
         success: false,
-        msg: content
+        message: content
       };
       this.loading = false;
       this.$emit("upload-error", this.res);
@@ -164,7 +164,7 @@ export default {
         "文件大小不能超过" + Math.floor(this.maxSize / 1024) + "M";
       this.res = {
         success: false,
-        msg: content
+        message: content
       };
       this.loading = false;
       this.$emit("upload-error", this.res);

+ 1 - 1
src/modules/exam-center/components/UploadPaperDialog.vue

@@ -65,7 +65,7 @@ export default {
     uplaodError(errorData) {
       this.$notify.error({
         title: "错误提示",
-        message: errorData.message || errorData.msg
+        message: errorData.message
       });
     },
     uploadSuccess(res) {

+ 3 - 1
src/modules/exam-center/components/UploadSamplePaperDialog.vue

@@ -136,8 +136,10 @@ export default {
       const datas = {
         tcPCard: this.modalForm
       };
-      if (this.data.taskId && this.data.cardSource === "2")
+      if (this.data.taskId && this.data.cardSource === "2") {
         datas.tcPExamTaskDetail = this.data;
+        datas.tcPCard.enablePaperType = this.data.enablePaperType;
+      }
 
       const res = await createCard(datas).catch(() => {});
       this.isSubmit = false;