Browse Source

SearchTable组件添加搜索栏

master_hella_20240701
yufei0306 6 months ago
parent
commit
3f41f1fb7d
  1. 15
      src/components/SearchTable/src/SearchTable.vue

15
src/components/SearchTable/src/SearchTable.vue

@ -1,7 +1,9 @@
<template>
<Dialog :title="dialogTitle" v-model="searchDialogVisible" :width="dialogWidth" >
<!-- 搜索工作栏 -->
<!-- <Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" /> -->
<!-- <ContentWrap>
<Search :schema="searchSchema" @search="setSearchParamsRef" @reset="setSearchParamsRef" />
</ContentWrap> -->
<!-- 列表头部 -->
<TableHead
@ -61,7 +63,7 @@ const getListRef = ref()
const setSearchParamsRef = ref()
const tableObjectRef = ref()
const getPage:any = ref()
// const searchSchema = ref()
const searchSchema = ref()
const tableColumns = ref()
const formFieldRef = ref()
const searchFieldRef = ref()
@ -81,7 +83,7 @@ const openData = (titleName: any, tableObject:any ,allSchemas: any,multiple: any
searchDialogVisible.value = true
multipleBol.value = multiple
allSchemasRef.value = allSchemas
// searchSchema.value = allSchemas.searchSchema
searchSchema.value = allSchemas.searchSchema
tableColumns.value = allSchemas.tableColumns
}
const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, searchField: any,multiple: any, type: any, row: any, searchCondition:any , isCountRequestRe:any,isConcatDetailSchemas=false,detailSchemas: any) => {
@ -94,7 +96,7 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
formFieldRef.value = formField
searchFieldRef.value = searchField
allSchemasRef.value = allSchemas
// searchSchema.value = allSchemas.searchSchema
searchSchema.value = allSchemas.searchSchema
if(isConcatDetailSchemas){
//
console.log('detailSchemas',detailSchemas)
@ -117,9 +119,8 @@ const open = (titleName: any, allSchemas: any,getApiPage: any, formField: any, s
if (searchCondition) tableObjectRef.value.params = searchCondition;
//
const { getList } = tableMethods
// setSearchParamsRef.value = setSearchParams
setSearchParamsRef.value = tableObject.params
const { getList , setSearchParams } = tableMethods
setSearchParamsRef.value = setSearchParams
getListRef.value = getList
getList()
}

Loading…
Cancel
Save