diff --git a/src/components/SearchTable/src/SearchTable.vue b/src/components/SearchTable/src/SearchTable.vue index 299c1070b..011ff68f4 100644 --- a/src/components/SearchTable/src/SearchTable.vue +++ b/src/components/SearchTable/src/SearchTable.vue @@ -98,27 +98,37 @@ 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 => { - if (searchData.filters) { - searchData.filters.push({ - action: "==", - column: key, - value: searchConditionRef.value[key] - }) - // } - } else { + // 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,