From 94b1d79fcd30aee99af195f9d31ff7b9ee60f540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Wed, 18 Oct 2023 16:08:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=94=BF=E7=AD=96=E5=BE=81?= =?UTF-8?q?=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 --- .../creatProcess/policyConsultation/index.vue | 73 +++++++++++++------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue b/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue index 9efd6e95e..d99ea5764 100644 --- a/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue +++ b/src/pages/processCenter/pages/creatProcess/policyConsultation/index.vue @@ -496,9 +496,11 @@ }, //保存事件 handleSave() { - this.saveLoading = true; + this.openButtonLoading() if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') { this.draftSaving() + } else if (this.taskKey == 'PolicySolicitOpinionProcessKey6') { + } }, //草稿保存 @@ -516,7 +518,7 @@ commentText: this.commentText })); saveTaskFirst(_formData).then(res => { - this.saveLoading = false; + this.closeButtonLoading() this.$message.success("保存成功"); this.bpnId = res.result }).catch(e => { @@ -527,15 +529,17 @@ handleSubmit() { this.$refs['zczqyjForm'].validate((valid) => { if (valid) { - if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') { + this.openButtonLoading() + if (!this.taskKey || this.taskKey == 'PolicySolicitOpinionProcessKey1') {//起草 + this.closeButtonLoading() this.$refs.personnelInformationRef.submit((row) => { - this.isSubmit = true - this.saveLoading = true; + this.openButtonLoading() this.startProcessRollBack(row) }) - } else if (this.taskKey == 'PolicySolicitOpinionProcessKey2') { - this.isSubmit = true - this.saveLoading = true; + } else if (this.taskKey == 'PolicySolicitOpinionProcessKey2' || + this.taskKey == 'PolicySolicitOpinionProcessKey4' || + this.taskKey == 'PolicySolicitOpinionProcessKey5' || + this.taskKey == 'PolicySolicitOpinionProcessKey6') { //审核、审定、批准、责任人分配任务 const json = Object.assign(this.dataForm); json.commentText = this.commentText json.approvalFlag = 0 @@ -544,24 +548,46 @@ commentText: this.commentText } this.completeTask(this.$route.query.taskIds, query) + } else if (this.taskKey == 'PolicySolicitOpinionProcessKey3') {//起草修改 + this.closeButtonLoading() + this.$refs.personnelInformationRef.submit((row) => { + const json = Object.assign(this.dataForm, row); + json.commentText = this.commentText + json.approvalFlag = 0 + let query = { + form: json, + commentText: this.commentText + } + this.openButtonLoading() + this.completeTask(this.$route.query.taskIds, query) + }) } } else { return this.$message.warning('请完善基础信息') } }) }, + openButtonLoading() { + this.isReject = true + this.isSubmit = true + this.saveLoading = true; + }, + closeButtonLoading() { + this.isReject = true + this.isSubmit = true + this.saveLoading = true; + }, handleReject() { // approvalFlag value:0通过 1驳回 - if (this.taskKey == 'PolicySolicitOpinionProcessKey2') { - const json = Object.assign(this.dataForm); - json.commentText = this.commentText - json.approvalFlag = 1 - let query = { - form: json, - commentText: this.commentText - } - this.completeTask(this.$route.query.taskIds, query) + this.openButtonLoading() + const json = Object.assign(this.dataForm); + json.commentText = this.commentText + json.approvalFlag = 1 + let query = { + form: json, + commentText: this.commentText } + this.completeTask(this.$route.query.taskIds, query) }, //启动流程 startProcessRollBack(roleForm) { @@ -581,8 +607,7 @@ this.completeTask(res.data, query) } else { this.$message.warning('流程启动失败') - this.isSubmit = false - this.saveLoading = false; + this.closeButtonLoading() } }) }, @@ -600,8 +625,7 @@ } this.$router.push("/processCenter"); } - this.isSubmit = false; - this.saveLoading = false; + this.closeButtonLoading() }) }, //删除草稿 @@ -708,10 +732,11 @@ }); }, formProcessing(row) { - this.dataForm = row + this.dataForm = row.form this.dataForm = {...this.dataForm} + console.log(this.dataForm); if (this.showPersonnel) { - this.$refs.personnelInformationRef.getData(row) + this.$refs.personnelInformationRef.getData(row.form) } }, getTaskDraftData() { @@ -721,7 +746,7 @@ }).then(res => { let mes = JSON.parse(res.mes); this.dataForm = mes.form - this.roleForm = mes.roleForm + this.$refs.personnelInformationRef.getData(mes.roleForm) this.commentText = mes.commentText this.dataLoading = false });