From ab04e4ba879e5e5759b68a32ca463f1a68826625 Mon Sep 17 00:00:00 2001 From: Thanit Konmek Date: Wed, 23 Aug 2023 17:42:38 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=AD=E0=B8=81=E0=B8=AA=E0=B8=B2?= =?UTF-8?q?=E0=B8=A3=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B9=80?= =?UTF-8?q?=E0=B8=95=E0=B8=B4=E0=B8=A1=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=A5?= =?UTF-8?q?=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/resign/ResignByid.vue | 82 ++++++++++++++++++- .../06_retirement/interface/response/Main.ts | 7 +- 2 files changed, 85 insertions(+), 4 deletions(-) diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 3fb04d6e2..4460bc3f7 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -145,6 +145,37 @@ + +
+
เอกสารเพิ่มเติม
+
+
+
+ + + +
+
@@ -610,7 +641,12 @@ import CurrencyInput from "@/components/CurruncyInput.vue"; import http from "@/plugins/http"; import config from "@/app.config"; -import type { ResponseItems } from "@/modules/06_retirement/interface/response/Main"; +import type { + ResponseItems, + TypeFile, +} from "@/modules/06_retirement/interface/response/Main"; + +import type { QTableProps } from "quasar"; const $q = useQuasar(); const route = useRoute(); @@ -671,6 +707,37 @@ const actionPass = ref(false); const reasonReign = ref(""); const dateBreak = ref(null); +const rows = ref([]); +const columns = ref([ + { + name: "no", + align: "left", + label: "ลำดับ", + sortable: true, + field: "no", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "fileName", + align: "left", + label: "ชื่อไฟล์", + sortable: true, + field: "fileName", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, + { + name: "btnMicrosoft", + align: "right", + label: "ปุ่ม", + sortable: true, + field: "btnMicrosoft", + headerStyle: "font-size: 14px", + style: "font-size: 14px", + }, +]); + const closeModal = () => (modal.value = false); const openModal = () => (modal.value = true); @@ -700,9 +767,18 @@ const fetchData = async (id: string) => { .get(config.API.resingByid(id)) .then((res: any) => { const data = res.data.result; - console.log(data); - dataDetail.value = data; + // console.log(data); + let list: TypeFile[] = []; + if (data.docs.length > 0) { + data.docs.map((doc: TypeFile) => { + list.push({ + pathName: doc.pathName ?? "", + fileName: doc.fileName ?? "", + }); + }); + } + dataDetail.value = data; organizationPositionOld.value = data.organizationPositionOld ?? ""; positionTypeOld.value = data.positionTypeOld ?? ""; positionLevelOld.value = data.positionLevelOld ?? ""; diff --git a/src/modules/06_retirement/interface/response/Main.ts b/src/modules/06_retirement/interface/response/Main.ts index cbdd08356..97cc3c02f 100644 --- a/src/modules/06_retirement/interface/response/Main.ts +++ b/src/modules/06_retirement/interface/response/Main.ts @@ -30,4 +30,9 @@ interface ResponseItems { datetext: string | null; } -export type { resMain, ResponseItems }; +interface TypeFile { + fileName: string; + pathName: string; +} + +export type { resMain, ResponseItems, TypeFile };