fix: pageing

This commit is contained in:
setthawutttty 2025-09-24 11:37:49 +07:00
parent 33e7877e6e
commit c8d061e43a
3 changed files with 13 additions and 6 deletions

View file

@ -30,6 +30,7 @@ const year = ref<string>("");
const round = ref<string>("");
const name = ref<string>("");
const count = ref<number>(0);
const total = ref<number>(0);
const totalList = ref<number>(0);
const pass = ref<number>(0);
const notpass = ref<number>(0);
@ -368,8 +369,9 @@ async function fetchData() {
notpass.value = header.notpass;
missed_exam.value = header.missed_exam;
other.value = header.other;
total.value = res.data.result.total;
totalList.value = Math.ceil(
header.count / initialPagination.value.rowsPerPage
res.data.result.total / initialPagination.value.rowsPerPage
);
if (period != null) {
name.value = period.name;
@ -505,6 +507,7 @@ onMounted(async () => {
v-model:inputfilter="filter"
v-model:inputvisible="visibleColumns"
v-model:totalList="totalList"
v-model:total="total"
v-model:pagination="initialPagination"
:nornmalData="false"
:conclude="true"