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

This commit is contained in:
STW_TTTY\stwtt 2024-04-26 10:05:07 +07:00
parent 9f90e4575f
commit b6809d98c2
4 changed files with 12 additions and 0 deletions

View file

@ -13,6 +13,7 @@ import type { ResponseObject } from "@/modules/14_KPI/interface/response/KpiGrou
import http from "@/plugins/http";
import config from "@/app.config";
const total = ref<number>()
const modal = ref<boolean>(false);
const rows = ref<ResponseObject[]>([]);
const groupName = ref<string>("");
@ -84,6 +85,7 @@ async function fetchData() {
`?page=${formQuery.page}&pageSize=${formQuery.pageSize}&keyword=${formQuery.keyword}`
)
.then(async (res) => {
total.value = res.data.result.total
const data = res.data.result;
totalList.value = Math.ceil(res.data.result.total / formQuery.pageSize);
rows.value = data.data;
@ -300,6 +302,7 @@ onMounted(async () => {
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="formQuery.page"
active-color="primary"