fix: clear row = []

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-10-17 11:04:59 +07:00
parent 3210bbf687
commit 77202be224
3 changed files with 15 additions and 6 deletions

View file

@ -1,7 +1,10 @@
<script setup lang="ts">
import { checkPermission } from "@/utils/permissions";
import { ref, useAttrs, watch } from "vue";
import type { Pagination } from "@/modules/03_recruiting/interface/index/Main";
import type {
Pagination,
ExamResultOption,
} from "@/modules/03_recruiting/interface/index/Main";
const attrs = ref<any>(useAttrs());
const table = ref<any>(null);
@ -48,9 +51,9 @@ const props = defineProps({
},
});
const optionsStatus = ref<any[]>([
const optionsStatus = ref<ExamResultOption[]>([
{ label: "ทั้งหมด", value: "" },
{ label: "ขส.", value: "missed_exam" },
{ label: "ขาดสอบ", value: "missed_exam" },
{ label: "ผ่าน", value: "pass" },
{ label: "ไม่ผ่าน", value: "notpass" },
]);

View file

@ -15,6 +15,11 @@ interface ChangeActive {
id: number;
}
interface ExamResultOption {
label: string;
value: string;
}
//ข้อมูลส่วนตัว
interface Information {
cardid: string | null;
@ -292,4 +297,5 @@ export type {
AddressWeb,
EnableType,
CmsTable,
ExamResultOption,
};

View file

@ -324,17 +324,17 @@ async function fetchData() {
}
const data = res.data.result.data;
let result: RecruitDetailResponse[] = [];
if (data.length > 0) {
let result: RecruitDetailResponse[] = [];
if (data.length > 0) {
data.map((r: RecruitDetailResponse) => {
r.personName = `${r.prefix}${r.fullName}`;
result.push(r);
});
}
rows.value = result;
rowsData.value = result;
}
rows.value = result;
rowsData.value = result;
})
.catch((e) => {
messageError($q, e);