Merge pull request #7674 from dataease/pr@dev-v2_dzz

fix: 批量管理新建计算字段字段类型不显示
This commit is contained in:
dataeaseShu 2024-01-17 17:41:47 +08:00 committed by GitHub
commit 2857573c11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -513,6 +513,10 @@ const confirmEditCalc = () => {
return
}
const obj = cloneDeep(calcEdit.value.fieldForm)
const { deType, dateFormat, deExtractType } = obj
obj.dateFormat = deType === 1 ? dateFormat : ''
obj.dateFormatType = deType === 1 ? dateFormat : ''
obj.deTypeArr = deType === 1 && deExtractType === 0 ? [deType, dateFormat] : [deType]
const result = allfields.value.findIndex(ele => obj.id === ele.id)
if (result !== -1) {
allfields.value.splice(result, 1, obj)