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

@ -22,6 +22,8 @@ const router = useRouter();
const filter = ref<string>(""); //search data table
const page = ref<number>(1);
const maxPage = ref<number>(1);
const totalList = ref<number>();
const status = ref<string>("NEW");
async function fetchListDisciplinary() {
showLoader();
@ -33,6 +35,7 @@ async function fetchListDisciplinary() {
.then((res) => {
const data = res.data.result.data;
maxPage.value = Math.ceil(res.data.result.total / rowsPerPage.value);
totalList.value = res.data.result.total;
fetchList(data);
})
.catch((err) => {})
@ -57,7 +60,7 @@ async function updatePagingProp(rowPerpage: number, pageCurrent: number) {
function filterStatus(statusReturn: string) {
status.value = statusReturn;
fetchListDisciplinary()
fetchListDisciplinary();
}
/**
@ -88,6 +91,7 @@ onMounted(async () => {
:rowsPerPage="rowsPerPage"
:page="page"
:maxPage="maxPage"
:totalList="totalList"
:fetchListDisciplinary="fetchListDisciplinary"
@update:pagination="updatePagingProp"
v-model:open-edit="openEdit"