ยุทธศาสตร์ => เพิ่ม scroll
This commit is contained in:
parent
21e569efb4
commit
fa663dd442
1 changed files with 95 additions and 84 deletions
|
|
@ -209,94 +209,100 @@ onMounted(() => {
|
|||
</q-input>
|
||||
</q-toolbar>
|
||||
</div>
|
||||
<q-tree
|
||||
class="q-pa-sm q-gutter-sm"
|
||||
dense
|
||||
:nodes="nodes"
|
||||
node-key="id"
|
||||
label-key="id"
|
||||
:filter="filter"
|
||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
v-model:expanded="expanded"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
clickable
|
||||
@click.stop
|
||||
:active="nodeId == prop.node.name"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
<div>
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.name }}
|
||||
</div>
|
||||
</div>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
icon="mdi-dots-vertical"
|
||||
class="q-ml-xs"
|
||||
color="grey-13"
|
||||
size="12px"
|
||||
round
|
||||
<div class="bg-white tree-container q-pa-xs">
|
||||
<q-tree
|
||||
class="q-pa-sm q-gutter-sm"
|
||||
dense
|
||||
:nodes="nodes"
|
||||
node-key="id"
|
||||
label-key="id"
|
||||
:filter="filter"
|
||||
no-results-label="ไม่พบข้อมูลที่ค้นหา"
|
||||
no-nodes-label="ไม่มีข้อมูล"
|
||||
v-model:expanded="expanded"
|
||||
>
|
||||
<template v-slot:default-header="prop">
|
||||
<q-item
|
||||
clickable
|
||||
@click.stop
|
||||
:active="nodeId == prop.node.name"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 items-center text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in prop.node.level !== 4
|
||||
? ListMenu
|
||||
: ListMenu.slice(1, 4)"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="onClickAction(item.value, prop.node)"
|
||||
<div>
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.name }}
|
||||
</div>
|
||||
</div>
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
icon="mdi-dots-vertical"
|
||||
class="q-ml-xs"
|
||||
color="grey-13"
|
||||
size="12px"
|
||||
round
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in prop.node.level !== 4
|
||||
? ListMenu
|
||||
: ListMenu.slice(1, 4)"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<q-icon size="17px" :color="item.color" :name="item.icon" />
|
||||
</q-item-section>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click.stop="onClickAction(item.value, prop.node)"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<q-icon
|
||||
size="17px"
|
||||
:color="item.color"
|
||||
:name="item.icon"
|
||||
/>
|
||||
</q-item-section>
|
||||
|
||||
<div v-if="item.value === 'ADD'">
|
||||
<q-item-section v-if="prop.node.level === 1">
|
||||
{{ `${item.label}ยุทธศาสตร์ที่` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 2">
|
||||
{{ `${item.label}ยุทธศาสตร์ย่อย` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 3">
|
||||
{{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
|
||||
</q-item-section>
|
||||
</div>
|
||||
<div v-if="item.value === 'ADD'">
|
||||
<q-item-section v-if="prop.node.level === 1">
|
||||
{{ `${item.label}ยุทธศาสตร์ที่ 1` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 2">
|
||||
{{ `${item.label}ยุทธศาสตร์ย่อย` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 3">
|
||||
{{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
|
||||
</q-item-section>
|
||||
</div>
|
||||
|
||||
<div v-else-if="item.value === 'EDIT'">
|
||||
<q-item-section v-if="prop.node.level === 1">
|
||||
{{ `${item.label}ยุทธศาสตร์/แผน` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 2">
|
||||
{{ `${item.label}ยุทธศาสตร์ที่` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 3">
|
||||
{{ `${item.label}ยุทธศาสตร์ย่อย` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 4">
|
||||
{{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
|
||||
</q-item-section>
|
||||
</div>
|
||||
<div v-else-if="item.value === 'EDIT'">
|
||||
<q-item-section v-if="prop.node.level === 1">
|
||||
{{ `${item.label}ยุทธศาสตร์/แผน` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 2">
|
||||
{{ `${item.label}ยุทธศาสตร์ที่` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 3">
|
||||
{{ `${item.label}ยุทธศาสตร์ย่อย` }}
|
||||
</q-item-section>
|
||||
<q-item-section v-if="prop.node.level === 4">
|
||||
{{ `${item.label}กลยุทธ์ที่/เป้าประสงค์` }}
|
||||
</q-item-section>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<q-item-section>{{ item.label }}</q-item-section>
|
||||
</div>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-tree>
|
||||
<div v-else>
|
||||
<q-item-section>{{ item.label }}</q-item-section>
|
||||
</div>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-tree>
|
||||
</div>
|
||||
</q-card>
|
||||
|
||||
<q-dialog v-model="modalDialog" persistent>
|
||||
|
|
@ -349,4 +355,9 @@ onMounted(() => {
|
|||
</q-dialog>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
||||
<style lang="scss" scoped>
|
||||
.tree-container {
|
||||
overflow: auto;
|
||||
height: 75vh;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue