ปรับ API report กพ7

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-11-04 13:43:10 +07:00
parent 7b02611f33
commit 9dfd60c26e
2 changed files with 19 additions and 10 deletions

View file

@ -399,11 +399,11 @@ async function onClickDownloadKp7(type: string) {
const url =
type === "FULL"
? empType.value
? config.API.profileReportEmpId(profileId.value)
: config.API.profileReportId(profileId.value)
? config.API.profilFull(profileId.value, "profile-employee")
: config.API.profilFull(profileId.value, "profile")
: empType.value
? config.API.profileKp7ShortEmpId(profileId.value)
: config.API.profileKp7ShortId(profileId.value);
? config.API.profilshort(profileId.value, "profile-employee")
: config.API.profilshort(profileId.value, "profile");
const fileName = type === "FULL" ? "ก.พ.7/ก.ก.1" : "ประวัติแบบย่อ";
await http
@ -411,13 +411,13 @@ async function onClickDownloadKp7(type: string) {
.then(async (res) => {
const data = await res.data.result;
await genReport(data, `${fileName}`, type);
hideLoader();
})
.catch((err) => {
messageError($q, err);
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
/**
@ -1089,7 +1089,10 @@ onMounted(async () => {
<!-- Dialog เลอก Image -->
<q-dialog v-model="dialogImage" persistent>
<q-card style="width: 100vw; max-width: 60vw">
<DialogHeader :tittle="'เลือกรูปภาพ (150 x 200 px)'" :close="closeImage" />
<DialogHeader
:tittle="'เลือกรูปภาพ (150 x 200 px)'"
:close="closeImage"
/>
<q-separator />
<q-card-section class="col-12 row">