fix(仪表板): 修复文本搜索在使用查询组件的清空和重置时无效的问题

This commit is contained in:
dataeaseShu 2024-04-17 18:25:52 +08:00
parent ec861e2a9e
commit 4f48876cbd

View File

@ -293,6 +293,12 @@ const delQueryConfig = index => {
const resetData = () => { const resetData = () => {
;(list.value || []).reduce((pre, next) => { ;(list.value || []).reduce((pre, next) => {
if (next.defaultConditionValueF?.length) {
next.conditionValueF = next.defaultConditionValueF
}
if (next.defaultConditionValueS?.length) {
next.conditionValueS = next.defaultConditionValueS
}
if (!next.defaultValueCheck) { if (!next.defaultValueCheck) {
next.defaultValue = next.multiple || +next.displayType === 7 ? [] : undefined next.defaultValue = next.multiple || +next.displayType === 7 ? [] : undefined
} }
@ -302,8 +308,6 @@ const resetData = () => {
? [...next.defaultMapValue] ? [...next.defaultMapValue]
: next.defaultMapValue : next.defaultMapValue
} }
next.conditionValueF = next.defaultConditionValueF
next.conditionValueS = next.defaultConditionValueS
const keyList = Object.entries(next.checkedFieldsMap) const keyList = Object.entries(next.checkedFieldsMap)
.filter(ele => next.checkedFields.includes(ele[0])) .filter(ele => next.checkedFields.includes(ele[0]))
.filter(ele => !!ele[1]) .filter(ele => !!ele[1])