|
@ -67,6 +67,7 @@ const typeRef = ref() |
|
|
const rowRef = ref() |
|
|
const rowRef = ref() |
|
|
const allSchemasRef = ref() |
|
|
const allSchemasRef = ref() |
|
|
const multipleBol = ref(false) |
|
|
const multipleBol = ref(false) |
|
|
|
|
|
const searchConditionRef = ref() |
|
|
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => { |
|
|
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any ) => { |
|
|
searchDialogVisible.value = true |
|
|
searchDialogVisible.value = true |
|
|
formFieldRef.value = formField |
|
|
formFieldRef.value = formField |
|
@ -84,6 +85,7 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s |
|
|
getListApi: getPage.value // 分页接口 |
|
|
getListApi: getPage.value // 分页接口 |
|
|
}) |
|
|
}) |
|
|
tableObjectRef.value = tableObject |
|
|
tableObjectRef.value = tableObject |
|
|
|
|
|
searchConditionRef.value = searchCondition |
|
|
if (searchCondition) tableObjectRef.value.params = searchCondition; |
|
|
if (searchCondition) tableObjectRef.value.params = searchCondition; |
|
|
|
|
|
|
|
|
// 获得表格的各种操作 |
|
|
// 获得表格的各种操作 |
|
@ -98,16 +100,24 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s |
|
|
const searchFormClick = (searchData) => { |
|
|
const searchFormClick = (searchData) => { |
|
|
// console.log(99, rowRef.value) |
|
|
// console.log(99, rowRef.value) |
|
|
// console.log(100, searchData) |
|
|
// console.log(100, searchData) |
|
|
// console.log(101, tableObjectRef.value.params) |
|
|
// console.log(101, searchConditionRef.value) |
|
|
|
|
|
|
|
|
// 20240104 修改 判断 当前弹窗 是否有条件 如果有条件 需拼接到 筛选中 searchData.filters |
|
|
// 20240104 修改 判断 当前弹窗 是否有条件 如果有条件 需拼接到 筛选中 searchData.filters |
|
|
if (tableObjectRef.value.params) { |
|
|
if (searchConditionRef.value) { |
|
|
Object.keys(tableObjectRef.value.params).forEach(key => { |
|
|
Object.keys(searchConditionRef.value).forEach(key => { |
|
|
|
|
|
if (searchData.filters) { |
|
|
searchData.filters.push({ |
|
|
searchData.filters.push({ |
|
|
action: "==", |
|
|
action: "==", |
|
|
column: key, |
|
|
column: key, |
|
|
value: tableObjectRef.value.params[key] |
|
|
value: searchConditionRef.value[key] |
|
|
}) |
|
|
}) |
|
|
|
|
|
// } |
|
|
|
|
|
} else { |
|
|
|
|
|
searchData.filters = [{ |
|
|
|
|
|
action: "==", |
|
|
|
|
|
column: key, |
|
|
|
|
|
value: searchConditionRef.value[key] |
|
|
|
|
|
}] |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
tableObjectRef.value.params = { |
|
|
tableObjectRef.value.params = { |
|
|