fix bug checkin list paging
This commit is contained in:
parent
7b2047d36e
commit
1decea3a19
3 changed files with 13 additions and 8 deletions
|
|
@ -144,6 +144,7 @@ async function fetchListTimeRecord() {
|
|||
keyword: keyword.value.trim(), //keyword ค้นหา
|
||||
profileType: roleStatus.value.trim(), //keyword ค้นหา
|
||||
};
|
||||
|
||||
showLoader();
|
||||
await http
|
||||
.get(
|
||||
|
|
@ -219,10 +220,11 @@ onMounted(async () => {
|
|||
@update:pagination="updatePaging"
|
||||
v-model:role-status="roleStatus"
|
||||
/>
|
||||
|
||||
<TableList
|
||||
:total="total"
|
||||
:rows="rows.length > 0 ? rows : []"
|
||||
:page="page"
|
||||
v-model:page="page"
|
||||
:rowsPerPage="rowsPerPage"
|
||||
:maxPage="maxPage"
|
||||
@update:pagination="updatePaging"
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ onMounted(async () => {
|
|||
<TableList
|
||||
:total="total"
|
||||
:rows="rows.length > 0 ? rows : []"
|
||||
:page="page"
|
||||
v-model:page="page"
|
||||
:rowsPerPage="rowsPerPage"
|
||||
:maxPage="maxPage"
|
||||
@update:pagination="updatePagingProp"
|
||||
|
|
|
|||
|
|
@ -9,15 +9,18 @@ import DialogDetail from "@/modules/09_leave/components/02_WorkList/DialogDetail
|
|||
import DialogEdit from "@/modules/09_leave/components/02_WorkList/DialogEdit.vue";
|
||||
|
||||
const workStore = useWorklistDataStore();
|
||||
const currentPage = defineModel<number>("page", {
|
||||
default: 1,
|
||||
});
|
||||
const props = defineProps({
|
||||
rows: {
|
||||
type: Object,
|
||||
require: true,
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
require: true,
|
||||
},
|
||||
// page: {
|
||||
// type: Number,
|
||||
// require: true,
|
||||
// },
|
||||
rowsPerPage: {
|
||||
type: Number,
|
||||
require: true,
|
||||
|
|
@ -48,10 +51,10 @@ const dataDetail = ref<any>();
|
|||
const modalEdit = ref<boolean>(false);
|
||||
|
||||
/** pagination */
|
||||
const currentPage = ref<number>(1);
|
||||
// const currentPage = ref<number>(1);
|
||||
const pagination = ref({
|
||||
descending: false,
|
||||
page: Number(props.page),
|
||||
page: Number(currentPage.value),
|
||||
rowsPerPage: props.rowsPerPage,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue