Merge branch 'develop' into dev
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m23s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m23s
This commit is contained in:
commit
1cb83bd0c5
1 changed files with 20 additions and 5 deletions
|
|
@ -114,7 +114,7 @@ function onSearch() {
|
||||||
rows.value = onSearchDataTable(
|
rows.value = onSearchDataTable(
|
||||||
filter.value,
|
filter.value,
|
||||||
rowsData.value,
|
rowsData.value,
|
||||||
columns.value ? columns.value : []
|
columns.value ? columns.value : [],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,12 +132,27 @@ async function onDownloadFile(id: string, profileId: string) {
|
||||||
"ประวัติการเปลี่ยนชื่อ-นามสกุล",
|
"ประวัติการเปลี่ยนชื่อ-นามสกุล",
|
||||||
profileId,
|
profileId,
|
||||||
id,
|
id,
|
||||||
"เอกสารหลักฐาน"
|
"เอกสารหลักฐาน",
|
||||||
)
|
),
|
||||||
)
|
)
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
const data = res.data.downloadUrl;
|
// const data = res.data.downloadUrl;
|
||||||
window.open(data, "_blank");
|
// window.open(data, "_blank");
|
||||||
|
console.log(res.data);
|
||||||
|
|
||||||
|
const downloadUrl = res.data.downloadUrl;
|
||||||
|
const response = await fetch(downloadUrl);
|
||||||
|
const blob = await response.blob();
|
||||||
|
const url = URL.createObjectURL(blob);
|
||||||
|
const link = document.createElement("a");
|
||||||
|
link.href = url;
|
||||||
|
link.download = `ประวัติการเปลี่ยนชื่อ-นามสกุล_`;
|
||||||
|
document.body.appendChild(link);
|
||||||
|
link.click();
|
||||||
|
setTimeout(() => {
|
||||||
|
document.body.removeChild(link);
|
||||||
|
URL.revokeObjectURL(url);
|
||||||
|
}, 100);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
messageError($q, err);
|
messageError($q, err);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue