โครงสร้างอัตรากำลัง
This commit is contained in:
parent
56fae384bf
commit
912c74768d
9 changed files with 164 additions and 195 deletions
|
|
@ -643,7 +643,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
@ -816,7 +816,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
<q-td auto-width>
|
||||||
<q-btn
|
<q-btn
|
||||||
flat
|
flat
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
<q-td v-for="col in props.cols" :key="col.name" :props="props">
|
||||||
<div v-if="col.name == 'no'">
|
<div v-if="col.name == 'no'">
|
||||||
{{
|
{{
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,7 @@ function updatePagination(newPagination: NewPagination) {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -190,49 +190,6 @@ watch(
|
||||||
<p>{{ formData.status }}</p>
|
<p>{{ formData.status }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- <div class="row q-col-gutter-sm q-mb-xs">
|
|
||||||
<div class="col-12">
|
|
||||||
<d-table
|
|
||||||
flat
|
|
||||||
:columns="columns"
|
|
||||||
:rows="row"
|
|
||||||
row-key="id"
|
|
||||||
dense
|
|
||||||
hide-bottom
|
|
||||||
class="custom-header-table-expand"
|
|
||||||
>
|
|
||||||
<template v-slot:header="props">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<q-th
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<span class="text-weight-medium">{{ col.label }}</span>
|
|
||||||
</q-th>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
<template v-slot:body="props">
|
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
|
||||||
<q-td
|
|
||||||
v-for="col in props.cols"
|
|
||||||
:key="col.name"
|
|
||||||
:props="props"
|
|
||||||
>
|
|
||||||
<div v-if="col.name == 'no'">
|
|
||||||
{{ props.rowIndex + 1 }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-else>
|
|
||||||
{{ col.value }}
|
|
||||||
</div>
|
|
||||||
</q-td>
|
|
||||||
</q-tr>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
|
||||||
|
|
@ -513,7 +513,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td class="text-center">
|
<q-td class="text-center">
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
|
|
@ -687,7 +687,7 @@ watch([() => page.value, () => pageSize.value], () => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -352,7 +352,7 @@ function clearForm() {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-checkbox
|
<q-checkbox
|
||||||
keep-color
|
keep-color
|
||||||
|
|
|
||||||
|
|
@ -428,11 +428,160 @@ watch(
|
||||||
:active="nodeId == prop.node.orgTreeId"
|
:active="nodeId == prop.node.orgTreeId"
|
||||||
@click.stop="updateSelected(prop.node)"
|
@click.stop="updateSelected(prop.node)"
|
||||||
active-class="my-list-link text-primary text-weight-medium"
|
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"
|
class="row col-12 text-dark q-py-xs q-pl-sm rounded-borders my-list"
|
||||||
>
|
>
|
||||||
<div>
|
<q-item-section>
|
||||||
<div class="text-weight-medium">
|
<div>
|
||||||
{{ prop.node.orgTreeName }}
|
<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>
|
||||||
<div class="text-weight-light text-grey-8">
|
<div class="text-weight-light text-grey-8">
|
||||||
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
|
||||||
|
|
@ -442,144 +591,7 @@ watch(
|
||||||
: prop.node.orgTreeShortName
|
: prop.node.orgTreeShortName
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</q-item-section>
|
||||||
|
|
||||||
<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>
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-tree>
|
</q-tree>
|
||||||
|
|
|
||||||
|
|
@ -571,7 +571,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props" >
|
||||||
<q-td>
|
<q-td>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="store.typeOrganizational === 'draft'"
|
v-if="store.typeOrganizational === 'draft'"
|
||||||
|
|
@ -756,7 +756,7 @@ watch(
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:body="props">
|
<template v-slot:body="props">
|
||||||
<q-tr :props="props" class="cursor-pointer">
|
<q-tr :props="props">
|
||||||
<q-td
|
<q-td
|
||||||
v-for="col in props.cols"
|
v-for="col in props.cols"
|
||||||
:key="col.name"
|
:key="col.name"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue