From ebda3b0beae45355385781316a13013e232840e4 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 11:20:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E6=A0=87=E5=87=86?= =?UTF-8?q?=E8=B0=83=E7=A0=94=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzdy/step1.vue | 7 ++++++- .../pages/creatProcess/bzdy/step2.vue | 12 ++++++++++-- .../pages/creatProcess/bzdy/step3.vue | 15 +++++++++++++-- .../pages/creatProcess/bzdy/step4.vue | 10 ++++++++++ .../pages/creatProcess/bzdy/step5.vue | 11 ++++++++++- .../pages/creatProcess/bzdy/step6.vue | 10 ++++++++++ .../pages/creatProcess/bzdy/step7.vue | 5 +++++ .../pages/creatProcess/bzdy/step8.vue | 6 +++++- .../pages/creatProcess/bzdy/step9.vue | 6 +++++- 9 files changed, 74 insertions(+), 8 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue index 880c31566..c1b047266 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step1.vue @@ -542,6 +542,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) @@ -556,8 +557,9 @@ export default { this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, handleSubmit() { @@ -566,6 +568,7 @@ export default { this.$refs['Form'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.$http.post('lawss/activiti/startProcessRollBack', { createUser: this.$store.getters.userInfo.userId, createUserName: this.$store.getters.userInfo.userName, @@ -597,9 +600,11 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.isSubmit = false + this.saveLoading = false this.$message.warning('流程启动失败') } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue index 82015cf43..c824bbae5 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step2.vue @@ -256,6 +256,8 @@ this.drawerModal = true }, checkedRole (data) { + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -270,6 +272,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -324,6 +329,7 @@ }, handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -331,16 +337,17 @@ commentText2: this.commentText2, })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, handleSubmit() { this.$refs['qbkwForm'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true var json = this.json json.commentText = this.commentText2 json.responUserList = this.form.responUserList @@ -355,6 +362,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { return this.$message.warning('请完善基础信息') diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue index db0421945..494e98a73 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step3.vue @@ -328,6 +328,8 @@ this.drawerModal = true }, checkedRole (data) { + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -342,6 +344,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -429,6 +434,7 @@ }, handleSave() { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -437,15 +443,16 @@ commentText3: this.commentText3, })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, // 接受按钮 handleAccept(){ this.isSubmit = true + this.saveLoading = true execTask({ todoId: this.todoId // 当前节点ID }).then(res => { @@ -453,6 +460,8 @@ this.$message.success('接收成功') this.$router.push('/processCenter') } + }).finally(() => { + this.saveLoading = false this.isSubmit = false }) }, @@ -461,6 +470,7 @@ if (valid) { this.json.dyhz = this.form.dyhz this.isSubmit = true + this.saveLoading = true var json = this.json json.commentText = this.commentText3 json.fileId = this.form.fileId @@ -476,6 +486,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { return this.$message.warning('请完善基础信息') diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue index d9066941d..879c08cd3 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step4.vue @@ -210,6 +210,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" @submit="handleSubmit" show-back @back="handleSubmitNo" @@ -304,6 +305,8 @@ this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -318,6 +321,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -355,6 +361,7 @@ }, handleSubmit() { // 同意 this.isSubmit = true + this.saveLoading = true var json = this.json json.actionFlag = 0 json.commentText = this.commentText4 @@ -368,11 +375,13 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { if (this.commentText4) { this.isSubmit = true + this.saveLoading = true var json = this.json json.actionFlag = 1 json.commentText = this.commentText4 @@ -386,6 +395,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输入审批意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step5.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step5.vue index 97226269f..cac9b12f3 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step5.vue @@ -299,6 +299,8 @@ this.drawerModal = true }, checkedRole (data) { + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -313,6 +315,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -387,6 +392,7 @@ }, handleSave() { this.saveLoading = true + this.isSubmit = true let json = this.form json.responUserList = this.tableData this.form.docUser = this.newDocUser @@ -399,14 +405,16 @@ saveTaskForPub(_formData).then(res => { this.saveLoading = false this.$message.success('保存成功') - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, handleSubmit() { this.$refs['qbkwForm'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true let json = this.jsonData json.commentText = this.commentText5 json.hzfileId = this.form.hzfileId @@ -423,6 +431,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step6.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step6.vue index c9a454d2a..b760fc7d3 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step6.vue @@ -202,6 +202,7 @@ @back="handleSubmitNo" :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" show-transfer @transfer="handleTransfer" @submit="handleSubmit" @@ -294,6 +295,8 @@ this.drawerModal = true }, checkedRole (data) { + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -308,6 +311,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -382,6 +388,7 @@ }, handleSubmit() { this.isSubmit = true + this.saveLoading = true var json = this.json json.actionFlag = 0 json.commentText = this.commentText6 @@ -395,11 +402,13 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { if (this.commentText6) { this.isSubmit = true + this.saveLoading = true var json = this.json json.actionFlag = 1 json.commentText = this.commentText6 @@ -413,6 +422,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输入审批意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step7.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step7.vue index c57b24558..f3c74aad9 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step7.vue @@ -201,6 +201,8 @@ approval @back="handleSubmitNo" :submitLoading="isSubmit" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" show-transfer @transfer="handleTransfer" @submit="handleSubmit" @@ -293,6 +295,7 @@ this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -307,6 +310,8 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step8.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step8.vue index cd033ce64..c7034cdfd 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step8.vue @@ -199,7 +199,8 @@ show-submit approval :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" + :isSubmitBack="isSubmit" @submit="handleSubmit" show-back show-transfer @@ -294,6 +295,7 @@ this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -308,6 +310,8 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzdy/step9.vue b/src/pages/processCenter/pages/creatProcess/bzdy/step9.vue index a2be9e220..d5789c8e0 100644 --- a/src/pages/processCenter/pages/creatProcess/bzdy/step9.vue +++ b/src/pages/processCenter/pages/creatProcess/bzdy/step9.vue @@ -233,7 +233,8 @@ approval @back="handleSubmitNo" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" + :isSubmitBack="isSubmit" show-transfer @transfer="handleTransfer" @submit="handleSubmit" @@ -337,6 +338,7 @@ this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -351,6 +353,8 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, // 请求转换流程图