ปรับการแสดงผลสมรรถนะ
This commit is contained in:
parent
613fbece2e
commit
d0627e3c5c
3 changed files with 69 additions and 9 deletions
|
|
@ -171,8 +171,26 @@ function onSubmit() {
|
|||
<q-tr :props="props" class="cursor-pointer">
|
||||
<q-td v-for="col in props.cols" :key="col.id">
|
||||
<div v-if="col.name === 'point'">
|
||||
<div v-if="type == 'HEAD' || type == 'GROUP'">
|
||||
<q-rating
|
||||
<div>
|
||||
<q-btn-group outline>
|
||||
<q-btn
|
||||
v-for="(i, index) in sortedDataListCriteria"
|
||||
:key="index"
|
||||
:class="props.row.point == i.level && 'active'"
|
||||
outline
|
||||
color="grey-6"
|
||||
:label="i.level"
|
||||
@click="props.row.point = i.level"
|
||||
>
|
||||
<q-tooltip>
|
||||
<div class="text-body2">
|
||||
<span v-html="i.description"></span>
|
||||
</div>
|
||||
</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn-group>
|
||||
|
||||
<!-- <q-rating
|
||||
v-model="props.row.point"
|
||||
max="5"
|
||||
size="sm"
|
||||
|
|
@ -191,9 +209,8 @@ function onSubmit() {
|
|||
</div>
|
||||
</q-tooltip>
|
||||
</template>
|
||||
</q-rating>
|
||||
</q-rating> -->
|
||||
</div>
|
||||
<div v-else>รอ ทำ select</div>
|
||||
</div>
|
||||
<div v-else-if="col.name === 'summary'">
|
||||
{{ props.row.point !== 0 ? props.row.point * 20 : "-" }}
|
||||
|
|
@ -260,4 +277,14 @@ function onSubmit() {
|
|||
top: 0;
|
||||
}
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item:not(:last-child):before {
|
||||
border-right: 1px solid #c4c4c4;
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item.active {
|
||||
color: #2196f3 !important;
|
||||
background-color: #fff;
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item.active:not(:last-child):before {
|
||||
border: 1px solid #2196f3;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -107,6 +107,12 @@ const columns = ref<QTableProps["columns"]>([
|
|||
},
|
||||
]);
|
||||
|
||||
const visibleColumns = ref<string[]>(
|
||||
store.tabOpen === 3
|
||||
? ["name", "level", "point", "weight", "summary"]
|
||||
: ["name", "level", "weight"]
|
||||
);
|
||||
|
||||
const typeCompetency = ref<string>("");
|
||||
function onAdd(type: string) {
|
||||
typeCompetency.value = type;
|
||||
|
|
@ -239,7 +245,7 @@ onMounted(() => {
|
|||
</div>
|
||||
|
||||
<q-space />
|
||||
<!-- <q-btn
|
||||
<q-btn
|
||||
v-if="!isReadonly"
|
||||
flat
|
||||
round
|
||||
|
|
@ -250,7 +256,7 @@ onMounted(() => {
|
|||
@click="onEvaluate(item.id)"
|
||||
>
|
||||
<q-tooltip>ประเมิน</q-tooltip>
|
||||
</q-btn> -->
|
||||
</q-btn>
|
||||
</div>
|
||||
</q-card-section>
|
||||
<q-card-section class="q-pa-sm">
|
||||
|
|
@ -266,6 +272,7 @@ onMounted(() => {
|
|||
hide-pagination
|
||||
class="custom-table2"
|
||||
no-data-label="ไม่มีข้อมูล"
|
||||
:visible-columns="visibleColumns"
|
||||
>
|
||||
<template v-slot:header="props">
|
||||
<q-tr :props="props">
|
||||
|
|
@ -283,7 +290,23 @@ onMounted(() => {
|
|||
</div>
|
||||
<div v-else-if="col.name == 'point'">
|
||||
<div>
|
||||
<q-rating
|
||||
<q-btn-group outline>
|
||||
<q-btn
|
||||
v-for="(i, index) in sortedDataListCriteria"
|
||||
:key="index"
|
||||
:class="props.row.point == i.level && 'active'"
|
||||
outline
|
||||
color="grey-6"
|
||||
:label="i.level"
|
||||
>
|
||||
<q-tooltip>
|
||||
<div class="text-body2">
|
||||
<span v-html="i.description"></span>
|
||||
</div>
|
||||
</q-tooltip>
|
||||
</q-btn>
|
||||
</q-btn-group>
|
||||
<!-- <q-rating
|
||||
v-model="props.row.point"
|
||||
max="5"
|
||||
size="sm"
|
||||
|
|
@ -303,7 +326,7 @@ onMounted(() => {
|
|||
</div>
|
||||
</q-tooltip>
|
||||
</template>
|
||||
</q-rating>
|
||||
</q-rating> -->
|
||||
</div>
|
||||
<!-- <div v-else>รอ ทำ select</div> -->
|
||||
</div>
|
||||
|
|
@ -402,4 +425,14 @@ onMounted(() => {
|
|||
top: 0;
|
||||
}
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item:not(:last-child):before {
|
||||
border-right: 1px solid #c4c4c4;
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item.active {
|
||||
color: #2196f3 !important;
|
||||
background-color: #fff;
|
||||
}
|
||||
.q-btn-group--outline > .q-btn-item.active:not(:last-child):before {
|
||||
border: 1px solid #2196f3;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ async function clearScore() {
|
|||
|
||||
async function getAll() {
|
||||
await fetchEvaluation();
|
||||
await getProfile(); // await (store.dataProfile === null ? getProfile() : "");
|
||||
await (store.dataProfile.profileId === null ? getProfile() : ""); // await getProfile();
|
||||
await getOrgOp();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue