|
|
|
@ -43,6 +43,7 @@ export default { |
|
|
|
|
// modal(对话框)确定按钮 loading |
|
|
|
|
confirmLoading: false, |
|
|
|
|
templateList: [], |
|
|
|
|
type: 0, |
|
|
|
|
// 当前表单元素 |
|
|
|
|
form: { |
|
|
|
|
template_id: '', |
|
|
|
@ -54,7 +55,8 @@ export default { |
|
|
|
|
/** |
|
|
|
|
* 显示对话框 |
|
|
|
|
*/ |
|
|
|
|
show (appid) { |
|
|
|
|
show (appid, type) { |
|
|
|
|
this.type = type |
|
|
|
|
this.form.appid = appid |
|
|
|
|
this.visible = true |
|
|
|
|
this.getTemplatelist() |
|
|
|
@ -78,7 +80,8 @@ export default { |
|
|
|
|
*/ |
|
|
|
|
handleSubmit (values) { |
|
|
|
|
this.confirmLoading = true |
|
|
|
|
Api.commit(this.form) |
|
|
|
|
if (this.type === 0) { |
|
|
|
|
Api.commit(this.form) |
|
|
|
|
.then((result) => { |
|
|
|
|
// 显示成功提示 |
|
|
|
|
this.$message.success(result.message, 1.2) |
|
|
|
@ -90,6 +93,20 @@ export default { |
|
|
|
|
.finally((result) => { |
|
|
|
|
this.confirmLoading = false |
|
|
|
|
}) |
|
|
|
|
} else { |
|
|
|
|
Api.commitOne(this.form) |
|
|
|
|
.then((result) => { |
|
|
|
|
// 显示成功提示 |
|
|
|
|
this.$message.success(result.message, 1.2) |
|
|
|
|
// 关闭对话框 |
|
|
|
|
this.handleCancel() |
|
|
|
|
// 通知父端组件提交完成了 |
|
|
|
|
this.$emit('handleSubmit', values) |
|
|
|
|
}) |
|
|
|
|
.finally((result) => { |
|
|
|
|
this.confirmLoading = false |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|