diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step1.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step1.vue index 224b78ed4..49c7200d4 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step1.vue @@ -580,7 +580,6 @@ export default { queryTaskFirst({ bpnId: this.$route.query.bpnId }).then(res => { - debugger let obj = JSON.parse(res.mes) let mes = {} if(obj.json !== undefined){ @@ -805,6 +804,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) @@ -816,11 +816,11 @@ export default { commentInfo: this.commentInfo })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, // 提交按钮 @@ -839,6 +839,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) @@ -864,8 +865,13 @@ export default { } this.$router.push("/processCenter"); } + }).finally(() => { + this.saveLoading = false this.isSubmit = false }) + }).catch(() => { + this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请完成流程信息的人员选择') diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step2.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step2.vue index 8e7e65447..8425c2bf7 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step2.vue @@ -208,7 +208,7 @@ show-submit show-back backBTNTexts="不涉及" - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" :submitLoading="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" @@ -380,7 +380,7 @@ export default { } this.$refs['rh_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) @@ -390,8 +390,9 @@ export default { this.$message.success('退回成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -417,6 +418,7 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false }); } diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step3.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step3.vue index 082d2b38d..45a3da2c0 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step3.vue @@ -467,6 +467,7 @@ export default { // 保存按钮 handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -477,11 +478,11 @@ export default { commentStep3: this.commentStep3 })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(e => { this.saveLoading = false + this.isSubmit = false }) }, // 提交按钮 @@ -496,6 +497,7 @@ export default { this.$refs['rh_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) @@ -505,8 +507,10 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(e => { + this.saveLoading = false this.isSubmit = false - }); + }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step4.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step4.vue index 4a358d522..5e28e9ced 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step4.vue @@ -228,7 +228,7 @@ show-back backBTNTexts="驳回" :submitLoading="isSubmit" - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" > @@ -373,7 +373,7 @@ export default { } this.$refs['rh_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) @@ -383,8 +383,9 @@ export default { this.$message.success('退回成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -412,8 +413,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + }) } }) }, diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step5.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step5.vue index 73c8fbfc4..ab06a7f7c 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step5.vue @@ -722,6 +722,7 @@ export default { // 保存按钮 handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -730,10 +731,10 @@ export default { commentStep5: this.commentStep5 })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { + this.isSubmit = false this.saveLoading = false }) }, @@ -748,6 +749,7 @@ export default { this.$refs['rh_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) @@ -757,8 +759,10 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + this.saveLoading = false + }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step6.vue b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step6.vue index 40b039b2c..d328e9133 100644 --- a/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzhHd-rh/step6.vue @@ -226,7 +226,7 @@ v-if="taskInfo !== '标准法规工程师汇总修订完毕'" show-submit show-back - :isSubmitBack="isBack" + :isSubmitBack="isSubmit" :submitLoading="isSubmit" @back="handleSubmitNo" @submit="handleSubmit" @@ -396,7 +396,7 @@ export default { } this.$refs['rh_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) @@ -406,8 +406,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } - this.isBack = false - }); + }).finally(() => { + this.isSubmit = false + }) } }) } @@ -446,8 +447,9 @@ export default { this.$message.success('提交成功') this.$router.push("/processCenter"); } + }).finally(() => { this.isSubmit = false - }); + }) } }) }