From 781573147534cb90fb2fc34b935d4cef0a531853 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 26 Mar 2025 10:47:54 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=20search=20?= =?UTF-8?q?=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=AB=E0=B8=99=E0=B8=B1=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=B7=E0=B8=AD=E0=B9=80=E0=B8=A7=E0=B8=B5=E0=B8=A2?= =?UTF-8?q?=E0=B8=99=E0=B8=96=E0=B8=B6=E0=B8=87=E0=B9=81=E0=B8=81=E0=B9=88?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=A3=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/DialogOrgSelectOneStep.vue | 343 +++++++++--------- 1 file changed, 174 insertions(+), 169 deletions(-) diff --git a/src/components/Dialogs/DialogOrgSelectOneStep.vue b/src/components/Dialogs/DialogOrgSelectOneStep.vue index 08deac9d8..334ad3ed6 100644 --- a/src/components/Dialogs/DialogOrgSelectOneStep.vue +++ b/src/components/Dialogs/DialogOrgSelectOneStep.vue @@ -22,6 +22,7 @@ import type { const { fetchStructureTree } = useStructureTree(); const rows = ref([]); +const rowsData = ref([]); const filterRef = ref(); const filterModal = ref(""); const props = defineProps({ @@ -41,6 +42,7 @@ const { hideLoader, date2Thai, dialogMessageNotify, + onSearchDataTable, } = mixin; const route = useRoute(); @@ -141,6 +143,7 @@ async function getDataTable(id: string, level: number = 0) { .then(async (res) => { const data = await res.data.result.data; rows.value = data; + rowsData.value = data; }) .catch((e) => { messageError($q, e); @@ -242,6 +245,14 @@ function onSubmit() { } } +function onSearch() { + rows.value = onSearchDataTable( + filterModal.value, + rowsData.value, + columns.value ? columns.value : [] + ); +} + onMounted(async () => { await getTreeData(); }); @@ -251,176 +262,170 @@ onMounted(async () => { - - -
- - - - - - - - - - -
- -
- - แสดงทั้งหมด - - - - - - -
-
- - - - -
-
-
-
-
- - - - บันทึกข้อมูล +
+ - - + + + + + + + + + +
+ +
+ + แสดงทั้งหมด + + + + + + +
+
+ + + + +
+
+
+
+ + + + + บันทึกข้อมูล +