From 5741c3a815a0a0c5c3f3e603dfdfc48a001ddc34 Mon Sep 17 00:00:00 2001 From: waruneeta Date: Thu, 1 Feb 2024 18:40:17 +0700 Subject: [PATCH 1/2] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A?= =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84=E0=B8=82=E0=B8=AD=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=A3=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_organizationalNew/components/listView.vue | 1 - .../interface/response/organizational.ts | 6 ++++-- src/modules/02_organizationalNew/store/organizational.ts | 9 ++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/modules/02_organizationalNew/components/listView.vue b/src/modules/02_organizationalNew/components/listView.vue index 5ebb791e0..6eaf9a271 100644 --- a/src/modules/02_organizationalNew/components/listView.vue +++ b/src/modules/02_organizationalNew/components/listView.vue @@ -95,7 +95,6 @@ async function fetchDataTable(id: string, level: number, action: boolean) { await http .post(config.API.orgPosMasterList, reqMaster) .then((res) => { - console.log(res); posMaster.value = []; const dataMain: PosMaster[] = []; totalPage.value = Math.ceil(res.data.result.total / reqMaster.pageSize); diff --git a/src/modules/02_organizationalNew/interface/response/organizational.ts b/src/modules/02_organizationalNew/interface/response/organizational.ts index a146b5216..e0a2b2927 100644 --- a/src/modules/02_organizationalNew/interface/response/organizational.ts +++ b/src/modules/02_organizationalNew/interface/response/organizational.ts @@ -80,8 +80,9 @@ interface Position { interface PosMaster { id: string; // id อัตรากำลัง posmaster + orgShortname: string; // อักษรย่อตำแหน่ง posMasterNoPrefix: string; // Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: number; // เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNo: number | string; // เลขที่ตำแหน่ง เป็นตัวเลข posMasterNoSuffix: string | null; // Suffix หลังเลขที่ตำแหน่ง เช่น ช. positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน @@ -113,8 +114,9 @@ interface Position2 { interface PosMaster2 { id: string; // id อัตรากำลัง posmaster + orgShortname: string; // อักษรย่อตำแหน่ง posMasterNoPrefix: string; // Prefix นำหน้าเลขที่ตำแหน่ง เป็น Optional (ไม่ใช่อักษรย่อของหน่วยงาน/ส่วนราชการ) - posMasterNo: number; // เลขที่ตำแหน่ง เป็นตัวเลข + posMasterNo: number | string; // เลขที่ตำแหน่ง เป็นตัวเลข posMasterNoSuffix: string | null; // Suffix หลังเลขที่ตำแหน่ง เช่น ช. positionName: string; // ชื่อตำแหน่งในสายงาน (ชื่อตำแหน่ง) positionField: string; // สายงาน diff --git a/src/modules/02_organizationalNew/store/organizational.ts b/src/modules/02_organizationalNew/store/organizational.ts index 6cc5cfe3b..1efed1c44 100644 --- a/src/modules/02_organizationalNew/store/organizational.ts +++ b/src/modules/02_organizationalNew/store/organizational.ts @@ -29,11 +29,14 @@ export const useOrganizational = defineStore("organizationalStore", () => { } function fetchPosMaster(data: PosMaster[]) { - console.log(data); - const newPosMaster = data.map((e: PosMaster) => ({ ...e, - positionIsSelected: e.positionIsSelected ? "มีคนครอง" : "ไม่มีคนครอง", + positionIsSelected: e.positionIsSelected ? "มี" : "ว่าง", + posMasterNo: + e.orgShortname + + e.posMasterNoPrefix + + e.posMasterNo + + e.posMasterNoSuffix, positionName: e.positionName ? e.positionName : "-", posTypeName: e.posTypeName ? e.posTypeName : "-", posLevelName: e.posLevelName ? e.posLevelName : "-", From 7112e60b6974420ae330b651b71a98a7f42ef202 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Fri, 2 Feb 2024 09:26:13 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20filt?= =?UTF-8?q?er=20=E0=B9=80=E0=B8=9E=E0=B8=B4=E0=B9=88=E0=B8=A1=E0=B8=AD?= =?UTF-8?q?=E0=B8=B1=E0=B8=95=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3=E0=B8=A5?= =?UTF-8?q?=E0=B8=B1=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../02_organizationalNew/components/DialogFormPosition.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/modules/02_organizationalNew/components/DialogFormPosition.vue b/src/modules/02_organizationalNew/components/DialogFormPosition.vue index c69977e04..1bc99c156 100644 --- a/src/modules/02_organizationalNew/components/DialogFormPosition.vue +++ b/src/modules/02_organizationalNew/components/DialogFormPosition.vue @@ -428,10 +428,7 @@ function onSubmitSelectEdit() { ); } -/** update เมื่อเปลี่ยน option */ -function updateSelect() { - search.value = ""; -} + /** input ค้นหา */ const searchRef = ref(null); @@ -727,7 +724,7 @@ async function clearFormPositionSelect() { :options="optionFilter" emit-value dense - @update:model-value="updateSelect" + map-options outlined option-label="name"