From 23f7165e94f5122104294672b1ae815676b63904 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 28 May 2024 15:13:29 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E4=BC=81=E6=A0=87=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E4=BF=9D=E5=AD=98=E6=B2=A1=E4=BC=A0onEditFil?= =?UTF-8?q?e=E5=92=8CreplaceFileId=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BC=81?= =?UTF-8?q?=E6=A0=87=E6=9B=B4=E6=94=B9=E6=B5=81=E7=A8=8B=E5=92=8C=E5=88=B6?= =?UTF-8?q?=E4=BF=AE=E8=AE=A2=E6=B5=81=E7=A8=8B=E9=87=8D=E6=96=B0=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E4=BC=81=E6=A0=87=E6=88=96=E8=AE=A1=E5=88=92=E5=A6=82?= =?UTF-8?q?=E6=9E=9C=E6=B2=A1=E6=8D=A2=E4=B8=8D=E9=87=8D=E6=96=B0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EnterpriseStandardChangeFlow.vue | 2 +- .../modules/ApproveBaseInfo.vue | 6 +- .../modules/BaseInfoForm.vue | 5 +- .../modules/MainDrafterInitBaseInfo.vue | 479 +++++++++--------- .../modules/BaseInfoForm.vue | 9 +- 5 files changed, 259 insertions(+), 242 deletions(-) diff --git a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue index 139c56c4..76e1f211 100644 --- a/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue +++ b/src/views/workCenter/enterpriseStandardChange/EnterpriseStandardChangeFlow.vue @@ -354,7 +354,7 @@ export default { this.$message.warning(this.$t('pleaseFillInAtLeastOneItem')) return } - const baseInfoObj = Object.assign({}, baseInfo.formInline) + const baseInfoObj = Object.assign({}, baseInfo.formInline, { onEditFile: baseInfo.onEditFile, replaceFileId: baseInfo.replaceFileId }) if (baseInfo.dataSource) { baseInfoObj.list = baseInfo.dataSource } diff --git a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue index 12a9083e..700a5643 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/ApproveBaseInfo.vue @@ -143,7 +143,8 @@ export default { ], dataSource: [], loading: false, - onEditFile: '' + onEditFile: '', + replaceFileId: '' // 提交或保存时要传给replaceFileId的,防止保存丢失在这里存一下 } }, methods: { @@ -160,6 +161,7 @@ export default { } }) this.onEditFile = data.onEditFile + this.replaceFileId = data.replaceFileId // 给表单赋值 this.$nextTick(() => { this.$refs.baseInfoForm.initData(data) @@ -171,6 +173,8 @@ export default { const data = {} data.formInline = this.$refs.baseInfoForm.getData() data.dataSource = this.dataSource + data.onEditFile = this.onEditFile + data.replaceFileId = this.replaceFileId return data }, handleTableChange (pagination) { diff --git a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue index 2f6bc71f..c1f6ebb7 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/BaseInfoForm.vue @@ -707,7 +707,10 @@ export default { }, // 选完企标编号了,需要回显内容 listChange (value) { - console.log(value) + if (!value[0] || this.formInline.standardId === value[0].id) { + // 说明标准没有换,不更新数据 + return + } this.loading = true this.isEditSetData = true this.$emit('listChange', value) diff --git a/src/views/workCenter/enterpriseStandardChange/modules/MainDrafterInitBaseInfo.vue b/src/views/workCenter/enterpriseStandardChange/modules/MainDrafterInitBaseInfo.vue index 6776a847..0ab8daed 100644 --- a/src/views/workCenter/enterpriseStandardChange/modules/MainDrafterInitBaseInfo.vue +++ b/src/views/workCenter/enterpriseStandardChange/modules/MainDrafterInitBaseInfo.vue @@ -1,245 +1,247 @@