แก้โหลด พ้นราชการ

This commit is contained in:
setthawutttty 2025-07-07 10:38:04 +07:00
parent e497160fd5
commit e539ca977b
3 changed files with 15 additions and 10 deletions

View file

@ -233,9 +233,12 @@ function onSearch() {
); );
} }
onMounted(async () => { watch(
await getTreeData(); () => modal.value,
}); async () => {
modal.value && (await getTreeData());
}
);
</script> </script>
<template> <template>
<q-dialog v-model="modal" persistent full-width> <q-dialog v-model="modal" persistent full-width>

View file

@ -170,8 +170,10 @@ async function fetchlistprofile(id: string) {
linkFile.value = data.file; 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, id: e.id,
profileId: e.profileId, profileId: e.profileId,
order: e.order, order: e.order,
@ -201,18 +203,17 @@ async function fetchlistprofile(id: string) {
child4: e.child4, child4: e.child4,
child4Id: e.child4Id, child4Id: e.child4Id,
})); }));
rows.value = listData;
rowsData.value = listData;
}
if (statusReport.value == false) { if (statusReport.value == false) {
await fecthCheck(retireld.value); await fecthCheck(retireld.value);
} else statusUpload.value = true; } else statusUpload.value = true;
rows.value = listData;
rowsData.value = listData;
hideLoader();
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);
})
.finally(() => {
hideLoader(); hideLoader();
}); });
} }

View file

@ -182,6 +182,7 @@ async function saveData() {
.put(config.API.detailByidDeceased(profileId.value), dataToSend) .put(config.API.detailByidDeceased(profileId.value), dataToSend)
.then(async (res) => { .then(async (res) => {
await getData(); await getData();
success($q, "เพิ่มข้อมูลสำเร็จ");
}) })
.catch((e) => { .catch((e) => {
messageError($q, e); messageError($q, e);