ประเมินบุคคล ==> ปรับ load
This commit is contained in:
parent
bb79dded69
commit
87f3209073
4 changed files with 71 additions and 34 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue