แก้ UI
This commit is contained in:
parent
c9ec713f14
commit
4a9e9dcda4
3 changed files with 405 additions and 408 deletions
|
|
@ -47,12 +47,16 @@ const resPerformForm = reactive<RequestItemsObject>({
|
||||||
const isEdit = ref<boolean>(false);
|
const isEdit = ref<boolean>(false);
|
||||||
const modal = ref<boolean>(false);
|
const modal = ref<boolean>(false);
|
||||||
const modeView = ref<string>("table");
|
const modeView = ref<string>("table");
|
||||||
|
const modeViewPlan = ref<string>("table");
|
||||||
const filterSearch = ref("");
|
const filterSearch = ref("");
|
||||||
|
|
||||||
const filterHistory = ref<string>("");
|
const filterHistory = ref<string>("");
|
||||||
const modalHistory = ref<boolean>(false);
|
const modalHistory = ref<boolean>(false);
|
||||||
const rowsHistory = ref<ResponseObject[]>([]);
|
const rowsHistory = ref<ResponseObject[]>([]);
|
||||||
|
const filterSearchPlan = ref("");
|
||||||
|
|
||||||
const rows = ref<ResponseObject[]>([]);
|
const rows = ref<ResponseObject[]>([]);
|
||||||
|
const rowsPlan = ref<any[]>([]);
|
||||||
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
const columns = ref<QTableProps["columns"]>([
|
||||||
{
|
{
|
||||||
|
|
@ -277,10 +281,90 @@ const visibleColumns = ref<String[]>([
|
||||||
"date",
|
"date",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const visibleColumnsPlan = ref<String[]>([
|
||||||
|
"no",
|
||||||
|
"Knowledge",
|
||||||
|
"develop",
|
||||||
|
"target",
|
||||||
|
"developmentResults",
|
||||||
|
"developmentReport",
|
||||||
|
]);
|
||||||
|
const columnsPlan = ref<QTableProps["columns"]>([
|
||||||
|
{
|
||||||
|
name: "no",
|
||||||
|
align: "left",
|
||||||
|
label: "ลำดับ",
|
||||||
|
sortable: true,
|
||||||
|
field: "no",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
format: (v) => date2Thai(v),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Knowledge",
|
||||||
|
align: "left",
|
||||||
|
label: "ความรู้ / ทักษะ / สมรรถนะที่ต้องได้รับการพัฒนา",
|
||||||
|
sortable: true,
|
||||||
|
field: "Knowledge",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "develop",
|
||||||
|
align: "left",
|
||||||
|
label: "วิธีการพัฒนา",
|
||||||
|
sortable: true,
|
||||||
|
field: "develop",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "target",
|
||||||
|
align: "left",
|
||||||
|
label: "เป้าหมายการพัฒนา",
|
||||||
|
sortable: true,
|
||||||
|
field: "target",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "developmentResults",
|
||||||
|
align: "left",
|
||||||
|
label: "วิธีการวัดผลการพัฒนา",
|
||||||
|
sortable: true,
|
||||||
|
field: "developmentResults",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "developmentReport",
|
||||||
|
align: "left",
|
||||||
|
label: "รายงานผลการพัฒนา",
|
||||||
|
sortable: true,
|
||||||
|
field: "developmentReport",
|
||||||
|
headerStyle: "font-size: 14px",
|
||||||
|
style: "font-size: 14px",
|
||||||
|
sort: (a: string, b: string) =>
|
||||||
|
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
const pagination = ref({
|
const pagination = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
rowsPerPage: 10,
|
rowsPerPage: 10,
|
||||||
});
|
});
|
||||||
|
const paginationPlan = ref({
|
||||||
|
page: 1,
|
||||||
|
rowsPerPage: 10,
|
||||||
|
});
|
||||||
|
|
||||||
const historyPagination = ref({
|
const historyPagination = ref({
|
||||||
page: 1,
|
page: 1,
|
||||||
|
|
@ -426,103 +510,332 @@ onMounted(() => {
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
<div class="row q-col-gutter-sm">
|
||||||
<q-btn
|
<div class="col-12">
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
<span class="text-blue-6 text-weight-bold text-body1"
|
||||||
dense
|
>ผลการประเมินการปฏิบัติราชการ</span
|
||||||
color="primary"
|
>
|
||||||
icon="add"
|
</div>
|
||||||
flat
|
|
||||||
round
|
|
||||||
@click="onClickOpenDialog()"
|
|
||||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
|
|
||||||
<q-space />
|
<div class="col-12">
|
||||||
<q-input
|
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||||
standout
|
<q-btn
|
||||||
dense
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
v-model="filterSearch"
|
dense
|
||||||
ref="filterRef"
|
color="primary"
|
||||||
outlined
|
icon="add"
|
||||||
placeholder="ค้นหา"
|
flat
|
||||||
debounce="300"
|
round
|
||||||
>
|
@click="onClickOpenDialog()"
|
||||||
<template v-slot:append>
|
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
||||||
<q-icon
|
>
|
||||||
v-if="filterSearch == ''"
|
|
||||||
name="search"
|
|
||||||
@click.stop.prevent="filterSearch = ''"
|
|
||||||
class="cursor-pointer"
|
|
||||||
/>
|
|
||||||
<q-icon
|
|
||||||
v-if="filterSearch"
|
|
||||||
name="cancel"
|
|
||||||
@click.stop.prevent="filterSearch = ''"
|
|
||||||
class="cursor-pointer"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<q-select
|
|
||||||
v-if="modeView == 'table'"
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
options-cover
|
|
||||||
style="min-width: 150px"
|
|
||||||
/>
|
|
||||||
<q-btn-toggle
|
|
||||||
v-model="modeView"
|
|
||||||
dense
|
|
||||||
class="no-shadow toggle-borderd"
|
|
||||||
toggle-color="grey-4"
|
|
||||||
:options="[
|
|
||||||
{ value: 'table', slot: 'table' },
|
|
||||||
{ value: 'card', slot: 'card' },
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<template v-slot:table>
|
|
||||||
<q-icon
|
|
||||||
name="format_list_bulleted"
|
|
||||||
size="24px"
|
|
||||||
:style="{
|
|
||||||
color: modeView === 'table' ? '#787B7C' : '#C9D3DB',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:card>
|
<q-space />
|
||||||
<q-icon
|
<q-input
|
||||||
name="mdi-view-grid-outline"
|
standout
|
||||||
size="24px"
|
dense
|
||||||
:style="{
|
v-model="filterSearch"
|
||||||
color: modeView === 'card' ? '#787B7C' : '#C9D3DB',
|
ref="filterRef"
|
||||||
}"
|
outlined
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
debounce="300"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="filterSearch == ''"
|
||||||
|
name="search"
|
||||||
|
@click.stop.prevent="filterSearch = ''"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
<q-icon
|
||||||
|
v-if="filterSearch"
|
||||||
|
name="cancel"
|
||||||
|
@click.stop.prevent="filterSearch = ''"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-select
|
||||||
|
v-if="modeView == 'table'"
|
||||||
|
v-model="visibleColumns"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columns"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
/>
|
/>
|
||||||
</template>
|
<q-btn-toggle
|
||||||
</q-btn-toggle>
|
v-model="modeView"
|
||||||
</div>
|
dense
|
||||||
|
class="no-shadow toggle-borderd"
|
||||||
|
toggle-color="grey-4"
|
||||||
|
:options="[
|
||||||
|
{ value: 'table', slot: 'table' },
|
||||||
|
{ value: 'card', slot: 'card' },
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<template v-slot:table>
|
||||||
|
<q-icon
|
||||||
|
name="format_list_bulleted"
|
||||||
|
size="24px"
|
||||||
|
:style="{
|
||||||
|
color: modeView === 'table' ? '#787B7C' : '#C9D3DB',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
<d-table
|
<template v-slot:card>
|
||||||
|
<q-icon
|
||||||
|
name="mdi-view-grid-outline"
|
||||||
|
size="24px"
|
||||||
|
:style="{
|
||||||
|
color: modeView === 'card' ? '#787B7C' : '#C9D3DB',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-btn-toggle>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<d-table
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
bordered
|
||||||
|
:rows="rows"
|
||||||
|
:paging="true"
|
||||||
|
:columns="columns"
|
||||||
|
:filter="filterSearch"
|
||||||
|
v-model:pagination="pagination"
|
||||||
|
:grid="modeView === 'card'"
|
||||||
|
:visible-columns="visibleColumns"
|
||||||
|
:rows-per-page-options="[20, 50, 100]"
|
||||||
|
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
|
||||||
|
>
|
||||||
|
<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-tr>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:body="props" v-if="modeView === 'table'">
|
||||||
|
<q-tr :props="props">
|
||||||
|
<q-td auto-width>
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
color="deep-purple"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="clickHistory(props.row)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
round
|
||||||
|
color="edit"
|
||||||
|
icon="edit"
|
||||||
|
@click="onClickOpenDialog(true, props.row)"
|
||||||
|
>
|
||||||
|
<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:item="props" v-else>
|
||||||
|
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||||
|
<q-card bordered>
|
||||||
|
<q-card-actions class="bg-grey-3" align="right">
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="deep-purple"
|
||||||
|
icon="mdi-history"
|
||||||
|
@click="clickHistory(props.row)"
|
||||||
|
>
|
||||||
|
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
<q-btn
|
||||||
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
color="edit"
|
||||||
|
icon="edit"
|
||||||
|
@click.stop.prevent="onClickOpenDialog(true, props.row)"
|
||||||
|
>
|
||||||
|
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
||||||
|
</q-btn>
|
||||||
|
</q-card-actions>
|
||||||
|
<q-separator />
|
||||||
|
<div>
|
||||||
|
<q-item
|
||||||
|
v-for="(col, index) in props.cols.filter(
|
||||||
|
(col:any) => col.name !== 'desc'
|
||||||
|
)"
|
||||||
|
:key="col.name"
|
||||||
|
:class="index % 2 !== 0 ? 'bg-grey-1' : ''"
|
||||||
|
>
|
||||||
|
<q-item-section class="text-grey-6">
|
||||||
|
<q-item-label>{{ col.label }}</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
|
||||||
|
<q-item-section class="text-dark">
|
||||||
|
<q-item-label>
|
||||||
|
{{ col.value ? col.value : "-" }}
|
||||||
|
</q-item-label>
|
||||||
|
</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
</div>
|
||||||
|
</q-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</d-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-12 q-mt-md">
|
||||||
|
<span class="text-blue-6 text-weight-bold text-body1 q-pb-sm"
|
||||||
|
>การพัฒนารายบุคคล (Individual Development Plan)</span
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
||||||
|
<q-btn
|
||||||
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
|
dense
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
flat
|
||||||
|
round
|
||||||
|
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
||||||
|
>
|
||||||
|
|
||||||
|
<q-space />
|
||||||
|
<q-input
|
||||||
|
standout
|
||||||
|
dense
|
||||||
|
v-model="filterSearchPlan"
|
||||||
|
ref="filterPlanRef"
|
||||||
|
outlined
|
||||||
|
placeholder="ค้นหา"
|
||||||
|
debounce="300"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon
|
||||||
|
v-if="filterSearchPlan == ''"
|
||||||
|
name="search"
|
||||||
|
@click.stop.prevent="filterSearchPlan = ''"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
<q-icon
|
||||||
|
v-if="filterSearchPlan"
|
||||||
|
name="cancel"
|
||||||
|
@click.stop.prevent="filterSearchPlan = ''"
|
||||||
|
class="cursor-pointer"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-select
|
||||||
|
v-if="modeViewPlan == 'table'"
|
||||||
|
v-model="visibleColumnsPlan"
|
||||||
|
multiple
|
||||||
|
outlined
|
||||||
|
dense
|
||||||
|
options-dense
|
||||||
|
:display-value="$q.lang.table.columns"
|
||||||
|
emit-value
|
||||||
|
map-options
|
||||||
|
:options="columnsPlan"
|
||||||
|
option-value="name"
|
||||||
|
options-cover
|
||||||
|
style="min-width: 150px"
|
||||||
|
/>
|
||||||
|
<q-btn-toggle
|
||||||
|
v-model="modeViewPlan"
|
||||||
|
dense
|
||||||
|
class="no-shadow toggle-borderd"
|
||||||
|
toggle-color="grey-4"
|
||||||
|
:options="[
|
||||||
|
{ value: 'table', slot: 'table' },
|
||||||
|
{ value: 'card', slot: 'card' },
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<template v-slot:table>
|
||||||
|
<q-icon
|
||||||
|
name="format_list_bulleted"
|
||||||
|
size="24px"
|
||||||
|
:style="{
|
||||||
|
color: modeViewPlan === 'table' ? '#787B7C' : '#C9D3DB',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-slot:card>
|
||||||
|
<q-icon
|
||||||
|
name="mdi-view-grid-outline"
|
||||||
|
size="24px"
|
||||||
|
:style="{
|
||||||
|
color: modeViewPlan === 'card' ? '#787B7C' : '#C9D3DB',
|
||||||
|
}"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</q-btn-toggle>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-12">
|
||||||
|
<d-table
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
bordered
|
bordered
|
||||||
:rows="rows"
|
:rows="rowsPlan"
|
||||||
:paging="true"
|
:paging="true"
|
||||||
:columns="columns"
|
:columns="columnsPlan"
|
||||||
:filter="filterSearch"
|
:filter="filterSearchPlan"
|
||||||
v-model:pagination="pagination"
|
v-model:pagination="paginationPlan"
|
||||||
:grid="modeView === 'card'"
|
:grid="modeViewPlan === 'card'"
|
||||||
:visible-columns="visibleColumns"
|
:visible-columns="visibleColumnsPlan"
|
||||||
:rows-per-page-options="[20, 50, 100]"
|
:rows-per-page-options="[20, 50, 100]"
|
||||||
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
|
:card-container-class="modeViewPlan === 'card' ? 'q-col-gutter-md' : ''"
|
||||||
>
|
>
|
||||||
<template v-slot:header="props">
|
<template v-slot:header="props">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
|
|
@ -533,31 +846,8 @@ onMounted(() => {
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template v-slot:body="props" v-if="modeView === 'table'">
|
<template v-slot:body="props" v-if="modeViewPlan === 'table'">
|
||||||
<q-tr :props="props">
|
<q-tr :props="props">
|
||||||
<q-td auto-width>
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
color="deep-purple"
|
|
||||||
icon="mdi-history"
|
|
||||||
@click="clickHistory(props.row)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ประวัติแก้ไขผลการประเมินการปฏิบัติราชการ</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
round
|
|
||||||
color="edit"
|
|
||||||
icon="edit"
|
|
||||||
@click="onClickOpenDialog(true, props.row)"
|
|
||||||
>
|
|
||||||
<q-tooltip>แก้ไขข้อมูล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-td>
|
|
||||||
<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 class="table_ellipsis">
|
<div class="table_ellipsis">
|
||||||
{{ col.value ? col.value : "-" }}
|
{{ col.value ? col.value : "-" }}
|
||||||
|
|
@ -575,9 +865,8 @@ onMounted(() => {
|
||||||
round
|
round
|
||||||
color="deep-purple"
|
color="deep-purple"
|
||||||
icon="mdi-history"
|
icon="mdi-history"
|
||||||
@click="clickHistory(props.row)"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>ประวัติแก้ไขเครื่องราชอิสริยาภรณ์</q-tooltip>
|
<q-tooltip>ประวัติแก้ไขการพัฒนารายบุคคล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
v-if="checkPermission($route)?.attrIsUpdate"
|
||||||
|
|
@ -585,7 +874,6 @@ onMounted(() => {
|
||||||
round
|
round
|
||||||
color="edit"
|
color="edit"
|
||||||
icon="edit"
|
icon="edit"
|
||||||
@click.stop.prevent="onClickOpenDialog(true, props.row)"
|
|
||||||
>
|
>
|
||||||
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
@ -614,6 +902,8 @@ onMounted(() => {
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</d-table>
|
</d-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<q-dialog v-model="modal" persistent>
|
<q-dialog v-model="modal" persistent>
|
||||||
<q-card>
|
<q-card>
|
||||||
|
|
|
||||||
|
|
@ -1,288 +0,0 @@
|
||||||
<script setup lang="ts">
|
|
||||||
import { onMounted, ref, watch, reactive } from "vue";
|
|
||||||
import { checkPermission } from "@/utils/permissions";
|
|
||||||
import { useRoute } from "vue-router";
|
|
||||||
import { useQuasar } from "quasar";
|
|
||||||
|
|
||||||
import http from "@/plugins/http";
|
|
||||||
import config from "@/app.config";
|
|
||||||
|
|
||||||
import type { QTableProps, QForm } from "quasar";
|
|
||||||
|
|
||||||
import { useCounterMixin } from "@/stores/mixin";
|
|
||||||
import DialogHeader from "@/components/DialogHeader.vue";
|
|
||||||
|
|
||||||
const $q = useQuasar();
|
|
||||||
const route = useRoute();
|
|
||||||
const mixin = useCounterMixin();
|
|
||||||
const {
|
|
||||||
date2Thai,
|
|
||||||
success,
|
|
||||||
messageError,
|
|
||||||
showLoader,
|
|
||||||
hideLoader,
|
|
||||||
dialogConfirm,
|
|
||||||
pathRegistryEmp,
|
|
||||||
} = mixin;
|
|
||||||
|
|
||||||
const profileId = ref<string>(
|
|
||||||
route.params.id ? route.params.id.toString() : ""
|
|
||||||
);
|
|
||||||
const empType = ref<string>(pathRegistryEmp(route.name?.toString() ?? ""));
|
|
||||||
|
|
||||||
const modeView = ref<string>("table");
|
|
||||||
const filterSearch = ref("");
|
|
||||||
|
|
||||||
const rows = ref<any[]>([]);
|
|
||||||
|
|
||||||
const visibleColumns = ref<String[]>([
|
|
||||||
"no",
|
|
||||||
"Knowledge",
|
|
||||||
"develop",
|
|
||||||
"target",
|
|
||||||
"developmentResults",
|
|
||||||
"developmentReport",
|
|
||||||
]);
|
|
||||||
const columns = ref<QTableProps["columns"]>([
|
|
||||||
{
|
|
||||||
name: "no",
|
|
||||||
align: "left",
|
|
||||||
label: "ลำดับ",
|
|
||||||
sortable: true,
|
|
||||||
field: "no",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
format: (v) => date2Thai(v),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Knowledge",
|
|
||||||
align: "left",
|
|
||||||
label: "ความรู้ / ทักษะ / สมรรถนะที่ต้องได้รับการพัฒนา",
|
|
||||||
sortable: true,
|
|
||||||
field: "Knowledge",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "develop",
|
|
||||||
align: "left",
|
|
||||||
label: "วิธีการพัฒนา",
|
|
||||||
sortable: true,
|
|
||||||
field: "develop",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "target",
|
|
||||||
align: "left",
|
|
||||||
label: "เป้าหมายการพัฒนา",
|
|
||||||
sortable: true,
|
|
||||||
field: "target",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "developmentResults",
|
|
||||||
align: "left",
|
|
||||||
label: "วิธีการวัดผลการพัฒนา",
|
|
||||||
sortable: true,
|
|
||||||
field: "developmentResults",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "developmentReport",
|
|
||||||
align: "left",
|
|
||||||
label: "รายงานผลการพัฒนา",
|
|
||||||
sortable: true,
|
|
||||||
field: "developmentReport",
|
|
||||||
headerStyle: "font-size: 14px",
|
|
||||||
style: "font-size: 14px",
|
|
||||||
sort: (a: string, b: string) =>
|
|
||||||
a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }),
|
|
||||||
},
|
|
||||||
]);
|
|
||||||
|
|
||||||
const pagination = ref({
|
|
||||||
page: 1,
|
|
||||||
rowsPerPage: 10,
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {});
|
|
||||||
</script>
|
|
||||||
<template>
|
|
||||||
<div class="row items-center q-gutter-x-sm q-pb-sm">
|
|
||||||
<q-btn
|
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
|
||||||
dense
|
|
||||||
color="primary"
|
|
||||||
icon="add"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
><q-tooltip>เพิ่มข้อมูล</q-tooltip></q-btn
|
|
||||||
>
|
|
||||||
|
|
||||||
<q-space />
|
|
||||||
<q-input
|
|
||||||
standout
|
|
||||||
dense
|
|
||||||
v-model="filterSearch"
|
|
||||||
ref="filterRef"
|
|
||||||
outlined
|
|
||||||
placeholder="ค้นหา"
|
|
||||||
debounce="300"
|
|
||||||
>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon
|
|
||||||
v-if="filterSearch == ''"
|
|
||||||
name="search"
|
|
||||||
@click.stop.prevent="filterSearch = ''"
|
|
||||||
class="cursor-pointer"
|
|
||||||
/>
|
|
||||||
<q-icon
|
|
||||||
v-if="filterSearch"
|
|
||||||
name="cancel"
|
|
||||||
@click.stop.prevent="filterSearch = ''"
|
|
||||||
class="cursor-pointer"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
<q-select
|
|
||||||
v-if="modeView == 'table'"
|
|
||||||
v-model="visibleColumns"
|
|
||||||
multiple
|
|
||||||
outlined
|
|
||||||
dense
|
|
||||||
options-dense
|
|
||||||
:display-value="$q.lang.table.columns"
|
|
||||||
emit-value
|
|
||||||
map-options
|
|
||||||
:options="columns"
|
|
||||||
option-value="name"
|
|
||||||
options-cover
|
|
||||||
style="min-width: 150px"
|
|
||||||
/>
|
|
||||||
<q-btn-toggle
|
|
||||||
v-model="modeView"
|
|
||||||
dense
|
|
||||||
class="no-shadow toggle-borderd"
|
|
||||||
toggle-color="grey-4"
|
|
||||||
:options="[
|
|
||||||
{ value: 'table', slot: 'table' },
|
|
||||||
{ value: 'card', slot: 'card' },
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<template v-slot:table>
|
|
||||||
<q-icon
|
|
||||||
name="format_list_bulleted"
|
|
||||||
size="24px"
|
|
||||||
:style="{
|
|
||||||
color: modeView === 'table' ? '#787B7C' : '#C9D3DB',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:card>
|
|
||||||
<q-icon
|
|
||||||
name="mdi-view-grid-outline"
|
|
||||||
size="24px"
|
|
||||||
:style="{
|
|
||||||
color: modeView === 'card' ? '#787B7C' : '#C9D3DB',
|
|
||||||
}"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</q-btn-toggle>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<d-table
|
|
||||||
flat
|
|
||||||
dense
|
|
||||||
bordered
|
|
||||||
:rows="rows"
|
|
||||||
:paging="true"
|
|
||||||
:columns="columns"
|
|
||||||
:filter="filterSearch"
|
|
||||||
v-model:pagination="pagination"
|
|
||||||
:grid="modeView === 'card'"
|
|
||||||
:visible-columns="visibleColumns"
|
|
||||||
:rows-per-page-options="[20, 50, 100]"
|
|
||||||
:card-container-class="modeView === 'card' ? 'q-col-gutter-md' : ''"
|
|
||||||
>
|
|
||||||
<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-tr>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template v-slot:body="props" v-if="modeView === 'table'">
|
|
||||||
<q-tr :props="props">
|
|
||||||
<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:item="props" v-else>
|
|
||||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
|
||||||
<q-card bordered>
|
|
||||||
<q-card-actions class="bg-grey-3" align="right">
|
|
||||||
<q-btn
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="deep-purple"
|
|
||||||
icon="mdi-history"
|
|
||||||
@click="clickHistory(props.row)"
|
|
||||||
>
|
|
||||||
<q-tooltip>ประวัติแก้ไขการพัฒนารายบุคคล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
<q-btn
|
|
||||||
v-if="checkPermission($route)?.attrIsUpdate"
|
|
||||||
flat
|
|
||||||
round
|
|
||||||
color="edit"
|
|
||||||
icon="edit"
|
|
||||||
@click.stop.prevent="onClickOpenDialog(true, props.row)"
|
|
||||||
>
|
|
||||||
<q-tooltip>แก่ไขข้อมุล</q-tooltip>
|
|
||||||
</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
<q-separator />
|
|
||||||
<div>
|
|
||||||
<q-item
|
|
||||||
v-for="(col, index) in props.cols.filter(
|
|
||||||
(col:any) => col.name !== 'desc'
|
|
||||||
)"
|
|
||||||
:key="col.name"
|
|
||||||
:class="index % 2 !== 0 ? 'bg-grey-1' : ''"
|
|
||||||
>
|
|
||||||
<q-item-section class="text-grey-6">
|
|
||||||
<q-item-label>{{ col.label }}</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
|
|
||||||
<q-item-section class="text-dark">
|
|
||||||
<q-item-label>
|
|
||||||
{{ col.value ? col.value : "-" }}
|
|
||||||
</q-item-label>
|
|
||||||
</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
</div>
|
|
||||||
</q-card>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</d-table>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped></style>
|
|
||||||
|
|
@ -7,7 +7,6 @@ import Train from "@/modules/04_registryPerson/components/detail/Achievement/02_
|
||||||
import Insignia from "@/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue";
|
import Insignia from "@/modules/04_registryPerson/components/detail/Achievement/03_Insignia.vue";
|
||||||
import DeclarationHonor from "@/modules/04_registryPerson/components/detail/Achievement/04_DeclarationHonor.vue";
|
import DeclarationHonor from "@/modules/04_registryPerson/components/detail/Achievement/04_DeclarationHonor.vue";
|
||||||
import ResultsPerformance from "@/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue";
|
import ResultsPerformance from "@/modules/04_registryPerson/components/detail/Achievement/05_ResultsPerformance.vue";
|
||||||
import DevelopmentPlan from "@/modules/04_registryPerson/components/detail/Achievement/06_DevelopmentPlan.vue";
|
|
||||||
|
|
||||||
const tab = ref<string>("1");
|
const tab = ref<string>("1");
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -37,7 +36,6 @@ const tab = ref<string>("1");
|
||||||
<q-tab name="3" label="เครื่องราชอิสริยาภรณ์" />
|
<q-tab name="3" label="เครื่องราชอิสริยาภรณ์" />
|
||||||
<q-tab name="4" label="ประกาศเกียรติคุณ" />
|
<q-tab name="4" label="ประกาศเกียรติคุณ" />
|
||||||
<q-tab name="5" label="ผลการประเมินการปฏิบัติราชการ" />
|
<q-tab name="5" label="ผลการประเมินการปฏิบัติราชการ" />
|
||||||
<q-tab name="6" label="การพัฒนารายบุคคล (Individual Development Plan)" />
|
|
||||||
</q-tabs>
|
</q-tabs>
|
||||||
<q-separator />
|
<q-separator />
|
||||||
|
|
||||||
|
|
@ -60,9 +58,6 @@ const tab = ref<string>("1");
|
||||||
<q-tab-panel name="5">
|
<q-tab-panel name="5">
|
||||||
<ResultsPerformance />
|
<ResultsPerformance />
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
<q-tab-panel name="6">
|
|
||||||
<DevelopmentPlan />
|
|
||||||
</q-tab-panel>
|
|
||||||
</q-tab-panels>
|
</q-tab-panels>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue