รายการลาออก download file

This commit is contained in:
STW_TTTY\stwtt 2024-08-22 13:08:09 +07:00
parent c014962eed
commit 30871f95c8

View file

@ -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(() => {});
};
//