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 () => { - - -
- - - - - - - - - - -
- -
- - แสดงทั้งหมด - - - - - - -
-
- - - - -
-
-
-
-
- - - - บันทึกข้อมูล +
+ - - + + + + + + + + + +
+ +
+ + แสดงทั้งหมด + + + + + + +
+
+ + + + +
+
+
+
+ + + + + บันทึกข้อมูล +