แก้ รีโหลดเเล้วข้อมูลหาย
This commit is contained in:
parent
aa034176c7
commit
0f0e1439da
1 changed files with 15 additions and 0 deletions
|
|
@ -300,10 +300,25 @@ async function onClickDelete(id: string, docId: string) {
|
|||
});
|
||||
}
|
||||
|
||||
/** function เรียกประเภทการลา */
|
||||
async function fectOptionType() {
|
||||
await http
|
||||
.get(config.API.leaveType())
|
||||
.then(async (res) => {
|
||||
dataStore.fetchLeaveType(res.data.result);
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
});
|
||||
}
|
||||
|
||||
/**เมื่อเริ่มโหลดหน้า
|
||||
* เรียกใช้งาน fetchData เพื่อดึงข้อมูล
|
||||
*/
|
||||
onMounted(async () => {
|
||||
if (dataStore.options.length == 0) {
|
||||
fectOptionType();
|
||||
}
|
||||
await fetchDataDetail(personalId.value);
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue