From 6ca6e200ed687be2690a48101fe06fbac7ddcbe4 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Tue, 10 Oct 2023 12:03:49 +0700 Subject: [PATCH 1/3] =?UTF-8?q?-=20=E0=B8=82=E0=B8=AD=E0=B8=A5=E0=B8=B2?= =?UTF-8?q?=E0=B8=AD=E0=B8=AD=E0=B8=81=20=E0=B9=80=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=E0=B9=81=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B9=80?= =?UTF-8?q?=E0=B8=AD=E0=B8=81=E0=B8=AA=E0=B8=B2=E0=B8=A3=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=88=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= =?UTF-8?q?=20-=20=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=E0=B9=80=E0=B8=A1?= =?UTF-8?q?=E0=B8=99=E0=B8=B9=E0=B8=82=E0=B8=AD=E0=B8=87=E0=B8=A5=E0=B8=B9?= =?UTF-8?q?=E0=B8=81=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interface/request/main/main.ts | 68 +++++++-------- .../04_registry/components/Profile.vue | 18 ++-- .../components/resign/ResignByid.vue | 85 ++++++++++++++++++- .../06_retirement/interface/response/Main.ts | 7 +- 4 files changed, 134 insertions(+), 44 deletions(-) diff --git a/src/interface/request/main/main.ts b/src/interface/request/main/main.ts index 10cb37f18..7bd5d227d 100644 --- a/src/interface/request/main/main.ts +++ b/src/interface/request/main/main.ts @@ -250,12 +250,12 @@ const menuList = readonly([ path: "appoint-promote", role: "placement", }, - // { - // key: 6.8, - // label: "รายการแต่งตั้งลูกจ้างประจำ", - // path: "appoint-employee", - // role: "placement", - // }, + { + key: 6.8, + label: "รายการแต่งตั้งลูกจ้างประจำ", + path: "appoint-employee", + role: "placement", + }, // { // key: 6.9, // label: "รายการย้าย", @@ -374,34 +374,34 @@ const menuList = readonly([ }, ], }, - { - key: 9, - icon: "mdi-calendar", - activeIcon: "mdi-calendar", - label: "การลา", - path: "leave", - role: "coin", - children: [ - { - key: 9.1, - label: "รายการลงเวลาปฏิบัติงาน", - path: "/work-list", - role: "coin", - }, - { - key: 9.2, - label: "รายการลา", - path: "/leave-list", - role: "coin", - }, - { - key: 9.3, - label: "รายงานสถิติ", - path: "/statistics-report", - role: "coin", - }, - ], - }, + // { + // key: 9, + // icon: "mdi-calendar", + // activeIcon: "mdi-calendar", + // label: "การลา", + // path: "leave", + // role: "coin", + // children: [ + // { + // key: 9.1, + // label: "รายการลงเวลาปฏิบัติงาน", + // path: "/work-list", + // role: "coin", + // }, + // { + // key: 9.2, + // label: "รายการลา", + // path: "/leave-list", + // role: "coin", + // }, + // { + // key: 9.3, + // label: "รายงานสถิติ", + // path: "/statistics-report", + // role: "coin", + // }, + // ], + // }, ]); const tabList = readonly([ diff --git a/src/modules/04_registry/components/Profile.vue b/src/modules/04_registry/components/Profile.vue index 720a41488..48a3fe0c4 100644 --- a/src/modules/04_registry/components/Profile.vue +++ b/src/modules/04_registry/components/Profile.vue @@ -153,16 +153,18 @@ - + @@ -219,7 +221,6 @@ clickable v-close-popup @click="clickPassaway" - v-if="profileType == 'officer'" > @@ -275,7 +276,8 @@ - + ดาวน์โหลดไฟล์ diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 1d1721279..8e0216303 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -11,7 +11,7 @@ import CurrencyInput from "@/components/CurruncyInput.vue"; import http from "@/plugins/http"; import config from "@/app.config"; import keycloak from "@/plugins/keycloak"; -import type { TypeFile } from "@/modules/06_retirement/interface/response/Main"; +import type { TypeFile, rowFile } from "@/modules/06_retirement/interface/response/Main"; import type { QTableProps } from "quasar"; const $q = useQuasar(); @@ -331,6 +331,42 @@ const statusOrder = (val: boolean) => { return "อนุมัติการลาออก"; } }; + +// เอกสารดาวน์โหลด +const rowsFileDownload = ref([ + { + fileName: + "แบบฟอร์มหนังสือขอลาออกจากราชการ", + pathName: "", + } +]); + +const fileDownload = async (type: string, fileName: string) => { + showLoader(); + await http + .get(config.API.reportResignList(type, id.value), { + responseType: "blob", + }) + .then(async (res) => { + downloadFile(res, `${fileName}.${type}`); + }) + .catch((e) => { + messageError($q, e); + }) + .finally(() => { + 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); +}; - + From b376c77095ebf4f81c2accb1c3f7363d7aebe6a9 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 10 Oct 2023 13:54:29 +0700 Subject: [PATCH 3/3] no message --- src/modules/09_leave/components/1_Work/DialogDetail.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/09_leave/components/1_Work/DialogDetail.vue b/src/modules/09_leave/components/1_Work/DialogDetail.vue index 31baf30ac..7d866964e 100644 --- a/src/modules/09_leave/components/1_Work/DialogDetail.vue +++ b/src/modules/09_leave/components/1_Work/DialogDetail.vue @@ -45,7 +45,7 @@ function colsePopup() { - รายละเอียดการลงเวลาของ + รายละเอียดการลงเวลาของ {{ titlename }}