From 6bf655220ab03ca2a675786da7547c6b751be882 Mon Sep 17 00:00:00 2001 From: setthawutttty Date: Fri, 4 Apr 2025 17:55:13 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=94=E0=B8=B2=E0=B8=A7=E0=B9=82=E0=B8=AB?= =?UTF-8?q?=E0=B8=A5=E0=B8=94=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Dialogs/PopupPersonalNew.vue | 8 +++++-- .../01_retirement/RetirementDetail.vue | 22 ++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/components/Dialogs/PopupPersonalNew.vue b/src/components/Dialogs/PopupPersonalNew.vue index 2f16bf7b6..40a99c35e 100644 --- a/src/components/Dialogs/PopupPersonalNew.vue +++ b/src/components/Dialogs/PopupPersonalNew.vue @@ -184,7 +184,9 @@ async function fetchProfileGov(id: string) { function redirecToRegistry() { router.push( - `/registry-${props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer"}/${props.id}` + `/registry-${ + props.type.toLocaleLowerCase() == "employee" ? "employee" : "officer" + }/${props.id}` ); modal.value = false; } @@ -499,7 +501,9 @@ async function fetchProfile(id: string, avatarName: string) { diff --git a/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue b/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue index 4e8ae26f2..49334a200 100644 --- a/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue +++ b/src/modules/06_retirement/components/01_retirement/RetirementDetail.vue @@ -37,6 +37,7 @@ const { const myForm = ref(null); /** ตัวแปร */ +const linkFile = ref(""); const modal = ref(false); const retireld_params = route.params.retirementId; const retireld = ref(retireld_params.toString()); @@ -166,6 +167,7 @@ async function fetchlistprofile(id: string) { typeReport.value = data.typeReport; textReport.value = data.detail; employeeType.value = data.type; + linkFile.value = data.file; // รายชื่อผู้เกษียณอายุราชการ if (data.profile !== null) { @@ -433,8 +435,13 @@ async function onSearch() { ); } +function downloadFile(path: string) { + window.open(path); +} + /** Hook */ onMounted(async () => { + linkFile.value = ""; retireld.value = retireld_params.toString(); await fetchlistprofile(retireld.value); }); @@ -474,7 +481,20 @@ onMounted(async () => { > เพิ่มรายชื่อ - + ดาวน์โหลดไฟล์ +