From 790af39fb122a9fab4e1805ad961f039ea7430e1 Mon Sep 17 00:00:00 2001 From: "DESKTOP-1R2VSQH\\Lenovo ThinkPad E490" Date: Wed, 31 Jan 2024 10:42:51 +0700 Subject: [PATCH] =?UTF-8?q?UI=20=E0=B9=82=E0=B8=84=E0=B8=A3=E0=B8=87?= =?UTF-8?q?=E0=B8=AA=E0=B8=A3=E0=B9=89=E0=B8=B2=E0=B8=87=E0=B8=AD=E0=B8=B1?= =?UTF-8?q?=E0=B8=95=E0=B8=A3=E0=B8=B2=E0=B8=81=E0=B8=B3=E0=B8=A5=E0=B8=B1?= =?UTF-8?q?=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/StructureDetail.vue | 6 +++++- .../02_organizationalNew/views/main.vue | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/modules/02_organizationalNew/components/StructureDetail.vue b/src/modules/02_organizationalNew/components/StructureDetail.vue index 3973c2e47..2b13b8a2c 100644 --- a/src/modules/02_organizationalNew/components/StructureDetail.vue +++ b/src/modules/02_organizationalNew/components/StructureDetail.vue @@ -50,7 +50,11 @@ async function fetchDetailTree(id: string, type: string) { formData.orgType = range != "DEPARTMENT" ? "ส่วนราชการ" : "หน่วยงาน"; formData.orgLevel = store.convertType(range); formData.status = - store.typeOrganizational === "current" ? "ปัจจุบัน" : "แบบร่าง"; + store.typeOrganizational === "current" + ? "ปกติ" + : store.typeOrganizational === "draft" + ? "แบบร่าง" + : "ยุบ"; formData.orgPhoneEx = data[`org${type}PhoneEx`]; formData.orgPhoneIn = data[`org${type}PhoneIn`]; formData.orgFax = data[`org${type}Fax`]; diff --git a/src/modules/02_organizationalNew/views/main.vue b/src/modules/02_organizationalNew/views/main.vue index 8c44cd415..3c512a7ad 100644 --- a/src/modules/02_organizationalNew/views/main.vue +++ b/src/modules/02_organizationalNew/views/main.vue @@ -120,8 +120,10 @@ function onClickDateTime() { const modalHistory = ref(false); const count = ref(0); -function onClickHistory(id: string) { +const labelHistory = ref("ประวัติโครงสร้าง"); +function onClickHistory(id: string, name: string) { historyId.value = id; + labelHistory.value = name; count.value++; // modalHistory.value = !modalHistory.value; } @@ -193,19 +195,25 @@ onMounted(async () => { :outline="stroe.typeOrganizational === 'current' ? false : true" color="blue" label="ปัจจุบัน" - @click="stroe.typeOrganizational = 'current'" + @click=" + (stroe.typeOrganizational = 'current'), + (labelHistory = 'ประวัติโครงสร้าง') + " :disable="ishasActive" /> @@ -216,7 +224,7 @@ onMounted(async () => { v-close-popup v-for="(item, index) in itemHistory" :key="index" - @click="onClickHistory(item.id)" + @click="onClickHistory(item.id, item.name)" > {{ item.name }}