diff --git a/src/modules/11_discipline/components/1_Complaint/Form.vue b/src/modules/11_discipline/components/1_Complaint/Form.vue index 5fdc30df7..7cbfd831f 100644 --- a/src/modules/11_discipline/components/1_Complaint/Form.vue +++ b/src/modules/11_discipline/components/1_Complaint/Form.vue @@ -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(); }); diff --git a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue index 116236471..7543e3bfb 100644 --- a/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue +++ b/src/modules/11_discipline/components/2_InvestigateFacts/Form.vue @@ -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(() => {}); } /** ดึงข้อมูลรายละเอียดสืบสวน */ diff --git a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue index 9c4b8768b..5e5c7f84f 100644 --- a/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue +++ b/src/modules/11_discipline/components/3_InvestigateDisciplinary/Form.vue @@ -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 รายชื่อกรรมการที่เลือก diff --git a/src/modules/11_discipline/store/ComplaintsStore.ts b/src/modules/11_discipline/store/ComplaintsStore.ts index f8f5e66f0..861c7c8e7 100644 --- a/src/modules/11_discipline/store/ComplaintsStore.ts +++ b/src/modules/11_discipline/store/ComplaintsStore.ts @@ -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";