วินัย => แสดงรายการทั้งหมด , ตัวชี้วัดตามแผน => ปรับ tree
This commit is contained in:
parent
f7d8256682
commit
7cce2fd1fb
13 changed files with 157 additions and 115 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue