From 08b42a64069b9c705ae7a89f2ddf2f74a5a78bf6 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Mon, 15 Sep 2025 14:26:44 +0700 Subject: [PATCH] =?UTF-8?q?fix(organiztion):=20download=20file=20-=20?= =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=88=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=20get=20=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20post?= =?UTF-8?q?=20-=20=E0=B9=80=E0=B8=9B=E0=B8=A5=E0=B8=B5=E0=B9=88=E0=B8=A2?= =?UTF-8?q?=E0=B8=99=E0=B8=88=E0=B8=B2=E0=B8=81=E0=B8=AA=E0=B9=88=E0=B8=87?= =?UTF-8?q?=20rootId=20=E0=B9=80=E0=B8=9B=E0=B9=87=E0=B8=99=20nodeId=20?= =?UTF-8?q?=E0=B9=81=E0=B8=A5=E0=B8=B0=20nodelevel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_organization/components/TableMain.vue | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) 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( - + +