แก้โหลด พ้นราชการ
This commit is contained in:
parent
e497160fd5
commit
e539ca977b
3 changed files with 15 additions and 10 deletions
|
|
@ -233,9 +233,12 @@ function onSearch() {
|
|||
);
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
await getTreeData();
|
||||
});
|
||||
watch(
|
||||
() => modal.value,
|
||||
async () => {
|
||||
modal.value && (await getTreeData());
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<template>
|
||||
<q-dialog v-model="modal" persistent full-width>
|
||||
|
|
|
|||
|
|
@ -170,8 +170,10 @@ async function fetchlistprofile(id: string) {
|
|||
linkFile.value = data.file;
|
||||
|
||||
// รายชื่อผู้เกษียณอายุราชการ
|
||||
if (data.profile !== null) {
|
||||
const listData = data.profile.map((e: any) => ({
|
||||
|
||||
const listData =
|
||||
data.profile &&
|
||||
data.profile.map((e: any) => ({
|
||||
id: e.id,
|
||||
profileId: e.profileId,
|
||||
order: e.order,
|
||||
|
|
@ -201,18 +203,17 @@ async function fetchlistprofile(id: string) {
|
|||
child4: e.child4,
|
||||
child4Id: e.child4Id,
|
||||
}));
|
||||
rows.value = listData;
|
||||
rowsData.value = listData;
|
||||
}
|
||||
|
||||
if (statusReport.value == false) {
|
||||
await fecthCheck(retireld.value);
|
||||
} else statusUpload.value = true;
|
||||
|
||||
rows.value = listData;
|
||||
rowsData.value = listData;
|
||||
hideLoader();
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
})
|
||||
.finally(() => {
|
||||
hideLoader();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ async function saveData() {
|
|||
.put(config.API.detailByidDeceased(profileId.value), dataToSend)
|
||||
.then(async (res) => {
|
||||
await getData();
|
||||
success($q, "เพิ่มข้อมูลสำเร็จ");
|
||||
})
|
||||
.catch((e) => {
|
||||
messageError($q, e);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue