ฟิลเตอร์เเต่งตั้ง
This commit is contained in:
parent
0ce0ba8723
commit
8a609fa120
1 changed files with 19 additions and 2 deletions
|
|
@ -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<AppointMainRows[]>([]);
|
||||
const rowsData = ref<AppointMainRows[]>([]);
|
||||
const rowsOrder = ref<AppointMainRows[]>([]);
|
||||
|
||||
const filterKeyword = ref<string>("");
|
||||
|
|
@ -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"
|
||||
>
|
||||
<template v-slot:append>
|
||||
<q-icon name="search" />
|
||||
|
|
@ -214,7 +232,6 @@ onMounted(async () => {
|
|||
ref="table"
|
||||
:columns="columns"
|
||||
:rows="rows"
|
||||
:filter="filterKeyword.trim()"
|
||||
row-key="Order"
|
||||
flat
|
||||
:visible-columns="visibleColumns"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue