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 { useCounterMixin } from "@/stores/mixin";
|
||||||
import http from "@/plugins/http";
|
import http from "@/plugins/http";
|
||||||
import config from "@/app.config";
|
import config from "@/app.config";
|
||||||
|
import genReportXLSX from "@/plugins/genreportxlsx";
|
||||||
|
|
||||||
import type { DataStructureTree } from "@/interface/main";
|
import type { DataStructureTree } from "@/interface/main";
|
||||||
import type {
|
import type {
|
||||||
|
|
@ -60,6 +61,8 @@ const dateEnd = ref<Date>(
|
||||||
new Date(dateMonth.value.year, dateMonth.value.month + 1, 0)
|
new Date(dateMonth.value.year, dateMonth.value.month + 1, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const detailReport = ref<any>();
|
||||||
|
|
||||||
/** View*/
|
/** View*/
|
||||||
const isLoadPDF = ref<boolean>(false);
|
const isLoadPDF = ref<boolean>(false);
|
||||||
const numOfPages = ref<number>(0);
|
const numOfPages = ref<number>(0);
|
||||||
|
|
@ -123,6 +126,7 @@ function fetchDataReport() {
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = await res.data.result;
|
const data = await res.data.result;
|
||||||
|
detailReport.value = data;
|
||||||
await fetchDocumentTemplate(data);
|
await fetchDocumentTemplate(data);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -210,6 +214,7 @@ onMounted(() => {
|
||||||
</q-select>
|
</q-select>
|
||||||
|
|
||||||
<q-space />
|
<q-space />
|
||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
:loading="isLoadPDF"
|
:loading="isLoadPDF"
|
||||||
flat
|
flat
|
||||||
|
|
@ -217,6 +222,12 @@ onMounted(() => {
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="download"
|
icon="download"
|
||||||
:disable="!reportType || !nodeId"
|
:disable="!reportType || !nodeId"
|
||||||
|
@click.stop.pervent="
|
||||||
|
genReportXLSX(
|
||||||
|
detailReport,
|
||||||
|
`${optionReport.find((e) => e.id === reportType)?.name}`
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue