Browse Source

筛选条件优化

master_hella_20240701
陈薪名 8 months ago
parent
commit
c7be9e729d
  1. 24
      src/components/SearchTable/src/SearchTable.vue

24
src/components/SearchTable/src/SearchTable.vue

@ -98,28 +98,38 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
//
const searchFormClick = (searchData) => {
// console.log(99, rowRef.value)
// console.log(100, searchData)
// console.log(101, searchConditionRef.value)
console.log(99, rowRef.value)
console.log(100, searchData)
console.log(101, searchConditionRef.value)
// 20240104 searchData.filters
if (searchConditionRef.value) {
Object.keys(searchConditionRef.value).forEach(key => {
// 20240321 searchData
if (searchData.filters) {
if (searchConditionRef.value.filters) {
Object.keys(searchConditionRef.value.filters).forEach(key => {
searchData.filters.push(searchConditionRef.value.filters[key])
});
} else {
Object.keys(searchConditionRef.value).forEach(key => {
searchData.filters.push({
action: "==",
column: key,
value: searchConditionRef.value[key]
})
// }
});
}
} else {
if (searchConditionRef.value.filters) {
searchData.filters = searchConditionRef.value.filters
} else {
Object.keys(searchConditionRef.value).forEach(key => {
searchData.filters = [{
action: "==",
column: key,
value: searchConditionRef.value[key]
}]
}
});
}
}
tableObjectRef.value.params = {
isSearch: true,
filters: searchData.filters

Loading…
Cancel
Save