Merge branch 'nice' into develop

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-24 17:18:29 +07:00
commit 8e58a7e3c7
4 changed files with 20 additions and 33 deletions

View file

@ -32,7 +32,6 @@ const { showLoader, hideLoader, messageError } = mixin;
const assignId = ref<string>(route.params.form.toString());
const personalId = ref<string>(route.params.personalId.toString());
const tab = ref<string>("save1");
const dataArrayNumber = ref<number>();
const dataRole = ref<string>("mentor");
@ -52,7 +51,7 @@ async function fecthAssign(id: string) {
// messageError($q, e);
})
.finally(() => {
probationStore.checkLoad && hideLoader();
hideLoader();
});
}
@ -82,13 +81,13 @@ async function FileDownload(type: string) {
`แบบบันทึกผล(ผู้ดูเเล)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
type
);
hideLoader();
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
} else {
//
showLoader();
@ -101,13 +100,13 @@ async function FileDownload(type: string) {
`แบบบันทึกผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
type
);
hideLoader();
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
}

View file

@ -65,21 +65,10 @@ async function fecthAssign(id: string) {
// messageError($q, e);
})
.finally(() => {
probationStore.checkLoad && hideLoader();
hideLoader();
});
}
/** เปลี่ยน type file */
function downloadFile(response: any, filename: string) {
const link = document.createElement("a");
var fileName = filename;
link.href = window.URL.createObjectURL(new Blob([response.data]));
link.setAttribute("download", fileName);
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
}
/**
* download file
* @param type type
@ -96,13 +85,13 @@ async function FileDownload(type: string) {
`แบบประเมินผล(ผู้บังคับบัญชา)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
type
);
hideLoader();
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
}
/** เปลี่ยนหน้า เพิ่ม */

View file

@ -59,7 +59,7 @@ const fecthAssign = async (id: string) => {
// messageError($q, e);
})
.finally(() => {
probationStore.checkLoad && hideLoader();
hideLoader();
});
};
@ -75,13 +75,13 @@ const FileDownload = async (type: string) => {
`แบบประเมินผล(คณะกรรมการ)_${probationStore.person.name}_ครั้งที่${numTab.no}`,
type
);
hideLoader();
})
.catch(async (e) => {
messageError($q, JSON.parse(await e.response.data.text()));
hideLoader();
})
.finally(() => {});
.finally(() => {
hideLoader();
});
};
const addData = () => {
router.push(