From 1cb34d7cff5aa1abb7bddc87a5fe3db0ba68014e Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 17:14:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E6=A0=87=E5=87=86=E5=8C=96=E5=8D=8F=E4=BC=9A=E5=85=A5?= =?UTF-8?q?=E4=BC=9A=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzhHd-rh/step1.vue | 12 +++++++++--- .../pages/creatProcess/bzhHd-rh/step2.vue | 10 ++++++---- .../pages/creatProcess/bzhHd-rh/step3.vue | 10 +++++++--- .../pages/creatProcess/bzhHd-rh/step4.vue | 12 +++++++----- .../pages/creatProcess/bzhHd-rh/step5.vue | 10 +++++++--- .../pages/creatProcess/bzhHd-rh/step6.vue | 12 +++++++----- 6 files changed, 43 insertions(+), 23 deletions(-) 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 - }); + }) } }) } From a0dbd719aaf88c0a94675f1378b645d942fcf0f2 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 17:56:57 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E6=A0=87=E5=87=86=E5=8C=96=E5=8D=8F=E4=BC=9A=E5=8F=82?= =?UTF-8?q?=E4=BC=9A=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzhHy-ch/step1.vue | 10 ++++++++-- .../pages/creatProcess/bzhHy-ch/step2.vue | 12 +++++++----- .../pages/creatProcess/bzhHy-ch/step3.vue | 10 +++++++--- .../pages/creatProcess/bzhHy-ch/step4.vue | 12 +++++++----- .../pages/creatProcess/bzhHy-ch/step5.vue | 10 +++++++--- .../pages/creatProcess/bzhHy-ch/step6.vue | 12 +++++++----- 6 files changed, 43 insertions(+), 23 deletions(-) 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 - }); + }) } }) From a3065afb5bed6b8b07ceaa72e1552f11378e2438 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 18:13:15 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E5=A4=96?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E5=90=8D=E6=8E=A8=E8=8D=90=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processCenter/pages/creatProcess/wbsm/step1.vue | 12 ++++++++++-- .../processCenter/pages/creatProcess/wbsm/step2.vue | 11 +++++++---- .../processCenter/pages/creatProcess/wbsm/step3.vue | 11 +++++++---- .../processCenter/pages/creatProcess/wbsm/step4.vue | 11 +++++++---- .../processCenter/pages/creatProcess/wbsm/step5.vue | 11 +++++++---- 5 files changed, 38 insertions(+), 18 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue index 119fd333c..418950078 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step1.vue @@ -644,6 +644,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) @@ -655,11 +656,11 @@ export default { commentText: this.commentText })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(e => { this.saveLoading = false + this.isSubmit = false }) }, // 提交按钮 @@ -681,6 +682,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, @@ -714,7 +716,11 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false + this.saveLoading = false }); + } else { + this.saveLoading = false + this.isSubmit = false } }); } else { @@ -739,6 +745,7 @@ export default { this.$refs["Form"].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -751,6 +758,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false + this.saveLoading = false }); } else { return this.$message.warning("请完善人员信息"); diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step2.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step2.vue index 2dd40c2d6..923d5a620 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step2.vue @@ -144,8 +144,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -256,14 +256,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -272,6 +271,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() { @@ -397,6 +398,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, @@ -408,6 +410,7 @@ export default { this.$message.success(res.message); this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step3.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step3.vue index 299aba65a..cdbf3798d 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step3.vue @@ -144,8 +144,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -256,14 +256,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -272,6 +271,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() { @@ -397,6 +398,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, @@ -408,6 +410,7 @@ export default { this.$message.success(res.message); this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step4.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step4.vue index 9efc532a4..71371c831 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step4.vue @@ -144,8 +144,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -256,14 +256,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -272,6 +271,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() { @@ -397,6 +398,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, @@ -408,6 +410,7 @@ export default { this.$message.success(res.message); this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } diff --git a/src/pages/processCenter/pages/creatProcess/wbsm/step5.vue b/src/pages/processCenter/pages/creatProcess/wbsm/step5.vue index 984c9a989..ef80a2819 100644 --- a/src/pages/processCenter/pages/creatProcess/wbsm/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/wbsm/step5.vue @@ -144,8 +144,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -256,14 +256,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -272,6 +271,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() { @@ -397,6 +398,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, @@ -408,6 +410,7 @@ export default { this.$message.success(res.message); this.$router.push("/processCenter"); } + this.isSubmit = false }, e => { }); } From f81b67b5e039f2148ea2a4db9a94be1efd6ab789 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 18:27:29 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E5=8F=82?= =?UTF-8?q?=E4=B8=8E=E5=A4=96=E9=83=A8=E6=A0=87=E5=87=86=E5=88=B6=E4=BF=AE?= =?UTF-8?q?=E8=AE=A2=E4=BF=A1=E6=81=AF=E6=8F=90=E6=8A=A5=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/cywbbzzxd/step1.vue | 10 ++++++++-- .../pages/creatProcess/cywbbzzxd/step2.vue | 2 +- .../pages/creatProcess/cywbbzzxd/step3.vue | 6 ++++-- .../pages/creatProcess/cywbbzzxd/step4.vue | 12 +++++++----- .../pages/creatProcess/cywbbzzxd/step5.vue | 12 +++++++----- .../pages/creatProcess/cywbbzzxd/step6.vue | 12 +++++++----- 6 files changed, 34 insertions(+), 20 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue index 02a574192..d06f9abee 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step1.vue @@ -187,6 +187,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, @@ -219,7 +220,11 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false + this.saveLoading = false }); + } else { + this.saveLoading = false + this.isSubmit = false } }); } else { @@ -230,6 +235,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); @@ -240,11 +246,11 @@ export default { roleForm: this.roleForm, })); saveTaskFirst(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false; }); }, }, diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue index 92aaecb9b..9e3def10d 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step2.vue @@ -91,7 +91,7 @@ show-save show-submit :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" @save="handleSave" @submit="handleSubmit" > diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue index 261920fa8..fd3d49264 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step3.vue @@ -390,9 +390,9 @@ show-save show-submit show-record - :recordLoading="recordLoading" + :recordLoading="isSubmit" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" @record="handleRecord" @save="handleSave" @submit="handleSubmit" @@ -641,6 +641,7 @@ export default { let json = { signFlag: '2', }; + this.isSubmit = true; this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -670,6 +671,7 @@ export default { wbbzform: this.wbbzform, signFlag: '1', }; + this.isSubmit = true; this.$refs["wbbzForm"].validate((valid) => { if (valid) { this.$http.post("lawss/activiti/completeTask", { diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue index 162046d03..5d733f897 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step4.vue @@ -223,8 +223,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -369,6 +369,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -389,7 +390,6 @@ export default { } }, handleSubmit() { - this.isSubmit = true; if (this.participantsData.length < 1) { this.$message.warning("项目信息不能为空"); } else { @@ -406,6 +406,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true; this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -433,14 +434,13 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -449,6 +449,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, }, diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step5.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step5.vue index c2270e438..21adf95fd 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step5.vue @@ -223,8 +223,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -369,6 +369,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -389,7 +390,6 @@ export default { } }, handleSubmit() { - this.isSubmit = true if (this.participantsData.length < 1) { this.$message.warning("项目信息不能为空"); } else { @@ -406,6 +406,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -433,14 +434,13 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -449,6 +449,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, }, diff --git a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step6.vue b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step6.vue index a15ff88e5..f1635d7c2 100644 --- a/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/cywbbzzxd/step6.vue @@ -223,8 +223,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -369,6 +369,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true; this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -389,7 +390,6 @@ export default { } }, handleSubmit() { - this.isSubmit = true if (this.participantsData.length < 1) { this.$message.warning("项目信息不能为空"); } else { @@ -406,6 +406,7 @@ export default { }; this.$refs["wbbzForm"].validate((valid) => { if (valid) { + this.isSubmit = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.$route.query.taskIds, userId: this.$store.getters.userInfo.userId, @@ -433,14 +434,13 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -449,6 +449,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, }, From 62152dc88d37eec904bce58ad1bab526ff3c4261 Mon Sep 17 00:00:00 2001 From: zyn Date: Mon, 6 Nov 2023 18:38:14 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E6=A0=87=E5=87=86=E5=8C=96=E5=8D=8F=E4=BC=9A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=A4=87=E6=A1=88=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/jrbzhxh/step1.vue | 10 ++++++++-- .../pages/creatProcess/jrbzhxh/step2.vue | 15 +++++++-------- .../pages/creatProcess/jrbzhxh/step3.vue | 9 +++++---- .../pages/creatProcess/jrbzhxh/step4.vue | 9 +++++---- 4 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue index 10dd1f3ba..3a0e50e42 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step1.vue @@ -186,6 +186,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, @@ -218,7 +219,11 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false + this.saveLoading = false }); + } else { + this.saveLoading = false + this.isSubmit = false } }); } else { @@ -229,6 +234,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); @@ -239,11 +245,11 @@ export default { roleForm: this.roleForm, })); saveTaskFirst(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false; }); }, }, diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue index e181634fb..b7add981b 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step2.vue @@ -323,9 +323,9 @@ show-save show-submit show-record - :recordLoading="recordLoading" + :recordLoading="isSubmit" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" @record="handleRecord" @save="handleSave" @submit="handleSubmit" @@ -561,7 +561,7 @@ export default { }, //不备案 handleRecord(){ - this.recordLoading = true + this.isSubmit = true this.dlFlag = '0' this.wbbzform.commentText = this.commentText; this.wbbzform.participantsData = this.participantsData @@ -578,14 +578,14 @@ export default { this.$message.success(res.message); this.$router.push("/processCenter"); } - this.recordLoading = false + this.isSubmit = false }, e => { }); }, //流程保存 handleSave() { - this.saveLoading = true + this.isSubmit = true this.wbbzform.fileName = this.fileInfoList this.wbbzform.commentText = this.commentText; this.wbbzform.participantsData = this.participantsData @@ -600,11 +600,10 @@ export default { form: this.wbbzform, })) saveTaskForPub(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { - this.saveLoading = false + }).finally(() => { + this.isSubmit = false }) }, //流程提交 diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step3.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step3.vue index adfb9110a..14bbac1e9 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step3.vue @@ -278,8 +278,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -384,14 +384,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -400,6 +399,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() { diff --git a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step4.vue b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step4.vue index 40c626c42..7906c2d84 100644 --- a/src/pages/processCenter/pages/creatProcess/jrbzhxh/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/jrbzhxh/step4.vue @@ -278,8 +278,8 @@ show-transfer show-submit :submitLoading="isSubmit" - :transfer-loading="isTransfer" - :saveLoading="saveLoading" + :isSubmitBack="isSubmit" + :saveLoading="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -384,14 +384,13 @@ export default { methods: { //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 userId: this.$store.getters.userInfo.userId, // 委托人 pId: this.$route.query.prcId // 流程实例 }).then(res => { - this.isTransfer = false if (res.success) { this.drawerModal = false this.$message.success('调整成功') @@ -400,6 +399,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, processTable() {