From 83ad800dca95636883feedf0226e65d904baaaa9 Mon Sep 17 00:00:00 2001 From: danshihao Date: Thu, 11 Jul 2024 16:54:59 +0800 Subject: [PATCH] =?UTF-8?q?[update=20=E6=A0=87=E5=87=86=E8=A7=A3=E8=AF=BB?= =?UTF-8?q?=E6=B5=81=E7=A8=8B]=20=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardInterpretationProcess.vue | 23 ++++++++++--------- .../modules/InterpretationInitiate.vue | 15 +++++++++--- ...nterpretationMainInterpreterDistribute.vue | 1 + 3 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue index 6e85cfd..0c1ab13 100644 --- a/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue +++ b/src/views/workCenter/standardInterpretationProcess/StandardInterpretationProcess.vue @@ -291,7 +291,9 @@ export default { } // 回显业务信息,如果有标识属性就是强制撤回 if (Object.hasOwnProperty.call(infoJson, 'revocation')) { - + this.$nextTick(() => { + this.$refs.businessComp.setData(infoJson.pageData) + }) } } } @@ -367,16 +369,6 @@ export default { projectId: this.projectId }) - // 发起保存草稿信息 - // if (this.isInitiate) { - // params.infoJsonStr = JSON.stringify({ - // // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) - // personInfo: this.$refs.personnelInfo.getDataObj(), - // // 业务表格数据,用于强制撤回后回显 - // draftData: params.processEsInspectPlanList - // }) - // } - params.data = {} // 发起节点 if (this.isInitiate) { @@ -420,6 +412,15 @@ export default { params.data.processStandardInterpretClauseList = [] params.data.processStandardInterpretClauseSublistList = compData.clauseInterpretData } + + // 保存草稿信息 + params.infoJsonStr = JSON.stringify({ + // 人员信息(要重新获取,流程里的信息不能直接用,后端需要多选人员处理成数组了) + personInfo: this.$refs.personnelInfo.getDataObj(), + // 业务表格数据,用于强制撤回后回显 + pageData: params + }) + // 如果有校验失败的,那就报错 if (flag) { throw new Error(flag) diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue index 586daef..90339d3 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationInitiate.vue @@ -139,7 +139,7 @@ export default { * 获取组件内的数据 * @param isValidate - 是否需要校验 */ - getData (isValidate) { + async getData (isValidate) { const obj = {} if (isValidate) { // 如果没有选择标准 @@ -152,12 +152,21 @@ export default { // 选择的标准列表 obj.standardData = this.dataSource // 选择的条款列表 - obj.clauseData = this.$refs.interpretationClauseTable.getData() + if (this.showClauseTable) { + obj.clauseData = this.$refs.interpretationClauseTable.getData() + } return obj }, // 更新组件内的数据 setData (data) { - + this.dataSource = [data.data.processStandardInterpret] + // 如果有条款列表就回显条款列表 + if (data.data.processStandardInterpretClauseList && data.data.processStandardInterpretClauseList.length) { + this.showClauseTable = true + this.$nextTick(() => { + this.$refs.interpretationClauseTable.setData(data.data.processStandardInterpretClauseList) + }) + } }, // 添加标准 handleAddStandard () { diff --git a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue index 782a8f0..f5ea297 100644 --- a/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue +++ b/src/views/workCenter/standardInterpretationProcess/modules/InterpretationMainInterpreterDistribute.vue @@ -277,6 +277,7 @@ export default { } // 是否下发有值就自动带入下一步,并回显数据 if (data.data.processStandardInterpret.isDistribute) { + this.form.setFieldsValue(data.data.processStandardInterpret) this.isNextStep = true this.$nextTick(() => { this.$refs.interpretationClauseTable.setData(this.clauseDataSource)