|
@@ -506,11 +506,22 @@ export default {
|
|
|
this.paperAttachments[aind].createId = card.createId;
|
|
|
}
|
|
|
},
|
|
|
- toCreateCard(attachment) {
|
|
|
+ async toCreateCard(attachment) {
|
|
|
if (!this.curTaskApply.cardRuleId) {
|
|
|
this.$message.error("题卡规则缺失!");
|
|
|
return;
|
|
|
}
|
|
|
+ const res = await this.$prompt("请输入题卡名称?", "提示", {
|
|
|
+ type: "warning",
|
|
|
+ showInput: true,
|
|
|
+ inputPlaceholder: "请输入题卡名称",
|
|
|
+ inputValidator: (val) => {
|
|
|
+ if (!val) return "请输入题卡名称!";
|
|
|
+ if (val.length > 50) return "题卡名称不得超过50个字符!";
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ }).catch(() => {});
|
|
|
+ if (!res || res.action !== "confirm") return;
|
|
|
this.curAttachment = { ...attachment };
|
|
|
// 这里只允许新建标准专卡
|
|
|
this.$ls.set("prepareTcPCard", {
|
|
@@ -518,6 +529,7 @@ export default {
|
|
|
courseName: this.curTaskApply.courseName,
|
|
|
schoolName: this.$ls.get("schoolName"),
|
|
|
makeMethod: "SELF",
|
|
|
+ cardName: res.value,
|
|
|
cardRuleId: this.curTaskApply.cardRuleId,
|
|
|
type: "CUSTOM",
|
|
|
createMethod: "STANDARD",
|