fix: สรรหา ปรับ pagin /โครงสร้าง ปิดดาวโหลดได้เเค่ root ปรับข้อความ

This commit is contained in:
setthawutttty 2025-09-10 11:08:18 +07:00
parent e4bdf45beb
commit 8263697759
8 changed files with 162 additions and 58 deletions

View file

@ -26,6 +26,7 @@ const year = ref<string>("2566");
const round = ref<string>("1");
const name = ref<string>("");
const initialPagination = ref<Pagination>({
page: 1,
rowsPerPage: 0,
sortBy: "examID",
});
@ -33,6 +34,10 @@ const initialPagination = ref<Pagination>({
const count = ref<number>(0);
const pass = ref<number>(0);
const notpass = ref<number>(0);
const missed_exam = ref<number>(0);
const other = ref<number>(0);
const totalList = ref<number>(0);
const importId = ref<string>(route.params.id as string); // Period Import Id
const filter = ref<string>(""); //search data table
@ -293,6 +298,8 @@ async function fetchData() {
.post(config.API.getDisableExamResultById(importId.value), {
examAttribute: "",
examResult: "",
page: initialPagination.value.page,
pageSize: initialPagination.value.rowsPerPage,
})
.then((res) => {
var _data = res.data.result;
@ -300,7 +307,11 @@ async function fetchData() {
count.value = header.count;
pass.value = header.pass;
notpass.value = header.notpass;
missed_exam.value = header.missed_exam;
other.value = header.other;
totalList.value = Math.ceil(
header.count / initialPagination.value.rowsPerPage
);
const data = res.data.result.data;
let result: RecruitDetailResponse[] = [];
if (data.length > 0) {
@ -422,6 +433,9 @@ onMounted(async () => {
:count="count"
:pass="pass"
:notpass="notpass"
:missed_exam="missed_exam"
:other="other"
v-model:totalList="totalList"
:rows="rows"
:columns="columns"
v-model:filter="filter"
@ -432,6 +446,7 @@ onMounted(async () => {
v-model:inputvisible="visibleColumns"
:nornmalData="false"
:conclude="true"
:fetchData="fetchData"
>
<template #columns="props">
<q-tr :props="props" class="cursor-pointer">