From b02e8283d0280955189c1676dd7df9e502e64b70 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 28 Aug 2024 17:34:38 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7?= =?UTF-8?q?=E0=B9=88=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/4_Allocate/Main.vue | 5 +- .../components/4_Allocate/OrgList.vue | 28 ++------ .../components/5_Borrow/DialogForm.vue | 12 ++-- .../07_insignia/components/5_Borrow/Main.vue | 4 +- src/modules/07_insignia/views/ResultPage.vue | 64 ++++++++----------- 5 files changed, 40 insertions(+), 73 deletions(-) diff --git a/src/modules/07_insignia/components/4_Allocate/Main.vue b/src/modules/07_insignia/components/4_Allocate/Main.vue index d0d92fb79..b0cc2534f 100644 --- a/src/modules/07_insignia/components/4_Allocate/Main.vue +++ b/src/modules/07_insignia/components/4_Allocate/Main.vue @@ -566,10 +566,7 @@ onMounted(async () => { รายละเอียด { messageError($q, err); }) - .finally(() => hideLoader()); + .finally(() => { + hideLoader(); + }); } /** funcion เรียกข้อมูลหน่วยงานจัดสรรเครื่องราชอิสริยาภรณ์ */ @@ -160,21 +162,6 @@ async function fetchOrgList() { .catch((err) => { messageError($q, err); }); - // showLoader(); - // await http - // .get(config.API.typeOc()) - // .then(async (response: any) => { - // orgList.value = response.data.result.map((e: any) => ({ - // id: e.organizationId, - // name: e.organizationName, - // })); - // }) - // .catch((err) => { - // messageError($q, err); - // }) - // .finally(() => { - // hideLoader(); - // }); } /** funcion ย้อนกลับหน้าจัดสรรเครื่องราชอิสริยาภรณ์*/ @@ -286,10 +273,8 @@ const resetFilter = () => { /** Hook*/ onMounted(async () => { - fecthDashboard(); - fecthListData(); name.value = DataStore.insigniaName; - fetchOrgList(); + await Promise.all([fecthDashboard(), fecthListData(), fetchOrgList()]); }); @@ -412,10 +397,7 @@ onMounted(async () => { { await props.closeAndFecth(); - await clearData(); await success($q, "บันทึกข้อมูลสำเร็จ"); + await clearData(); }) .catch((err) => { messageError($q, err); @@ -292,6 +290,7 @@ watch(props, () => { // fetchOrgList(); } else { fecthlistInsignia(); + setValue(); } } }); @@ -476,6 +475,7 @@ watch(props, () => { " :label="`${'วันที่คืน'}`" clearable + class="inputgreen" @clear="clearReturnDate" >