Merge branch 'nice' into develop
This commit is contained in:
commit
332ee5526b
2 changed files with 144 additions and 156 deletions
|
|
@ -258,8 +258,8 @@ onMounted(() => {
|
|||
"
|
||||
flat
|
||||
dense
|
||||
color="secondary"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
color="grey-13"
|
||||
icon="mdi-dots-vertical"
|
||||
round
|
||||
>
|
||||
<q-menu>
|
||||
|
|
|
|||
|
|
@ -428,160 +428,11 @@ watch(
|
|||
:active="nodeId == prop.node.orgTreeId"
|
||||
@click.stop="updateSelected(prop.node)"
|
||||
active-class="my-list-link text-primary text-weight-medium"
|
||||
class="row col-12 text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||
class="row col-12 text-dark items-center q-py-xs q-pl-sm rounded-borders my-list"
|
||||
>
|
||||
<q-item-section>
|
||||
<div>
|
||||
<q-item-label lines="1" class="text-weight-medium"
|
||||
>{{ prop.node.orgTreeName }}
|
||||
<q-btn
|
||||
v-if="store.typeOrganizational === 'draft'"
|
||||
flat
|
||||
dense
|
||||
color="secondary"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
round
|
||||
dene
|
||||
class="q-ml-xs"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in prop.node.orgLevel === 4
|
||||
? listAdd.slice(1, 6)
|
||||
: listAdd"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
item.type === 'EDIT'
|
||||
? onClickEdit(prop.node)
|
||||
: item.type === 'ADD'
|
||||
? onClickAgency(
|
||||
prop.node.orgLevel + 1,
|
||||
prop.node
|
||||
)
|
||||
: item.type === 'DETAIL'
|
||||
? onClickDetail(
|
||||
prop.node.orgTreeId,
|
||||
prop.node.orgLevel
|
||||
)
|
||||
: item.type === 'DEL'
|
||||
? onClickDel(
|
||||
prop.node.orgLevel,
|
||||
prop.node.orgTreeId,
|
||||
prop.node.orgRootId
|
||||
)
|
||||
: item.type === 'SORT'
|
||||
? onClickSort(
|
||||
prop.node.orgRootId,
|
||||
prop.node.orgLevel
|
||||
)
|
||||
: item.type === 'HISTORY'
|
||||
? onClickHistory(
|
||||
prop.node.orgLevel,
|
||||
prop.node.orgTreeId
|
||||
)
|
||||
: null
|
||||
"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<div class="row items-center">
|
||||
<q-icon
|
||||
size="xs"
|
||||
:color="item.color"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<div v-if="prop.node.orgLevel === 0">
|
||||
<div
|
||||
class="q-pl-md"
|
||||
v-if="
|
||||
item.type === 'EDIT' ||
|
||||
item.type === 'DEL' ||
|
||||
item.type === 'HISTORY' ||
|
||||
item.type === 'SORT'
|
||||
"
|
||||
>
|
||||
{{ item.label }}หน่วยงาน
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if="item.type === 'ADD'"
|
||||
class="q-pl-md"
|
||||
>
|
||||
{{ item.label }}ส่วนราชการ
|
||||
</div>
|
||||
<div v-else class="q-pl-md">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div
|
||||
class="q-pl-md"
|
||||
v-if="
|
||||
item.type === 'ADD' ||
|
||||
item.type === 'EDIT' ||
|
||||
item.type === 'DEL' ||
|
||||
item.type === 'HISTORY' ||
|
||||
item.type === 'SORT'
|
||||
"
|
||||
>
|
||||
{{ item.label }}ส่วนราชการ
|
||||
</div>
|
||||
<div v-else class="q-pl-md">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-else
|
||||
flat
|
||||
dense
|
||||
color="secondary"
|
||||
icon="mdi-dots-horizontal-circle-outline"
|
||||
round
|
||||
class="q-pa-none q-ml-xs"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in listAdd.slice(5, 6)"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
onClickDetail(
|
||||
prop.node.orgTreeId,
|
||||
prop.node.orgLevel
|
||||
)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<q-icon
|
||||
size="17px"
|
||||
:color="item.color"
|
||||
:name="item.icon"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ item.label }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item-label>
|
||||
<div>
|
||||
<div class="text-weight-medium">
|
||||
{{ prop.node.orgTreeName }}
|
||||
</div>
|
||||
<div class="text-weight-light text-grey-8">
|
||||
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
||||
|
|
@ -591,7 +442,144 @@ watch(
|
|||
: prop.node.orgTreeShortName
|
||||
}}
|
||||
</div>
|
||||
</q-item-section>
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
v-if="store.typeOrganizational === 'draft'"
|
||||
flat
|
||||
dense
|
||||
color="grey-13"
|
||||
icon="mdi-dots-vertical"
|
||||
round
|
||||
class="q-ml-xs"
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in prop.node.orgLevel === 4
|
||||
? listAdd.slice(1, 6)
|
||||
: listAdd"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
item.type === 'EDIT'
|
||||
? onClickEdit(prop.node)
|
||||
: item.type === 'ADD'
|
||||
? onClickAgency(prop.node.orgLevel + 1, prop.node)
|
||||
: item.type === 'DETAIL'
|
||||
? onClickDetail(
|
||||
prop.node.orgTreeId,
|
||||
prop.node.orgLevel
|
||||
)
|
||||
: item.type === 'DEL'
|
||||
? onClickDel(
|
||||
prop.node.orgLevel,
|
||||
prop.node.orgTreeId,
|
||||
prop.node.orgRootId
|
||||
)
|
||||
: item.type === 'SORT'
|
||||
? onClickSort(prop.node.orgRootId, prop.node.orgLevel)
|
||||
: item.type === 'HISTORY'
|
||||
? onClickHistory(
|
||||
prop.node.orgLevel,
|
||||
prop.node.orgTreeId
|
||||
)
|
||||
: null
|
||||
"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<div class="row items-center">
|
||||
<q-icon
|
||||
size="xs"
|
||||
:color="item.color"
|
||||
:name="item.icon"
|
||||
/>
|
||||
<div v-if="prop.node.orgLevel === 0">
|
||||
<div
|
||||
class="q-pl-md"
|
||||
v-if="
|
||||
item.type === 'EDIT' ||
|
||||
item.type === 'DEL' ||
|
||||
item.type === 'HISTORY' ||
|
||||
item.type === 'SORT'
|
||||
"
|
||||
>
|
||||
{{ item.label }}หน่วยงาน
|
||||
</div>
|
||||
|
||||
<div
|
||||
v-else-if="item.type === 'ADD'"
|
||||
class="q-pl-md"
|
||||
>
|
||||
{{ item.label }}ส่วนราชการ
|
||||
</div>
|
||||
<div v-else class="q-pl-md">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<div
|
||||
class="q-pl-md"
|
||||
v-if="
|
||||
item.type === 'ADD' ||
|
||||
item.type === 'EDIT' ||
|
||||
item.type === 'DEL' ||
|
||||
item.type === 'HISTORY' ||
|
||||
item.type === 'SORT'
|
||||
"
|
||||
>
|
||||
{{ item.label }}ส่วนราชการ
|
||||
</div>
|
||||
<div v-else class="q-pl-md">
|
||||
{{ item.label }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
v-else
|
||||
flat
|
||||
dense
|
||||
color="grey-13"
|
||||
icon="mdi-dots-vertical"
|
||||
round
|
||||
>
|
||||
<q-menu>
|
||||
<q-list
|
||||
dense
|
||||
v-for="(item, index) in listAdd.slice(5, 6)"
|
||||
:key="index"
|
||||
style="min-width: 100px"
|
||||
>
|
||||
<q-item
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="
|
||||
onClickDetail(prop.node.orgTreeId, prop.node.orgLevel)
|
||||
"
|
||||
>
|
||||
<q-item-section avatar style="min-width: 20px">
|
||||
<q-icon
|
||||
size="xs"
|
||||
:color="item.color"
|
||||
:name="item.icon"
|
||||
/>
|
||||
</q-item-section>
|
||||
<q-item-section>{{ item.label }}</q-item-section>
|
||||
</q-item>
|
||||
</q-list>
|
||||
</q-menu>
|
||||
</q-btn>
|
||||
</q-item>
|
||||
</template>
|
||||
</q-tree>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue