From d87726d60385c1f3c635d93d43340fa83cb55f27 Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期六, 05 八月 2023 21:20:15 +0800 Subject: [PATCH] 模板流程表单保存失败关闭禁用功能重新提交 --- Source/UBCS-WEB/src/components/template/FlowPath.vue | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Source/UBCS-WEB/src/components/template/FlowPath.vue b/Source/UBCS-WEB/src/components/template/FlowPath.vue index f3d30c7..72d9567 100644 --- a/Source/UBCS-WEB/src/components/template/FlowPath.vue +++ b/Source/UBCS-WEB/src/components/template/FlowPath.vue @@ -171,17 +171,19 @@ // 鏂板 async handleSave(row, done, loading) { console.log(row) - const response = await flowpathSave({ ...row, ...{ templateId: this.code } }) - if (response.status === 200) { - loading() + await flowpathSave({ ...row, ...{ templateId: this.code } }).then(response=>{ + if (response.status === 200) { console.log(response) this.$message({ - type: 'success', - message: '鏂板鏁版嵁鎴愬姛锛�' + type: 'success', + message: '鏂板鏁版嵁鎴愬姛锛�' }) done() this.getDataList() - } + } + }).catch(res=>{ + loading() + }) }, // 缂栬緫 @@ -189,16 +191,19 @@ console.log(row) const { modelName, modelKey, buttonTypeKey, id ,description} = row let param = { modelName, modelKey, buttonTypeKey, id,description } - const response = await flowpathSave({ ...param, ...{ templateId: this.code } }) - if (response.status === 200) { - loading() + await flowpathSave({ ...param, ...{ templateId: this.code } }).then(response=>{ + if (response.status === 200) { this.$message({ - type: 'success', - message: '淇敼鏁版嵁鎴愬姛锛�' + type: 'success', + message: '淇敼鏁版嵁鎴愬姛锛�' }) done() this.getDataList() - } + } + }).catch(()=>{ + //loading鎺у埗绂佺敤 榛樿鏄紑鍚� + loading() + }) }, // 鍒犻櫎鍗曟潯 -- Gitblit v1.9.3