From 7e26314cb6e78c538fa915d10e7512c8cd2db94f Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Fri, 16 Aug 2024 15:40:06 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9A?= =?UTF-8?q?=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B9=80=E0=B8=A7?= =?UTF-8?q?=E0=B8=B5=E0=B8=A2=E0=B8=99=E0=B9=81=E0=B8=88=E0=B9=89=E0=B8=87?= =?UTF-8?q?=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=96=E0=B8=B6=E0=B8=87=E0=B9=81?= =?UTF-8?q?=E0=B8=81=E0=B9=88=E0=B8=81=E0=B8=A3=E0=B8=A3=E0=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ExitInterview/exitMain.vue | 40 ------------------- .../components/resign/Deceased.vue | 18 +-------- .../components/resign/DetailDeceased.vue | 29 +++++--------- src/modules/06_retirement/router.ts | 12 ------ 4 files changed, 11 insertions(+), 88 deletions(-) diff --git a/src/modules/06_retirement/components/ExitInterview/exitMain.vue b/src/modules/06_retirement/components/ExitInterview/exitMain.vue index 28ea9074d..bacac0c05 100644 --- a/src/modules/06_retirement/components/ExitInterview/exitMain.vue +++ b/src/modules/06_retirement/components/ExitInterview/exitMain.vue @@ -416,55 +416,30 @@ const openModalCalendar = (rows: any) => { {{ props.row.realReason }} {{ props.row.notExitFactor }} {{ props.row.futureWork ? "ใช่" : "ไม่" }} {{ props.row.futureWorkReason }} {{ props.row.havejob ? "ใช่" : "ไม่" }} @@ -472,11 +447,6 @@ const openModalCalendar = (rows: any) => {
{{ props.row.havejobReason }} @@ -485,11 +455,6 @@ const openModalCalendar = (rows: any) => { {{ props.row.appointDate == null ? "-" : props.row.appointDate @@ -498,11 +463,6 @@ const openModalCalendar = (rows: any) => { {{ props.row.datetext }} diff --git a/src/modules/06_retirement/components/resign/Deceased.vue b/src/modules/06_retirement/components/resign/Deceased.vue index db7634cfe..5f495cfc6 100644 --- a/src/modules/06_retirement/components/resign/Deceased.vue +++ b/src/modules/06_retirement/components/resign/Deceased.vue @@ -241,25 +241,9 @@ const pagination = ref({ round color="info" icon="mdi-eye" - @click=" - router.push(`/retirement/deceased-detail/${props.row.id}`) - " - > - รายละเอียด - - - แก้ไขข้อมูล + รายละเอียด diff --git a/src/modules/06_retirement/components/resign/DetailDeceased.vue b/src/modules/06_retirement/components/resign/DetailDeceased.vue index ffbac1cae..5db7009e7 100644 --- a/src/modules/06_retirement/components/resign/DetailDeceased.vue +++ b/src/modules/06_retirement/components/resign/DetailDeceased.vue @@ -14,12 +14,14 @@ import CardProfile from "@/components/CardProfile.vue"; /** importStore*/ import { useCounterMixin } from "@/stores/mixin"; +import { checkPermission } from "@/utils/permissions"; + +import genReport from "@/plugins/genreport"; /**use*/ const $q = useQuasar(); const router = useRouter(); const route = useRoute(); -const checkRoutePermisson = ref(route.name == "deceased-detailOnly"); const mixin = useCounterMixin(); const { showLoader, hideLoader, messageError, date2Thai } = mixin; const fullName = ref(""); @@ -64,17 +66,6 @@ const nextPage = (page: string) => { window.open(page, "_blank"); }; -//downloadFile -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); -}; - /** * ฟังก์ชั่น ดาว์โหลด * @param type typeของรายละเอียด @@ -82,13 +73,13 @@ const downloadFile = (response: any, filename: string) => { const fileDownload = async (type: string) => { showLoader(); await http - .get(config.API.DeceasedReport(type, profileId.value), { - responseType: "blob", - }) + .get(config.API.DeceasedReport(type, profileId.value)) .then((res) => { - downloadFile( - res, - `รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}.${type}` + const data = res.data.result; + genReport( + data, + `รายละเอียดบันทึกเวียนแจ้งการถึงแก่กรรม-${fullName.value}`, + type ); }) .catch(async (e) => { @@ -191,7 +182,7 @@ const fileDownload = async (type: string) => {
-
+
import("@/modules/06_retirement/components/resign/Deceased.vue"); const detaildeceased = () => import("@/modules/06_retirement/components/resign/DetailDeceased.vue"); -const detaildeceasedOnly = () => - import("@/modules/06_retirement/components/resign/DetailDeceased.vue"); const dismissOrder = () => import("@/modules/06_retirement/components/DismissOrder/DismissOrder.vue"); const outDetail = () => @@ -190,16 +188,6 @@ export default [ Role: "STAFF", }, }, - { - path: "/retirement/deceased-detail/:id", - name: "deceased-detailOnly", - component: detaildeceasedOnly, - meta: { - Auth: true, - Key: "SYS_PASSAWAY", - Role: "STAFF", - }, - }, { path: "/retirement/deceased/detail/:id", name: "deceased-detailByid",