รายการลาออก 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*/
|
/** importComponents*/
|
||||||
import CardProfile from "@/components/CardProfile.vue";
|
import CardProfile from "@/components/CardProfile.vue";
|
||||||
|
|
||||||
|
import genReport from "@/plugins/genreport";
|
||||||
|
|
||||||
const modalPersonal = ref<boolean>(false);
|
const modalPersonal = ref<boolean>(false);
|
||||||
const personId = ref<string>("");
|
const personId = ref<string>("");
|
||||||
/** Use */
|
/** Use */
|
||||||
|
|
@ -398,18 +400,17 @@ const rowsFileDownload = ref<rowFile[]>([
|
||||||
const fileDownload = async (type: string, fileName: string) => {
|
const fileDownload = async (type: string, fileName: string) => {
|
||||||
showLoader();
|
showLoader();
|
||||||
await http
|
await http
|
||||||
.get(config.API.reportResignList(type, id.value), {
|
.get(config.API.reportResignList(type, id.value))
|
||||||
responseType: "blob",
|
|
||||||
})
|
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
downloadFile(res, `${fileName}.${type}`);
|
const data = res.data.result;
|
||||||
|
await genReport(data, `${fileName}`, type);
|
||||||
|
hideLoader();
|
||||||
})
|
})
|
||||||
.catch(async (e) => {
|
.catch(async (e) => {
|
||||||
messageError($q, JSON.parse(await e.response.data.text()));
|
messageError($q, JSON.parse(await e.response.data.text()));
|
||||||
})
|
|
||||||
.finally(() => {
|
|
||||||
hideLoader();
|
hideLoader();
|
||||||
});
|
})
|
||||||
|
.finally(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
// ดาว์นโหลดไฟล์
|
// ดาว์นโหลดไฟล์
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue