From be4f26614373948e52c87705a3b35f77897df468 Mon Sep 17 00:00:00 2001 From: buhuazhen <hua100783@gmail.com> Date: 星期四, 04 九月 2025 11:28:19 +0800 Subject: [PATCH] Merge branch 'dev_bhz' into ywx --- src/views/personnelManagement/scheduling/index.vue | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/views/personnelManagement/scheduling/index.vue b/src/views/personnelManagement/scheduling/index.vue index 35ceac6..2818055 100644 --- a/src/views/personnelManagement/scheduling/index.vue +++ b/src/views/personnelManagement/scheduling/index.vue @@ -106,6 +106,13 @@ </template> </el-table-column> </el-table> + <pagination + v-if="tableCount > 0" + :total="tableCount" + :page="filterForm.current" + :limit="filterForm.size" + @pagination="paginationChange" + /> </div> <!-- 鎵归噺鎿嶄綔 --> @@ -244,7 +251,9 @@ import {save, del, delByIds, listPage} from "@/api/personnelManagement/scheduling.js" import {getStaffOnJob} from "@/api/personnelManagement/onboarding.js"; import dayjs from "dayjs"; +import pagination from "@/components/PIMTable/Pagination.vue"; +const tableCount = ref(0) // 鍝嶅簲寮忔暟鎹� const scheduleDialog = ref(false) const dialogType = ref('add') @@ -255,7 +264,9 @@ const filterForm = reactive({ staffName: '', shiftType: '', - dateRange: [] + dateRange: [], + current:1, + size: 10 }) // 鎺掔彮琛ㄥ崟 @@ -304,7 +315,11 @@ personList.value = res.data }) }; - +const paginationChange = (obj) => { + filterForm.current = obj.page; + filterForm.size = obj.limit; + handleFilter(); +}; const handleSelectStaff = (val) => { let obj = personList.value.find(item => item.id === val) @@ -328,14 +343,14 @@ const handleFilter = async () => { tableLoading.value = true let searchForm = { - staffName: filterForm.staffName, - shiftType: filterForm.shiftType, + ...filterForm, ...(filterForm.dateRange.length > 0 && { startDate: filterForm.dateRange[0], endDate: filterForm.dateRange[1], }) } let resp = await listPage(searchForm) + tableCount.value = resp.data.total scheduleList.value = resp.data.records.map(it => { return { ...it, -- Gitblit v1.9.3