From 293ebef0ab437d170b89d5091a392cb50105050a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Tue, 9 Jan 2024 17:44:53 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=A0=87=E5=87=86=E5=BE=81=E6=B1=82?= =?UTF-8?q?=E6=84=8F=E8=A7=81=E6=B5=81=E7=A8=8B=E3=80=81=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=B5=81=E7=A8=8B=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StandardConsultationProcess.vue | 31 ++++++++++---- .../StandardProcurementProcess.vue | 41 +++++++++++++------ 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue index 35abcf4d..5edc321a 100644 --- a/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue +++ b/src/views/workCenter/standardConsultationProcess/StandardConsultationProcess.vue @@ -801,16 +801,17 @@ export default { } }, created () { - // 有流程id或者草稿id点进来的 - if (this.$route.query.processInstanceId || this.$route.query.draftId) { - this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value - this.initProcessDetailData() - } else { - this.currentNode = ConsultationProcess.initiate.value - } // 获取人员信息数据 this.getPersonInfoStructure(this.processKey, () => { - this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) + // 有流程id或者草稿id点进来的 + if (this.$route.query.processInstanceId || this.$route.query.draftId) { + this.currentNode = this.$route.query.nodeId || ConsultationProcess.initiate.value + this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) + this.initProcessDetailData() + } else { + this.currentNode = ConsultationProcess.initiate.value + this.initPersonInfoData(this.currentNode.indexOf(ConsultationProcess.initiate.value) === 0) + } }) // 找不到这个节点默认使用审批节点页面及按钮,发起除外 this.nodeEnumsKey = this.currentNode ? ConsultationProcess.keyOfValueByLike(this.currentNode) || 'regulatoryEngineerApproval' : 'initiate' @@ -830,7 +831,12 @@ export default { } queryConsultationProcessDetail(params).then(async res => { if (res.success) { - const { result } = res + let result = res.result || {} + // 草稿有数据需要从草稿里取 + if (result.infoJsonStr) { + result = JSON.parse(result.infoJsonStr) + this.draftInitPersonInfo(result.userInfoMap) + } this.businessId = result.businessId // 处理流程信息 this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) @@ -1095,6 +1101,13 @@ export default { if (!formData) { return } + formData.infoJsonStr = JSON.stringify(formData) + // saveSource:从待办进入保存--1;发起/草稿页面--2 + if (this.$route.query.processInstanceId) { + formData.saveSource = 1 + } else { + formData.saveSource = 2 + } this.loading = true saveConsultationProcess(formData).then(res => { if (res.success) { diff --git a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue index 05901b3e..e6f7ed54 100644 --- a/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue +++ b/src/views/workCenter/standardProcurementProcess/StandardProcurementProcess.vue @@ -269,18 +269,19 @@ export default { } }, created () { - if (this.$route.query.processInstanceId || this.$route.query.draftId) { - this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value - this.initProcessInfo() - } else { - this.currentNode = ProcurementProcessNodes.initiate.value - } - if (this.currentNode === ProcurementProcessNodes.initiate.value) { - this.columns.push(this.operateColumn) - } - this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode) this.getPersonInfoStructure(this.processKey, () => { - this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) + if (this.$route.query.processInstanceId || this.$route.query.draftId) { + this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value + this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) + this.initProcessInfo() + } else { + this.currentNode = ProcurementProcessNodes.initiate.value + this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value) + } + if (this.currentNode === ProcurementProcessNodes.initiate.value) { + this.columns.push(this.operateColumn) + } + this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode) }) }, methods: { @@ -337,7 +338,11 @@ export default { } queryProcurementProcessInfo(params).then(res => { if (res.success) { - const { result } = res + let result = res.result || {} + if (result.infoJsonStr) { + result = JSON.parse(result.infoJsonStr) + this.draftInitPersonInfo(result.userInfoMap) + } this.businessId = result.businessId this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {}) this.dataSource = result.businessInfoDTO || [] @@ -447,6 +452,16 @@ export default { */ handleSave () { const formData = this.dealFormData(true) + if (!formData) { + return + } + formData.infoJsonStr = JSON.stringify(formData) + // saveSource:从待办进入保存--1;发起/草稿页面--2 + if (this.$route.query.processInstanceId) { + formData.saveSource = 1 + } else { + formData.saveSource = 2 + } this.loading = true saveProcurementProcess(formData).then(res => { if (res.success) { @@ -582,4 +597,4 @@ export default { \ No newline at end of file +