From efa8896898fc7be701278da2a55c1b4e61705e2a Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Tue, 6 Feb 2024 11:30:51 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=9B=E0=B8=A3=E0=B8=B1=E0=B8=9A=20code=20?= =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA=E0=B8=A3=E0=B9=89?= =?UTF-8?q?=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listView.vue | 82 ++++++----- .../components/mainTree.vue | 127 ++++++++++++------ .../components/tableTree.vue | 78 ++++++++--- .../interface/index/organizational.ts | 27 +++- .../02_organizationalNew/views/main.vue | 90 ++++++++----- 5 files changed, 271 insertions(+), 133 deletions(-) diff --git a/src/modules/02_organizationalNew/components/listView.vue b/src/modules/02_organizationalNew/components/listView.vue index d0b0a938c..365ad22db 100644 --- a/src/modules/02_organizationalNew/components/listView.vue +++ b/src/modules/02_organizationalNew/components/listView.vue @@ -26,13 +26,16 @@ const store = useOrganizational(); const $q = useQuasar(); const { showLoader, hideLoader, messageError } = useCounterMixin(); -const nodeTree = ref(); // ข้อมูล Tree +/** props*/ const historyId = defineModel("historyId", { required: true }); // id ประวัติโครงสร้าง const count = defineModel("count", { required: true }); + +const nodeTree = ref(); // ข้อมูล Tree const nodeId = ref(""); // id ของ Tree const orgLevel = ref(0); // levelTree const isLoad = ref(false); // loadTable const selected = ref(""); + const reqMaster = reactive({ id: "", type: 0, @@ -51,7 +54,6 @@ const posMaster = ref([]); */ async function fetchDataTree(id: string) { showLoader(); - await http .get(config.API.orgByid(id.toString())) .then((res) => { @@ -119,6 +121,7 @@ async function fetchDataTable(id: string, level: number, action: boolean) { }); } +/** funcion ค้นหาข้อมูลใน Table*/ async function filterKeyword() { reqMaster.page = 1; action1.value === false && @@ -155,6 +158,7 @@ watch( } ); +/** callblck function ทำการ fetch ข้อมูล Table เมื่อมีการเปลี่ยนหน้า*/ watch( [() => reqMaster.page, () => reqMaster.pageSize, () => reqMaster.isAll], () => { @@ -197,45 +201,49 @@ watch(
- - -
-
ตำแหน่งทั้งหมด
- - -
-
-
ตำแหน่งที่มีคนครอง
- - -
-
-
ตำแหน่งว่าง
- - -
-
+ + +
+
ตำแหน่งทั้งหมด
+ + +
+
+
ตำแหน่งที่มีคนครอง
+ + +
+
+
ตำแหน่งว่าง
+ + +
+
- +
- +

กรุณาเลือกโครงสร้าง

diff --git a/src/modules/02_organizationalNew/components/mainTree.vue b/src/modules/02_organizationalNew/components/mainTree.vue index e20abcf03..156b02ce6 100644 --- a/src/modules/02_organizationalNew/components/mainTree.vue +++ b/src/modules/02_organizationalNew/components/mainTree.vue @@ -1,26 +1,34 @@