แก้รายงานออกคำสั่งวินัย และแก้ path url report-template

This commit is contained in:
Warunee Tamkoo 2024-01-08 12:19:14 +07:00
parent c49b528861
commit defe861b55
4 changed files with 119 additions and 48 deletions

View file

@ -1,4 +1,6 @@
import axios from "axios";
import config from "@/app.config";
import { useQuasar } from "quasar";
import { useCounterMixin } from "@/stores/mixin";
@ -7,13 +9,10 @@ const $q = useQuasar();
const mixin = useCounterMixin();
const { showLoader, hideLoader, messageError } = mixin;
const apiGenReport =
"https://report-server.frappet.synology.me/api/v1/report-template/docx";
async function genReport(data: any, fileName: string, type: string = "docx") {
showLoader();
await axios
.post(apiGenReport, data, {
.post(`${config.API.reportTemplate}/docx`, data, {
headers:
type == "docx"
? {