filter keyword
This commit is contained in:
parent
c7aa139d74
commit
039d4081d6
2 changed files with 20 additions and 18 deletions
|
|
@ -120,6 +120,12 @@ async function fetchDataTable(id: string, level: number, action: boolean) {
|
|||
});
|
||||
}
|
||||
|
||||
async function filterKeyword() {
|
||||
reqMaster.page = 1;
|
||||
action1.value === false &&
|
||||
fetchDataTable(reqMaster.id, reqMaster.type, false);
|
||||
}
|
||||
|
||||
/**lifecycle Hook*/
|
||||
onMounted(async () => {
|
||||
const id =
|
||||
|
|
@ -197,6 +203,7 @@ watch(
|
|||
v-model:reqMaster="reqMaster"
|
||||
v-model:totalPage="totalPage"
|
||||
v-model:posMaster="posMaster"
|
||||
:filterKeyword="filterKeyword"
|
||||
/>
|
||||
|
||||
<q-banner v-else class="q-pa-lg col-12 text-center">
|
||||
|
|
|
|||
|
|
@ -17,6 +17,10 @@ import DialogSort from "@/modules/02_organizationalNew/components/DialogSortPosi
|
|||
/** importStore*/
|
||||
import { useOrganizational } from "@/modules/02_organizationalNew/store/organizational";
|
||||
|
||||
const props = defineProps({
|
||||
filterKeyword: { type: Function, require: true, default: () => {} },
|
||||
});
|
||||
|
||||
const dataSort = ref<Array<any>>([]);
|
||||
const modalSort = ref<boolean>(false);
|
||||
const showAllData = ref<boolean>(false);
|
||||
|
|
@ -188,22 +192,6 @@ const columnsExpand = ref<QTableProps["columns"]>([
|
|||
style: "font-size: 14px",
|
||||
},
|
||||
]);
|
||||
const rows = ref<any>([
|
||||
{
|
||||
noPosition: "สกง.1",
|
||||
namePosition: "นักทรัพยากรบุคคล",
|
||||
typePosition: "ทั่วไป",
|
||||
levelPositoion: "ชำนาญการ / ?",
|
||||
isStatus: "ไม่มี",
|
||||
},
|
||||
{
|
||||
noPosition: "สกง.2",
|
||||
namePosition: "นักทรัพยากรบุคคล",
|
||||
typePosition: "ทั่วไป",
|
||||
levelPositoion: "ชำนาญการ / ?",
|
||||
isStatus: "ไม่มี",
|
||||
},
|
||||
]);
|
||||
|
||||
const dialogPosition = ref<boolean>(false);
|
||||
function onClickPosition(type: string) {
|
||||
|
|
@ -281,7 +269,15 @@ function updatePagination(newPagination: NewPagination) {
|
|||
>
|
||||
</q-checkbox>
|
||||
</div>
|
||||
<div><q-input outlined dense v-model="filter" label="ค้นหา" /></div>
|
||||
<div>
|
||||
<q-input
|
||||
outlined
|
||||
dense
|
||||
v-model="reqMaster.keyword"
|
||||
label="ค้นหา"
|
||||
@keydown.enter.prevent="props.filterKeyword(reqMaster.keyword)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
|
|
@ -298,7 +294,6 @@ function updatePagination(newPagination: NewPagination) {
|
|||
:paging="true"
|
||||
dense
|
||||
:rows-per-page-options="[10, 25, 50, 100]"
|
||||
:filter="filter"
|
||||
@update:pagination="updatePagination"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue