diff --git a/src/modules/02_organization/components/TableMain.vue b/src/modules/02_organization/components/TableMain.vue index 1c7665def..91e1e5083 100644 --- a/src/modules/02_organization/components/TableMain.vue +++ b/src/modules/02_organization/components/TableMain.vue @@ -181,7 +181,8 @@ const document = computed(() => { return baseDocument.value; } else { return baseDocument.value.filter( - (e: DataDocument) => e.val === "report2" || e.val === "report4" + (e: DataDocument) => + e.val === "report2" || e.val === "report4" || e.val === "report1" ); } }); @@ -538,17 +539,17 @@ function getSummary() { } /** - * function DownloadReport + * function ดาวน์โหลดรายงาน + * @param val ประเภทเอกสาร + * @param name ชื่อเอกสาร */ async function onClickDownloadReport(val: string, name: string) { - const newReport = - store.typeOrganizational !== "draft" && val === "report2" - ? "report2-history" - : val; - showLoader(); await http - .get(config.API.orgReport(newReport) + `/${orgRootId.value}`) + .post(config.API.orgReport(val), { + node: orgLevel.value, + nodeId: treeId.value, + }) .then(async (res) => { const data = res.data.result; if (data) { @@ -691,14 +692,8 @@ watch( - + +