no message

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2023-12-20 17:39:01 +07:00
parent c85c0933df
commit 56ac4d9fbf

View file

@ -218,13 +218,18 @@ async function genReport(data: any) {
},
responseType: "blob",
})
.then((res) => {
.then(async (res) => {
const blob = new Blob([res.data]);
const objectUrl = URL.createObjectURL(blob);
console.log(blob);
pdfSrc.value = objectUrl;
console.log(pdfSrc.value);
const pdfData = await usePDF(`${objectUrl}`);
showLoader();
setTimeout(() => {
pdfSrc.value = pdfData.pdf.value;
numOfPages.value = pdfData.pages.value;
hideLoader();
}, 1500);
})
.catch((err) => {
messageError($q, err);