fix:bug router(-1)

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-11-05 18:05:03 +07:00
parent 453c674907
commit 86584622fe
8 changed files with 52 additions and 46 deletions

View file

@ -204,7 +204,6 @@ async function candidateToPlacement() {
})
.finally(async () => {
hideLoader();
router.go(-1);
});
})
.onCancel(() => {})
@ -238,7 +237,7 @@ async function uploadDataPoint() {
.put(config.API.periodExamUploadPoint(examId.value), formData)
.then(() => {
success($q, "อัพเดทคะแนนสอบสำเร็จ");
files.value = [];
props.fetchData();
})
.catch((e) => {
messageError($q, e);
@ -246,7 +245,6 @@ async function uploadDataPoint() {
.finally(async () => {
hideLoader();
files.value = [];
props.fetchData();
});
}
@ -294,6 +292,7 @@ async function checkCandidates() {
})
.then(() => {
success($q, "ตรวจสอบข้อมูลสำเร็จ");
props.fetchData();
selected.value = [];
})
.catch((e) => {
@ -301,21 +300,20 @@ async function checkCandidates() {
})
.finally(() => {
hideLoader();
props.fetchData();
});
}
async function downloadFilePDF(res: string, fileName: string) {
const link = document.createElement("a");
link.href = window.URL.createObjectURL(
new Blob([res], {
type: "application/vnd.ms-excel",
})
);
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
}
// async function downloadFilePDF(res: string, fileName: string) {
// const link = document.createElement("a");
// link.href = window.URL.createObjectURL(
// new Blob([res], {
// type: "application/vnd.ms-excel",
// })
// );
// link.setAttribute("download", fileName);
// document.body.appendChild(link);
// link.click();
// }
async function candidateCheckProfileDialog() {
dialogMessage(
@ -365,10 +363,10 @@ async function clickPassExam() {
showLoader();
await http
.get(config.API.exportExamPassExamList(examId.value))
.then(async(res) => {
.then(async (res) => {
const data = res.data.result;
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
await genReport(data, data.reportName,'pdf');
await genReport(data, data.reportName, "pdf");
})
.catch((e) => {
messageError($q, e);
@ -382,10 +380,10 @@ async function clickCandidateList() {
showLoader();
await http
.get(config.API.exportExamCandidateList(examId.value))
.then(async(res) => {
.then(async (res) => {
const data = res.data.result;
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
await genReport(data, data.reportName,'pdf');
await genReport(data, data.reportName, "pdf");
})
.catch((e) => {
messageError($q, e);