From 8877654419f8ebfed44b4db4dbc100c01a47c81a Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Thu, 25 Jul 2024 16:51:37 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E5=A4=96=E9=83=A8=E6=A0=87=E5=87=86?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=9F=A5=E7=9C=8B=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NoMatchTrackingProcess.vue | 112 +++---- .../ProjectComplianceEvaluationProcess.vue | 193 ++++++++---- .../components/ProjectTable.vue | 11 +- .../components/StandardList.vue | 10 +- .../StandardComplianceProcess.vue | 198 ++++++++---- .../components/DepartLeaderApproveTable.vue | 7 +- .../components/DepartLeaderIssueTable.vue | 10 +- .../components/DesignEngineerAssess.vue | 11 +- .../components/DesignEngineerWriteProject.vue | 7 +- .../components/InitialAssignTable.vue | 12 +- .../components/InitialBasicServiceInfo.vue | 10 +- .../components/ModuleOwnerIssueTable.vue | 10 +- .../components/RegulatoryEngineerApproval.vue | 13 +- .../StandardConsultationProcess.vue | 210 ++++++++----- .../StandardEntryOrChangeProcess.vue | 283 +++++++++++------- .../StandardProcurementProcess.vue | 195 ++++++++---- 16 files changed, 860 insertions(+), 432 deletions(-) diff --git a/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue b/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue index 0a841a24..6d0832a0 100644 --- a/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue +++ b/src/views/workCenter/noMatchTrackingProcess/NoMatchTrackingProcess.vue @@ -531,25 +531,22 @@ export default { ) }, // 保存快照 - saveParamJsonStr () { + saveParamJsonStr (callback) { // 流程信息表单 const processInfoForm = Object.assign(this.processInfo, this.processInfoForm.getFieldsValue()) // 流程审批信息 const approvalInfoForm = Object.assign(this.approvalInfo, this.approvalInfoForm.getFieldsValue()) - // 人员信息的数据, 处理成对象 - const personnelObj = this.$refs.personnelInfo.getDataObj() const params = { ...processInfoForm, ...approvalInfoForm } - params.infoJsonStr = JSON.stringify({ - processInfo: processInfoForm, - approvalInfo: approvalInfoForm, - userInfoMap: personnelObj, - dataSource: this.dataSource - }) + params.infoJsonStr = JSON.stringify(this.dealSaveJsonData()) params.taskId = this.$route.query.taskId params.prcType = ProcessType.NO_MATCH_TRACKING.value - saveSnapShot(params).then(res => { - if (!res.success) { - console.log(res.message) + saveSnapShot(params).then(async res => { + if (res.success) { + callback && await callback() + } else { + this.$message.warning(res.message) + this.loading = false + this.disabledBtnClick = false } }) }, @@ -710,21 +707,34 @@ export default { } else { submitFunc = submitNoMatchTrackingProcess } - submitFunc(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - if (!(this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId))) { - // 保存快照 - await this.saveParamJsonStr() + if (this.currentNode === NoMatchTrackingNodes.initial.value && (!this.$route.query.processInstanceId || this.$route.query.draftId)) { + submitFunc(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false } - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false - }) + }).finally(() => { + this.loading = false + }) + } else { + // 保存快照后提交 + this.saveParamJsonStr(() => { + submitFunc(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) + }) + } }, /** * 同意 @@ -744,18 +754,19 @@ export default { return } this.loading = true - agreeNoMatchTrackingProcess(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - // 保存快照 - await this.saveParamJsonStr() - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false + // 保存快照 + this.saveParamJsonStr(() => { + agreeNoMatchTrackingProcess(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) }) }, /** @@ -774,18 +785,19 @@ export default { return } this.loading = true - rejectNoMatchTrackingProcess(formData).then(async res => { - if (res.success) { - this.$message.success(res.message) - // 保存快照 - await this.saveParamJsonStr() - this.goBack() - } else { - this.$message.warning(res.message) - this.disabledBtnClick = false - } - }).finally(() => { - this.loading = false + // 保存快照 + this.saveParamJsonStr(() => { + rejectNoMatchTrackingProcess(formData).then(res => { + if (res.success) { + this.$message.success(res.message) + this.goBack() + } else { + this.$message.warning(res.message) + this.disabledBtnClick = false + } + }).finally(() => { + this.loading = false + }) }) }, handleDesignEngineerNameChange (name) { diff --git a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue index f4c79749..650dfcb5 100644 --- a/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue +++ b/src/views/workCenter/projectComplianceEvaluationProcess/ProjectComplianceEvaluationProcess.vue @@ -1,7 +1,7 @@ @@ -127,6 +129,11 @@ export default { default: () => { return [] } + }, + disabled: { + type: Boolean, + required: false, + default: false } }, data () { diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue index e0e452e1..09b900ac 100644 --- a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue +++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue @@ -1,7 +1,7 @@