From f33da756af0dbdacb769f6c81655f607e9b6d569 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 30 Apr 2025 11:21:39 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87=E0=B8=AA?= =?UTF-8?q?=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=AD=E0=B8=B1=E0=B8=95?= =?UTF-8?q?=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1=E0=B8=87?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=B2=E0=B8=A3=E0=B8=B2=E0=B8=8A=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=20=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B9=84?= =?UTF-8?q?=E0=B8=9B=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=84=E0=B8=B3=E0=B8=AA?= =?UTF-8?q?=E0=B8=B1=E0=B9=88=E0=B8=87=E0=B8=81=E0=B8=A3=E0=B8=93=E0=B8=B5?= =?UTF-8?q?=E0=B8=AA=E0=B8=B3=E0=B8=99=E0=B8=B1=E0=B8=81=E0=B8=9B=E0=B8=A5?= =?UTF-8?q?=E0=B8=B1=E0=B8=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/02_organization/components/MainView.vue | 2 ++ src/modules/02_organization/components/TreeMain.vue | 2 ++ src/modules/02_organization/interface/index/organizational.ts | 1 + src/modules/02_organization/views/main.vue | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/src/modules/02_organization/components/MainView.vue b/src/modules/02_organization/components/MainView.vue index bd35e4bd4..bbe2b8f88 100644 --- a/src/modules/02_organization/components/MainView.vue +++ b/src/modules/02_organization/components/MainView.vue @@ -29,6 +29,7 @@ const { showLoader, hideLoader, messageError } = useCounterMixin(); /** props*/ const historyId = defineModel("historyId", { required: true }); // id ประวัติโครงสร้าง const count = defineModel("count", { required: true }); +const isDeputy = defineModel("isDeputy", { default: false }); const nodeTree = ref(); // ข้อมูล Tree const nodeId = ref(""); // id ของ Tree @@ -267,6 +268,7 @@ onMounted(async () => { v-model:short-name="shortName" v-model:node-id="nodeId" v-model:org-root-id="orgRootId" + v-model:is-deputy="isDeputy" :fetch-data-table="fetchDataTable" :fetch-data-tree="fetchDataTree" /> diff --git a/src/modules/02_organization/components/TreeMain.vue b/src/modules/02_organization/components/TreeMain.vue index 9b76ab9da..d3842f755 100644 --- a/src/modules/02_organization/components/TreeMain.vue +++ b/src/modules/02_organization/components/TreeMain.vue @@ -32,6 +32,7 @@ const nodeId = defineModel("nodeId", { required: true }); const orgRootId = defineModel("orgRootId", { required: true, }); +const isDeputy = defineModel("isDeputy", { default: false }); const shortName = defineModel("shortName", { required: true }); const props = defineProps({ fetchDataTree: { @@ -101,6 +102,7 @@ const orgId = ref(""); * @param data ข่อมูล Tree */ function updateSelected(data: DataTree) { + isDeputy.value = data.isDeputy; orgRootId.value = data?.orgLevel === 0 ? data?.orgTreeId : data?.orgRootId; store.rootId = ( data.orgLevel === 0 ? data.orgTreeId : data.orgRootId diff --git a/src/modules/02_organization/interface/index/organizational.ts b/src/modules/02_organization/interface/index/organizational.ts index f5a6ee940..7e2365def 100644 --- a/src/modules/02_organization/interface/index/organizational.ts +++ b/src/modules/02_organization/interface/index/organizational.ts @@ -77,6 +77,7 @@ interface DataTree { totalRootPositionCurrentVacant: number; totalRootPositionNextUse: number; totalRootPositionNextVacant: number; + isDeputy: boolean; children?: DataTree[]; } diff --git a/src/modules/02_organization/views/main.vue b/src/modules/02_organization/views/main.vue index 6445ce540..be9eb7fcb 100644 --- a/src/modules/02_organization/views/main.vue +++ b/src/modules/02_organization/views/main.vue @@ -39,6 +39,7 @@ const count = ref(0); const modalCommand = ref(false); //ส่งไปออกคำสั่ง const modalRemark = ref(false); // หมายเหตุ +const isDeputy = ref(false); // สำนักงานปลัด /** * function เรียกข้อมูลโครงสร้าง แบบปัจุบันและ แบบร่าง @@ -333,6 +334,7 @@ onMounted(async () => { @click="ocClickAddStructure('ADD')" class="q-px-md" /> + @@ -447,6 +450,7 @@ onMounted(async () => { v-model:is-staff="store.isStaff as boolean" v-model:root-id="store.rootId" :system-name="'ORGANIZATION'" + v-model:is-deputy="isDeputy" />