fix(查询组件): 过滤组件更新过滤条件级联中过滤条件没有置空或变更

This commit is contained in:
dataeaseShu 2024-07-31 10:39:22 +08:00
parent 788bbbfadc
commit 7950f3f7ce

View File

@ -421,6 +421,16 @@ const computedTree = computed(() => {
let newDatasetId = ''
let oldDatasetId = ''
const handleCurrentChange = node => {
if (!curComponent.value.dataset?.id) return
let id = `${curComponent.value.dataset?.id}--${curComponent.value.id}`
let isChange = false
for (let i in cascadeArr) {
const [fir, sec] = cascadeArr[i]
if (fir?.datasetId.includes(id) || sec?.datasetId.includes(id)) {
isChange = true
}
}
if (!isChange) return
oldDatasetId = curComponent.value.dataset?.id
newDatasetId = node.id
}