อัตรากำลังลูกจ้างประจำฯ => บัค pagination

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-19 15:31:12 +07:00
parent 55709b6439
commit bb0e6a69bf
3 changed files with 48 additions and 4 deletions

View file

@ -118,11 +118,26 @@ function onClickMovePos() {
}
}
/**
* function updatePagination
* @param newPagination อม Pagination ใหม
*/
function updatePagination(newPagination: any) {
reqMaster.value.pageSize = newPagination.rowsPerPage;
reqMaster.value.page = 1;
}
const pagination = ref({
page: reqMaster.value.page,
rowsPerPage: reqMaster.value.pageSize,
});
watch(
() => modal.value,
() => {
reqMaster.value.page = 1;
filterTree.value = "";
pagination.value.rowsPerPage = reqMaster.value.pageSize;
title.value = `ย้ายตำแหน่งจากหน่วยงาน/ส่วนราชการปัจจุบัน ${props.mainTree.orgName}`;
if (modal.value && props.type === "SINGER") {
@ -166,6 +181,9 @@ watch(
no-data-label="ไม่มีข้อมูล"
selection="multiple"
v-model:selected="selectedFilter"
:rows-per-page-options="[10, 25, 50, 100]"
v-model:pagination="pagination"
@update:pagination="updatePagination"
>
<template v-slot:header-selection="scope">
<q-checkbox