แก้แสดงคะแนนรวมระบบ KPI

This commit is contained in:
Warunee Tamkoo 2024-04-29 17:59:29 +07:00
parent 81fd3a3ac8
commit aa6e847306
2 changed files with 23 additions and 6 deletions

View file

@ -54,7 +54,8 @@ function fetchListPlanned() {
(sum: number, e: any) => sum + e.weight,
0
);
totalResults1.value = (result * 60) / weight;
totalResults1.value =
(result * store.dataEvaluation.plannedPoint) / weight;
}
})
.catch((err) => {
@ -85,7 +86,8 @@ function fetchListRole() {
(sum: number, e: any) => sum + e.weight,
0
);
totalResults2.value = (result * 60) / weight;
totalResults2.value =
(result * store.dataEvaluation.rolePoint) / weight;
}
})
.catch((err) => {
@ -116,7 +118,8 @@ function fetchAssigned() {
(sum: number, e: any) => sum + e.weight,
0
);
totalResults3.value = (result * 20) / weight;
totalResults3.value =
(result * store.dataEvaluation.specialPoint) / weight;
}
})
.catch((err) => {
@ -198,7 +201,15 @@ onMounted(() => {
</div> -->
<div class="col-12 text-center row justify-center">
<span>สรปผลการประเมนผลสมฤทธของงาน (คะแนนเต 80 คะแนน)</span>
<span
>สรปผลการประเมนผลสมฤทธของงาน (คะแนนเต
{{
store.dataEvaluation.plannedPoint +
store.dataEvaluation.rolePoint +
store.dataEvaluation.specialPoint
}}
คะแนน)</span
>
<div class="text-primary q-pl-md">{{ resultWork }}</div>
</div>
</div>

View file

@ -152,7 +152,10 @@ function getData(type: string) {
if (total > 0) {
let weightAvg = weight / total;
let resultAvg = result / total;
let sum = weightAvg != 0 ? (resultAvg / weightAvg) * 20 : 0;
let sum =
weightAvg != 0
? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint
: 0;
resultEvaluation.value = sum.toFixed(2);
}
// end cal summary
@ -342,7 +345,10 @@ onMounted(() => {
/>
<div class="row text-body2 text-weight-bold justify-center">
<span>สรปผลการประเมนสมรรถนะ (คะแนนเต 20 คะแนน)</span>
<span
>สรปผลการประเมนสมรรถนะ (คะแนนเต
{{ store.dataEvaluation.capacityPoint }} คะแนน)</span
>
<div class="text-primary q-pl-md">{{ resultEvaluation }}</div>
</div>
</template>