Browse Source

fix: bug fix

zhangjie 7 months ago
parent
commit
8795c58169
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/modules/card/views/CardEdit.vue

+ 3 - 2
src/modules/card/views/CardEdit.vue

@@ -182,7 +182,7 @@ export default {
           },
         };
         config.fillNumber = data.examNumberDigit;
-        config.aOrB = this.prepareTcPCard.openAb;
+        config.aOrB = Boolean(this.prepareTcPCard.openAb);
         config.requiredFields = JSON.parse(config.requiredFields);
         config.extendFields = JSON.parse(config.extendFields);
         config.relationList = JSON.parse(config.relationList || "[]");
@@ -236,6 +236,8 @@ export default {
         ...this.prepareTcPCard,
         title: this.cardName,
       };
+      // openAb以参数信息为主
+      cardInfo.openAb = data.openAb;
       if (this.cardId) cardInfo.id = this.cardId;
       return cardInfo;
     },
@@ -302,7 +304,6 @@ export default {
       const datas = this.$refs.CardDesign.getCardData(htmlContent, model);
       const cardInfo = this.getCardInfo(datas);
       cardInfo.status = "SUBMIT";
-
       const result = await saveCard(cardInfo, this.getRequestConfig()).catch(
         () => {}
       );