diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue index 0db4bd42c..743550ab1 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step1.vue @@ -923,6 +923,7 @@ export default { handleSave() { if(!this.submitFlag){ this.saveLoading = true; + this.isSubmit = true this.listForm.dataList = this.dataList let _formData = new FormData(); _formData.append("id", this.bpnId || ""); @@ -936,13 +937,14 @@ export default { commentText: this.commentText })); saveTaskFirst(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); }else{ this.saveLoading = true; + this.isSubmit = true this.listForm.dataList = this.dataList let _formData = new FormData(); _formData.append("id", this.bpnId || ""); @@ -955,11 +957,11 @@ export default { commentText: this.commentText })); saveTaskForPub(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); } }, @@ -977,7 +979,6 @@ export default { } }) if(peopleFlag){ - this.isSubmit = true; this.listForm.dataList = this.dataList; this.listForm.commentText = this.commentText; let json = Object.assign(this.listForm, this.roleForm); @@ -986,6 +987,8 @@ export default { if (valid) { this.$refs["roleForm"].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, @@ -1020,7 +1023,11 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); + } else { + this.isSubmit = false + this.saveLoading = false } }); } else { @@ -1038,6 +1045,8 @@ export default { if (valid) { this.$refs["roleForm"].validate((valid) => { if (valid) { + this.saveLoading = true + this.isSubmit = true let specialJson = { createUser: this.$store.getters.userInfo.userId, createUserName: this.$store.getters.userInfo.userName, @@ -1076,6 +1085,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } else { this.isSubmit = false; diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step2.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step2.vue index a0a96e66b..aaa30b670 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step2.vue @@ -202,9 +202,9 @@ show-back show-transfer show-submit - :transfer-loading="isTransfer" :submitLoading="isSubmit" - :saveLoading="saveLoading" + :saveLoading="isSubmit" + :isSubmitBack="isSubmit" :approval="true" @transfer="handleTransfer" @back="beforeBack" @@ -359,14 +359,13 @@ export default { }, //确认转办 checkedRole (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('调整成功') @@ -375,6 +374,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue index b3c58022c..c19a00e95 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step3.vue @@ -379,7 +379,6 @@ show-save show-transfer show-submit - :transfer-loading="isTransfer" :submitLoading="isSubmit" :saveLoading="saveLoading" :approval="true" @@ -746,6 +745,7 @@ export default { this.listForm.commentText = this.commentText; const json = JSON.stringify(this.listForm); this.isSubmit = true; + this.saveLoading = true; this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, @@ -758,6 +758,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); }else{ @@ -769,6 +770,7 @@ export default { //保存 handleSave() { this.saveLoading = true; + this.isSubmit = true // this.listForm.dataList = this.dataList; let _formData = new FormData(); _formData.append("id", this.bpnId || ""); @@ -780,11 +782,11 @@ export default { commentText: this.commentText })); saveTaskForPub(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false; }); }, checkedRole2(data) { @@ -795,14 +797,14 @@ export default { }, //确认转办 checkedRole(data) { - this.assigneeNewLoading = true; + this.saveLoading = 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("调整成功"); @@ -811,6 +813,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false; + this.isSubmit = false; }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue index a97671a00..d32e2a941 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step4.vue @@ -267,7 +267,6 @@ { }); } }, //确认转办 checkedRole (data) { - this.assigneeNewLoading = true + this.isSubmit = true + this.saveLoading = 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('调整成功') @@ -484,6 +485,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step5.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step5.vue index 65d19c8b2..9d9cb67bd 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step5.vue @@ -448,7 +448,6 @@ :show-submit="submitShow" :show-confirm="acceptShow" :submitLoading="isSubmit" - :transfer-loading="isTransfer" :saveLoading="saveLoading" @save="handleSave" @transfer="handleTransfer" @@ -697,7 +696,8 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 @@ -713,6 +713,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -840,6 +843,7 @@ export default { //保存事件 handleSave() { this.saveLoading = true; + this.isSubmit = true let _formData = new FormData(); this.listForm.dataList = this.dataList; _formData.append("id", this.bpnId || ""); @@ -853,13 +857,15 @@ export default { this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); }, // 接受按钮 handleAccept(){ this.isSubmit = true + this.saveLoading = true; execTask({ todoId: this.todoId // 当前节点ID }).then(res => { @@ -867,6 +873,8 @@ export default { this.$message.success('接收成功') this.$router.push('/processCenter') } + }).finally(() => { + this.saveLoading = false; this.isSubmit = false }) }, @@ -917,6 +925,7 @@ export default { this.listForm.dataList = this.dataList; const json = JSON.stringify(this.listForm); this.isSubmit = true + this.saveLoading = true this.$http.post("lawss/activiti/completeTask", { taskIds: this.taskIds, userId: this.userId, @@ -929,6 +938,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }, e => { }); diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step6.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step6.vue index 0c8193924..e8fab95de 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step6.vue @@ -352,8 +352,8 @@ show-submit show-transfer :submitLoading="isSubmit" - :saveLoading="saveLoading" - :transfer-loading="isTransfer" + :saveLoading="isSubmit" + :isSubmitBack="isSubmit" :approval="true" @back="beforeBack" @transfer="handleTransfer" @@ -477,14 +477,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('调整成功') @@ -493,6 +492,8 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false }) }, // 请求转换流程图 diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step7.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step7.vue index 982972053..e70736efb 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step7.vue @@ -361,7 +361,6 @@ show-transfer :submitLoading="isSubmit" :saveLoading="saveLoading" - :transfer-loading="isTransfer" :approval="true" @transfer="handleTransfer" @submit="handleSubmit" @@ -490,14 +489,14 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.saveLoading = 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('调整成功') @@ -506,6 +505,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -633,6 +635,7 @@ export default { this.listForm.commentText = this.commentText; const json = JSON.stringify(this.listForm); this.isSubmit = true + this.saveLoading = false this.$http.post('lawss/activiti/completeTask', { taskIds: this.taskIds, userId: this.userId, @@ -645,6 +648,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }, e => { }); diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step8-2.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step8-2.vue index 57cb4b6be..6fd0830ea 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step8-2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step8-2.vue @@ -371,7 +371,6 @@ show-transfer :submitLoading="isSubmit" :saveLoading="saveLoading" - :transfer-loading="isTransfer" :approval="true" @transfer="handleTransfer" @submit="handleSubmit" @@ -502,14 +501,14 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.saveLoading = 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('调整成功') @@ -518,6 +517,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -646,6 +648,7 @@ export default { this.listForm.commentText = this.commentText; const json = JSON.stringify(this.listForm); this.isSubmit = true + this.saveLoading = true this.$http.post('lawss/activiti/completeTask', { taskIds: this.taskIds, userId: this.userId, @@ -658,6 +661,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }, e => { }); diff --git a/src/pages/processCenter/pages/creatProcess/bzpg/step8.vue b/src/pages/processCenter/pages/creatProcess/bzpg/step8.vue index 226a842e4..505be2934 100644 --- a/src/pages/processCenter/pages/creatProcess/bzpg/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/bzpg/step8.vue @@ -361,7 +361,6 @@ show-transfer :submitLoading="isSubmit" :saveLoading="saveLoading" - :transfer-loading="isTransfer" :approval="true" @transfer="handleTransfer" @submit="handleSubmit" @@ -490,7 +489,8 @@ export default { }, //确认转办 checkedTransferRole (data) { - this.assigneeNewLoading = true + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id assignee: data[0].id, // 被委托人 @@ -506,6 +506,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -633,6 +636,7 @@ export default { this.listForm.commentText = this.commentText; const json = JSON.stringify(this.listForm); this.isSubmit = true + this.saveLoading = true this.$http.post('lawss/activiti/completeTask', { taskIds: this.taskIds, userId: this.userId, @@ -645,6 +649,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }, e => { });