From 4c8c2280ff96c7a0e140a4bfa7afd54f785ba4bf Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 9 Jan 2025 17:55:17 +0700 Subject: [PATCH] =?UTF-8?q?download=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87?= =?UTF-8?q?=E0=B8=B2=E0=B8=99=E0=B8=9E=E0=B9=89=E0=B8=99=E0=B8=88=E0=B8=B2?= =?UTF-8?q?=E0=B8=81=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81=E0=B8=B2=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/06_retirement/views/07_report.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/modules/06_retirement/views/07_report.vue b/src/modules/06_retirement/views/07_report.vue index 430d7f7b9..9ba7f40fb 100644 --- a/src/modules/06_retirement/views/07_report.vue +++ b/src/modules/06_retirement/views/07_report.vue @@ -9,6 +9,7 @@ import { useStructureTree } from "@/stores/structureTree"; import { useCounterMixin } from "@/stores/mixin"; import http from "@/plugins/http"; import config from "@/app.config"; +import genReportXLSX from "@/plugins/genreportxlsx"; import type { DataStructureTree } from "@/interface/main"; import type { @@ -60,6 +61,8 @@ const dateEnd = ref( new Date(dateMonth.value.year, dateMonth.value.month + 1, 0) ); +const detailReport = ref(); + /** View*/ const isLoadPDF = ref(false); const numOfPages = ref(0); @@ -123,6 +126,7 @@ function fetchDataReport() { }) .then(async (res) => { const data = await res.data.result; + detailReport.value = data; await fetchDocumentTemplate(data); }) .catch((err) => { @@ -210,6 +214,7 @@ onMounted(() => { + { color="primary" icon="download" :disable="!reportType || !nodeId" + @click.stop.pervent=" + genReportXLSX( + detailReport, + `${optionReport.find((e) => e.id === reportType)?.name}` + ) + " >