fix(查询组件): 过滤组件设置默认值清除默认值后依然存留数值

This commit is contained in:
dataeaseShu 2024-10-17 14:25:48 +08:00
parent 9cf47cac1c
commit cdba09d38d
2 changed files with 16 additions and 0 deletions

View File

@ -697,6 +697,21 @@ const setParameters = field => {
curComponent.value.optionValueSource = 1
}
}
if (curComponent.value.displayType === '22') {
const isNumParameter = curComponent.value.checkedFields.some(ele => {
return curComponent.value.parameters?.some(
itx => [2, 3].includes(itx.deType) && curComponent.value.checkedFieldsMap[ele] === itx.id
)
})
const isSingle = curComponent.value.checkedFields.every(id => {
return !curComponent.value.checkedFieldsMapArr?.[id]?.length
})
if (isSingle && isNumParameter) {
curComponent.value.displayType = '2'
}
}
setTypeChange()
})
setType()

View File

@ -79,6 +79,7 @@ const maxDate = new Date('2100/1/1')
watch(
() => config.value.defaultValue,
val => {
if (props.isConfig) return
const isMultiple = config.value.displayType === '7'
if (isMultiple) {
multiple.value = isMultiple