From 40447d9848ff143e1c49785b4288f4a9769b97fe Mon Sep 17 00:00:00 2001 From: zyn Date: Tue, 7 Nov 2023 10:19:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E6=89=8B=E6=9C=BA?= =?UTF-8?q?=E7=AB=AF-=E5=A4=96=E9=83=A8=E7=BD=B2=E5=90=8D=E6=8E=A8?= =?UTF-8?q?=E8=8D=90=E5=AE=A1=E6=89=B9=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processCenter/pages/phone/wbsm/step3.vue | 16 ++++++++++------ .../processCenter/pages/phone/wbsm/step4.vue | 16 ++++++++++------ .../processCenter/pages/phone/wbsm/step5.vue | 16 ++++++++++------ 3 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/pages/processCenter/pages/phone/wbsm/step3.vue b/src/pages/processCenter/pages/phone/wbsm/step3.vue index d4b35a331..35138ef03 100644 --- a/src/pages/processCenter/pages/phone/wbsm/step3.vue +++ b/src/pages/processCenter/pages/phone/wbsm/step3.vue @@ -74,9 +74,9 @@ show-transfer show-back show-submit - :transfer-loading="isTransfer" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @transfer="handleTransfer" @back="beforeBack" @@ -275,7 +275,7 @@ export default { }, // 保存按钮 handleSave() { - this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -284,11 +284,10 @@ export default { commentText: this.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.isSubmit = false }) }, // 提交按钮 @@ -330,6 +329,7 @@ export default { roleForm: this.roleForm } var json = JSON.stringify(son) + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, @@ -343,6 +343,7 @@ export default { this.$router.go(-2) // this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } @@ -358,6 +359,7 @@ export default { this.roleTransfer = data this.phoneRoleList = this.roleTransfer this.turnLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 @@ -373,6 +375,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) this.modalshowflag = false }, diff --git a/src/pages/processCenter/pages/phone/wbsm/step4.vue b/src/pages/processCenter/pages/phone/wbsm/step4.vue index 090206f95..458c4b837 100644 --- a/src/pages/processCenter/pages/phone/wbsm/step4.vue +++ b/src/pages/processCenter/pages/phone/wbsm/step4.vue @@ -80,9 +80,9 @@ show-transfer show-back show-submit - :transfer-loading="isTransfer" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @transfer="handleTransfer" @back="beforeBack" @@ -281,7 +281,7 @@ export default { }, // 保存按钮 handleSave() { - this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -290,11 +290,10 @@ export default { commentText: this.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.isSubmit = false }) }, // 提交按钮 @@ -336,6 +335,7 @@ export default { roleForm: this.roleForm } var json = JSON.stringify(son) + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, @@ -349,6 +349,7 @@ export default { this.$router.go(-2) // this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } @@ -364,6 +365,7 @@ export default { this.roleTransfer = data this.phoneRoleList = this.roleTransfer this.turnLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 @@ -379,6 +381,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) this.modalshowflag = false }, diff --git a/src/pages/processCenter/pages/phone/wbsm/step5.vue b/src/pages/processCenter/pages/phone/wbsm/step5.vue index 326a4ce0a..9b610cba9 100644 --- a/src/pages/processCenter/pages/phone/wbsm/step5.vue +++ b/src/pages/processCenter/pages/phone/wbsm/step5.vue @@ -80,9 +80,9 @@ show-transfer show-back show-submit - :transfer-loading="isTransfer" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @transfer="handleTransfer" @back="beforeBack" @@ -281,7 +281,7 @@ export default { }, // 保存按钮 handleSave() { - this.saveLoading = true + this.isSubmit = true let _formData = new FormData() _formData.append('taskIds', this.taskIds) _formData.append('json', JSON.stringify({ @@ -290,11 +290,10 @@ export default { commentText: this.commentText })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.isSubmit = false }) }, // 提交按钮 @@ -336,6 +335,7 @@ export default { roleForm: this.roleForm } var json = JSON.stringify(son) + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, @@ -349,6 +349,7 @@ export default { this.$router.go(-2) // this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } @@ -364,6 +365,7 @@ export default { this.roleTransfer = data this.phoneRoleList = this.roleTransfer this.turnLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 @@ -379,6 +381,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) this.modalshowflag = false },