ปรับโหลดไฟล์

This commit is contained in:
setthawutttty 2025-01-13 18:08:51 +07:00
parent 53fd998953
commit 82e0ac0fcd

View file

@ -4,6 +4,7 @@ import type { QTableProps } from "quasar";
import { onMounted, ref } from "vue";
import { useRouter } from "vue-router";
import { useQuasar } from "quasar";
import genReport from "@/plugins/genreport";
import http from "@/plugins/http";
import config from "@/app.config";
@ -203,7 +204,19 @@ function clickPassExam(id: string) {
* @param id รอบสอบเเขงข
*/
function clickCandidateList(id: string) {
window.open(config.API.exportCandidateList(id));
http
.get(config.API.exportCandidateList(id))
.then((res) => {
const data = res.data.result;
data.reportName = `CandidateList`
genReport(data, data.reportName,'pdf');
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
});
}
/**
@ -329,7 +342,7 @@ async function clickClose() {
/** ปิด dialog คะเเนน */
async function clickCloseScore() {
modalScore.value = false;
files_score.value = null
files_score.value = null;
await fetchData();
}
@ -370,7 +383,7 @@ async function checkSaveScore() {
.then((res) => {
success($q, "นำเข้าข้อมูลผลคะแนนสอบสำเร็จ");
modalScore.value = false;
files_score.value = null
files_score.value = null;
selected_row_id.value = "";
fetchData();
})