This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2025-01-13 13:07:15 +07:00
parent bdb578e71f
commit a33b3ae340
2 changed files with 14 additions and 39 deletions

View file

@ -125,18 +125,6 @@ async function fetchDataCommand(type: string) {
.finally(() => {
hideLoader();
});
// await http
// .get(config.API.commandRegisterByType(commandId.value, type))
// .then(async (res) => {
// const dataMain = await res.data.result;
// if (type === "cover") {
// dataCover.value = dataMain;
// issue.value = await res.data.result.data.commandTitle;
// await fetchPDF(dataCover.value);
// } else {
// dataAttachment.value = dataMain;
// }
// });
}
/** ฟังชั่นกำหนดค่าของ PDF*/
@ -165,29 +153,6 @@ async function fetchPDF(data: any, type: string = "docx?folder=command") {
messageError($q, err);
isLoadView.value = true;
});
// await axios
// .post(config.API.reportTemplate + `/${type}`, data, {
// headers: {
// accept: "application/pdf",
// "content-Type": "application/json",
// },
// responseType: "blob",
// })
// .then(async (res) => {
// const blob = new Blob([res.data]);
// const objectUrl = URL.createObjectURL(blob);
// const pdfData = usePDF(`${objectUrl}`);
// setTimeout(() => {
// pdfSrc.value = pdfData.pdf.value;
// numOfPages.value = pdfData.pages.value;
// isLoadView.value = true;
// }, 1500);
// })
// .catch(async (e) => {
// messageError($q, e);
// isLoadView.value = true;
// });
}
watch(
@ -205,6 +170,9 @@ watch(
.finally(() => {
hideLoader();
});
} else {
tab.value = "main";
pdfSrc.value = undefined;
}
}
);