fix API ดาวน์โหลดรายชื่อผู้มีสิทธิ์สอบ === > จัดการรอบสอบแข่งขัน
This commit is contained in:
parent
e22a720975
commit
f5b677e26c
7 changed files with 45 additions and 37 deletions
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue