|
@@ -26,7 +26,11 @@
|
|
:disabled="!pages.length"
|
|
:disabled="!pages.length"
|
|
>预览</el-button
|
|
>预览</el-button
|
|
>
|
|
>
|
|
- <save-page @confirm="toSave" ref="SavePage"></save-page>
|
|
|
|
|
|
+ <save-page
|
|
|
|
+ @confirm="toSave"
|
|
|
|
+ :disabled="!canSave"
|
|
|
|
+ ref="SavePage"
|
|
|
|
+ ></save-page>
|
|
<el-button type="primary" @click="toSubmit">提交</el-button>
|
|
<el-button type="primary" @click="toSubmit">提交</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="control-left">
|
|
<div class="control-left">
|
|
@@ -308,7 +312,8 @@ export default {
|
|
TOPIC_LIST,
|
|
TOPIC_LIST,
|
|
steps: ["添加标题", "基本设置", "试题配置", "设置阅卷参数", "预览生成"],
|
|
steps: ["添加标题", "基本设置", "试题配置", "设置阅卷参数", "预览生成"],
|
|
columnWidth: 0,
|
|
columnWidth: 0,
|
|
- cardPreviewUrl: ""
|
|
|
|
|
|
+ cardPreviewUrl: "",
|
|
|
|
+ canSave: true
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -360,6 +365,7 @@ export default {
|
|
async getCardTempDetail() {
|
|
async getCardTempDetail() {
|
|
const detData = await cardDetailEdit(this.cardId);
|
|
const detData = await cardDetailEdit(this.cardId);
|
|
const tempData = await cardTempDetail(this.cardId);
|
|
const tempData = await cardTempDetail(this.cardId);
|
|
|
|
+ this.canSave = !detData.operateStatus;
|
|
this.prepareTcPCard = Object.assign(this.prepareTcPCard, detData);
|
|
this.prepareTcPCard = Object.assign(this.prepareTcPCard, detData);
|
|
|
|
|
|
// 可能存在题卡内容没有记录的情况
|
|
// 可能存在题卡内容没有记录的情况
|
|
@@ -541,8 +547,9 @@ export default {
|
|
})
|
|
})
|
|
.then(async () => {
|
|
.then(async () => {
|
|
const result = await this.save();
|
|
const result = await this.save();
|
|
- if (result)
|
|
|
|
|
|
+ if (result) {
|
|
this.cardPreviewUrl = `/#/card/preview/${this.cardId}/frame`;
|
|
this.cardPreviewUrl = `/#/card/preview/${this.cardId}/frame`;
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch(() => {});
|
|
.catch(() => {});
|
|
},
|
|
},
|
|
@@ -553,6 +560,7 @@ export default {
|
|
).catch(() => {});
|
|
).catch(() => {});
|
|
this.cardPreviewUrl = "";
|
|
this.cardPreviewUrl = "";
|
|
if (result) {
|
|
if (result) {
|
|
|
|
+ this.canSave = false;
|
|
this.$message.success("提交成功!");
|
|
this.$message.success("提交成功!");
|
|
} else {
|
|
} else {
|
|
this.$message.error("提交失败,请重新尝试!");
|
|
this.$message.error("提交失败,请重新尝试!");
|