CN-1442 fix: 修复Detections多个搜索条件时,去除其中一个,再点击左侧filter刚去除那项导致删除参数错误的问题

This commit is contained in:
刘洪洪
2023-10-31 17:54:51 +08:00
parent f151415de6
commit 41d2f48766

View File

@@ -555,6 +555,8 @@ export default {
const column = this.columnList.find(c => { const column = this.columnList.find(c => {
return c.label === param.column return c.label === param.column
}) })
const obj = this.metaList.find(d => d.column && d.column.label === param.column && d.value && d.value.value === param.value[0])
if (obj) {
const metaIndex = this.metaList.findIndex(m => m.column && m.column.label === param.column && m.operator.value === param.operator && m.value.value === this.handleValue(param.value, column, param.operator)) const metaIndex = this.metaList.findIndex(m => m.column && m.column.label === param.column && m.operator.value === param.operator && m.value.value === this.handleValue(param.value, column, param.operator))
// 不是在首位则删除时顺带删除前一个indexand或or否则顺带删除后一个index // 不是在首位则删除时顺带删除前一个indexand或or否则顺带删除后一个index
if (metaIndex > 0) { if (metaIndex > 0) {
@@ -564,6 +566,7 @@ export default {
} else { } else {
this.metaList.splice(metaIndex, 2) this.metaList.splice(metaIndex, 2)
} }
}
}) })
}, },
/** /**