This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-06-24 17:54:53 +07:00
parent ab19e5937f
commit 21cb24bbaf
5 changed files with 162 additions and 73 deletions

View file

@ -288,7 +288,7 @@ onMounted(() => {
}}
</div>
<div v-else>
<div v-else class="table_ellipsis">
{{ col.value }}
</div>
</q-td>

View file

@ -86,14 +86,14 @@ async function fetchLeaveday(
.then((res) => {
const data = res.data.result;
data && genReport(data);
!data && hideLoader();
detailReport.value = data;
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
}
/**
@ -114,18 +114,19 @@ async function genReport(data: any) {
const objectUrl = URL.createObjectURL(blob);
fileBlob.value = blob;
const pdfData = await usePDF(`${objectUrl}`);
showLoader();
setTimeout(() => {
pdfSrc.value = pdfData.pdf.value;
numOfPages.value = pdfData.pages.value;
hideLoader();
}, 1500);
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
})
.finally(() => {
hideLoader();
setTimeout(() => {
hideLoader();
}, 2000);
});
}