updated kpi progress & problem

This commit is contained in:
Warunee Tamkoo 2024-05-14 09:50:52 +07:00
parent 9156fb8e72
commit beebb44d2f
8 changed files with 291 additions and 213 deletions

View file

@ -21,6 +21,14 @@ const indicatorWeightTotal = defineModel("indicatorWeightTotal", {
type: Number,
default: 0,
});
const indicatorWeight1Total = defineModel("indicatorWeight1Total", {
type: Number,
default: 0,
});
const indicatorWeight2Total = defineModel("indicatorWeight2Total", {
type: Number,
default: 0,
});
const dataListCriteria = ref<ListCriteria[]>([]);
const modalCriteria = ref<boolean>(false);
@ -72,6 +80,8 @@ function fetchListPlanned() {
);
weightPlanned.value = weight;
indicatorWeight1Total.value = Number(weight);
store.indicatorScoreVal = result;
totalResults1.value =
(result * store.dataEvaluation.plannedPoint) / weight;
@ -104,6 +114,7 @@ function fetchListRole() {
);
weightRole.value = weight;
indicatorWeight1Total.value = Number(weight);
totalResults2.value =
(result * store.dataEvaluation.rolePoint) / weight;
@ -168,6 +179,13 @@ function getCriteria() {
});
}
const isShowScore = computed(() => {
return (
store.tabOpen === 3 &&
store.dataEvaluation.evaluationStatus === "EVALUATING"
);
});
watch(
[weightPlanned, weightRole, weightAssigned],
([newA, newB, newC], [prevA, prevB, prevC]) => {
@ -219,39 +237,43 @@ onMounted(() => {
:total="totalResults1"
/>
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.excusiveIndicator1PercentVal,
},
{
name: 'ผลการประเมินมิติที่ 1 (คะแนน)',
value: store.excusiveIndicator1ScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
<div v-if="isShowScore">
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.excusiveIndicator1PercentVal,
},
{
name: 'ผลการประเมินมิติที่ 1 (คะแนน)',
value: store.excusiveIndicator1ScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
</div>
<div v-else class="q-mt-md"></div>
<Work
v-model:data="rows_03"
@ -261,50 +283,52 @@ onMounted(() => {
:total="totalResults3"
/>
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.excusiveIndicator2PercentVal,
},
{
name: 'ผลการประเมินมิติที่ 2 (คะแนน)',
value: store.excusiveIndicator2ScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
<div v-if="isShowScore">
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.excusiveIndicator2PercentVal,
},
{
name: 'ผลการประเมินมิติที่ 2 (คะแนน)',
value: store.excusiveIndicator2ScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
<div class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนผลสมฤทธของงาน ( 1 + 2)
(คะแนนเต
{{ store.excusiveIndicatorScore }}
คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.indicatorScoreVal }}
<div class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนผลสมฤทธของงาน ( 1 + 2)
(คะแนนเต
{{ store.excusiveIndicatorScore }}
คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.indicatorScoreVal }}
</div>
</div>
</div>
</div>
@ -333,45 +357,47 @@ onMounted(() => {
:total="totalResults3"
/>
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.indicatorPercentVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
<div v-if="isShowScore">
<q-table
flat
dense
bordered
:rows="[
{
name: 'รวมผลการประเมิน (ร้อยละ)',
value: store.indicatorPercentVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
<div class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนผลสมฤทธของงาน (คะแนนเต
{{ store.indicatorScore }}
คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.indicatorScoreVal }}
<div class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนผลสมฤทธของงาน (คะแนนเต
{{ store.indicatorScore }}
คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.indicatorScoreVal }}
</div>
</div>
</div>
</div>
@ -398,6 +424,7 @@ onMounted(() => {
<Competency v-model:dataListCriteria="dataListCriteria" />
<q-table
v-if="isShowScore"
flat
dense
bordered
@ -434,59 +461,61 @@ onMounted(() => {
<div v-if="!store.dataProfile.posExecutiveName">
<Develop />
<q-table
flat
dense
bordered
:rows="[
{
name: `ผลการประเมินการพัฒนาตนเอง (คะแนนเต็ม ${store.devScore} คะแนน)`,
value: store.devScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
</div>
<div v-if="isShowScore">
<q-table
flat
dense
bordered
:rows="[
{
name: `ผลการประเมินการพัฒนาตนเอง (คะแนนเต็ม ${store.devScore} คะแนน)`,
value: store.devScoreVal,
},
]"
:columns="[
{
name: 'name',
field: 'name',
label: 'name',
style: 'font-size: 14px',
},
{
name: 'value',
field: 'value',
label: 'value',
style: 'font-size: 14px; font-weight: bold',
},
]"
row-key="name"
hide-header
hide-bottom
class="q-mt-xs q-mb-md"
/>
</div>
<div
v-if="!store.dataProfile.posExecutiveName"
class="row text-body2 text-weight-bold"
>
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนพฤตกรรมการปฏราชการ (สมรรถนะ+การพฒนาตนเอง)
(คะแนนเต {{ store.competencyDevScore }} คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.competencyDevScoreVal }}
<div
v-if="isShowScore && !store.dataProfile.posExecutiveName"
class="row text-body2 text-weight-bold"
>
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนพฤตกรรมการปฏราชการ (สมรรถนะ+การพฒนาตนเอง)
(คะแนนเต {{ store.competencyDevScore }} คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.competencyDevScoreVal }}
</div>
</div>
</div>
</div>
<div v-else class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนพฤตกรรมการปฏราชการ (สมรรถนะ) (คะแนนเต
{{ store.competencyScore }} คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.competencyScoreVal }}
<div v-else class="row text-body2 text-weight-bold">
<div class="col-12 text-center row justify-center">
<span
>สรปผลการประเมนพฤตกรรมการปฏราชการ (สมรรถนะ) (คะแนนเต
{{ store.competencyScore }} คะแนน)</span
>
<div class="text-primary q-pl-md">
{{ store.competencyScoreVal }}
</div>
</div>
</div>
</div>