From fdda661a3fc74952758d7d1a8f2b40a6e419abc7 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 6 Feb 2024 16:53:53 +0700 Subject: [PATCH 1/6] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20Tree?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/DialogMovePos.vue | 33 +- .../components/listView.vue | 4 +- .../components/mainTree.vue | 297 +++++++++--------- 3 files changed, 182 insertions(+), 152 deletions(-) diff --git a/src/modules/02_organizationalNew/components/DialogMovePos.vue b/src/modules/02_organizationalNew/components/DialogMovePos.vue index 792d871c5..d09b60813 100644 --- a/src/modules/02_organizationalNew/components/DialogMovePos.vue +++ b/src/modules/02_organizationalNew/components/DialogMovePos.vue @@ -10,6 +10,7 @@ import type { PosMaster2, } from "@/modules/02_organizationalNew/interface/response/organizational"; import type { MovePos } from "@/modules/02_organizationalNew/interface/request/organizational"; +import type { DataTree } from "@/modules/02_organizationalNew/interface/index/organizational"; import HeaderDialog from "@/components/DialogHeader.vue"; @@ -61,8 +62,9 @@ function resetFilter() { filterRef.value.focus(); } -function updateSelected(orgLevel: number) { - levelTree.value = orgLevel; +function updateSelected(data: DataTree) { + levelTree.value = data.orgLevel; + selectedTree.value = data.orgTreeId; } const isDisable = computed(() => { @@ -115,6 +117,10 @@ watch( if (modal.value && props.type === "SINGER") { const data = rows.value.filter((e: PosMaster2) => e.id === props.rowId); selectedFilter.value = data; + selectedTree.value = ""; + } else { + selectedFilter.value = []; + selectedTree.value = ""; } } ); @@ -225,13 +231,16 @@ watch( :filter="filterTree" no-results-label="ไม่พบข้อมูลที่ค้นหา" no-nodes-label="ไม่มีข้อมูล" - v-model:selected="selectedTree" > @@ -271,4 +280,12 @@ watch( - + diff --git a/src/modules/02_organizationalNew/components/listView.vue b/src/modules/02_organizationalNew/components/listView.vue index 365ad22db..e87fb1c29 100644 --- a/src/modules/02_organizationalNew/components/listView.vue +++ b/src/modules/02_organizationalNew/components/listView.vue @@ -59,8 +59,8 @@ async function fetchDataTree(id: string) { .then((res) => { const data = res.data.result; nodeTree.value = data; - selected.value = ""; - nodeId.value = ""; + // selected.value = ""; + // nodeId.value = ""; }) .catch((err) => { messageError($q, err); diff --git a/src/modules/02_organizationalNew/components/mainTree.vue b/src/modules/02_organizationalNew/components/mainTree.vue index 156b02ce6..d82a32bd8 100644 --- a/src/modules/02_organizationalNew/components/mainTree.vue +++ b/src/modules/02_organizationalNew/components/mainTree.vue @@ -99,20 +99,21 @@ const orgId = ref(""); function updateSelected(data: DataTree) { store.treeId = data.orgTreeId; store.level = data.orgLevel; - if (data.orgTreeId === nodeId.value) { - nodeId.value = ""; - } else { - nodeId.value = data.orgTreeId ? data.orgTreeId : ""; - data.orgTreeId && - props.fetchDataTable?.(data.orgTreeId, data.orgLevel, true); - store.getSumPosition({ - totalPosition: data.totalPosition, - totalPositionCurrentUse: data.totalPositionCurrentUse, - totalPositionCurrentVacant: data.totalPositionCurrentVacant, - totalPositionNextUse: data.totalPositionNextUse, - totalPositionNextVacant: data.totalPositionNextVacant, - }); - } + // if (data.orgTreeId === nodeId.value) { + // nodeId.value = ""; + // } else { + nodeId.value = data.orgTreeId ? data.orgTreeId : "111"; + + data.orgTreeId && props.fetchDataTable?.(data.orgTreeId, data.orgLevel, true); + store.getSumPosition({ + totalPosition: data.totalPosition, + totalPositionCurrentUse: data.totalPositionCurrentUse, + totalPositionCurrentVacant: data.totalPositionCurrentVacant, + totalPositionNextUse: data.totalPositionNextUse, + totalPositionNextVacant: data.totalPositionNextVacant, + }); + + // } } const breakLoop = ref(false); @@ -349,6 +350,8 @@ watch( nodes.value = nodeTEST.value; } ); + +const modaeMenu = ref(false); @@ -62,9 +62,7 @@ /> -
+
{ messageError($q, e); }) .finally(() => { - store.isLoad++ + store.isLoad++; }); } }; @@ -903,6 +901,7 @@ const clickEditRow = () => { const clickHistory = async (row: RequestItemsObject) => { tittleHistory.value = "ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ"; modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileAssessmentHisId(row.id)) diff --git a/src/modules/04_registry/components/Coin.vue b/src/modules/04_registry/components/Coin.vue index 0d995b9de..bb063ca96 100644 --- a/src/modules/04_registry/components/Coin.vue +++ b/src/modules/04_registry/components/Coin.vue @@ -781,6 +781,7 @@ const clickHistory = async (row: RequestItemsObject) => { ? "ประวัติแก้ไขประกาศลูกจ้างดีเด่น" : "ประวัติแก้ไขประกาศเกียรติคุณ"; modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileHonorHisId(row.id)) diff --git a/src/modules/04_registry/components/Discipline.vue b/src/modules/04_registry/components/Discipline.vue index b6611bebe..f2838566e 100644 --- a/src/modules/04_registry/components/Discipline.vue +++ b/src/modules/04_registry/components/Discipline.vue @@ -43,8 +43,8 @@ icon="mdi-history" @click="clickHistory(props.row)" > - ประวัติแก้ไขวินัย - + ประวัติแก้ไขวินัย + @@ -58,9 +58,7 @@ -
+
{ messageError($q, e); }) .finally(() => { - store.isLoad++ + store.isLoad++; }); } }; @@ -885,6 +883,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileDisHisId(row.id)) diff --git a/src/modules/04_registry/components/Education.vue b/src/modules/04_registry/components/Education.vue index 44d19632c..ba45619ec 100644 --- a/src/modules/04_registry/components/Education.vue +++ b/src/modules/04_registry/components/Education.vue @@ -1495,6 +1495,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileEduHisId(row.id)) diff --git a/src/modules/04_registry/components/Information/top.vue b/src/modules/04_registry/components/Information/top.vue index 416a8f049..8f92674b7 100644 --- a/src/modules/04_registry/components/Information/top.vue +++ b/src/modules/04_registry/components/Information/top.vue @@ -62,9 +62,9 @@ > เพิ่มข้อมูล - +
diff --git a/src/modules/04_registry/components/Insignia.vue b/src/modules/04_registry/components/Insignia.vue index 08f8a0d9b..addb42c3f 100644 --- a/src/modules/04_registry/components/Insignia.vue +++ b/src/modules/04_registry/components/Insignia.vue @@ -1279,6 +1279,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileInsignHisId(row.id)) diff --git a/src/modules/04_registry/components/Leave.vue b/src/modules/04_registry/components/Leave.vue index fc95812fd..16400f334 100644 --- a/src/modules/04_registry/components/Leave.vue +++ b/src/modules/04_registry/components/Leave.vue @@ -152,7 +152,7 @@
-
+
-
+
{ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileLeaveHisId(row.id)) diff --git a/src/modules/04_registry/components/Other.vue b/src/modules/04_registry/components/Other.vue index 8144ca9f6..33bf1d312 100644 --- a/src/modules/04_registry/components/Other.vue +++ b/src/modules/04_registry/components/Other.vue @@ -570,6 +570,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileOtherHisId(row.id)) diff --git a/src/modules/04_registry/components/Record.vue b/src/modules/04_registry/components/Record.vue index b03a39e61..1ef12886e 100644 --- a/src/modules/04_registry/components/Record.vue +++ b/src/modules/04_registry/components/Record.vue @@ -43,8 +43,10 @@ icon="mdi-history" @click="clickHistory(props.row)" > - ประวัติแก้ไขวันที่มิได้ปฏิบัติหน้าที่อยู่ในเขตที่ได้มีประกาศใช้กฎอัยการศึก - + ประวัติแก้ไขวันที่มิได้ปฏิบัติหน้าที่อยู่ในเขตที่ได้มีประกาศใช้กฎอัยการศึก + @@ -61,9 +63,7 @@ /> -
+
{ messageError($q, e); }) .finally(() => { - store.isLoad++ + store.isLoad++; }); } }; @@ -770,6 +770,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileNopaidHisId(row.id)) diff --git a/src/modules/04_registry/components/Salary.vue b/src/modules/04_registry/components/Salary.vue index 36c830603..fafd041d7 100644 --- a/src/modules/04_registry/components/Salary.vue +++ b/src/modules/04_registry/components/Salary.vue @@ -2249,6 +2249,7 @@ const clickEditRowRef = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileSalaryHisId(row.id)) diff --git a/src/modules/04_registry/components/SalaryEmployee.vue b/src/modules/04_registry/components/SalaryEmployee.vue index 6b8b38ba7..d4ed7f39b 100644 --- a/src/modules/04_registry/components/SalaryEmployee.vue +++ b/src/modules/04_registry/components/SalaryEmployee.vue @@ -1989,6 +1989,7 @@ const clickEditRowRef = () => { */ const clickHistory = async (row: RequestItemsEmployee) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileSalaryEmployeeHisId(row.id)) diff --git a/src/modules/04_registry/components/SalaryEmployeeTemp.vue b/src/modules/04_registry/components/SalaryEmployeeTemp.vue index f5f303b8d..d0d760dc6 100644 --- a/src/modules/04_registry/components/SalaryEmployeeTemp.vue +++ b/src/modules/04_registry/components/SalaryEmployeeTemp.vue @@ -2017,6 +2017,7 @@ const clickEditRowRef = () => { */ const clickHistory = async (row: RequestItemsEmployee) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileSalaryEmployeeHisId(row.id)) diff --git a/src/modules/04_registry/components/Talent.vue b/src/modules/04_registry/components/Talent.vue index 1a0550239..59be110a5 100644 --- a/src/modules/04_registry/components/Talent.vue +++ b/src/modules/04_registry/components/Talent.vue @@ -37,9 +37,8 @@ icon="mdi-history" @click="clickHistory(props.row)" > - ประวัติแก้ไขความสามารถพิเศษ - - + ประวัติแก้ไขความสามารถพิเศษ + @@ -53,9 +52,7 @@ -
+
{ messageError($q, e); }) .finally(() => { - store.isLoad++ + store.isLoad++; }); } }; @@ -636,6 +633,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileAbiliHisId(row.id)) diff --git a/src/modules/04_registry/components/Train.vue b/src/modules/04_registry/components/Train.vue index afb78c4d6..b91b5678b 100644 --- a/src/modules/04_registry/components/Train.vue +++ b/src/modules/04_registry/components/Train.vue @@ -1069,6 +1069,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileTrainHisId(row.id)) diff --git a/src/modules/04_registry/components/Work.vue b/src/modules/04_registry/components/Work.vue index b3e6032bb..c32d4d136 100644 --- a/src/modules/04_registry/components/Work.vue +++ b/src/modules/04_registry/components/Work.vue @@ -47,9 +47,8 @@ icon="mdi-history" @click="clickHistory(props.row)" > - ประวัติแก้ไขปฏิบัติราชการพิเศษ - - + ประวัติแก้ไขปฏิบัติราชการพิเศษ + @@ -63,9 +62,7 @@ -
+
{ messageError($q, e); }) .finally(() => { - store.isLoad++ + store.isLoad++; }); } }; @@ -851,6 +848,7 @@ const clickEditRow = () => { */ const clickHistory = async (row: RequestItemsObject) => { modalHistory.value = true; + filterHistory.value = ""; showLoader(); await http .get(config.API.profileDutyHisId(row.id)) From 954f90a81a79852604324c7fc420f8874c8e6efa Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 7 Feb 2024 08:55:52 +0700 Subject: [PATCH 6/6] =?UTF-8?q?=E0=B9=80=E0=B8=8A=E0=B9=87=E0=B8=84?= =?UTF-8?q?=E0=B8=AD=E0=B8=B1=E0=B8=9E=E0=B9=84=E0=B8=9F=E0=B8=A5=E0=B9=8C?= =?UTF-8?q?=E0=B8=81=E0=B9=88=E0=B8=AD=E0=B8=99=E0=B8=9A=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B9=81=E0=B8=81=E0=B9=89=E0=B9=84?= =?UTF-8?q?=E0=B8=82=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/04_registry/components/Information/OldName.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/04_registry/components/Information/OldName.vue b/src/modules/04_registry/components/Information/OldName.vue index d34e79d24..098456670 100644 --- a/src/modules/04_registry/components/Information/OldName.vue +++ b/src/modules/04_registry/components/Information/OldName.vue @@ -68,9 +68,7 @@ -
+
{ * กดดูข้อมูลต่อไป */ const getData = () => { + fileUpload.value = []; const row = rows.value[rowIndex.value]; prefixId.value = row.prefixId; firstName.value = row.firstName; @@ -669,6 +668,7 @@ const clickEdit = () => { * กดปุ่มเพิ่มด้านบน table */ const clickAdd = async () => { + fileUpload.value = []; editRow.value = false; await addData(); };