ย้ายไอคอน

This commit is contained in:
STW_TTTY\stwtt 2024-07-24 09:50:23 +07:00
parent 900d308f81
commit dfa66f3a98
28 changed files with 730 additions and 702 deletions

View file

@ -506,20 +506,17 @@ const resetFilter = () => {
>
<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-th auto-width />
<q-th auto-width />
<q-th auto-width />
<q-th auto-width v-if="statuscode !== true" />
<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">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
<q-td auto-width>
<q-btn
dense
@ -588,6 +585,9 @@ const resetFilter = () => {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
</q-tr>
</template>
</d-table>

View file

@ -419,14 +419,28 @@ const fetchOrder = async (id: string) => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
@ -474,19 +488,6 @@ const fetchOrder = async (id: string) => {
</template>
</q-select>
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -1307,21 +1307,6 @@ onMounted(async () => {
>
<template #columns="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'"
class="table_ellipsis2"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td class="text-right">
<!-- แกไขกรรมการ -->
<q-btn
@ -1349,6 +1334,22 @@ onMounted(async () => {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div
v-if="col.name == 'no'"
class="table_ellipsis2"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>
</template>
</Table>

View file

@ -1527,21 +1527,6 @@ onMounted(async () => {
>
<template #columns="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'"
class="table_ellipsis2"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td class="text-right">
<!-- แกไขกรรมการ -->
<q-btn
@ -1570,6 +1555,22 @@ onMounted(async () => {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
>
<div
v-if="col.name == 'no'"
class="table_ellipsis2"
>
{{ props.rowIndex + 1 }}
</div>
<div v-else class="table_ellipsis2">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</Table>

View file

@ -170,27 +170,14 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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"
@click="editPage(props.row)"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td>
<q-btn
dense
@ -204,6 +191,20 @@ onMounted(() => {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="editPage(props.row)"
>
<div v-if="col.name === 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -223,14 +223,27 @@ onMounted(() => {
</template>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.id)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div
v-if="col.name == 'no'"
@ -265,19 +278,7 @@ onMounted(() => {
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.id)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -73,10 +73,10 @@ const paginationLabel = (start: string, end: string, total: string) => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width v-if="nornmalData == true" />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium" v-html="col.label" />
</q-th>
<q-th auto-width v-if="nornmalData == true" />
</q-tr>
</template>
<template #body="props">

View file

@ -193,27 +193,14 @@ onMounted(() => {
</template> -->
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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"
@click="router.push(`/evaluate/director/${props.row.id}`)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-btn
dense
@ -227,6 +214,20 @@ onMounted(() => {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="router.push(`/evaluate/director/${props.row.id}`)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -210,27 +210,14 @@ function filterFn() {
</template> -->
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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"
@click="router.push(`/evaluate/meeting/${props.row.id}`)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
<q-td auto-width>
<q-btn
dense
@ -244,6 +231,20 @@ function filterFn() {
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
:props="props"
@click="router.push(`/evaluate/meeting/${props.row.id}`)"
>
<div v-if="col.name == 'no'">
{{ props.rowIndex + 1 }}
</div>
<div v-else>
{{ col.value }}
</div>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -523,20 +523,18 @@ const pagination = ref({
>
<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-th auto-width />
<q-th auto-width />
<q-th auto-width />
<q-th auto-width v-if="statuscode !== true" />
<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">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
<q-td auto-width>
<q-btn
dense
@ -605,6 +603,10 @@ const pagination = ref({
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">{{
col.name == "no" ? props.rowIndex + 1 : col.value
}}</q-td>
</q-tr>
</template>
</d-table>

View file

@ -435,14 +435,27 @@ const updateData = (row: DataCopyOrder) => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
<q-td key="no" :props="props">
{{ props.rowIndex + 1 }}
</q-td>
@ -490,19 +503,7 @@ const updateData = (row: DataCopyOrder) => {
</template>
</q-select>
</q-td>
<q-td auto-width>
<q-btn
dense
size="12px"
flat
round
color="red"
@click="clickDelete(props.row.personalId)"
icon="mdi-delete"
>
<q-tooltip>ลบขอม</q-tooltip>
</q-btn>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -240,6 +240,7 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -247,11 +248,18 @@ watch(
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -273,14 +281,6 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -368,14 +368,63 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -451,55 +500,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -45,6 +45,33 @@ const props = defineProps({
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/ค่าจ้าง",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "no",
align: "left",
@ -147,33 +174,7 @@ const columns = ref<QTableProps["columns"]>([
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/ค่าจ้าง",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"no",
@ -370,14 +371,65 @@ function onClickViewInfo(type: string, id: string) {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
@ -449,56 +501,7 @@ function onClickViewInfo(type: string, id: string) {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -236,6 +236,7 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th
v-for="col in props.cols"
:key="col.name"
@ -243,11 +244,19 @@ watch(
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -269,14 +278,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
outline
color="primary"
label="เพิ่ม"
@click="onClickAddPerson(props.row)"
/>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -357,14 +357,63 @@ watch(
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -438,55 +487,7 @@ watch(
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL' ? store.itemMenu.filter((x:any)=>x.type !== 'properties') :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup' && x.type !== 'properties')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve,
props.row.remark
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -45,6 +45,33 @@ const props = defineProps({
/** ข้อมูล Table*/
const columns = ref<QTableProps["columns"]>([
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/เงินเดือน",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "no",
align: "left",
@ -136,35 +163,12 @@ const columns = ref<QTableProps["columns"]>([
style: "font-size: 14px",
},
{
name: "posSalary",
align: "center",
label: "ประวัติตำแหน่ง/เงินเดือน",
sortable: false,
field: "posSalary",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "discipline",
align: "center",
label: "วินัย",
sortable: false,
field: "discipline",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
{
name: "leave",
align: "center",
label: "การลา",
sortable: false,
field: "leave",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
},
]);
const visibleColumns = ref<string[]>([
"discipline",
"leave",
"isSuspension",
"no",
"fullName",
"posType",
@ -175,9 +179,7 @@ const visibleColumns = ref<string[]>([
"organization",
"result",
"posSalary",
"discipline",
"leave",
"isSuspension",
]);
/** modalDialog*/
@ -359,14 +361,64 @@ function onClickViewInfo(type: string, id: string) {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
@ -435,56 +487,7 @@ function onClickViewInfo(type: string, id: string) {
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!store.isClosedRound"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in store.roundCode !== 'SPECIAL'? store.itemMenu :store.itemMenu.filter((x:any)=>x.type !== 'moveGroup')"
:key="index"
clickable
v-close-popup
@click="
item.type === 'edit'
? onClickEdit(props.row.id, props.row.amount)
: item.type === 'moveGroup'
? onClickMovieGroup(props.row.id)
: item.type === 'moveLevel'
? onClickMoveLevel(
props.row.id,
props.row.type,
props.row.isReserve
)
: item.type === 'delete'
? onClickDelete(props.row.id)
: item.type === 'properties'
? onProperties(props.row)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -379,40 +379,15 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
<q-separator />
</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'">
{{
(formFilter.page - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div
v-else-if="
col.name == 'rateOldMin' ||
col.name == 'rateMaxOld' ||
col.name == 'rateHighMax'
"
>
{{ col.value ? col.value.toLocaleString() : "-" }}
</div>
<div v-else-if="col.name == 'groupOld'">
<span v-for="(item, index) in col.value">
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
</span>
</div>
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
</q-td>
<q-td>
<q-btn
flat
@ -448,6 +423,32 @@ onMounted(() => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'no'">
{{
(formFilter.page - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div
v-else-if="
col.name == 'rateOldMin' ||
col.name == 'rateMaxOld' ||
col.name == 'rateHighMax'
"
>
{{ col.value ? col.value.toLocaleString() : "-" }}
</div>
<div v-else-if="col.name == 'groupOld'">
<span v-for="(item, index) in col.value">
{{ item }}{{ index + 1 == col.value.length ? "" : "," }}
</span>
</div>
<div v-else>{{ col.value != "" ? col.value : "-" }}</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -319,31 +319,15 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
<q-separator />
</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 === 'startDate'">
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name === 'group'">
{{ col.value ? `กลุ่มที่ ${col.value}` : "-" }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
></q-icon>
</div>
<div v-else>{{ col.value ? col.value : "-" }}</div>
</q-td>
<q-td>
<q-btn
flat
@ -390,6 +374,23 @@ onMounted(() => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "-" }}
</div>
<div v-else-if="col.name === 'group'">
{{ col.value ? `กลุ่มที่ ${col.value}` : "-" }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
></q-icon>
</div>
<div v-else>{{ col.value ? col.value : "-" }}</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -311,50 +311,14 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></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 === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
/>
</div>
<div v-else-if="col.name === 'posList'" class="row">
<div class="column text-weight-light">
<span>ประเภทตำแหน</span>
<span>ระดบตำแหน</span>
</div>
<div class="column q-ml-sm">
<span>{{ props.row.posType }}</span>
<span>{{
props.row.isSpecial
? `${props.row.posLevel} (ฉ)`
: `${props.row.posLevel}`
}}</span>
</div>
</div>
<div v-else-if="col.name === 'salaryType'">
{{
col.value === "OFFICER"
? "ข้าราชการกรุงเทพมหานครสามัญ"
: "ลูกจ้างประจำกรุงเทพมหานคร"
}}
</div>
<div v-else-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
flat
@ -415,6 +379,43 @@ onMounted(() => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'isActive'">
<q-icon
:name="col.value ? 'done' : 'close'"
:color="col.value ? 'primary' : 'grey'"
size="24px"
/>
</div>
<div v-else-if="col.name === 'posList'" class="row">
<div class="column text-weight-light">
<span>ประเภทตำแหน</span>
<span>ระดบตำแหน</span>
</div>
<div class="column q-ml-sm">
<span>{{ props.row.posType }}</span>
<span>{{
props.row.isSpecial
? `${props.row.posLevel} (ฉ)`
: `${props.row.posLevel}`
}}</span>
</div>
</div>
<div v-else-if="col.name === 'salaryType'">
{{
col.value === "OFFICER"
? "ข้าราชการกรุงเทพมหานครสามัญ"
: "ลูกจ้างประจำกรุงเทพมหานคร"
}}
</div>
<div v-else-if="col.name === 'startDate'">
{{ col.value ? date2Thai(col.value) : "" }}
</div>
<div v-else>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -33,11 +33,15 @@ const store = useSalaryEmployeeChartDataStore();
<q-tab-panels v-model="store.mainTab" animated>
<q-tab-panel name="structure">
<TabStructure />
<div class="q-pa-sm">
<TabStructure />
</div>
</q-tab-panel>
<q-tab-panel name="criteria">
<TabCriteris />
<div class="q-pa-sm">
<TabCriteris />
</div>
</q-tab-panel>
</q-tab-panels>
</q-card>

View file

@ -303,18 +303,15 @@ onMounted(async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width v-if="!isActive" />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width v-if="!isActive" />
</q-tr>
<q-separator />
</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">
{{ col.value ? col.value : "-" }}
</q-td>
<q-td v-if="!isActive">
<q-btn
flat
@ -348,6 +345,10 @@ onMounted(async () => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
{{ col.value ? col.value : "-" }}
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -283,14 +283,54 @@ watch([() => formQuery.page, () => formQuery.pageSize], async () => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width v-if="!isActive"></q-th>
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width></q-th>
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td v-if="!isActive">
<q-btn
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in itemMenu"
:key="index"
clickable
v-close-popup
@click.stop="
item.type === 'edit'
? onClickSalaryRate('edit', props.row)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
<q-td
v-for="col in props.cols"
:key="col.name"
@ -344,46 +384,7 @@ watch([() => formQuery.page, () => formQuery.pageSize], async () => {
{{ col.value ? col.value.toLocaleString() : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="!isActive"
flat
dense
icon="mdi-dots-vertical"
class="q-pa-none q-ml-xs"
color="grey-13"
size="12px"
>
<q-menu>
<q-list dense style="min-width: 150px">
<q-item
v-for="(item, index) in itemMenu"
:key="index"
clickable
v-close-popup
@click.stop="
item.type === 'edit'
? onClickSalaryRate('edit', props.row)
: item.type === 'delete'
? onClickDelete(props.row.id)
: null
"
>
<q-item-section>
<div class="row items-center">
<q-icon
:color="item.color"
size="17px"
:name="item.icon"
/>
<div class="q-pl-md">{{ item.label }}</div>
</div>
</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -358,6 +358,7 @@ onMounted(async () => {
</template>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th
v-for="col in props.cols"
:key="col.name"
@ -366,49 +367,10 @@ onMounted(async () => {
>
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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'">
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div v-else-if="col.name == 'effectiveDate'">
{{ date2Thai(props.row.effectiveDate) }}
</div>
<div v-else-if="col.name == 'year'">
{{ props.row.year ? props.row.year + 543 : "-" }}
</div>
<div v-else-if="col.name == 'period'">
{{ dataStore.statusTothai(props.row.period) }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="grey"
class="text-h5"
/>
<q-icon
v-else
name="mdi-check"
color="positive"
class="text-h5"
/>
</div>
<div v-else-if="col.name == 'isClose'">
{{ props.row.isClose == false ? "-" : "ปิดรอบแล้ว" }}
</div>
<div v-else>
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td>
<q-btn
flat
@ -488,6 +450,45 @@ onMounted(async () => {
</q-menu>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name == 'no'">
{{
(currentPage - 1) * Number(pagination.rowsPerPage) +
props.rowIndex +
1
}}
</div>
<div v-else-if="col.name == 'effectiveDate'">
{{ date2Thai(props.row.effectiveDate) }}
</div>
<div v-else-if="col.name == 'year'">
{{ props.row.year ? props.row.year + 543 : "-" }}
</div>
<div v-else-if="col.name == 'period'">
{{ dataStore.statusTothai(props.row.period) }}
</div>
<div v-else-if="col.name === 'isActive'">
<q-icon
v-if="col.value == false"
name="mdi-close"
color="grey"
class="text-h5"
/>
<q-icon
v-else
name="mdi-check"
color="positive"
class="text-h5"
/>
</div>
<div v-else-if="col.name == 'isClose'">
{{ props.row.isClose == false ? "-" : "ปิดรอบแล้ว" }}
</div>
<div v-else>
{{ col.value ?? "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -358,14 +358,26 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer">
<q-td
><q-btn
flat
dense
round
color="info"
icon="mdi-eye-outline"
@click="onClickView(props.row.id)"
>
<q-tooltip>รายละเอยดแผนพฒนาการปฏราชการรายบคคล</q-tooltip>
</q-btn></q-td
>
<q-td v-if="tab === 'COMPLETE'">
<q-checkbox
keep-color
@ -382,18 +394,7 @@ onMounted(() => {
{{ col.value ?? "-" }}
</div>
</q-td>
<q-td
><q-btn
flat
dense
round
color="info"
icon="mdi-eye-outline"
@click="onClickView(props.row.id)"
>
<q-tooltip>รายละเอยดแผนพฒนาการปฏราชการรายบคคล</q-tooltip>
</q-btn></q-td
>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -494,19 +494,14 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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 class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn flat round color="grey" icon="mdi-dots-vertical">
<q-menu>
@ -529,6 +524,12 @@ onMounted(() => {
<q-tooltip>ดาวนโหลด</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">

View file

@ -310,20 +310,16 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
<q-th auto-width />
</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>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
dense
@ -348,6 +344,12 @@ onMounted(() => {
<q-tooltip>ลบ</q-tooltip>
</q-btn>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div>
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>

View file

@ -27,17 +27,79 @@ const route = useRoute();
const projectId = ref<string>(route.params.id.toLocaleString());
const $q = useQuasar();
const mixin = useCounterMixin();
const {
dialogRemove,
showLoader,
hideLoader,
messageError,
success,
dialogConfirm,
} = mixin;
const { showLoader, hideLoader, messageError, success, dialogConfirm } = mixin;
const plannedGoals = ref<ResPlannedGoals[]>([]);
const plannedPeoples = ref<ResPeople[]>([]);
const actualGoals = ref<ResActualGoals[]>([]);
const actualPeoples = ref<ResPeople[]>([]);
const groupTargetData: any = reactive({
targetData: [{}],
});
const isEdit = ref<boolean>(false);
const editId = ref<string>("");
const modalGroupTarget = ref<boolean>(false);
const newModalGroupTarget = ref<boolean>(false);
const modalRelate = ref<boolean>(false);
const isTarget = ref<string>("");
const posTypeOp = ref<DataOption[]>([]);
const posLevelOp = ref<DataOption[]>([]);
const posTypeMain = ref<ResGroup[]>([]);
const formGroupTarget = reactive<FormGroupTargetPlannedGoal>({
groupTarget: "",
groupTargetSub: "",
position: "",
posType: null,
posLevel: null,
type: null,
amount: null,
positions: [
{
position: "",
posTypeId: null,
posLevelId: null,
},
],
});
const formGroupRelate = reactive<FormGroupRelate>({
relate: "",
amount: null,
});
/** เพิ่ม object ให้ตัวแปร */
const addGroupTargetData = async () => {
formGroupTarget.positions.push({
position: "",
posTypeId: null,
posLevelId: null,
});
};
const peoplesOp = ref<DataOption[]>([
{ id: "OPERATOR", name: "เจ้าหน้าที่ดําเนินการ" },
{ id: "LECTURER", name: "วิทยากร" },
{ id: "OBSERVER", name: "ผู้สังเกตการณ์" },
]);
const groupOp = ref<DataOption[]>([
{ id: "OFFICER", name: "ข้าราชการกรุงเทพมหานคร" },
{ id: "PERSONNEL", name: "บุคลากรกรุงเทพมหานคร" },
{ id: "OUTSIDERS", name: "บุคคลภายนอก" },
]);
const groupSubOp = ref<DataOption[]>([
{ id: "OFFICER", name: "ข้าราชการกรุงเทพมหานครสามัญ" },
{ id: "TEACHER", name: "ข้าราชการครู" },
{ id: "EMPLOYEE", name: "กรุงเทพมหานคร(ลูกจ้างประจำ)" },
{ id: "EMPLOYEETEMP", name: "กรุงเทพมหานคร(ลูกจ้างชั่วคราว)" },
{ id: "EDUCATIONAL", name: "บุคลากรทางการศึกษากรุงเทพมหานคร" },
]);
const columnsPlannedGoals = ref<QTableProps["columns"]>([
{
name: "groupTarget",
@ -67,9 +129,7 @@ const columnsPlannedGoals = ref<QTableProps["columns"]>([
field: "posTypePlannedId",
headerStyle: "font-size: 14px",
style: "font-size: 14px",
// format: (val) => convertTypeGoals(val),
},
{
name: "amount",
align: "left",
@ -147,72 +207,6 @@ const columnsRelated = ref<QTableProps["columns"]>([
},
]);
const plannedGoals = ref<ResPlannedGoals[]>([]);
const plannedPeoples = ref<ResPeople[]>([]);
const actualGoals = ref<ResActualGoals[]>([]);
const actualPeoples = ref<ResPeople[]>([]);
const peoplesOp = ref<DataOption[]>([
{ id: "OPERATOR", name: "เจ้าหน้าที่ดําเนินการ" },
{ id: "LECTURER", name: "วิทยากร" },
{ id: "OBSERVER", name: "ผู้สังเกตการณ์" },
]);
const groupOp = ref<DataOption[]>([
{ id: "OFFICER", name: "ข้าราชการกรุงเทพมหานคร" },
{ id: "PERSONNEL", name: "บุคลากรกรุงเทพมหานคร" },
{ id: "OUTSIDERS", name: "บุคคลภายนอก" },
]);
const groupSubOp = ref<DataOption[]>([
{ id: "OFFICER", name: "ข้าราชการกรุงเทพมหานครสามัญ" },
{ id: "TEACHER", name: "ข้าราชการครู" },
{ id: "EMPLOYEE", name: "กรุงเทพมหานคร(ลูกจ้างประจำ)" },
{ id: "EMPLOYEETEMP", name: "กรุงเทพมหานคร(ลูกจ้างชั่วคราว)" },
{ id: "EDUCATIONAL", name: "บุคลากรทางการศึกษากรุงเทพมหานคร" },
]);
const isEdit = ref<boolean>(false);
const editId = ref<string>("");
const modalGroupTarget = ref<boolean>(false);
const newModalGroupTarget = ref<boolean>(false);
const modalRelate = ref<boolean>(false);
const isTarget = ref<string>("");
const formGroupTarget = reactive<FormGroupTargetPlannedGoal>({
groupTarget: "",
groupTargetSub: "",
position: "",
posType: null,
posLevel: null,
type: null,
amount: null,
positions: [
{
position: "",
posTypeId: null,
posLevelId: null,
},
],
});
const formGroupRelate = reactive<FormGroupRelate>({
relate: "",
amount: null,
});
const posTypeOp = ref<DataOption[]>([]);
const posLevelOp = ref<DataOption[]>([]);
const posTypeMain = ref<ResGroup[]>([]);
/** เพิ่ม object ให้ตัวแปร */
const addGroupTargetData = async () => {
formGroupTarget.positions.push({
position: "",
posTypeId: null,
posLevelId: null,
});
};
/** function เรียกข้อมูลประเภทตำแหน่ง*/
function fetchType() {
if (posTypeMain.value.length === 0) {
@ -541,37 +535,14 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</q-tr>
</template>
<template v-slot:body="props">
<q-tr :props="props" class="cursor-pointer vertical-top">
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'posTypePlannedId'">
<div
v-if="props.row.groupTarget !== 'OUTSIDERS'"
v-for="row in props.row.position"
>
{{ `- ${row.position}`
}}{{
row.posType !== null || row.posLevel !== null
? ` (${row.posType ? row.posType : ""}${
row.posLevel ? " " + row.posLevel : ""
})`
: ""
}}
</div>
<div v-else>
{{ props.row.type ? props.row.type : "-" }}
</div>
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="store.projectStatus !== 'FINISH'"
@ -597,6 +568,29 @@ onMounted(() => {
<q-tooltip>แกไขขอม</q-tooltip></q-btn
>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div v-if="col.name === 'posTypePlannedId'">
<div
v-if="props.row.groupTarget !== 'OUTSIDERS'"
v-for="row in props.row.position"
>
{{ `- ${row.position}`
}}{{
row.posType !== null || row.posLevel !== null
? ` (${row.posType ? row.posType : ""}${
row.posLevel ? " " + row.posLevel : ""
})`
: ""
}}
</div>
<div v-else>
{{ props.row.type ? props.row.type : "-" }}
</div>
</div>
<div v-else class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>
@ -617,19 +611,14 @@ onMounted(() => {
>
<template v-slot:header="props">
<q-tr :props="props">
<q-th auto-width />
<q-th v-for="col in props.cols" :key="col.name" :props="props">
<span class="text-weight-medium">{{ col.label }}</span>
</q-th>
<q-th auto-width />
</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 class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
<q-td>
<q-btn
v-if="store.projectStatus !== 'FINISH'"
@ -652,6 +641,11 @@ onMounted(() => {
<q-tooltip>แกไขขอม</q-tooltip></q-btn
>
</q-td>
<q-td v-for="col in props.cols" :key="col.name" :props="props">
<div class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
</d-table>