แก้ฟิลเตอร์ สรรหา
This commit is contained in:
parent
3bfb6687e8
commit
50e5652b43
13 changed files with 216 additions and 104 deletions
|
|
@ -23,7 +23,7 @@ import HistoryTable from "@/components/TableHistory.vue";
|
|||
|
||||
const $q = useQuasar(); // show dialog
|
||||
const mixin = useCounterMixin();
|
||||
const { success, dateText, showLoader, hideLoader, messageError } = mixin;
|
||||
const { success, dateText, showLoader, hideLoader, messageError,onSearchDataTable } = mixin;
|
||||
|
||||
const router = useRouter();
|
||||
const name = ref<string>("");
|
||||
|
|
@ -50,6 +50,7 @@ const textTittle = ref<string>("");
|
|||
const textTittleScore = ref<string>("");
|
||||
const textTittleCandidate = ref<string>("");
|
||||
const rows = ref<ResponseRecruitPeriod[]>([]);
|
||||
const rowsData = ref<ResponseRecruitPeriod[]>([]);
|
||||
const initialPagination = ref<Pagination>({
|
||||
rowsPerPage: 0,
|
||||
});
|
||||
|
|
@ -182,6 +183,7 @@ async function fetchData() {
|
|||
}
|
||||
|
||||
rows.value = result;
|
||||
rowsData.value = result;
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
@ -432,6 +434,14 @@ async function checkSave() {
|
|||
});
|
||||
}
|
||||
|
||||
function onSearch() {
|
||||
rows.value = onSearchDataTable(
|
||||
filter.value,
|
||||
rowsData.value,
|
||||
columns.value ? columns.value : []
|
||||
);
|
||||
}
|
||||
|
||||
/** ดึงข้อมูล เมื่อโหลดหน้า component */
|
||||
onMounted(async () => {
|
||||
hideLoader();
|
||||
|
|
@ -449,7 +459,8 @@ onMounted(async () => {
|
|||
style="max-height: 80vh"
|
||||
:rows="rows"
|
||||
:columns="columns"
|
||||
:filter="filter"
|
||||
v-model:filter="filter"
|
||||
:onSearch="onSearch"
|
||||
:visible-columns="visibleColumns"
|
||||
v-model:inputfilter="filter"
|
||||
v-model:inputvisible="visibleColumns"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue