diff --git a/src/views/admin/hospitals/service.vue b/src/views/admin/hospitals/service.vue index 2504a02..f33978d 100644 --- a/src/views/admin/hospitals/service.vue +++ b/src/views/admin/hospitals/service.vue @@ -120,6 +120,12 @@ + + @@ -189,7 +195,7 @@ const hospitals = computed(() => hospitalStore.list); const filters = reactive({ keyword: undefined }); // 月份切换(用于服务操作按钮列对齐设计稿,实际不参与筛选) -const currentMonth = ref(dayjs()); +const currentMonth = ref(''); const currentMonthLabel = computed(() => currentMonth.value.format("YYYY年M月")); const prevMonth = () => { currentMonth.value = currentMonth.value.subtract(1, "month"); @@ -206,17 +212,20 @@ const formatExpiringDays = (n) => { const v = Number(n); return `${v}天`; }; +const total = ref(0); +const page = ref(1); +const pageSize = ref(10); const loadList = async () => { loading.value = true; try { const params = { - page: 1, - pageSize: 200, + page: page.value, + pageSize: pageSize.value, keyword: filters.keyword || undefined, category: filters.category || undefined, - year: currentMonth.value.year(), - month: currentMonth.value.month() + 1, + // year: currentMonth.value.year(), + // month: currentMonth.value.month() + 1, } if (dateRange.value?.length === 2) { params.maintenanceStart = dateRange.value[0]; @@ -224,6 +233,7 @@ const loadList = async () => { } const res = await getAdminMaintenance(params); list.value = res?.list || []; + total.value = res?.total || 0; } finally { loading.value = false; }