fix API ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ === > จัดการรอบสอบแข่งขัน
This commit is contained in:
parent
e22a720975
commit
f5b677e26c
7 changed files with 45 additions and 37 deletions
|
|
@ -42,5 +42,9 @@ export default {
|
|||
exportPassExamList: (id: string) => `${recruit_report}pass/${id}`,
|
||||
periodRecruitToPlacement: (examId: string) => `${recruit}placement/${examId}`,
|
||||
|
||||
reportRecruit:(type:string)=>`${recruit}${type}`
|
||||
reportRecruit:(type:string)=>`${recruit}${type}`,
|
||||
|
||||
|
||||
exportCandidateListNew: (id: string) => `${recruit_report}candidate-new/${id}`,
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -206,40 +206,42 @@ async function fetchData() {
|
|||
* ดาวน์โหลดรายชื่อผู้สอบแข่งขันได้
|
||||
* @param id รอบสอบเเข่งขัน
|
||||
*/
|
||||
function clickPassExam(id: string) {
|
||||
async function clickPassExam(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.exportPassExamList(id))
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
data.reportName = `CandidateList`;
|
||||
genReport(data, data.reportName, "pdf");
|
||||
await genReport(data, data.reportName, "pdf");
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ
|
||||
* @param id รอบสอบเเข่งขัน
|
||||
*/
|
||||
function clickCandidateList(id: string) {
|
||||
async function clickCandidateList(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
.get(config.API.exportCandidateList(id))
|
||||
.then((res) => {
|
||||
await http
|
||||
.get(config.API.exportCandidateListNew(id))
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
data.reportName = `CandidateList`;
|
||||
genReport(data, data.reportName, "pdf");
|
||||
await genReport(data, data.reportName, "pdf");
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -168,37 +168,39 @@ const visibleColumnsHistory = ref<String[]>([
|
|||
]);
|
||||
|
||||
/** ดาวน์โหลดรายชื่อผู้สอบคัดเลือกคนพิการได้ */
|
||||
function clickPassExam(id: string) {
|
||||
async function clickPassExam(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.exportDisablePassExamList(id))
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
data.reportName = `CandidateList`;
|
||||
genReport(data, data.reportName, "pdf");
|
||||
await genReport(data, data.reportName, "pdf");
|
||||
})
|
||||
.catch(async (e) => {
|
||||
hideLoader();
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ */
|
||||
function clickCandidateList(id: string) {
|
||||
async function clickCandidateList(id: string) {
|
||||
showLoader();
|
||||
http
|
||||
await http
|
||||
.get(config.API.exportDisableCandidateList(id))
|
||||
.then((res) => {
|
||||
.then(async (res) => {
|
||||
const data = res.data.result;
|
||||
data.reportName = `CandidateList`;
|
||||
genReport(data, data.reportName, "pdf");
|
||||
await genReport(data, data.reportName, "pdf");
|
||||
})
|
||||
.catch(async (e) => {
|
||||
hideLoader();
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -875,13 +875,13 @@ async function clickdownloadFile(type: string) {
|
|||
`แบบมอบหมายงานการทดลองปฏิบัติหน้าที่ราชการ-${fullname.value}`,
|
||||
type
|
||||
);
|
||||
hideLoader();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
||||
/** เช็ค จำนวนเดือน เเละ วันที่เริ่ม ไม่เท่ากับ undefined*/
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { useRoute, useRouter } from "vue-router";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import { useProbationDataStore } from "@/modules/05_placement/storeProbation";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
|
||||
import FormUploadFile from "@/modules/05_placement/components/probation/FormEvaluation/FormUploadFile.vue";
|
||||
import DialogSelectAuthority from "@/modules/05_placement/components/probation/FormEvaluation/DialogSelectAuthority.vue";
|
||||
|
|
|
|||
|
|
@ -97,13 +97,13 @@ async function FileDownload(type: string) {
|
|||
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
|
||||
type
|
||||
);
|
||||
hideLoader();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
} else {
|
||||
//ผุ้บังคับ
|
||||
showLoader();
|
||||
|
|
@ -116,13 +116,13 @@ async function FileDownload(type: string) {
|
|||
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
|
||||
type
|
||||
);
|
||||
hideLoader();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
hideLoader();
|
||||
})
|
||||
.finally(() => {});
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { useRoute } from "vue-router";
|
|||
import { VuePDF, usePDF } from "@tato30/vue-pdf";
|
||||
import axios from "axios";
|
||||
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue