รายการลาออก download file
This commit is contained in:
parent
c014962eed
commit
30871f95c8
1 changed files with 8 additions and 7 deletions
|
|
@ -24,6 +24,8 @@ import type { DataProfile } from "@/modules/05_placement/interface/index/Main";
|
|||
/** importComponents*/
|
||||
import CardProfile from "@/components/CardProfile.vue";
|
||||
|
||||
import genReport from "@/plugins/genreport";
|
||||
|
||||
const modalPersonal = ref<boolean>(false);
|
||||
const personId = ref<string>("");
|
||||
/** Use */
|
||||
|
|
@ -398,18 +400,17 @@ const rowsFileDownload = ref<rowFile[]>([
|
|||
const fileDownload = async (type: string, fileName: string) => {
|
||||
showLoader();
|
||||
await http
|
||||
.get(config.API.reportResignList(type, id.value), {
|
||||
responseType: "blob",
|
||||
})
|
||||
.get(config.API.reportResignList(type, id.value))
|
||||
.then(async (res) => {
|
||||
downloadFile(res, `${fileName}.${type}`);
|
||||
const data = res.data.result;
|
||||
await genReport(data, `${fileName}`, type);
|
||||
hideLoader();
|
||||
})
|
||||
.catch(async (e) => {
|
||||
messageError($q, JSON.parse(await e.response.data.text()));
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
})
|
||||
.finally(() => {});
|
||||
};
|
||||
|
||||
// ดาว์นโหลดไฟล์
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue