From a55820297af7da7a4d0ad29554ebfef99856e130 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 18 Nov 2024 13:31:35 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1?= =?UTF-8?q?=20Report=20=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA?= =?UTF-8?q?=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_organization/components/TreeTable.vue | 19 ++++++-- .../components/TreeTable.vue | 48 +++++++++++++++++++ .../interface/index/Main.ts | 6 +++ 3 files changed, 68 insertions(+), 5 deletions(-) diff --git a/src/modules/02_organization/components/TreeTable.vue b/src/modules/02_organization/components/TreeTable.vue index f4ea5c9c9..5b2566d01 100644 --- a/src/modules/02_organization/components/TreeTable.vue +++ b/src/modules/02_organization/components/TreeTable.vue @@ -117,13 +117,19 @@ const baseDocument = ref([ name: "บัญชี 3", val: "report3", }, + { + name: "รายงานสรุปจำนวนกรอบอัตรากำลังของข้าราชการกรุงเทพมหานครสามัญ", + val: "report4", + }, ]); const document = computed(() => { if (store.typeOrganizational === "draft") { return baseDocument.value; } else { - return baseDocument.value.filter((e: DataDocument) => e.val === "report2"); + return baseDocument.value.filter( + (e: DataDocument) => e.val === "report2" || e.val === "report4" + ); } }); @@ -456,14 +462,17 @@ async function onClickDownloadReport(val: string, name: string) { showLoader(); await http .get(config.API.orgReport(val) + `/${orgRootId.value}`) - .then((res) => { + .then(async (res) => { const data = res.data.result; if (data) { - genreport(data, name); + await genreport(data, name); } }) .catch((err) => { messageError($q, err); + }) + .finally(() => { + hideLoader(); }); } @@ -487,7 +496,7 @@ watch(
-
+
([ color: "red", }, ]); +const documentItems = ref([ + { + name: "รายงานสรุปจำนวนกรอบอัตรากำลังของลูกจ้างประจำกรุงเทพมหานคร", + val: "report4", + }, +]); /** columns*/ const columns = ref([ @@ -327,6 +335,26 @@ function getSummary() { }); } +/** function DownloadReport*/ +async function onClickDownloadReport(val: string, name: string) { + // รอ API + // showLoader(); + // await http + // .get(config.API.orgReport(val) + `/${orgRootId.value}`) + // .then(async (res) => { + // const data = res.data.result; + // if (data) { + // await genreport(data, name); + // } + // }) + // .catch((err) => { + // messageError($q, err); + // }) + // .finally(() => { + // hideLoader(); + // }); +} + const pagination = ref({ page: reqMaster.value.page, rowsPerPage: reqMaster.value.pageSize, @@ -383,6 +411,26 @@ watch( > ย้ายตำแหน่ง + + + + + + {{ item.name }} + + + + ดาวน์โหลด +
diff --git a/src/modules/16_positionEmployee/interface/index/Main.ts b/src/modules/16_positionEmployee/interface/index/Main.ts index 95adf29d0..2d4eb16fb 100644 --- a/src/modules/16_positionEmployee/interface/index/Main.ts +++ b/src/modules/16_positionEmployee/interface/index/Main.ts @@ -127,6 +127,11 @@ interface NewPagination { sortBy: string; } +interface DataDocumentList { + name: string; + val: string; +} + export type { Pagination, DataOption, @@ -144,4 +149,5 @@ export type { HistoryPostType, FormPositionSelectRef, NewPagination, + DataDocumentList, };