fix PDF = undefined
This commit is contained in:
parent
4d4a95c2b9
commit
4f0eecfffe
15 changed files with 24 additions and 2 deletions
|
|
@ -114,6 +114,8 @@ async function fetchDataCommand(type: string) {
|
|||
/** ฟังชั่นกำหนดค่าของ PDF*/
|
||||
async function fetchPDF(data: any, type: string = "docx?folder=command") {
|
||||
isLoadView.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
axios
|
||||
.get(data.downloadUrl, {
|
||||
method: "GET",
|
||||
|
|
@ -155,6 +157,7 @@ watch(
|
|||
} else {
|
||||
tab.value = "main";
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
}
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@ async function fetchDataCommand(type: string) {
|
|||
/** ฟังชั่นกำหนดค่าของ PDF*/
|
||||
async function fetchPDF(data: any, type: string = "docx?folder=command") {
|
||||
isLoadView.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
await axios
|
||||
.post(config.API.reportTemplate + `/${type}`, data, {
|
||||
headers: {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ async function fetchPDF(type: string = "docx") {
|
|||
function onClose() {
|
||||
modal.value = false;
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1
|
||||
}
|
||||
|
||||
watch(modal, () => {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ watch(modal, (val) => {
|
|||
fetchPDF(dataFile.value.downloadUrl, dataFile.value.fileType);
|
||||
} else {
|
||||
pdfSrc.value = undefined;
|
||||
page.value = 1;
|
||||
numOfPages.value = 0;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue