From 9aa0708c48d06927f61c8819735eb7f8a0c31e8a Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Fri, 22 Sep 2023 14:43:47 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=8A=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B9=80=E0=B8=AD=E0=B8=81=E0=B8=AA=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B8=95=E0=B8=AD=E0=B8=99=E0=B8=94=E0=B8=B2=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=E0=B9=8C=E0=B9=82=E0=B8=AB=E0=B8=A5=E0=B8=94=E0=B8=95?= =?UTF-8?q?=E0=B8=B2=E0=B8=A1=E0=B8=8A=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B9=80?= =?UTF-8?q?=E0=B8=AD=E0=B8=81=E0=B8=AA=E0=B8=B2=E0=B8=A3=E0=B8=97=E0=B8=B5?= =?UTF-8?q?=E0=B9=88=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Transfer/transferRegistry.vue | 8 +++---- .../DismissOrder/DialogSendToCommand.vue | 21 +++++++------------ .../components/resign/ResignByid.vue | 18 ++++++++-------- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/src/modules/05_placement/components/Transfer/transferRegistry.vue b/src/modules/05_placement/components/Transfer/transferRegistry.vue index a0ee73414..e683d8ca9 100644 --- a/src/modules/05_placement/components/Transfer/transferRegistry.vue +++ b/src/modules/05_placement/components/Transfer/transferRegistry.vue @@ -68,14 +68,14 @@ const downloadFile = (response: any, filename: string) => { link.click(); document.body.removeChild(link); }; -const fileDownload = async (no: number, type: string) => { +const fileDownload = async (no: number, type: string, fileName: string) => { showLoader(); await http .get(config.API.reportTransferFile(no, type, id.value), { responseType: "blob", }) .then(async (res) => { - downloadFile(res, `_ครั้งที่.${type}`); + downloadFile(res, `${fileName}.${type}`); }) .catch((e) => { messageError($q, e); @@ -463,7 +463,7 @@ onMounted(async () => { round color="red" icon="picture_as_pdf" - @click="fileDownload(props.row.no, 'pdf')" + @click="fileDownload(props.row.no, 'pdf', props.row.fileName)" > ไฟล์ PDF @@ -473,7 +473,7 @@ onMounted(async () => { round color="blue" icon="mdi-file-word" - @click="fileDownload(props.row.no, 'docx')" + @click="fileDownload(props.row.no, 'docx', props.row.fileName)" > ไฟล์ WORD diff --git a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue index e6e6f1c12..668d0d63b 100644 --- a/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue +++ b/src/modules/06_retirement/components/DismissOrder/DialogSendToCommand.vue @@ -218,29 +218,24 @@ watchEffect(() => { {{ props.rowIndex + 1 }} - - {{ props.row.prefix }} - {{ props.row.fullname }} - - {{ props.row.positionTypeOld }} + + {{ props.row.position }} - - {{ props.row.positionLevelOld }} + + {{ props.row.positionLevel }} - - {{ props.row.positionNumberOld }} - -
{{ props.row.organizationPositionOld }}
- - {{ props.row.datetext }} + +
+ {{ props.row.organization }} +
{{ props.row.statustext }} diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index dcebf1ce5..6e2c8469b 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -173,15 +173,15 @@ const fetchData = async (id: string) => { hideLoader(); }); }; -const downloadFile = (response: any, filename: string) => { - const link = document.createElement("a"); - var fileName = filename; - link.href = window.URL.createObjectURL(new Blob([response.data])); - link.setAttribute("download", fileName); - document.body.appendChild(link); - link.click(); - document.body.removeChild(link); -}; +// const downloadFile = (response: any, filename: string) => { +// const link = document.createElement("a"); +// var fileName = filename; +// link.href = window.URL.createObjectURL(new Blob([response.data])); +// link.setAttribute("download", fileName); +// document.body.appendChild(link); +// link.click(); +// document.body.removeChild(link); +// }; const popUp = (action: "pass" | "passNot") => { reasonReign.value = "";