รายการ ทั้งหมด

This commit is contained in:
STW_TTTY\stwtt 2024-04-29 18:04:55 +07:00
parent bebdfbfce5
commit efb095b37a
4 changed files with 8 additions and 0 deletions

View file

@ -208,6 +208,7 @@ watch([() => currentPage.value, () => pagination.value.rowsPerPage], () => {
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ store.row.length }} รายการ
<q-pagination
v-model="currentPage"
active-color="primary"

View file

@ -14,6 +14,7 @@ import config from "@/app.config";
import type { FormType } from "@/modules/07_appealComplain/interface/response/mainType";
import type { DataOption } from "@/modules/07_appealComplain/interface/index/main";
const total = ref<number>(0)
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const page = ref<number>(1);
@ -174,6 +175,7 @@ const getData = async () => {
)
)
.then((res: any) => {
total.value = res.data.result.total
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
let data = res.data.result.data;
dataStore.fetchAppealComplain(data);
@ -390,6 +392,7 @@ onMounted(async () => {
:rows-per-page-options="[10, 25, 50, 100]"
>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="currentPage"
active-color="primary"

View file

@ -101,6 +101,7 @@ const formQuery = reactive({
page: 1,
pageSize: 10,
});
const total = ref<number>(0);
const totalList = ref<number>(1);
const isRoundClose = ref<boolean>(false);
@ -150,6 +151,7 @@ function fetchList() {
)
.then((res) => {
const data = res.data.result;
total.value = data.total;
totalList.value = Math.ceil(data.total / formQuery.pageSize);
rows.value = data.data;
})
@ -460,6 +462,7 @@ onMounted(() => {
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="formQuery.page"
active-color="primary"

View file

@ -327,6 +327,7 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ rows.length }} รายการ
<q-pagination
v-model="formQuery.page"
active-color="primary"