ทะเบียนประวัติ ==> ปรับ load

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-27 10:37:57 +07:00
parent bc29de9f1c
commit 07b50dca80
4 changed files with 42 additions and 26 deletions

View file

@ -199,7 +199,7 @@ function uploadFileURL(uploadUrl: string, file: any) {
}
function fetchProfile(id: string) {
showLoader();
// showLoader();
http
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
.then(async (res) => {
@ -208,9 +208,9 @@ function fetchProfile(id: string) {
.catch(() => {
profilePicture.value = avatar;
})
.finally(() => {
hideLoader();
});
// .finally(() => {
// hideLoader();
// });
}
const reasonStatus = ref<boolean>(false);
@ -254,7 +254,7 @@ async function fetchDataPersonal() {
showLoader();
await http
.get(config.API.registryNewByProfileId(profileId.value, empType.value))
.then((res) => {
.then(async (res) => {
formDetail.value = res.data.result;
if (res.data.result.leaveReason) {
@ -275,7 +275,7 @@ async function fetchDataPersonal() {
fileName.value = res.data.result.avatarName;
if (formDetail.value?.avatarName) {
fetchProfile(profileId.value);
await fetchProfile(profileId.value);
} else {
profilePicture.value = avatar;
}
@ -291,13 +291,13 @@ async function fetchDataPersonal() {
}
})
.finally(() => {
hideLoader();
setTimeout(() => {
hideLoader();
}, 2800);
});
}
function onClickDownloadKp7(type: string) {
console.log(empType.value);
showLoader();
const url =
type === "FULL"