From 3caf3510c30415214f6f253fbbc0aeb1feab304e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E9=9C=84?= Date: Fri, 20 Oct 2023 16:08:53 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=96=87=E6=A1=A3=E6=8B=86=E5=88=86-?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../documentSplit/modules/SplitAddForm.vue | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/views/documentTool/documentSplit/modules/SplitAddForm.vue b/src/views/documentTool/documentSplit/modules/SplitAddForm.vue index f1d390ef..67993fa2 100644 --- a/src/views/documentTool/documentSplit/modules/SplitAddForm.vue +++ b/src/views/documentTool/documentSplit/modules/SplitAddForm.vue @@ -283,9 +283,6 @@ export default { indexArr[1] = this.dataList.findIndex(tt => tt.dbFieldName === 'cer_implement_date') // 新注册实施日期 indexArr[2] = this.dataList.findIndex(tt => tt.dbFieldName === 'new_register_implement_date') - delete this.formInline.new_cer_implement_date - delete this.formInline.cer_implement_date - delete this.formInline.new_register_implement_date if (value === YesOrNoEnum.YES.value) { indexArr.forEach(index => { this.$set(this.dataList[index], 'fieldShowType', FieldType.DATE_MORE.value) @@ -439,7 +436,28 @@ export default { loadFormInfo () { getDocSplitEditFormData({ id: this.itemVal.id }).then(res => { if (res.success) { + // 处理树结构多选回显 + const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), []) + const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value) this.formInline = Object.assign({}, res.result) + treeMultipleField.forEach(field => { + const valueArr = [] + if (this.formInline[field.dbFieldName]) { + const values = this.formInline[field.dbFieldName].split(',') + for (let i = 0; i < values.length; i++) { + valueArr[i] = { + value: values[i] + } + } + this.formInline[field.dbFieldName] = valueArr + } else { + this.formInline[field.dbFieldName] = undefined + } + }) + const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value) + dictField.forEach(field => { + this.formInline[field.dbFieldName] = this.formInline[field.dbFieldName] || null + }) // 是否长期有效默认选否 if (!this.formInline.is_long_effect) { this.$set(this.formInline, 'is_long_effect', YesOrNoEnum.NO.value) @@ -847,6 +865,11 @@ export default { /deep/ table { width: 100%; } + + /deep/ img { + max-width: 100%; + max-height: 500px; + } } &-operate {