From 9887bcb3b05b09bc49a98e4389fa6494fd8c90b1 Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Tue, 1 Oct 2024 15:04:26 +0700 Subject: [PATCH] =?UTF-8?q?dialog=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88?= =?UTF-8?q?=E0=B8=A1=20=E0=B8=9B=E0=B8=B8=E0=B9=88=E0=B8=A1=E0=B8=94?= =?UTF-8?q?=E0=B8=B2=E0=B8=A7=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../14_IDP/component/DialogDevelop.vue | 26 ++++++++++++++----- src/modules/14_IDP/views/main.vue | 5 ++-- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/modules/14_IDP/component/DialogDevelop.vue b/src/modules/14_IDP/component/DialogDevelop.vue index 8fa3379..df7a80f 100644 --- a/src/modules/14_IDP/component/DialogDevelop.vue +++ b/src/modules/14_IDP/component/DialogDevelop.vue @@ -27,6 +27,7 @@ const isReadOnly = ref(false); const props = defineProps({ getData: Function, + onDownloadFile: Function, }); /** เช็ค true/false 70*/ @@ -180,7 +181,7 @@ async function createURLUpload(id: string, file: any) { const fileName = { fileName: file.name }; await http .post( - config.API.file("IDP", "ยื่นคำร้องขอเพิ่มข้อมูลการพัฒนารายบุคคล", id), + config.API.file("IDP", "หลักฐาน", id), { replace: false, fileList: fileName, @@ -268,11 +269,13 @@ function getDetail() { formData.otherPerson = data.reasonDevelopment20; formData.otherTraining = data.reasonDevelopment10; formData.development = data.developmentProjects; - }).catch((e)=>{ - messageError($q,e) - }).finally(()=>{ - hideLoader() }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + hideLoader(); + }); } watch( @@ -458,7 +461,7 @@ watch(
+ + หลักฐานอ้างอิง +
- + { if (res.data.length !== 0) { downloadUrl(id, res.data[0].fileName); @@ -240,7 +240,7 @@ function downloadUrl(id: string, fileName: string) { .get( config.API.fileByFile( "IDP", - "ยื่นคำร้องขอเพิ่มข้อมูลการพัฒนารายบุคคล", + "หลักฐาน", id, fileName ) @@ -494,6 +494,7 @@ onMounted(async () => { :get-data="getListData" v-model:is-edit="isEdit" v-model:id-row="idRow" + :on-download-file="onDownloadFile" />