From b8f7e7d55f86c8d5e1d7908b9f9542d7c7fb5bc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Tue, 7 Nov 2023 19:02:14 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=9B=E9=80=89=E7=BB=84=E4=BB=B6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 2 +- src/components/TableHead/src/TableHead.vue | 21 ------------------- src/hooks/web/useTable.ts | 3 +++ .../itemManage/itembasic/itembasic.data.ts | 6 +++--- 4 files changed, 7 insertions(+), 25 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 8fdb9d559..65b7e6cac 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -360,7 +360,7 @@ const handleDelete = async (id: number) => { const searchFormClick = (searchData) => { tableObject.params = { isSearch: true, - filters: searchData.filters + filters: searchData.filters?searchData.filters:[{column: "masterId", action: "==", value: masterParmas.value.masterId}] } getList() // 刷新当前列表 } diff --git a/src/components/TableHead/src/TableHead.vue b/src/components/TableHead/src/TableHead.vue index 1dc2ea638..9fbe9fcbd 100644 --- a/src/components/TableHead/src/TableHead.vue +++ b/src/components/TableHead/src/TableHead.vue @@ -8,15 +8,6 @@ />
- - @@ -114,8 +105,6 @@ watch( // 传递给父类 const emit = defineEmits([ 'buttonBaseClick', - 'quicklySearchClick', - 'quicklySearchClear', 'updataTableColumns', 'searchFormClick' ]) @@ -135,16 +124,6 @@ watch( } } - // 快速搜索事件 - const quicklySearchClick = (val, option) => { - emit('quicklySearchClick', val, option) - } - - // 快速搜索清空事件 - const quicklySearchClear = (val, option) => { - emit('quicklySearchClear', val, option) - } - const quicklySearchDom_Ref = ref() // 筛选组件 diff --git a/src/hooks/web/useTable.ts b/src/hooks/web/useTable.ts index 5ff8a519a..34248f9d0 100644 --- a/src/hooks/web/useTable.ts +++ b/src/hooks/web/useTable.ts @@ -173,6 +173,9 @@ export const useTable = (config?: UseTableConfig) => { pageNo: 1, ...data }) + // 查询/重置时,删除筛选相关属性 + delete tableObject.params.filters + delete tableObject.params.isSearch // 页码不等于1时更新页码重新获取数据,页码等于1时重新获取数据 if (tableObject.currentPage !== 1) { tableObject.currentPage = 1 diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts index ff6888f58..625f45926 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts +++ b/src/views/wms/basicDataManage/itemManage/itembasic/itembasic.data.ts @@ -60,10 +60,10 @@ export const Itembasic = useCrudSchemas(reactive([ } , form: { component: 'Switch', - value: 'TRUE', + value: 'ENABLE', componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' + inactiveValue: 'DISABLE', + activeValue: 'ENABLE' } }, },