fix:bug router(-1)
This commit is contained in:
parent
453c674907
commit
86584622fe
8 changed files with 52 additions and 46 deletions
|
|
@ -204,7 +204,6 @@ async function candidateToPlacement() {
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
router.go(-1);
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.onCancel(() => {})
|
.onCancel(() => {})
|
||||||
|
|
@ -238,7 +237,7 @@ async function uploadDataPoint() {
|
||||||
.put(config.API.periodExamUploadPoint(examId.value), formData)
|
.put(config.API.periodExamUploadPoint(examId.value), formData)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "อัพเดทคะแนนสอบสำเร็จ");
|
success($q, "อัพเดทคะแนนสอบสำเร็จ");
|
||||||
files.value = [];
|
props.fetchData();
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -246,7 +245,6 @@ async function uploadDataPoint() {
|
||||||
.finally(async () => {
|
.finally(async () => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
files.value = [];
|
files.value = [];
|
||||||
props.fetchData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -294,6 +292,7 @@ async function checkCandidates() {
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
props.fetchData();
|
||||||
selected.value = [];
|
selected.value = [];
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
|
|
@ -301,21 +300,20 @@ async function checkCandidates() {
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
props.fetchData();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function downloadFilePDF(res: string, fileName: string) {
|
// async function downloadFilePDF(res: string, fileName: string) {
|
||||||
const link = document.createElement("a");
|
// const link = document.createElement("a");
|
||||||
link.href = window.URL.createObjectURL(
|
// link.href = window.URL.createObjectURL(
|
||||||
new Blob([res], {
|
// new Blob([res], {
|
||||||
type: "application/vnd.ms-excel",
|
// type: "application/vnd.ms-excel",
|
||||||
})
|
// })
|
||||||
);
|
// );
|
||||||
link.setAttribute("download", fileName);
|
// link.setAttribute("download", fileName);
|
||||||
document.body.appendChild(link);
|
// document.body.appendChild(link);
|
||||||
link.click();
|
// link.click();
|
||||||
}
|
// }
|
||||||
|
|
||||||
async function candidateCheckProfileDialog() {
|
async function candidateCheckProfileDialog() {
|
||||||
dialogMessage(
|
dialogMessage(
|
||||||
|
|
@ -365,10 +363,10 @@ async function clickPassExam() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportExamPassExamList(examId.value))
|
.get(config.API.exportExamPassExamList(examId.value))
|
||||||
.then(async(res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
||||||
await genReport(data, data.reportName,'pdf');
|
await genReport(data, data.reportName, "pdf");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -382,10 +380,10 @@ async function clickCandidateList() {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.exportExamCandidateList(examId.value))
|
.get(config.API.exportExamCandidateList(examId.value))
|
||||||
.then(async(res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.result;
|
const data = res.data.result;
|
||||||
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`;
|
||||||
await genReport(data, data.reportName,'pdf');
|
await genReport(data, data.reportName, "pdf");
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,14 @@ const $q = useQuasar();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const mixin = useCounterMixin();
|
const mixin = useCounterMixin();
|
||||||
const { messageError, success, showLoader, hideLoader, onSearchDataTable,convertDateToAPI } =
|
const {
|
||||||
mixin;
|
messageError,
|
||||||
|
success,
|
||||||
|
showLoader,
|
||||||
|
hideLoader,
|
||||||
|
onSearchDataTable,
|
||||||
|
convertDateToAPI,
|
||||||
|
} = mixin;
|
||||||
|
|
||||||
const initialPagination = ref<Pagination>({
|
const initialPagination = ref<Pagination>({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
@ -375,7 +381,6 @@ function onSubmitCandidates(date: Date) {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "นำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุ");
|
success($q, "นำผู้ผ่านสอบแข่งขันเข้าสู่ระบบบรรจุ");
|
||||||
modalCandidates.value = false;
|
modalCandidates.value = false;
|
||||||
// router.go(-1);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -409,7 +414,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/compete/period`)"
|
||||||
/>
|
/>
|
||||||
รายชื่อผู้สมัครสอบแข่งขัน {{ name }} ครั้งที่ {{ round }}/{{ year }}
|
รายชื่อผู้สมัครสอบแข่งขัน {{ name }} ครั้งที่ {{ round }}/{{ year }}
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/compete/import/${importId}`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดของผู้สมัครสอบ {{ examID }} : {{ prefix }}{{ fullname }}
|
รายละเอียดของผู้สมัครสอบ {{ examID }} : {{ prefix }}{{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,6 @@ async function onSubmitCandidates(date: Date) {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ");
|
success($q, "นำผู้ผ่านคัดเลือกคนพิการเข้าสู่ระบบบรรจุ");
|
||||||
modalCandidates.value = false;
|
modalCandidates.value = false;
|
||||||
// router.go(-1);
|
|
||||||
})
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
|
|
@ -396,7 +395,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/compete/period`)"
|
||||||
/>
|
/>
|
||||||
รายชื่อผู้สมัครสอบรอบ {{ name }} ครั้งที่ {{ round }}/{{ year }}
|
รายชื่อผู้สมัครสอบรอบ {{ name }} ครั้งที่ {{ round }}/{{ year }}
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
|
||||||
|
|
@ -149,7 +149,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/disable/import/${importId}`)"
|
||||||
/>
|
/>
|
||||||
รายละเอียดของผู้สมัครสอบ {{ examID }} : {{ prefix }}{{ fullname }}
|
รายละเอียดของผู้สมัครสอบ {{ examID }} : {{ prefix }}{{ fullname }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -71,14 +71,15 @@ async function confirm(status: boolean, reason: string) {
|
||||||
status: status,
|
status: status,
|
||||||
reason: reason,
|
reason: reason,
|
||||||
})
|
})
|
||||||
.then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -89,14 +90,15 @@ async function reject(reason: string) {
|
||||||
.put(config.API.candidateRejectRegister(candidateId.value), {
|
.put(config.API.candidateRejectRegister(candidateId.value), {
|
||||||
reason: reason,
|
reason: reason,
|
||||||
})
|
})
|
||||||
.then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
||||||
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลสำเร็จ");
|
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,14 +125,15 @@ async function rejectReverse(reason: string) {
|
||||||
.put(config.API.candidateCheckRegisterReject(candidateId.value), {
|
.put(config.API.candidateCheckRegisterReject(candidateId.value), {
|
||||||
reason: reason,
|
reason: reason,
|
||||||
})
|
})
|
||||||
.then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "สำเร็จ");
|
||||||
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
success($q, "สำเร็จ");
|
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -289,7 +292,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/qualify/manage/${examId}`)"
|
||||||
/>
|
/>
|
||||||
ตรวจสอบคุณสมบัติผู้สมัครสอบรอบคัดเลือก
|
ตรวจสอบคุณสมบัติผู้สมัครสอบรอบคัดเลือก
|
||||||
{{
|
{{
|
||||||
|
|
|
||||||
|
|
@ -73,14 +73,15 @@ async function confirm(status: boolean, reason: string) {
|
||||||
status: status,
|
status: status,
|
||||||
reason: reason,
|
reason: reason,
|
||||||
})
|
})
|
||||||
.then((res) => {})
|
.then(() => {
|
||||||
|
success($q, "ตรวจสอบข้อมูลชำระเงินสำเร็จ");
|
||||||
|
router.push(`/qualify/manage/${examId.value}`);
|
||||||
|
})
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
messageError($q, e);
|
messageError($q, e);
|
||||||
})
|
})
|
||||||
.finally(async () => {
|
.finally(() => {
|
||||||
hideLoader();
|
hideLoader();
|
||||||
success($q, "ตรวจสอบข้อมูลชำระเงินสำเร็จ");
|
|
||||||
router.push(`/qualify/manage/${examId.value}`);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,7 +121,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/qualify/manage/${examId}`)"
|
||||||
/>
|
/>
|
||||||
ตรวจสอบการชำระเงิน
|
ตรวจสอบการชำระเงิน
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,7 @@ onMounted(async () => {
|
||||||
flat
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="q-mr-sm"
|
class="q-mr-sm"
|
||||||
@click="router.go(-1)"
|
@click="router.push(`/qualify/manage`)"
|
||||||
/>
|
/>
|
||||||
{{
|
{{
|
||||||
`${name} ${round == null ? "" : "ครั้งที่ " + round + "/"}${
|
`${name} ${round == null ? "" : "ครั้งที่ " + round + "/"}${
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue