แก้โหลด หน้า

This commit is contained in:
setthawutttty 2024-11-04 13:48:11 +07:00
parent 57f145784e
commit 419ccf61fa
10 changed files with 43 additions and 20 deletions

View file

@ -1043,16 +1043,28 @@ function updateAppointMent() {
/** เมื่อโหลดหน้า เรียกใช้งานฟังชั่น */
onMounted(async () => {
await getAssignNew(personalId);
await getLaw(personalId);
await getSkill(personalId);
await getKnowledge(personalId);
await getcompetency(personalId);
await getCompetencyGroup(personalId);
await getAppoint(personalId);
const promises = [
getAssignNew(personalId),
getLaw(personalId),
getSkill(personalId),
getKnowledge(personalId),
getcompetency(personalId),
getCompetencyGroup(personalId),
getAppoint(personalId),
];
if (assignId.value !== undefined) {
await getAssign();
promises.push(getAssign());
}
showLoader();
await Promise.all(promises)
.then(() => {})
.catch((e) => {
messageError($q, e);
})
.finally(() => {
hideLoader();
});
});
</script>