This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-24 15:57:23 +07:00
parent 5246a694d4
commit 53fc2493e3
9 changed files with 100 additions and 45 deletions

View file

@ -127,6 +127,10 @@ export const useChangeRoundDataStore = defineStore(
console.log(profileId);
profileId.value = id;
}
const maxPageMain = ref<number>(0);
const totalListMain = ref<number>(0);
function fetchDataForCardId(dataDetail: any) {
if (dataDetail) {
showLoader();
@ -141,6 +145,10 @@ export const useChangeRoundDataStore = defineStore(
})
.then((res) => {
const apiData = res.data.result.data;
totalListMain.value = res.data.result.total;
maxPageMain.value = Math.ceil(
totalListMain.value / dataDetail.pageSize
);
if (apiData.length > 0) {
checkCilck.value = false;
rows.value = apiData.map((e: any) => ({
@ -238,6 +246,9 @@ export const useChangeRoundDataStore = defineStore(
changePage,
total,
maxPage,
totalListMain,
maxPageMain,
};
}
);