|
@@ -2,11 +2,11 @@
|
|
|
<div class="card-design">
|
|
|
<div class="design-top">
|
|
|
<div class="design-top-logo">
|
|
|
- <h1><i class="icon icon-back" @click="toExit"></i>答题卡制作</h1>
|
|
|
+ <h1>答题卡制作</h1>
|
|
|
</div>
|
|
|
- <div class="design-top-info">
|
|
|
+ <!-- <div class="design-top-info">
|
|
|
<div class="info-help"><i class="icon icon-help"></i>帮助</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
|
|
|
<div class="design-main">
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
ELEMENT_LIST,
|
|
|
TOPIC_LIST
|
|
|
} from "../elementModel";
|
|
|
-import { transformField, getAOrBSystem, CARD_VERSION } from "../enumerate";
|
|
|
+import { CARD_VERSION } from "../enumerate";
|
|
|
// import CardConfigPropEdit from "../components/CardConfigPropEdit";
|
|
|
import TopicElementEdit from "../components/TopicElementEdit";
|
|
|
import TopicElementPreview from "../components/TopicElementPreview";
|
|
@@ -320,6 +320,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ if (!this.prepareTcPCard.examTaskId) {
|
|
|
+ this.$message.error("找不到命题任务,请退出题卡制作!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
this.initCard();
|
|
|
this.registWindowSubmit();
|
|
|
},
|
|
@@ -354,11 +358,11 @@ export default {
|
|
|
}
|
|
|
this.addWatch();
|
|
|
},
|
|
|
- async getCardTempDetail(content) {
|
|
|
+ async getCardTempDetail() {
|
|
|
const detData = await cardDetailEdit(this.cardId);
|
|
|
const tempData = await cardTempDetail(this.cardId);
|
|
|
- this.canSave = !detData.operateStatus;
|
|
|
- this.prepareTcPCard = Object.assign(this.prepareTcPCard, detData);
|
|
|
+ // this.canSave = !detData.operateStatus;
|
|
|
+ // this.prepareTcPCard = Object.assign(this.prepareTcPCard, detData);
|
|
|
|
|
|
// 可能存在题卡内容没有记录的情况
|
|
|
if (tempData) {
|
|
@@ -389,22 +393,24 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
async getCardConfig() {
|
|
|
- const data = await cardConfigInfos();
|
|
|
+ const data = await cardConfigInfos(this.prepareTcPCard.cardRuleId);
|
|
|
if (!data) {
|
|
|
- this.$message.error("请先配置题卡规则!");
|
|
|
+ this.$message.error("找不到题卡规则!");
|
|
|
return;
|
|
|
}
|
|
|
- const aOrBSystem = getAOrBSystem(this.prepareTcPCard);
|
|
|
let config = {
|
|
|
- ...transformField(data),
|
|
|
- pageSize: "A3",
|
|
|
- columnNumber: 2,
|
|
|
- columnGap: 20,
|
|
|
- showForbidArea: true,
|
|
|
- cardName: ""
|
|
|
+ ...data,
|
|
|
+ ...{
|
|
|
+ pageSize: "A3",
|
|
|
+ columnNumber: 2,
|
|
|
+ columnGap: 20,
|
|
|
+ showForbidArea: true,
|
|
|
+ cardName: ""
|
|
|
+ }
|
|
|
};
|
|
|
- if (aOrBSystem !== null) config.aOrBSystem = aOrBSystem;
|
|
|
- config.aOrB = !!config["aOrBSystem"];
|
|
|
+ config.aOrB = this.prepareTcPCard["paperType"]
|
|
|
+ ? this.prepareTcPCard.paperType.split(",").length > 1
|
|
|
+ : null;
|
|
|
this.setCardConfig(config);
|
|
|
},
|
|
|
addNewTopic(item) {
|
|
@@ -473,9 +479,9 @@ export default {
|
|
|
// save
|
|
|
getCardData(contentTemp = "", model = "") {
|
|
|
const multiEnablePaperType =
|
|
|
- this.prepareTcPCard["enablePaperType"] &&
|
|
|
- this.prepareTcPCard["enablePaperType"].split(",").length > 1
|
|
|
- ? this.prepareTcPCard["enablePaperType"]
|
|
|
+ this.prepareTcPCard["paperType"] &&
|
|
|
+ this.prepareTcPCard["paperType"].split(",").length > 1
|
|
|
+ ? this.prepareTcPCard["paperType"]
|
|
|
: "";
|
|
|
const tcPCard = this.$objAssign(
|
|
|
{
|