download รายงานพ้นจากราชการ
This commit is contained in:
parent
7e93f611c5
commit
4c8c2280ff
1 changed files with 11 additions and 0 deletions
|
|
@ -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<Date>(
|
|||
new Date(dateMonth.value.year, dateMonth.value.month + 1, 0)
|
||||
);
|
||||
|
||||
const detailReport = ref<any>();
|
||||
|
||||
/** View*/
|
||||
const isLoadPDF = ref<boolean>(false);
|
||||
const numOfPages = ref<number>(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(() => {
|
|||
</q-select>
|
||||
|
||||
<q-space />
|
||||
|
||||
<q-btn
|
||||
:loading="isLoadPDF"
|
||||
flat
|
||||
|
|
@ -217,6 +222,12 @@ onMounted(() => {
|
|||
color="primary"
|
||||
icon="download"
|
||||
:disable="!reportType || !nodeId"
|
||||
@click.stop.pervent="
|
||||
genReportXLSX(
|
||||
detailReport,
|
||||
`${optionReport.find((e) => e.id === reportType)?.name}`
|
||||
)
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue