diff --git a/src/modules/06_retirement/components/resign/ResignByid.vue b/src/modules/06_retirement/components/resign/ResignByid.vue index 4a6e2c3ef..5d9ac5070 100644 --- a/src/modules/06_retirement/components/resign/ResignByid.vue +++ b/src/modules/06_retirement/components/resign/ResignByid.vue @@ -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(false); const personId = ref(""); /** Use */ @@ -398,18 +400,17 @@ const rowsFileDownload = ref([ 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(() => {}); }; // ดาว์นโหลดไฟล์