From 6f05aa81ee25a1019c249fc5c025a3c34bdeaed9 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Wed, 29 Jan 2025 11:21:54 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=AA=E0=B8=A3?= =?UTF-8?q?=E0=B8=A3=E0=B8=AB=E0=B8=B2=20=E0=B8=9F=E0=B8=B4=E0=B8=A5?= =?UTF-8?q?=E0=B9=80=E0=B8=95=E0=B8=AD=E0=B8=A3=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/TableCandidate.vue | 12 +++++++---- .../views/02_qualify/DisablePeriod.vue | 20 +++++++++++-------- .../03_recruiting/views/02_qualify/Period.vue | 7 ++++--- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/src/modules/03_recruiting/components/TableCandidate.vue b/src/modules/03_recruiting/components/TableCandidate.vue index aab9cc439..869216ee2 100644 --- a/src/modules/03_recruiting/components/TableCandidate.vue +++ b/src/modules/03_recruiting/components/TableCandidate.vue @@ -365,8 +365,10 @@ async function clickPassExam() { showLoader(); await http .get(config.API.exportExamPassExamList(examId.value)) - .then(() => { - window.open(config.API.exportExamPassExamList(examId.value)); + .then(async(res) => { + const data = res.data.result; + data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; + await genReport(data, data.reportName,'pdf'); }) .catch((e) => { messageError($q, e); @@ -380,8 +382,10 @@ async function clickCandidateList() { showLoader(); await http .get(config.API.exportExamCandidateList(examId.value)) - .then(() => { - window.open(config.API.exportExamCandidateList(examId.value)); + .then(async(res) => { + const data = res.data.result; + data.reportName = `Candidate_Dashboard_${dateToISO(new Date())}`; + await genReport(data, data.reportName,'pdf'); }) .catch((e) => { messageError($q, e); diff --git a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue index 50f8a367a..b12dc148d 100644 --- a/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue +++ b/src/modules/03_recruiting/views/02_qualify/DisablePeriod.vue @@ -24,7 +24,8 @@ import HistoryTable from "@/components/TableHistory.vue"; const $q = useQuasar(); // show dialog const router = useRouter(); const mixin = useCounterMixin(); -const { success, dateText, messageError, showLoader, hideLoader } = mixin; +const { success, dateText, messageError, showLoader, hideLoader, date2Thai } = + mixin; const name = ref(""); const year = ref(new Date().getFullYear() + 543); @@ -41,6 +42,7 @@ const tittleHistory = ref("ประวัติการนำเข้ const modalHistory = ref(false); //modal ประวัติการแก้ไขข้อมูล const rows = ref([]); const filter = ref(""); //search data table +const filterHistory = ref(""); //search data table const textTittle = ref(""); const textTittleScore = ref(""); const textTittleCandidate = ref(""); @@ -92,6 +94,9 @@ const columns = ref([ field: "year", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return `${row.year + 543}`; + }, }, { name: "examCount", @@ -125,12 +130,15 @@ const columnsHistory = ref([ }, { name: "createdAt", - align: "center", + align: "left", label: "วันที่ดำเนินการ", sortable: true, field: "createdAt", headerStyle: "font-size: 14px", style: "font-size: 14px", + format(val, row) { + return `${date2Thai(row.createdAt)}`; + }, }, { name: "createdFullName", @@ -504,9 +512,6 @@ onMounted(async () => {
{{ col.value }}
-
- {{ col.value + 543 }} -
{ v-model:modal="modalHistory" v-model:inputvisible="visibleColumnsHistory" v-model:tittle="tittleHistory" + v-model:inputfilter="filterHistory" + :filter="filterHistory" >