แก้โหลดวินัย

This commit is contained in:
setthawutttty 2024-11-12 10:03:49 +07:00
parent 66bb690fa1
commit be506bc526
4 changed files with 17 additions and 27 deletions

View file

@ -220,10 +220,9 @@ async function getActive() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
} else {
await getOc(formData.activeId);
}
@ -231,7 +230,6 @@ async function getActive() {
/** ดึงข้อมูลหน่วยงานจาก api */
async function getOc(activeId: string) {
showLoader();
await http
.get(config.API.orgByIdSystem(activeId, route.meta.Key as string))
.then(async (res) => {
@ -244,9 +242,7 @@ async function getOc(activeId: string) {
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
.finally(() => {});
}
/**
@ -262,8 +258,8 @@ function deletePerson(id: string) {
/** ช่องทางการร้องเรียน และฟังก์ชั่นการดึงข้อมูลช่องทางการร้องเรียนมาจาก api*/
function getListChannel() {
http
async function getListChannel() {
await http
.get(
config.API.complaintListOp(
mainStore.pathComplaintsChannal(route.name as string)
@ -379,11 +375,10 @@ watch(props.data, async () => {
});
/** โหลดข้อมูลเมื่อเข้าหน้านี้ */
onMounted(() => {
onMounted(async () => {
mainStore.rowsAdd = [];
getActive();
getListChannel();
await getActive();
await getListChannel();
});
</script>

View file

@ -338,10 +338,9 @@ async function getActive() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
}
/** ดึงข้อมูลหน่วยงาน */
@ -359,10 +358,9 @@ async function getOc(activeId: string) {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
}
/** ดึงข้อมูลรายละเอียดสืบสวน */

View file

@ -421,10 +421,9 @@ async function getActive() {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
}
async function getOc(activeId: string) {
@ -439,10 +438,9 @@ async function getOc(activeId: string) {
})
.catch((err) => {
messageError($q, err);
})
.finally(() => {
hideLoader();
});
})
.finally(() => {});
}
/** function เรียกรายชื่อกรรมการ*/
@ -491,7 +489,6 @@ async function fetchDListDirector() {
});
}
/**
* function return รายชอกรรมการทเลอก
* @param data รายชอกรรมการทเลอก

View file

@ -9,7 +9,7 @@ import type {
DataList,
DataListRow,
ocListType,
} from "@/modules/11_discipline/interface/response/complaint";
} from "@/modules/11_discipline/interface/response/Complaint";
import type { QTableProps } from "quasar";