From ba32db6123dc6e5011dea66d2fa6db9767518d2e Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 17 Mar 2025 17:46:39 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=97=E0=B8=B0=E0=B9=80=E0=B8=9A=E0=B8=B5?= =?UTF-8?q?=E0=B8=A2=E0=B8=99=E0=B8=9B=E0=B8=A3=E0=B8=B0=E0=B8=A7=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=E0=B9=82=E0=B8=AB=E0=B8=A5=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 --- .../10_registry/01_Information/06_Ability.vue | 78 ++++++++++++++++--- .../02_Government/06_Assistance.vue | 78 ++++++++++++++++--- 2 files changed, 132 insertions(+), 24 deletions(-) diff --git a/src/modules/10_registry/01_Information/06_Ability.vue b/src/modules/10_registry/01_Information/06_Ability.vue index 202e37b..806507c 100644 --- a/src/modules/10_registry/01_Information/06_Ability.vue +++ b/src/modules/10_registry/01_Information/06_Ability.vue @@ -238,6 +238,34 @@ function onSearch() { ); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ประกาศเกียรติคุณ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + onMounted(async () => { link.value = await dataStore.getProFileType(); await getData(); @@ -316,7 +344,19 @@ onMounted(async () => { {{ col.value ? col.value : "-" }} + + + ดาวน์โหลด + {
- - ประวัติแก้ไขความสามารถพิเศษ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขความสามารถพิเศษ + +
{{ @@ -385,5 +438,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; } diff --git a/src/modules/10_registry/02_Government/06_Assistance.vue b/src/modules/10_registry/02_Government/06_Assistance.vue index 44b0f48..a87f459 100644 --- a/src/modules/10_registry/02_Government/06_Assistance.vue +++ b/src/modules/10_registry/02_Government/06_Assistance.vue @@ -220,6 +220,34 @@ function getHistory() { }); } +/** + * ฟังก์ชันโหลไฟลเอกสารหลักฐาน + * @param id รายการที่ต้องการโหลด + */ +async function onDownloadFile(id: string, profileId: string) { + showLoader(); + await http + .get( + config.API.subFileByFileName( + "ทะเบียนประวัติ", + "ช่วยราชการ", + profileId, + id, + "เอกสารหลักฐาน" + ) + ) + .then(async (res) => { + const data = res.data; + window.open(data.downloadUrl, "_blank"); + }) + .catch((err) => { + messageError($q, err); + }) + .finally(() => { + hideLoader(); + }); +} + function onSearch() { rows.value = onSearchDataTable( filter.value, @@ -302,6 +330,18 @@ onMounted(async () => {
+ + ดาวน์โหลด + {
- - ประวัติแก้ไขรายการช่วยราชการ - +
+ + ดาวน์โหลด + + + ประวัติแก้ไขรายการช่วยราชการ + +
{{ @@ -369,5 +422,6 @@ onMounted(async () => { .fix_top { justify-content: start !important; + margin-top: 10px; }