วินัย => แสดงรายการทั้งหมด , ตัวชี้วัดตามแผน => ปรับ tree

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-04-26 14:23:14 +07:00
parent f7d8256682
commit 7cce2fd1fb
13 changed files with 157 additions and 115 deletions

View file

@ -30,6 +30,7 @@ const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const page = ref<number>(1);
const rowsPerPage = ref<number>(10);
const toptitle = ref<number>(0);
/**
*pagination ของตาราง
@ -70,6 +71,8 @@ async function getList() {
)
.then((res) => {
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
toptitle.value = res.data.result.total;
const data = res.data.result.data;
dataInvestigate.fecthList(data);
})
@ -181,17 +184,6 @@ onMounted(async () => {
v-model:pagination="pagination"
:rows-per-page-options="[10, 25, 50, 100]"
>
<template v-slot:pagination="scope">
<q-pagination
v-model="currentPage"
active-color="primary"
color="dark"
:max="Number(maxPage)"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
<template v-slot:header="props">
<q-tr :props="props">
<q-th
@ -236,6 +228,18 @@ onMounted(async () => {
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ toptitle }}รายการ
<q-pagination
v-model="currentPage"
active-color="primary"
color="dark"
:max="Number(maxPage)"
size="sm"
boundary-links
direction-links
></q-pagination>
</template>
</d-table>
</div>
</q-card>