ปรับโหลดไฟล์
This commit is contained in:
parent
53fd998953
commit
82e0ac0fcd
1 changed files with 16 additions and 3 deletions
|
|
@ -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();
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue