fix: แก้สรรหา

This commit is contained in:
setthawutttty 2025-09-10 12:04:53 +07:00
parent 40e2b34617
commit 22d1fbed58
5 changed files with 17 additions and 18 deletions

View file

@ -104,7 +104,7 @@ async function downloadScore() {
.get(config.API.examReport(importId.value, examId.value))
.then(async (res) => {
const data = res.data.result;
await genReport(data, `ผลคะแนน_${examId.value}.pdf`,'pdf');
await genReport(data, `ผลคะแนน_${examId.value}`, "pdf");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
@ -332,10 +332,10 @@ onMounted(async () => {
ภาคความรความสามารถทใชเฉพาะตำแหน (ภาค )
</div>
<div class="col-xs-3 col-sm-2 q-pr-xs">
{{ scoreAFull ? scoreAFull:'-' }}
{{ scoreAFull ? scoreAFull : "-" }}
</div>
<div class="col-xs-3 col-sm-2 q-pr-xs">
{{ scoreA ? scoreA:'-' }}
{{ scoreA ? scoreA : "-" }}
</div>
<div class="col-xs-2 col-sm-2 q-pr-xs text-grey-7">คะแนน</div>

View file

@ -231,6 +231,7 @@ async function clickPassExam(id: string) {
.get(config.API.exportPassExamList(id))
.then(async (res) => {
const data = res.data.result;
data.reportName = `CandidateList`;
await genReport(data, "รายชื่อผู้สอบแข่งขันได้", "pdf");
})
.catch(async (e) => {

View file

@ -8,6 +8,8 @@ import config from "@/app.config";
import { useCounterMixin } from "@/stores/mixin";
import { useQuasar } from "quasar";
import genReport from "@/plugins/genreport";
const $q = useQuasar();
const router = useRouter();
@ -96,15 +98,10 @@ async function fetchData() {
async function downloadScore() {
showLoader();
await http
.get(config.API.downloadDisableScoreReport(importId.value, examId.value), {
responseType: "blob",
})
.then((res) => {
var a = document.createElement("a");
a.href = URL.createObjectURL(res.data);
a.download = `ผลคะแนน_${examId.value}.pdf`;
// start download
a.click();
.get(config.API.repoetDownloadDisableExam(importId.value, examId.value))
.then(async (res) => {
const data = res.data.result;
await genReport(data, `ผลคะแนน_${examId.value}`, "pdf");
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));

View file

@ -60,6 +60,7 @@ const textTittleScore = ref<string>("");
const textTittleCandidate = ref<string>("");
const textTittleResult = ref<string>("");
const initialPagination = ref<Pagination>({
page: 1,
rowsPerPage: 0,
sortBy: "year",
});
@ -186,9 +187,10 @@ const visibleColumnsHistory = ref<String[]>([
async function clickPassExam(id: string) {
showLoader();
await http
.get(config.API.repoetDownloadDisableExam(id))
.get(config.API.exportDisablePassExamList(id))
.then(async (res) => {
const data = res.data.result;
data.reportName = `CandidateList`;
await genReport(data, "รายชื่อผู้สอบแข่งขันได้", "pdf");
})
.catch(async (e) => {
@ -668,7 +670,8 @@ onMounted(async () => {
round
@click.stop.prevent="clickResult(props.row.id)"
v-if="
(props.row.score == null || props.row.score.resultCount == 0) &&
(props.row.score == null ||
props.row.score.resultCount == 0) &&
checkPermission($route)?.attrIsUpdate
"
>
@ -702,9 +705,7 @@ onMounted(async () => {
@click.stop.prevent="clickPassExam(props.row.id)"
icon="mdi-clipboard-arrow-down"
>
<q-tooltip
>ดาวนโหลดรายชอผสอบแขงขนได</q-tooltip
>
<q-tooltip>ดาวนโหลดรายชอผสอบแขงขนได</q-tooltip>
</q-btn>
</div>
</div>