Merge branch 'develop' of github.com:Frappet/bma-ehr-frontend into develop

This commit is contained in:
Warunee Tamkoo 2024-08-06 16:04:57 +07:00
commit 71d2df7e63
11 changed files with 179 additions and 210 deletions

View file

@ -643,7 +643,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td auto-width>
<q-btn
flat
@ -816,7 +816,7 @@ async function emitSearch(keyword: string, typeSelect: string) {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td auto-width>
<q-btn
flat

View file

@ -171,7 +171,7 @@ watch(
</q-tr>
</template>
<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"

View file

@ -206,7 +206,7 @@ watch(
</q-tr>
</template>
<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">
<div v-if="col.name == 'no'">
{{

View file

@ -228,7 +228,7 @@ function updatePagination(newPagination: NewPagination) {
/>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td>
<q-checkbox
keep-color

View file

@ -190,49 +190,6 @@ watch(
<p>{{ formData.status }}</p>
</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>
</q-card-section>
</q-card>

View file

@ -513,7 +513,7 @@ watch([() => page.value, () => pageSize.value], () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td class="text-center">
<q-checkbox
keep-color
@ -687,7 +687,7 @@ watch([() => page.value, () => pageSize.value], () => {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td>
<q-checkbox
keep-color

View file

@ -352,7 +352,7 @@ function clearForm() {
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props">
<q-td>
<q-checkbox
keep-color

View file

@ -428,11 +428,160 @@ 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 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>
<div class="text-weight-medium">
{{ prop.node.orgTreeName }}
<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-light text-grey-8">
{{ prop.node.orgCode == null ? null : prop.node.orgCode }}
@ -442,144 +591,7 @@ watch(
: prop.node.orgTreeShortName
}}
</div>
</div>
<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-section>
</q-item>
</template>
</q-tree>

View file

@ -571,7 +571,7 @@ watch(
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-tr :props="props" >
<q-td>
<q-btn
v-if="store.typeOrganizational === 'draft'"
@ -756,7 +756,7 @@ watch(
</q-tr>
</template>
<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"

View file

@ -1225,7 +1225,7 @@ onMounted(async () => {
class="inputgreen"
:model-value="date2Thai(educationData.finishDate)"
hide-bottom-space
:label="`${'วันที่สำเร็จการศึกษาs'}`"
:label="`${'วันที่สำเร็จการศึกษา'}`"
>
<template v-slot:prepend>
<q-icon

View file

@ -85,6 +85,12 @@ const rowId = ref<string>("");
const actionType = ref<string>("");
/** ListMenu Table*/
const listMenu = ref<ListMenu[]>([
{
label: "ย้ายตำแหน่ง",
icon: "mdi-cursor-move",
type: "MOVE",
color: "blue-10",
},
{
label: "แก้ไข",
icon: "edit",
@ -97,12 +103,6 @@ const listMenu = ref<ListMenu[]>([
type: "DEL",
color: "red",
},
{
label: "ย้ายตำแหน่ง",
icon: "mdi-cursor-move",
type: "MOVE",
color: "blue-10",
},
]);
/** columns*/
@ -447,12 +447,12 @@ watch(
checkPermission($route)?.attrIsUpdate ||
checkPermission($route)?.attrIsDelete
"
class="q-pa-none q-ml-xs"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
color="secondary"
icon="mdi-dots-horizontal-circle-outline"
round
>
<q-menu>
<q-list dense style="min-width: 150px">
@ -470,7 +470,7 @@ watch(
<div class="row items-center">
<q-icon
color="secondary"
size="17px"
size="xs"
name="mdi-account"
/>
<div class="q-pl-md">เลอกคนครอง</div>
@ -490,7 +490,7 @@ watch(
<div class="row items-center">
<q-icon
color="red"
size="17px"
size="xs"
name="mdi-account-remove"
/>
<div class="q-pl-md">ลบคนครอง</div>
@ -526,7 +526,7 @@ watch(
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
size="xs"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
@ -541,7 +541,7 @@ watch(
>
<q-item-section>
<div class="row items-center">
<q-icon color="blue" size="17px" name="mdi-eye" />
<q-icon color="info" size="xs" name="mdi-eye" />
<div class="q-pl-md">รายละเอยด</div>
</div>
</q-item-section>