From 8a609fa120b61b6298187c14c0ac86c6675ed567 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Tue, 10 Dec 2024 10:42:47 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A5=E0=B9=80=E0=B8=95?= =?UTF-8?q?=E0=B8=AD=E0=B8=A3=E0=B9=8C=E0=B9=80=E0=B9=80=E0=B8=95=E0=B9=88?= =?UTF-8?q?=E0=B8=87=E0=B8=95=E0=B8=B1=E0=B9=89=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/probation/MainAppoint.vue | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/modules/05_placement/components/probation/MainAppoint.vue b/src/modules/05_placement/components/probation/MainAppoint.vue index b710acdc0..da5322d31 100644 --- a/src/modules/05_placement/components/probation/MainAppoint.vue +++ b/src/modules/05_placement/components/probation/MainAppoint.vue @@ -13,10 +13,18 @@ import DialogOrder from "@/modules/05_placement/components/probation/DialogOrder const $q = useQuasar(); //ใช้ noti quasar const mixin = useCounterMixin(); -const { dialogRemove, showLoader, hideLoader, messageError, success } = mixin; +const { + dialogRemove, + showLoader, + hideLoader, + messageError, + success, + onSearchDataTable, +} = mixin; const router = useRouter(); const rows = ref([]); +const rowsData = ref([]); const rowsOrder = ref([]); const filterKeyword = ref(""); @@ -86,6 +94,7 @@ async function getData() { .then(async (res) => { const data = await res.data.result; rows.value = data; + rowsData.value = data; hideLoader(); }) .catch((e) => { @@ -154,6 +163,14 @@ function closeModal() { rowsOrder.value = []; } +function onSearch() { + rows.value = onSearchDataTable( + filterKeyword.value, + rowsData.value, + columns.value ? columns.value : [] + ); +} + onMounted(async () => { await getData(); }); @@ -187,6 +204,7 @@ onMounted(async () => { outlined debounce="300" placeholder="ค้นหา" + @keydown.enter="onSearch" >