ปรับ UI โครงสร้าง

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-01-29 11:19:48 +07:00
parent 88041a1974
commit 8c1bfb7a75
6 changed files with 237 additions and 111 deletions

View file

@ -64,6 +64,7 @@ const expanded = ref<Array<any>>([]);
const notFound = ref<string>("ไม่พบข้อมูลที่ค้นหา");
const noData = ref<string>("ไม่มีข้อมูล");
const selected = ref("");
const orgLevel = ref<string>("");
const filterData = (node: any, filter: string) => {
// API
@ -225,8 +226,9 @@ function searchAndReplace(
}
const dialogAgency = ref<boolean>(false);
function onClickAgency() {
function onClickAgency(level: string) {
dialogAgency.value = !dialogAgency.value;
orgLevel.value = level;
}
watch(
@ -277,7 +279,7 @@ onMounted(async () => {
round
color="primary"
icon="add"
@click="onClickAgency"
@click="onClickAgency('DEPARTMENT')"
>
<q-tooltip>เพมหนวยงาน</q-tooltip>
</q-btn>
@ -347,6 +349,8 @@ onMounted(async () => {
@click="
item.val === 'EDIT'
? edit(prop.node.organizationId)
: item.val === 'ADD'
? onClickAgency('TEST')
: null
"
>
@ -370,7 +374,12 @@ onMounted(async () => {
</div>
</div>
<DialogAgency :modal="dialogAgency" :close="onClickAgency" />
<!-- เพมหนวยงาน -->
<DialogAgency
:modal="dialogAgency"
:close="onClickAgency"
v-model:orgLevel="orgLevel"
/>
</template>
<style scoped></style>