CN-1442 fix: 修复Detections多个搜索条件时,去除其中一个,再点击左侧filter刚去除那项导致删除参数错误的问题
This commit is contained in:
@@ -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))
|
||||||
// 不是在首位,则删除时顺带删除前一个index(and或or),否则顺带删除后一个index
|
// 不是在首位,则删除时顺带删除前一个index(and或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)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user