feat: add pagination
This commit is contained in:
parent
32b51ff84b
commit
fde6335706
1 changed files with 27 additions and 32 deletions
|
|
@ -225,10 +225,6 @@ const pageState = reactive({
|
||||||
quotationModal: false,
|
quotationModal: false,
|
||||||
employeeModal: false,
|
employeeModal: false,
|
||||||
productServiceModal: false,
|
productServiceModal: false,
|
||||||
|
|
||||||
currentMaxPage: 1,
|
|
||||||
currentPage: 1,
|
|
||||||
pageSize: 30,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const statData = ref<
|
const statData = ref<
|
||||||
|
|
@ -445,9 +441,7 @@ onMounted(async () => {
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
async function fetchQuotationList() {
|
||||||
() => pageState.currentTab,
|
|
||||||
async () => {
|
|
||||||
const ret = await quotationStore.getQuotationList({
|
const ret = await quotationStore.getQuotationList({
|
||||||
page: quotationPage.value,
|
page: quotationPage.value,
|
||||||
pageSize: quotationPageSize.value,
|
pageSize: quotationPageSize.value,
|
||||||
|
|
@ -470,8 +464,9 @@ watch(
|
||||||
}
|
}
|
||||||
|
|
||||||
flowStore.rotate();
|
flowStore.rotate();
|
||||||
},
|
}
|
||||||
);
|
|
||||||
|
watch(() => pageState.currentTab, fetchQuotationList);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -804,10 +799,10 @@ watch(
|
||||||
</div>
|
</div>
|
||||||
<nav class="col-4 row justify-end">
|
<nav class="col-4 row justify-end">
|
||||||
<PaginationComponent
|
<PaginationComponent
|
||||||
v-model:current-page="pageState.currentPage"
|
v-model:current-page="quotationPage"
|
||||||
v-model:max-page="pageState.currentMaxPage"
|
v-model:max-page="quotationPageMax"
|
||||||
|
:fetch-data="fetchQuotationList"
|
||||||
/>
|
/>
|
||||||
<!-- :fetch-data="async () => await fetchUserList()" -->
|
|
||||||
</nav>
|
</nav>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue