UI โครงสร้างอัตรากำลัง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-31 10:42:51 +07:00
parent 531b5a33db
commit 790af39fb1
2 changed files with 18 additions and 6 deletions

View file

@ -50,7 +50,11 @@ async function fetchDetailTree(id: string, type: string) {
formData.orgType = range != "DEPARTMENT" ? "ส่วนราชการ" : "หน่วยงาน"; formData.orgType = range != "DEPARTMENT" ? "ส่วนราชการ" : "หน่วยงาน";
formData.orgLevel = store.convertType(range); formData.orgLevel = store.convertType(range);
formData.status = formData.status =
store.typeOrganizational === "current" ? "ปัจจุบัน" : "แบบร่าง"; store.typeOrganizational === "current"
? "ปกติ"
: store.typeOrganizational === "draft"
? "แบบร่าง"
: "ยุบ";
formData.orgPhoneEx = data[`org${type}PhoneEx`]; formData.orgPhoneEx = data[`org${type}PhoneEx`];
formData.orgPhoneIn = data[`org${type}PhoneIn`]; formData.orgPhoneIn = data[`org${type}PhoneIn`];
formData.orgFax = data[`org${type}Fax`]; formData.orgFax = data[`org${type}Fax`];

View file

@ -120,8 +120,10 @@ function onClickDateTime() {
const modalHistory = ref<boolean>(false); const modalHistory = ref<boolean>(false);
const count = ref<number>(0); const count = ref<number>(0);
function onClickHistory(id: string) { const labelHistory = ref<string>("ประวัติโครงสร้าง");
function onClickHistory(id: string, name: string) {
historyId.value = id; historyId.value = id;
labelHistory.value = name;
count.value++; count.value++;
// modalHistory.value = !modalHistory.value; // modalHistory.value = !modalHistory.value;
} }
@ -193,19 +195,25 @@ onMounted(async () => {
:outline="stroe.typeOrganizational === 'current' ? false : true" :outline="stroe.typeOrganizational === 'current' ? false : true"
color="blue" color="blue"
label="ปัจจุบัน" label="ปัจจุบัน"
@click="stroe.typeOrganizational = 'current'" @click="
(stroe.typeOrganizational = 'current'),
(labelHistory = 'ประวัติโครงสร้าง')
"
:disable="ishasActive" :disable="ishasActive"
/> />
<q-btn <q-btn
:outline="stroe.typeOrganizational === 'draft' ? false : true" :outline="stroe.typeOrganizational === 'draft' ? false : true"
color="blue" color="blue"
label="แบบร่าง" label="แบบร่าง"
@click="stroe.typeOrganizational = 'draft'" @click="
(stroe.typeOrganizational = 'draft'),
(labelHistory = 'ประวัติโครงสร้าง')
"
:disable="ishasDraft" :disable="ishasDraft"
/> />
<q-btn-dropdown <q-btn-dropdown
color="blue" color="blue"
label="โครงสร้างแบบเก่า" :label="labelHistory"
@click="stroe.typeOrganizational = 'old'" @click="stroe.typeOrganizational = 'old'"
:outline="stroe.typeOrganizational === 'old' ? false : true" :outline="stroe.typeOrganizational === 'old' ? false : true"
> >
@ -216,7 +224,7 @@ onMounted(async () => {
v-close-popup v-close-popup
v-for="(item, index) in itemHistory" v-for="(item, index) in itemHistory"
:key="index" :key="index"
@click="onClickHistory(item.id)" @click="onClickHistory(item.id, item.name)"
> >
<q-item-section> <q-item-section>
<q-item-label>{{ item.name }}</q-item-label> <q-item-label>{{ item.name }}</q-item-label>