แก้ไข input
This commit is contained in:
parent
ea655acefb
commit
2d583eac1b
1 changed files with 23 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import { ref, reactive, watch } from "vue";
|
||||
import { ref, reactive, watch, computed } from "vue";
|
||||
import { useQuasar } from "quasar";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
|
@ -211,19 +211,37 @@ watch(
|
|||
formData.orgPhoneIn = props.dataNode.orgTreePhoneIn;
|
||||
formData.orgFax = props.dataNode.orgTreeFax;
|
||||
formData.orgLevel = props.dataNode.orgTreeRank;
|
||||
orgLevelOption.value = orgLevelOptionMain.value;
|
||||
orgLevelOption.value = orgLevelOptionMain.value.slice(1, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
const tittleName = computed(() => {
|
||||
let name = "";
|
||||
if (actionType.value === "ADD") {
|
||||
if (level.value === 1) {
|
||||
name = "เพิ่มหน่วยงาน";
|
||||
} else {
|
||||
name = "เพิ่มส่วนราชการ";
|
||||
}
|
||||
} else {
|
||||
if (level.value === 0) {
|
||||
name = "แก้ไขหน่วยงาน";
|
||||
} else {
|
||||
name = "แก้ไขเพิ่มส่วนราชการ";
|
||||
}
|
||||
}
|
||||
return name;
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<template>
|
||||
<q-dialog v-model="props.modal" persistent>
|
||||
<q-card style="min-width: 50vw">
|
||||
<form @submit.prevent="validateForm">
|
||||
<DialogHeader :tittle="`เพิ่มหน่วยงาน`" :close="closeClear" />
|
||||
<DialogHeader :tittle="tittleName" :close="closeClear" />
|
||||
<q-separator />
|
||||
<q-card-section>
|
||||
<div class="row q-col-gutter-sm">
|
||||
|
|
@ -246,9 +264,9 @@ watch(
|
|||
dense
|
||||
outlined
|
||||
for="#shortName"
|
||||
label="ชื่อย่อ"
|
||||
label="อักษรย่อ"
|
||||
hide-bottom-space
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกชื่อย่อ'}`]"
|
||||
:rules="[(val) => !!val || `${'กรุณากรอกอักษรย่อ'}`]"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue