| | |
| | | }) |
| | | |
| | | const dataList = ref([]) |
| | | const pagination = reactive({ |
| | | const pagination = ref({ |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | } |
| | | |
| | | const changeScheduledPage = (page) => { |
| | | scheduledPagination.currentPage = page.current |
| | | scheduledPagination.pageSize = page.size |
| | | scheduledPagination.currentPage = page.page |
| | | scheduledPagination.pageSize = page.limit |
| | | getScheduledTableData() |
| | | } |
| | | |
| | |
| | | const getTableData = async () => { |
| | | try { |
| | | const params = { |
| | | current: pagination.currentPage, |
| | | size: pagination.pageSize, |
| | | current: pagination.value.currentPage, |
| | | size: pagination.value.pageSize, |
| | | deviceName: filters.deviceName || undefined, |
| | | maintenancePlanTime: filters.maintenancePlanTime ? dayjs(filters.maintenancePlanTime).format('YYYY-MM-DD') : undefined, |
| | | maintenanceActuallyTime: filters.maintenanceActuallyTime ? dayjs(filters.maintenanceActuallyTime).format('YYYY-MM-DD') : undefined, |
| | |
| | | const { code, data } = await getUpkeepPage(params) |
| | | if (code === 200) { |
| | | dataList.value = data.records |
| | | pagination.total = data.total |
| | | pagination.value.total = data.total |
| | | } |
| | | } catch (error) { |
| | | console.log(error); |
| | |
| | | } |
| | | |
| | | const changePage = (page) => { |
| | | pagination.currentPage = page.current |
| | | pagination.pageSize = page.size |
| | | pagination.value.currentPage = page.page |
| | | pagination.value.pageSize = page.limit |
| | | getTableData() |
| | | } |
| | | |