From 3f5a4783c1aecaefe590877e390cd1e67110b2cd Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 9 Apr 2026 10:05:42 +0700 Subject: [PATCH] refactor(reportOrg): change getReport API method from GET to POST --- .../components/01_org/MainReport.vue | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/modules/21_report/components/01_org/MainReport.vue b/src/modules/21_report/components/01_org/MainReport.vue index 19119313d..5afa2e63d 100644 --- a/src/modules/21_report/components/01_org/MainReport.vue +++ b/src/modules/21_report/components/01_org/MainReport.vue @@ -111,17 +111,16 @@ async function fetchSummary() { * ฟังก์ชัน DownloadReport * @param list รายงานที่ต้องการดาวน์โหลด */ -async function getReport(list: string) { - const listFind = baseDocument.value.find( - (item: DataDocument) => item.val == list - )?.val; - const newReport = listFind === "report2" ? "report2-history" : listFind; +async function getReport(valReport: string) { pdfSrc.value = undefined; page.value = 1; isLoadPDF.value = true; - if (newReport) { + if (valReport) { await http - .get(config.API.orgReport(newReport) + `/${organizationId.value}`) + .post(config.API.orgReport(valReport), { + node: 0, + nodeId: organizationId.value, + }) .then(async (res) => { const data = res.data.result; detailReport.value = data; @@ -414,10 +413,8 @@ onMounted(async () => { color="primary" icon="download" > - - ดาวน์โหลดรายงาน - - + ดาวน์โหลดรายงาน +