From 85632ec16cdcef1f883415ea507855b65740c413 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 8 Aug 2023 09:28:24 +0700 Subject: [PATCH] =?UTF-8?q?filter=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=8A?= =?UTF-8?q?=E0=B8=B7=E0=B9=88=E0=B8=AD=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84?= =?UTF-8?q?=E0=B8=B3=E0=B8=AA=E0=B8=B1=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Receive/receiveMain.vue | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/src/modules/05_placement/components/Receive/receiveMain.vue b/src/modules/05_placement/components/Receive/receiveMain.vue index 816fd8e71..98c75f741 100644 --- a/src/modules/05_placement/components/Receive/receiveMain.vue +++ b/src/modules/05_placement/components/Receive/receiveMain.vue @@ -72,25 +72,27 @@ const fecthlistRecevice = async () => { .then((res) => { let response = res.data.result; listRecevice.value = response; - console.log(response); + // console.log(response); rows.value = response.map((e: any) => ({ personalId: e.id, citizenId: e.citizenId, fullname: e.firstname + " " + e.lastname, organizationName: - e.organizationName + - " " + - e.organizationShortName + - " " + - e.positionNumber + - " " + - e.positionPath, - orgName: e.organizationName, - organizationShortName: e.organizationShortName, + e.organizationName + + " " + + e.organizationShortName + + " " + + e.positionNumber + + " " + + e.positionPath, + orgName: e.organizationName, + organizationShortName: e.organizationShortName, positionNumber: e.positionNumber, positionPath: e.positionPath, birthday: date2Thai(e.dateOfBirth), })); + // console.log(rows.value); + rows2.value = rows.value.filter((e: any) => e.orgName !== null); }) .catch((e) => { console.log(typeof e); @@ -116,6 +118,19 @@ const rows = ref([ // birthday: dateText(new Date("1989-09-03")), // }, ]); +const rows2 = ref([ + { + personalId: "08db721d-add6-47b0-8a13-5f45d106e8d1", + citizenId: "1234444332222", + fullname: "นางสาวอย พชช", + organizationName: "นักจัดการงานทั่วไป", + orgName: "กลุ่มงานช่วยนักบริหาร", + organizationShortName: "สกจ.", + positionNumber: "กก. 1", + positionPath: "นักจัดการงานทั่วไป", + birthday: dateText(new Date("1989-09-03")), + }, +]); const columns = ref([ { name: "no", @@ -219,7 +234,7 @@ const openModalTree = (id: string) => { personalId.value = id; console.log(personalId.value); - personal.value = listRecevice.value.filter((e) => e.id === id); + personal.value = listRecevice.value.filter((e: any) => e.id === id); modalTree.value = true; };