更改筛选条件

This commit is contained in:
zhujiyan
2024-07-04 18:15:09 +08:00
parent 664a46fc62
commit 005ce8856b

View File

@@ -693,32 +693,16 @@ const initSearchFormIndexAndCount = (list: any) => {
watch(
() => searchForm.value.index,
(val: any, oldval: any) => {
// countData.value = []
if (val) {
initSearchFormIndexAndCount(val)
if (val == 0) {
countData.value = []
}
}
},
{
deep: true,
immediate: true
}
)
watch(
() => countData.value,
(val: any, oldval: any) => {
if (val) {
if (val.length != searchForm.value.index.length) {
val.map((item: any, index: any) => {
searchForm.value.index.map((vv: any) => {
if (item.index != vv) {
val.splice(index, 1)
}
})
})
}
countData.value.map((item:any,key:any)=>{
if(val.findIndex((vv:any)=>{return vv==item.index})==-1){
countData.value.splice(key,1)
}
})
}
},
{