From b74936f8dbe241ac32f178d0b9962e6d70a1048f Mon Sep 17 00:00:00 2001 From: Kittapath Date: Sat, 23 Dec 2023 19:25:43 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B8=9F=E0=B8=B4=E0=B8=A7=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=84?= =?UTF-8?q?=E0=B8=9F=E0=B8=A5=E0=B9=8C=E0=B9=80=E0=B8=A5=E0=B9=88=E0=B8=A1?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../06_evaluate/components/step/step2.vue | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/modules/06_evaluate/components/step/step2.vue b/src/modules/06_evaluate/components/step/step2.vue index 5a0c4ed..f40071b 100644 --- a/src/modules/06_evaluate/components/step/step2.vue +++ b/src/modules/06_evaluate/components/step/step2.vue @@ -17,7 +17,7 @@ const $q = useQuasar(); const store = useEvaluateStore(); const mixin = useCounterMixin(); -const { showLoader, hideLoader, messageError, success } = mixin; +const { showLoader, hideLoader, date2Thai, messageError, success } = mixin; const fullName = ref( keycloak.tokenParsed ? keycloak.tokenParsed.name!.toString() : "" @@ -76,6 +76,7 @@ const modalView = ref(false); const numOfPages = ref(0); const page = ref(1); const pdfSrc = ref(); +const profile = ref(); function onClickViewPDF(file: any) { // pdfSrc.value = file.webkitRelativePath; @@ -103,7 +104,14 @@ async function onClickDowloadFile( ) { showLoader(); const data = Object.assign( - { fullName: fullName.value }, + { fullName: profile.value == null ? "" : profile.value.fullName }, + { position: profile.value == null ? "" : profile.value.position }, + { positionLevel: profile.value == null ? "" : profile.value.positionLevel }, + { posNo: profile.value == null ? "" : profile.value.posNo }, + { oc: profile.value == null ? "" : profile.value.oc }, + { birthDate: profile.value == null ? "" : date2Thai(profile.value.birthDate) }, + { govAge: profile.value == null ? "" : profile.value.govAge }, + { positionLevelNew: profile.value == null ? "" : (profile.value.type == "EXPERT"? "ชำนาญการ":"ชำนาญการพิเศษ")}, tp === "EV1_005" || tp === "EV1_007" ? { organizationName: "-" } : null, tp === "EV1_007" ? { positionName: "-" } : null, tp === "EV1_007" ? { positionLeaveName: "-" } : null @@ -188,6 +196,23 @@ async function fetcheSigner(id: string) { .finally(() => { hideLoader(); }); + fetchCheckSpec(id); +} + +async function fetchCheckSpec(id: string) { + showLoader(); + await http + .get(config.API.evaluationCheckspecByid(id)) + .then((res) => { + const data = res.data.result; + profile.value =data + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); } const downloadFile1 = ref("");