วินัย => แสดงรายการทั้งหมด , ตัวชี้วัดตามแผน => ปรับ 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

@ -139,7 +139,9 @@ function resetFilter() {
const currentPage = ref<number>(1);
const maxPage = ref<number>(1);
const page = ref<number>(1);
const rowsPerPage = ref<number>(10);
const totalList = ref<number>(0);
/**
*pagination ของตาราง
@ -180,6 +182,7 @@ async function getList() {
.then((res) => {
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
const data = res.data.result.data;
totalList.value = res.data.result.total;
dataStore.getData(data);
})
.catch((e) => {
@ -311,6 +314,7 @@ onMounted(() => {
:rows-per-page-options="[10, 25, 50, 100]"
>
<template v-slot:pagination="scope">
งหมด {{ totalList }} รายการ
<q-pagination
v-model="currentPage"
active-color="primary"
@ -345,16 +349,16 @@ onMounted(() => {
}}
</div>
<div v-else-if="col.name === 'title'" class="table_ellipsis">
{{ props.row.title }}
{{ props.row.title ? props.row.title : "-" }}
</div>
<div
v-else-if="col.name === 'organization'"
class="table_ellipsis"
>
{{ props.row.organization }}
{{ props.row.organization ? props.row.organization : "-" }}
</div>
<div v-else>
{{ col.value }}
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>