diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue index f28c9e77d..8028ecbfb 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step1.vue @@ -713,6 +713,7 @@ export default { /** 保存按钮*/ handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('id', this.bpnId || '') _formData.append('createUser', this.$store.getters.userInfo.userId) @@ -725,11 +726,11 @@ export default { })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, /** 提交按钮*/ @@ -748,6 +749,7 @@ export default { this.$refs['roleForm'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true let paramsInfo = new FormData() // paramsInfo.append('id', this.bpnId || '') paramsInfo.append('createUser', this.$store.getters.userInfo.userId) @@ -774,7 +776,11 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false + this.saveLoading = false }) + }).catch(e => { + this.saveLoading = false + this.isSubmit = false }) } else { this.$message.warning('请完成流程信息的人员选择') diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue index 7e677b171..51fa53458 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step2.vue @@ -205,7 +205,7 @@ show-back backBTNTexts="不涉及" :submitLoading="isSubmit" - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" > @@ -341,7 +341,7 @@ export default { } this.$refs['ch_pageData'].validate((valid) => { if (valid) { - this.isBack = true + this.isSubmit = true const params = new FormData(); params.set('json', JSON.stringify(json)) params.set('userId', this.$store.getters.userInfo.userId) @@ -351,8 +351,9 @@ export default { this.$message.success('退回成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -379,8 +380,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue index 07b23a91c..82b8d9243 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step3.vue @@ -397,6 +397,7 @@ export default { // 保存按钮 handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -407,11 +408,11 @@ export default { ch_pageData: this.ch_pageData, })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, // 提交按钮 @@ -426,6 +427,7 @@ export default { this.$refs['ch_pageData'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true const params = new FormData(); params.set('json', JSON.stringify(json)) params.set('userId', this.$store.getters.userInfo.userId) @@ -435,8 +437,10 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { + this.saveLoading = false this.isSubmit = false - }); + }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue index 25847e144..865e6d01d 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step4.vue @@ -209,7 +209,7 @@ show-submit show-back :submitLoading="isSubmit" - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" > @@ -323,7 +323,7 @@ export default { } this.$refs['ch_pageData'].validate((valid) => { if (valid) { - this.isBack = true + this.isSubmit = true const params = new FormData(); params.set('json', JSON.stringify(json)) params.set('userId', this.$store.getters.userInfo.userId) @@ -333,8 +333,9 @@ export default { this.$message.success('退回成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -361,8 +362,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + }) } }) }, diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue index a833498e7..29d4b6158 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step5.vue @@ -502,6 +502,7 @@ export default { // 保存按钮 handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -510,11 +511,11 @@ export default { commentStep5: this.commentStep5 })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, // 提交按钮 @@ -527,6 +528,7 @@ export default { } this.$refs['ch_pageData'].validate((valid) => { if (valid) { + this.saveLoading = true this.isSubmit = true const params = new FormData(); params.set('json', JSON.stringify(json)) @@ -537,8 +539,10 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { + this.saveLoading = false this.isSubmit = false - }); + }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue index bc24438ee..4aa6c9c39 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHy-ch/step6.vue @@ -212,7 +212,7 @@ v-if="taskInfo !== '标准法规工程师修订完毕'" show-submit show-back - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" :submitLoading="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" @@ -375,7 +375,7 @@ export default { } this.$refs['ch_pageData'].validate((valid) => { if (valid) { - this.isBack = true + this.isSubmit = true const params = new FormData(); params.set('json', JSON.stringify(json)) params.set('userId', this.$store.getters.userInfo.userId) @@ -385,8 +385,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -425,8 +426,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + }) } })