From caaabc808dc0f05f9997d4765f984b9c807fa626 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 27 Jun 2024 11:20:36 +0700 Subject: [PATCH 1/2] fix bug --- .../components/PersonalList/OrgTree.vue | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/OrgTree.vue b/src/modules/05_placement/components/PersonalList/OrgTree.vue index 753a82eb0..d4576a8d7 100644 --- a/src/modules/05_placement/components/PersonalList/OrgTree.vue +++ b/src/modules/05_placement/components/PersonalList/OrgTree.vue @@ -114,16 +114,16 @@ function filterByPersonIdNull(obj: any) { } /**get data ตำแหน่งงาน */ -async function fetchplacementPosition() { - await http - .get(config.API.placementPosition()) - .then((res: any) => { - placementPosition.value = res.data.result; - }) - .catch((e: any) => { - messageError($q, e); - }); -} +// async function fetchplacementPosition() { +// await http +// .get(config.API.placementPosition()) +// .then((res: any) => { +// placementPosition.value = res.data.result; +// }) +// .catch((e: any) => { +// messageError($q, e); +// }); +// } /** รับค่ามาจาก หน้าหลัก*/ const props = defineProps({ @@ -204,7 +204,7 @@ async function saveAppoint() { await closeAndClear(); // await fetchPublishFile(); // await loadTreeData(); - await fetchplacementPosition(); + // await fetchplacementPosition(); hideLoader(); }); }); @@ -393,7 +393,7 @@ async function postClearPosition() { watch(props, () => { expanded.value = []; const dataPersonal = props.personal; - fetchplacementPosition(); + // fetchplacementPosition(); if (dataPersonal) { dataPersonal.map((data: any) => { personal.value = data; @@ -421,7 +421,7 @@ watch(props, () => { onMounted(async () => { // await fetchPublishFile(); // await loadTreeData(); - await fetchplacementPosition(); + // await fetchplacementPosition(); }); From b707a44734b4adfb580cd14559654eaef15d919a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Thu, 27 Jun 2024 11:53:53 +0700 Subject: [PATCH 2/2] =?UTF-8?q?=E0=B8=9A=E0=B8=A3=E0=B8=A3=E0=B8=88?= =?UTF-8?q?=E0=B8=B8=20=3D>=20fix=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PersonalList/Table.vue | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/src/modules/05_placement/components/PersonalList/Table.vue b/src/modules/05_placement/components/PersonalList/Table.vue index 1ceac6518..3bba347a0 100644 --- a/src/modules/05_placement/components/PersonalList/Table.vue +++ b/src/modules/05_placement/components/PersonalList/Table.vue @@ -287,12 +287,13 @@ async function getTable() { .get(config.API.personalList(examIdString)) .then(async (res: any) => { dataRes.value = res.data.result; + rowsAll.value = []; (rowsFilter.value = []), res.data.result.map((data: any) => { const rowData = { personalId: data.personalId, - avatar: data.avatar, + avatar: avatar, name: data.fullName, fullName: data.fullName + " " + data.idCard, idCard: data.idCard, @@ -372,7 +373,7 @@ async function getTable() { e.reportingDate !== null ); - insertAvatar(rows.value); + // insertAvatar(rows.value); }) .catch((e) => { messageError($q, e); @@ -382,31 +383,31 @@ async function getTable() { }); } -function insertAvatar(items: any) { - items.map((x: any, index: number) => { - http - .get( - config.API.fileByFile( - "ทะเบียนประวัติ", - "โปรไฟล์", - x.personalId, - "profile-" + x.personalId - ) - ) - .then((img) => { - rows.value[index] = { - ...x, - avatar: img.data.downloadUrl, - }; - }) - .catch(() => { - rows.value[index] = { - ...x, - avatar: avatar, - }; - }); - }); -} +// function insertAvatar(items: any) { +// items.map((x: any, index: number) => { +// http +// .get( +// config.API.fileByFile( +// "ทะเบียนประวัติ", +// "โปรไฟล์", +// x.personalId, +// "profile-" + x.personalId +// ) +// ) +// .then((img) => { +// rows.value[index] = { +// ...x, +// avatar: img.data.downloadUrl, +// }; +// }) +// .catch(() => { +// rows.value[index] = { +// ...x, +// avatar: avatar, +// }; +// }); +// }); +// } /**ยืนยันการผ่อนผัน */ async function saveDeferment() {