From 1b953851f17143e00679defbd93efa2e758bea3d Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 12 Oct 2023 02:53:56 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=84=E0=B8=A3=E0=B8=B7=E0=B9=88?= =?UTF-8?q?=E0=B8=AD=E0=B8=87=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=84=E0=B8=B4?= =?UTF-8?q?=E0=B8=A7=E0=B8=A3=E0=B8=B5=E0=B9=88=E0=B8=AA=E0=B8=B3=E0=B8=99?= =?UTF-8?q?=E0=B8=B1=E0=B8=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/07_insignia/store.ts | 36 +++++++++++++++++++------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/src/modules/07_insignia/store.ts b/src/modules/07_insignia/store.ts index 5b0cb0476..bdd276af6 100644 --- a/src/modules/07_insignia/store.ts +++ b/src/modules/07_insignia/store.ts @@ -32,12 +32,15 @@ export const useInsigniaDataStore = defineStore("insignia", () => { //รางาน const optionReport = ref([ - { id: '45', title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์" }, - { id: '43', title: 'บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี' }, - { id: '44', title: 'บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ' } - ]) + { + id: "45", + title: "บัญชีรายชื่อข้าราชการผู้ขอพระราชทานเครื่องราชอิสริยาภรณ์", + }, + { id: "43", title: "บัญชีระดับผลการประเมินผลการปฏิบัติราชการในรอบ 5 ปี" }, + { id: "44", title: "บัญชีแสดงจำนวนชั้นตราเครื่องราชฯ" }, + ]); const mainTab = ref("pending"); - const dataInsigniaType = ref([]) + const dataInsigniaType = ref([]); // เรียกราชชื่อการเสนอขอ const fetchData = async (data: any) => { if (data !== null) { @@ -61,7 +64,12 @@ export const useInsigniaDataStore = defineStore("insignia", () => { markLeave: e.markLeave, markRate: e.markRate, isApprove: e.isApprove, - statusMark: e.markDiscipline === true || e.markLeave === true || e.markRate === true ? true : false + statusMark: + e.markDiscipline === true || + e.markLeave === true || + e.markRate === true + ? true + : false, })); rows.value = await datalist; listinsignia.value = await datalist; @@ -79,7 +87,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => { const fetchOption = (op: any) => { if (agency.value !== null) { typeOc.value = agency.value; - optionsTypeOc.value = op.filter((e: any) => e.id == agency.value); + optionsTypeOc.value = op; + // .filter((e: any) => e.id == agency.value); } else { (optionsTypeOc.value = op), (typeOc.value = op[0].id); } @@ -105,8 +114,8 @@ export const useInsigniaDataStore = defineStore("insignia", () => { }; // ค้นหาข้อมมูลราชชื่อ ตาม ประเท๓และสถานภาพ const searchDataTable = async (type: string, employeeClasstype: string) => { - typeinsignia.value = type - employeeClass.value = employeeClasstype + typeinsignia.value = type; + employeeClass.value = employeeClasstype; if (type !== "all" && employeeClasstype !== "all") { rows.value = listinsignia.value.filter( (e: any) => @@ -127,7 +136,7 @@ export const useInsigniaDataStore = defineStore("insignia", () => { }; // ประเภทเครื่องราช function fetchInsigniaType(data: any) { - dataInsigniaType.value = data + dataInsigniaType.value = data; } // ประเภทลูกจ้าง @@ -147,15 +156,14 @@ export const useInsigniaDataStore = defineStore("insignia", () => { function convertStatus(val: string) { switch (val) { case "WAITTING": - return "สร้างรอบ" + return "สร้างรอบ"; case "PENDING": - return "กำลังดำเนินการ" + return "กำลังดำเนินการ"; case "DONE": - return "เสร็จสิ้น" + return "เสร็จสิ้น"; } } - return { roundId, optionRound,