แก้สมัครสอบ

This commit is contained in:
kittapath 2025-01-05 21:56:56 +07:00
parent c1cae5a785
commit 1580691d52
6 changed files with 73 additions and 71 deletions

View file

@ -11,6 +11,7 @@ import { useQuasar } from "quasar";
import type { RecruitDetailResponse } from "@/modules/03_recruiting/interface/response/Period";
import Table from "@/modules/03_recruiting/components/Table.vue";
import genReportXLSX from "@/plugins/genreportxlsx";
const $q = useQuasar();
const router = useRouter();
@ -34,6 +35,8 @@ const visibleColumns = ref<String[]>([
"dateOfBirth",
"gender",
"position_name",
"position_type",
"position_level",
"university",
"degree",
"major",
@ -120,6 +123,34 @@ const columns = ref<QTableProps["columns"]>([
sensitivity: "base",
}),
},
{
name: "position_type",
align: "left",
label: "ประเภทที่สมัคร",
sortable: true,
field: "position_type",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "position_level",
align: "left",
label: "ระดับที่สมัคร",
sortable: true,
field: "position_level",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
sort: (a: string, b: string) =>
a.localeCompare(b, undefined, {
numeric: true,
sensitivity: "base",
}),
},
{
name: "university",
align: "left",
@ -250,15 +281,10 @@ function clickDetail(examID: string) {
async function downloadExam() {
showLoader();
await http
.get(config.API.exportExam(importId.value), {
responseType: "blob",
})
.then((res) => {
var a = document.createElement("a");
a.href = URL.createObjectURL(res.data);
a.download = `รายชื่อผู้มีสิทธิ์สอบ.xlsx`;
// start download
a.click();
.get(config.API.exportExam(importId.value))
.then(async (res) => {
const dataList = res.data.result;
await genReportXLSX(dataList, "ส่งออกข้อมูลผู้มีสิทธิ์สอบ");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
@ -272,15 +298,10 @@ async function downloadExam() {
async function downloadPassExam() {
showLoader();
await http
.get(config.API.exportPassExam(importId.value), {
responseType: "blob",
})
.then((res) => {
var a = document.createElement("a");
a.href = URL.createObjectURL(res.data);
a.download = `รายชื่อสอบผ่านภาค_ก.xlsx`;
// start download
a.click();
.get(config.API.exportPassExam(importId.value))
.then(async (res) => {
const dataList = res.data.result;
await genReportXLSX(dataList, "ส่งออกข้อมูลผู้สอบผ่านภาค ก.");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
@ -294,15 +315,10 @@ async function downloadPassExam() {
async function downloadPassResultExam() {
showLoader();
await http
.get(config.API.exportPassResultExam(importId.value), {
responseType: "blob",
})
.then((res) => {
var a = document.createElement("a");
a.href = URL.createObjectURL(res.data);
a.download = `รายชื่อสอบแข่งขันได้.xlsx`;
// start download
a.click();
.get(config.API.exportPassResultExam(importId.value))
.then(async (res) => {
const dataList = res.data.result;
await genReportXLSX(dataList, "ส่งออกข้อมูลผู้สอบแข่งขันได้");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));