From eaa58e0a18bf8ec172b37e4491356a2667537bb1 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 08:47:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E5=BA=9F=E6=AD=A2=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/qbfz/step1.vue | 8 +++++--- .../pages/creatProcess/qbfz/step3.vue | 10 ++++++---- .../pages/creatProcess/qbfz/step4.vue | 12 +++++++----- .../pages/creatProcess/qbfz/step5.vue | 16 +++++++++------- .../pages/creatProcess/qbfz/step6.vue | 9 ++++++++- .../pages/creatProcess/qbfz/step7.vue | 16 ++++++++++++++-- 6 files changed, 49 insertions(+), 22 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step1.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step1.vue index 5f663ca9d..9cba9dc43 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step1.vue @@ -646,13 +646,14 @@ export default { }, res => { if (res.success) { this.$message.success(res.message) - this.isSubmit = false - this.saveLoading = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) } + this.isSubmit = false + this.saveLoading = false }) } else { this.isSubmit = true + this.saveLoading = true this.standardSearch.commentText = this.commentText var json = Object.assign(this.roleForm, this.standardSearch) this.$http.post('lawss/activiti/startProcessRollBack', { @@ -685,9 +686,10 @@ export default { return res }) } - this.isSubmit = false this.$router.push({path:'/processCenter?tabsName=ProcessCenter'}) } + this.isSubmit = false + this.saveLoading = false }) } }) diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step3.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step3.vue index eee48492c..39a009f7e 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step3.vue @@ -192,7 +192,6 @@ { if(valid){ this.isSubmit = true + this.saveLoading = true this.qbfsForm.commentText = this.commentText this.qbfsForm.presentPeople = this.$store.getters.userInfo.userName this.qbfsForm.presentPeopleId = this.$store.getters.userInfo.userId @@ -339,6 +339,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }, e => { }); }else{ @@ -354,8 +355,8 @@ export default { }, //确认转办 checkedRoles (data) { - this.isTransfer = true; this.isSubmit = true; + this.saveLoading = true; this.assigneeNewLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id @@ -363,8 +364,6 @@ export default { userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false; - this.isSubmit = false; if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -373,6 +372,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false; + this.isSubmit = false; }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step4.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step4.vue index 43e6fa471..9ab8bdd11 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step4.vue @@ -232,7 +232,6 @@ { if (valid) { this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.dataList = this.dataList; let json = JSON.stringify(this.qbfsForm); @@ -381,6 +381,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); }else{ @@ -403,7 +404,7 @@ export default { }, //确认转办 checkedRole(data) { - this.isTransfer = true; + this.saveLoading = true; this.isSubmit = true; this.assigneeNewLoading = true; changeAssigneeNew({ @@ -412,8 +413,6 @@ export default { userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false; - this.isSubmit = false; if (res.success) { this.drawerModal = false; this.$message.success("调整成功"); @@ -422,7 +421,10 @@ export default { } else { this.$message.warning(res.message); } - }); + }).finally(() => { + this.saveLoading = false; + this.isSubmit = false; + }) }, // 请求转换流程图 processNum(row) { diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step5.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step5.vue index eb65e7b48..7ee3c4c6e 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step5.vue @@ -234,7 +234,6 @@ show-transfer show-submit show-back - :transfer-loading="isTransfer" :submitLoading="isSubmit" :saveLoading="saveLoading" :isSubmitBack="isSubmit" @@ -368,6 +367,7 @@ export default { this.$message.warning('请填写审批意见') }else{ this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.bzFlag = '1' this.qbfsForm.dataList = this.dataList; @@ -384,6 +384,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }, e => { }); } @@ -393,7 +394,7 @@ export default { this.$refs['qbfsForm'].validate((valid) => { if (valid) { this.isSubmit = true; - this.isTransfer = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.bzFlag = '0' this.qbfsForm.dataList = this.dataList; @@ -410,7 +411,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; - this.isTransfer = false; + this.saveLoading = false; }, e => { }); }else{ @@ -433,7 +434,7 @@ export default { }, //确认转办 checkedRole(data) { - this.isTransfer = true; + this.saveLoading = true; this.isSubmit = true; this.assigneeNewLoading = true; changeAssigneeNew({ @@ -442,8 +443,6 @@ export default { userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false; - this.isSubmit = false; if (res.success) { this.drawerModal = false; this.$message.success("调整成功"); @@ -452,7 +451,10 @@ export default { } else { this.$message.warning(res.message); } - }); + }).finally(() => { + this.saveLoading = false; + this.isSubmit = false; + }) }, // 请求转换流程图 processNum(row) { diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step6.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step6.vue index 89e699c28..5edd5d3c3 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step6.vue @@ -234,7 +234,6 @@ show-transfer show-submit show-back - :transfer-loading="isTransfer" :submitLoading="isSubmit" :saveLoading="saveLoading" :isSubmitBack="isSubmit" @@ -368,6 +367,7 @@ export default { this.$message.warning('请填写审批意见') }else{ this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.sdFlag = '1' this.qbfsForm.dataList = this.dataList; @@ -384,6 +384,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); } @@ -393,6 +394,7 @@ export default { this.$refs['qbfsForm'].validate((valid) => { if (valid) { this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.sdFlag = '0' this.qbfsForm.dataList = this.dataList; @@ -409,6 +411,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); }else{ @@ -433,6 +436,7 @@ export default { checkedRole(data) { this.isTransfer = true; this.isSubmit = true; + this.saveLoading = true; this.assigneeNewLoading = true; changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id @@ -450,6 +454,9 @@ export default { } else { this.$message.warning(res.message); } + }).finally(() => { + this.saveLoading = false; + this.isSubmit = false; }); }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/qbfz/step7.vue b/src/pages/processCenter/pages/creatProcess/qbfz/step7.vue index 9963976a9..4c7655f9e 100644 --- a/src/pages/processCenter/pages/creatProcess/qbfz/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/qbfz/step7.vue @@ -234,7 +234,6 @@ show-transfer show-submit show-back - :transfer-loading="isTransfer" :submitLoading="isSubmit" :saveLoading="saveLoading" :isSubmitBack="isSubmit" @@ -368,6 +367,7 @@ export default { this.$message.warning('请填写审批意见') }else{ this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.bafzFlag = '1' this.qbfsForm.dataList = this.dataList; @@ -384,6 +384,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); } @@ -393,6 +394,7 @@ export default { this.$refs['qbfsForm'].validate((valid) => { if (valid) { this.isSubmit = true; + this.saveLoading = true; this.qbfsForm.commentText = this.commentText; this.qbfsForm.bafzFlag = '0' this.qbfsForm.dataList = this.dataList; @@ -404,9 +406,14 @@ export default { this.$http._getData('lawss/sarBussionessStand/repeal',params,{}).then(res => { if(res && res.ok){ this.completeTask(json) + } else { + this.isSubmit = false; + this.saveLoading = false; } }).catch(e=>{ console.log(e) + this.isSubmit = false; + this.saveLoading = false; }) }else{ this.$message.warning('请完善基础信息') @@ -426,6 +433,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); }, @@ -445,6 +453,7 @@ export default { checkedRole(data) { this.isTransfer = true; this.isSubmit = true; + this.saveLoading = true; this.assigneeNewLoading = true; changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id @@ -462,7 +471,10 @@ export default { } else { this.$message.warning(res.message); } - }); + }).finally(()=>{ + this.saveLoading = false; + this.isSubmit = false; + }) }, // 请求转换流程图 processNum(row) {