ประเมินบุคคล ==> ปรับ load

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-08-26 15:52:26 +07:00
parent bb79dded69
commit 87f3209073
4 changed files with 71 additions and 34 deletions

View file

@ -143,7 +143,7 @@ async function fetchDetail() {
.finally(() => {
setTimeout(() => {
hideLoader();
}, 500);
}, 2500);
});
}
@ -235,14 +235,30 @@ function getData() {
messageError($q, e);
})
.finally(() => {
hideLoader();
setTimeout(() => {
hideLoader();
}, 2500);
});
}
onMounted(async () => {
route.name === "evaluate-add" && (await fetchDetail());
props.data && fetchCheckSpec(props.data);
getData();
// route.name === "evaluate-add" && (await fetchDetail());
// props.data && fetchCheckSpec(props.data);
// getData();
const promises = [];
if (route.name === "evaluate-add") {
promises.push(fetchDetail());
}
if (props.data) {
promises.push(fetchCheckSpec(props.data));
}
promises.push(getData());
await Promise.all(promises);
});
</script>