From 09bb75da3b37b878eedd3f38c2adba235faeb6dc Mon Sep 17 00:00:00 2001 From: zyn Date: Fri, 3 Nov 2023 11:10:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=89=E9=92=AEloading-=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=BE=81=E6=B1=82=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/creatProcess/bzzqyj/step1-1.vue | 8 +++++++- .../pages/creatProcess/bzzqyj/step1.vue | 9 +++++++-- .../pages/creatProcess/bzzqyj/step2.vue | 12 ++++++++++-- .../pages/creatProcess/bzzqyj/step3.vue | 19 ++++++++++++++++++- .../pages/creatProcess/bzzqyj/step4-1.vue | 12 ++++++++++++ .../pages/creatProcess/bzzqyj/step4-2.vue | 12 ++++++++++++ .../pages/creatProcess/bzzqyj/step4.vue | 11 ++++++++++- .../pages/creatProcess/bzzqyj/step5.vue | 11 ++++++++++- .../pages/creatProcess/bzzqyj/step6.vue | 10 ++++++++++ .../pages/creatProcess/bzzqyj/step7.vue | 10 ++++++++++ .../pages/creatProcess/bzzqyj/step8.vue | 10 ++++++++++ .../pages/creatProcess/bzzqyj/step9.vue | 10 ++++++++++ 12 files changed, 126 insertions(+), 8 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue index a936bc7ea..cc70ad1d5 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1-1.vue @@ -835,6 +835,7 @@ export default { this.$refs['Form'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.$http.post('lawss/activiti/startProcessRollBack', { id: '', createUser: this.$store.getters.userInfo.userId, @@ -870,10 +871,13 @@ export default { } this.$router.push('/processCenter') } + this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('流程启动失败') this.isSubmit = false + this.saveLoading = false } }) } else { @@ -887,6 +891,7 @@ export default { }, handleSave () { this.saveLoading = true + this.isSubmit = true let _formData = new FormData() this.form.filesId = this.addFjList _formData.append('id', this.bpnId || '') @@ -902,8 +907,9 @@ export default { 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/bzzqyj/step1.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1.vue index 51facd8a0..fd999cc2e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step1.vue @@ -844,6 +844,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) @@ -856,11 +857,11 @@ export default { commentText1: this.commentText1 })) saveTaskFirst(_formData).then(res => { - this.saveLoading = false this.$message.success('保存成功') this.bpnId = res.result - }).catch(e => { + }).finally(() => { this.saveLoading = false + this.isSubmit = false }) }, handleSubmit() { @@ -869,6 +870,7 @@ export default { this.$refs['Form'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true this.$http.post('lawss/activiti/startProcessRollBack', { id: '', createUser: this.$store.getters.userInfo.userId, @@ -904,14 +906,17 @@ export default { } this.$router.push('/processCenter') this.isSubmit = false + this.saveLoading = false } else { this.$message.warning('流程启动失败') this.isSubmit = false + this.saveLoading = false } }) } else { this.$message.warning('流程启动失败') this.isSubmit = false + this.saveLoading = false } }) } else { diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step2.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step2.vue index 65bd93551..698bde8b2 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step2.vue @@ -261,6 +261,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -275,6 +277,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -329,6 +334,7 @@ export default { //保存事件 handleSave() { this.saveLoading = true; + this.isSubmit = true let _formData = new FormData(); this.form.onlyKey = this.onlyKey _formData.append("id", this.bpnId || ""); @@ -339,17 +345,18 @@ export default { commentText2: this.commentText2 })); saveTaskForPub(_formData).then(res => { - this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); }, handleSubmit() { this.$refs["bzzqyjForm"].validate((valid) => { if (valid) { this.isSubmit = true; + this.saveLoading = true; var json = this.json; json.onlyKey = this.onlyKey json.commentText = this.commentText2; @@ -368,6 +375,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/bzzqyj/step3.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue index 835035451..07d7fb746 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step3.vue @@ -500,6 +500,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, // 委托人 @@ -514,6 +516,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -575,6 +580,7 @@ }, handleSave() { this.saveLoading = true; + this.isSubmit = true let _formData = new FormData(); let json = this.form json.data = this.data @@ -588,13 +594,16 @@ })); saveTaskForPub(_formData).then(res => { this.saveLoading = false; + this.isSubmit = false this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false; }); }, handleAccept(){ + this.saveLoading = true; this.isSubmit = true execTask({ todoId: this.todoId // 当前节点ID @@ -604,11 +613,16 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, handleSubmit() { if (this.data.length < 1) { this.isSubmit = true + this.saveLoading = true var json = this.json json.onlyKey = this.onlyKey json.commentText = this.commentText3 @@ -626,6 +640,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { var a = 0 @@ -652,6 +667,7 @@ // } else { this.isSubmit = true + this.saveLoading = true var json = this.json json.commentText = this.commentText3 json.info = this.data @@ -668,6 +684,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } } diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-1.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-1.vue index 07ce5ed81..51acd7b4b 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-1.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-1.vue @@ -230,6 +230,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" show-transfer @transfer="handleTransfer" @submit="handleSubmit" @@ -361,6 +362,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, // 委托人 @@ -375,6 +378,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -408,6 +414,7 @@ this.$refs['bzzqyjForm'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true let json = this.json json.info = this.data json.onlyKey = this.onlyKey @@ -425,6 +432,7 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请选择标准法规工程师分线管理员') @@ -433,6 +441,8 @@ }, handleSubmitNo() { if (this.commentText41) { + this.isSubmit = true + this.saveLoading = true var json = this.json json.spFlag = '1' json.onlyKey = this.onlyKey @@ -446,6 +456,8 @@ this.$message.success('提交成功') this.$router.push('/processCenter') } + this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输审批意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-2.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-2.vue index ec3d165df..f5ffaf747 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-2.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4-2.vue @@ -222,6 +222,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" show-transfer @transfer="handleTransfer" @submit="handleSubmit" @@ -353,6 +354,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, // 委托人 @@ -367,6 +370,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -398,6 +404,7 @@ }, handleSubmit() { this.isSubmit = true + this.saveLoading = true let json = this.json json.info = this.data json.commentText = this.commentText42 @@ -413,10 +420,13 @@ this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { if (this.commentText42) { + this.isSubmit = true + this.saveLoading = true var json = this.json json.bzFlag = '1' json.onlyKey = this.onlyKey @@ -430,6 +440,8 @@ this.$message.success('提交成功') this.$router.push('/processCenter') } + this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输入反馈意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue index 79126f38f..225c81555 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step4.vue @@ -575,6 +575,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.saveLoading = true + this.isSubmit = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -589,6 +591,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.saveLoading = false + this.isSubmit = false }) }, // 请求转换流程图 @@ -621,6 +626,7 @@ export default { //保存事件 handleSave() { this.saveLoading = true; + this.isSubmit = true let _formData = new FormData(); let json = this.json json.info = this.data @@ -641,14 +647,16 @@ export default { this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); }, handleSubmit() { this.$refs['bzzqyjForm'].validate((valid) => { if (valid) { this.isSubmit = true + this.saveLoading = true let json = this.json json.actionFlag = 0 json.commentText = this.commentText4 @@ -667,6 +675,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请选择审批人') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue index 9655bae77..bf071bbe5 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step5.vue @@ -546,6 +546,8 @@ } }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -560,6 +562,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -596,6 +601,7 @@ handleSave() { if(this.clickFlag){ this.saveLoading = true; + this.isSubmit = true let _formData = new FormData(); let json = this.form; json.data = this.data; @@ -611,8 +617,9 @@ this.saveLoading = false; this.$message.success("保存成功"); this.bpnId = res.result; - }).catch(e => { + }).finally(() => { this.saveLoading = false; + this.isSubmit = false }); }else{ this.$message.warning('公开征求意见未结束,无法操作') @@ -634,6 +641,7 @@ return; } this.isSubmit = true; + this.saveLoading = true var json = this.json; json.oldinfo = this.oldData; json.onlyKey = this.onlyKey @@ -649,6 +657,7 @@ this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false; }); }else{ this.$message.warning('公开征求意见未结束,无法操作') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue index a22af334f..da18fc8b7 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step6.vue @@ -261,6 +261,7 @@ :submitLoading="isSubmit" :saveLoading="saveLoading" @submit="handleSubmit" + :isSubmitBack="isSubmit" show-back @back="handleSubmitNo" show-transfer @@ -398,6 +399,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, // 委托人 @@ -412,6 +415,9 @@ } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -487,6 +493,7 @@ this.$refs['bzzqyjForm'].validate((valid) => { if (valid) { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.hqFlag = '0'; json.onlyKey = this.onlyKey @@ -503,6 +510,7 @@ this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } else { this.$message.warning('请选择审批领导') @@ -512,6 +520,7 @@ handleSubmitNo() { if (this.commentText6) { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.hqFlag = '1'; json.onlyKey = this.onlyKey @@ -526,6 +535,7 @@ this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } else { this.$message.warning("请输入反馈意见"); diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step7.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step7.vue index 1ce4ecf56..3c6db01ae 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step7.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step7.vue @@ -252,6 +252,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" @submit="handleSubmit" show-back @back="handleSubmitNo" @@ -367,6 +368,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -381,6 +384,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -454,6 +460,7 @@ export default { }, handleSubmit() { this.isSubmit = true + this.saveLoading = true var json = this.json json.bdFlag = '0' json.onlyKey = this.onlyKey @@ -468,11 +475,13 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { if (this.commentText7) { this.isSubmit = true + this.saveLoading = true var json = this.json json.bdFlag = '1' json.onlyKey = this.onlyKey @@ -487,6 +496,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输入反馈意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue index 35e70c095..15706ce8e 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step8.vue @@ -252,6 +252,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" @submit="handleSubmit" show-back @back="handleSubmitNo" @@ -367,6 +368,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -381,6 +384,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -454,6 +460,7 @@ export default { }, handleSubmit() { this.isSubmit = true + this.saveLoading = true var json = this.json json.directorFlag = '0' json.onlyKey = this.onlyKey @@ -470,11 +477,13 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) }, handleSubmitNo() { if (this.commentText8) { this.isSubmit = true + this.saveLoading = true var json = this.json json.directorFlag = '1' json.onlyKey = this.onlyKey @@ -489,6 +498,7 @@ export default { this.$router.push('/processCenter') } this.isSubmit = false + this.saveLoading = false }) } else { this.$message.warning('请输入反馈意见') diff --git a/src/pages/processCenter/pages/creatProcess/bzzqyj/step9.vue b/src/pages/processCenter/pages/creatProcess/bzzqyj/step9.vue index f9cf49c62..37da97e63 100644 --- a/src/pages/processCenter/pages/creatProcess/bzzqyj/step9.vue +++ b/src/pages/processCenter/pages/creatProcess/bzzqyj/step9.vue @@ -251,6 +251,7 @@ show-submit :submitLoading="isSubmit" :saveLoading="saveLoading" + :isSubmitBack="isSubmit" @submit="handleSubmit" show-back @back="handleSubmitNo" @@ -366,6 +367,8 @@ export default { this.drawerModal = true }, checkedRole (data) { + this.isSubmit = true + this.saveLoading = true changeAssigneeNew({ taskId: this.$route.query.taskIds, // 任务id userId:this.$store.getters.userInfo.userId, // 委托人 @@ -380,6 +383,9 @@ export default { } else { this.$message.warning(res.message) } + }).finally(() => { + this.isSubmit = false + this.saveLoading = false }) }, // 请求转换流程图 @@ -453,6 +459,7 @@ export default { }, handleSubmit() { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.info = this.data2 json.presidentFlag = '0'; @@ -468,11 +475,13 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); }, handleSubmitNo() { if (this.commentText9) { this.isSubmit = true; + this.saveLoading = true var json = this.json; json.onlyKey = this.onlyKey json.presidentFlag = '1'; @@ -487,6 +496,7 @@ export default { this.$router.push("/processCenter"); } this.isSubmit = false; + this.saveLoading = false }); } else { this.$message.warning("请输入反馈意见");