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, };