From a74553c14b2cd4aa1b63b02fd08b9c654abc9753 Mon Sep 17 00:00:00 2001 From: zhanghan2021 Date: Wed, 6 Dec 2023 14:14:34 +0800 Subject: [PATCH] Add advanced search functionality --- atune/web/src/api/atune.ts | 9 ++++++ atune/web/src/components/atuneList.vue | 45 ++++++++++++++++++++------ atune/web/src/views/Home.vue | 19 ++++++++--- 3 files changed, 60 insertions(+), 13 deletions(-) diff --git a/atune/web/src/api/atune.ts b/atune/web/src/api/atune.ts index 286fc9ee..ba885ed0 100644 --- a/atune/web/src/api/atune.ts +++ b/atune/web/src/api/atune.ts @@ -43,3 +43,12 @@ export function deleteTune(data: object) { data, }); } + +// 高级搜索模板列表分页 +export function searchTune(data: object) { + return request({ + url: '/plugin/atune/search', + method: 'get', + params: data, + }); +} diff --git a/atune/web/src/components/atuneList.vue b/atune/web/src/components/atuneList.vue index 8bf249ec..109c6590 100644 --- a/atune/web/src/components/atuneList.vue +++ b/atune/web/src/components/atuneList.vue @@ -16,8 +16,8 @@ diff --git a/atune/web/src/views/Home.vue b/atune/web/src/views/Home.vue index f6da6abd..506438d4 100644 --- a/atune/web/src/views/Home.vue +++ b/atune/web/src/views/Home.vue @@ -12,13 +12,15 @@

调优模板

- - 搜索 + + 搜索 删除
- + +
@@ -38,6 +40,8 @@ import atuneTemplete from '@/components/atuneTemplete.vue' const atuneTree = ref([]); const selectedNodeData = ref(""); +const searchTuneName = ref("") +const searchTune = ref(false) const showDialog = ref(false); const selectedRows = ref([] as Atune[]) const refreshData = ref(false); @@ -61,9 +65,16 @@ const handleSelectionChange = (selected_Rows: any) => { selectedRows.value = selected_Rows; } +// 刷新 const handleDataUpdated = () => { refreshData.value = !refreshData.value; }; + +// 搜索 +const handleSearch = () => { + searchTune.value = !searchTune.value; +}; + // 删除 const handleDelete = () => { ElMessageBox.confirm('确定要删除吗?', '提示', { -- Gitee