This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-12-02 11:26:26 +07:00
parent a934497083
commit b347fd064e
10 changed files with 193 additions and 173 deletions

View file

@ -356,9 +356,9 @@ onMounted(async () => {
<div class="toptitle text-dark col-12 row items-center">
รายการรอบการประเมนผลการปฏหนาทราชการ
</div>
<q-card flat bordered class="q-pa-md">
<q-toolbar style="padding: 0px">
<div class="row q-gutter-sm">
<q-card flat bordered class="col-12 q-pa-md">
<div class="row q-col-gutter-sm">
<div class="row col-12">
<datepicker
menu-class-name="modalfix"
v-model="formQuery.year"
@ -401,21 +401,20 @@ onMounted(async () => {
</q-input>
</template>
</datepicker>
<q-btn
v-if="checkPermission($route)?.attrIsCreate"
flat
round
dense
icon="add"
color="primary"
@click="onClickAddOrView()"
>
<q-tooltip>เพ</q-tooltip>
</q-btn>
</div>
<q-space />
<div class="row q-gutter-sm">
<q-space />
<q-select
v-model="visibleColumns"
multiple
@ -430,82 +429,82 @@ onMounted(async () => {
style="min-width: 140px"
/>
</div>
</q-toolbar>
<div class="col-12">
<d-table
for="table"
ref="table"
:columns="columns"
:rows="rows"
row-key="subject"
flat
bordered
dense
class="custom-header-table"
:visible-columns="visibleColumns"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<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">
<q-tr :props="props">
<q-td>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate !== false"
flat
round
dense
:disable="!props.row.isActive"
:color="props.row.isActive ? 'orange' : 'grey'"
icon="mdi-close"
@click="onClickAction('close', props.row.id)"
>
<q-tooltip>ดรอบ</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete !== false"
clickable
v-close-popup
@click="onClickAction('delete', props.row.id)"
flat
round
dense
color="red"
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 class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="formQuery.page"
active-color="primary"
color="dark"
:max="Number(totalList)"
size="sm"
boundary-links
direction-links
:max-pages="5"
@update:model-value="fetchList"
></q-pagination>
</template>
</d-table>
<div class="col-12">
<d-table
for="table"
ref="table"
:columns="columns"
:rows="rows"
row-key="subject"
flat
bordered
dense
class="custom-header-table"
:visible-columns="visibleColumns"
:rows-per-page-options="[10, 25, 50, 100]"
@update:pagination="updatePagination"
>
<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">
<q-tr :props="props">
<q-td>
<q-btn
v-if="checkPermission($route)?.attrIsUpdate !== false"
flat
round
dense
:disable="!props.row.isActive"
:color="props.row.isActive ? 'orange' : 'grey'"
icon="mdi-close"
@click="onClickAction('close', props.row.id)"
>
<q-tooltip>ดรอบ</q-tooltip>
</q-btn>
<q-btn
v-if="checkPermission($route)?.attrIsDelete !== false"
clickable
v-close-popup
@click="onClickAction('delete', props.row.id)"
flat
round
dense
color="red"
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 class="table_ellipsis">
{{ col.value ? col.value : "-" }}
</div>
</q-td>
</q-tr>
</template>
<template v-slot:pagination="scope">
งหมด {{ total }} รายการ
<q-pagination
v-model="formQuery.page"
active-color="primary"
color="dark"
:max="Number(totalList)"
size="sm"
boundary-links
direction-links
:max-pages="5"
@update:model-value="fetchList"
></q-pagination>
</template>
</d-table>
</div>
</div>
</q-card>

View file

@ -143,7 +143,7 @@ async function fetchList() {
page: formQuery.page,
pageSize: formQuery.pageSize,
kpiPeriodId: store.formQuery.round,
keyword: store.formQuery.keyword,
keyword: store.formQuery.keyword.trim(),
status: formQuery.status === "" ? undefined : formQuery.status,
results: formQuery.results === "" ? undefined : formQuery.results,
};
@ -322,13 +322,7 @@ onMounted(async () => {
@keydown.enter.prevent="changRound"
>
<template v-slot:append>
<q-icon
v-if="store.formQuery.keyword !== ''"
name="clear"
class="cursor-pointer"
@click="(store.formQuery.keyword = ''), changRound()"
/>
<q-icon v-else name="search" color="grey-5" />
<q-icon name="search" color="grey-5" />
</template>
</q-input>
<q-select
@ -380,6 +374,8 @@ onMounted(async () => {
outlined
@update:model-value="(formQuery.page = 1), fetchList()"
use-input
hide-selected
fill-input
@clear="
(formQuery.status = ''), (statusOp = store.statusOptions)
"
@ -413,6 +409,8 @@ onMounted(async () => {
outlined
@update:model-value="(formQuery.page = 1), fetchList()"
use-input
hide-selected
fill-input
@clear="
(formQuery.results = ''), (resultOp = store.resultsOptions)
"

View file

@ -409,7 +409,6 @@ async function fetchProfileEvaluator(id: string) {
http
.get(config.API.profilePosition + `/${id}`)
.then((res) => {
console.log(res.data.result);
const data = res.data.result;
evaluator.value.fullName =
data.prefix + data.firstName + " " + data.lastName;
@ -892,7 +891,9 @@ onUnmounted(() => {
:rules="[ (val:string) => !!val ||
`${'กรุณาเลือกผู้ประเมิน'}`, ]"
use-input
@filter="(inputValue:any,
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn,'evaluatorIdOp'
) "
/>
@ -930,7 +931,9 @@ onUnmounted(() => {
map-options
class="inputgreen"
use-input
@filter="(inputValue:any,
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn,'commanderIdOp'
) "
>
@ -983,7 +986,9 @@ onUnmounted(() => {
map-options
use-input
class="inputgreen"
@filter="(inputValue:any,
hide-selected
fill-input
@filter="(inputValue:string,
doneFn:Function) => filterOption(inputValue, doneFn,'commanderHighOp'
) "
>

View file

@ -429,6 +429,7 @@ function onCloseModal() {
* function fetch รายชอขอมลทะเบยนประว
*/
function fetchListPerson() {
rowsPerson.value = []
showLoader();
let queryParams = {
page: formFilter.page,
@ -796,13 +797,13 @@ onMounted(() => {
class="bg-white"
v-model="formFilter.searchKeyword"
outlined
clearable
hide-bottom-space
dense
label="คำค้น"
>
<template v-slot:after>
<q-btn
outline
color="primary"
icon="search"
label="ค้นหา"
@ -811,6 +812,9 @@ onMounted(() => {
>
</q-btn>
</template>
<template v-slot:append>
<q-icon name="search" color="grey-5" />
</template>
</q-input>
</div>
</div>