update 文档拆分-编辑

This commit is contained in:
赵霄
2023-10-20 16:08:53 +08:00
parent 37235e707f
commit 3caf3510c3
@@ -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 {