|
@@ -31,7 +31,9 @@
|
|
|
:disabled="!canSave"
|
|
|
ref="SavePage"
|
|
|
></save-page>
|
|
|
- <el-button type="primary" @click="toSubmit">提交</el-button>
|
|
|
+ <el-button type="primary" @click="toSubmit" :loading="isSubmit"
|
|
|
+ >提交</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="control-left">
|
|
|
<el-button
|
|
@@ -313,6 +315,7 @@ export default {
|
|
|
steps: ["添加标题", "基本设置", "试题配置", "设置阅卷参数", "预览生成"],
|
|
|
columnWidth: 0,
|
|
|
cardPreviewUrl: "",
|
|
|
+ isSubmit: false,
|
|
|
canSave: true
|
|
|
};
|
|
|
},
|
|
@@ -540,16 +543,16 @@ export default {
|
|
|
if (result) this.$message.success("保存成功!");
|
|
|
},
|
|
|
toSubmit() {
|
|
|
+ if (this.isSubmit) return;
|
|
|
this.$confirm("确定要提交当前题卡吗?", "提示", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
})
|
|
|
- .then(async () => {
|
|
|
- const result = await this.save();
|
|
|
- if (result) {
|
|
|
- this.cardPreviewUrl = `/#/card/preview/${this.cardId}/frame`;
|
|
|
- }
|
|
|
+ .then(() => {
|
|
|
+ window.cardData = { cardConfig: this.cardConfig, pages: this.pages };
|
|
|
+ this.isSubmit = true;
|
|
|
+ this.cardPreviewUrl = `/#/card/preview/${this.cardId}/frame`;
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
},
|
|
@@ -559,6 +562,8 @@ export default {
|
|
|
this.getCardData(cardContentTemp)
|
|
|
).catch(() => {});
|
|
|
this.cardPreviewUrl = "";
|
|
|
+ this.isSubmit = false;
|
|
|
+ window.cardData = null;
|
|
|
if (result) {
|
|
|
this.canSave = false;
|
|
|
this.$message.success("提交成功!");
|