ปรับ pagin รายการลงเวลาปฏิบัติงาน
This commit is contained in:
parent
69927cf089
commit
e8bcbe5fff
3 changed files with 9 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ const $q = useQuasar(); //ใช้ noti quasar
|
||||||
/** ตัวแปร querySting*/
|
/** ตัวแปร querySting*/
|
||||||
const keyword = ref<string>("");
|
const keyword = ref<string>("");
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const rowsPerPage = ref<number>(3);
|
const rowsPerPage = ref<number>(10);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
const filetStatus = ref<string>("ALL");
|
const filetStatus = ref<string>("ALL");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ const rows = ref<TableRows[]>([]);
|
||||||
/** ตัวแปร QueryString*/
|
/** ตัวแปร QueryString*/
|
||||||
const keyword = ref<string>("");
|
const keyword = ref<string>("");
|
||||||
const page = ref<number>(1);
|
const page = ref<number>(1);
|
||||||
const rowsPerPage = ref<number>(2);
|
const rowsPerPage = ref<number>(10);
|
||||||
const maxPage = ref<number>(1);
|
const maxPage = ref<number>(1);
|
||||||
|
|
||||||
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
/** function เรียกข้อมูลรายการลงเวลาปฏิบัติงาน (รายการลงเวลา) */
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@ function closeDetail() {
|
||||||
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
updateProp(pagination.value, currentPage.value);
|
updateProp(pagination.value, currentPage.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function updateRowsPerPagen(newPagination: any) {
|
||||||
|
pagination.value.rowsPerPage = newPagination.rowsPerPage;
|
||||||
|
currentPage.value = 1;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -98,7 +103,8 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
|
||||||
class="custom-header-table"
|
class="custom-header-table"
|
||||||
:visible-columns="workStore.visibleColumns"
|
:visible-columns="workStore.visibleColumns"
|
||||||
:rows-per-page-options="[10, 25, 50, 100]"
|
:rows-per-page-options="[10, 25, 50, 100]"
|
||||||
v-model:pagination="pagination"
|
:pagination="pagination"
|
||||||
|
@update:pagination="updateRowsPerPagen"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue