แก้ load ระบบ kpi

This commit is contained in:
Warunee Tamkoo 2024-05-02 16:13:34 +07:00
parent 1ae9e85af9
commit d642f663f3
4 changed files with 48 additions and 61 deletions

View file

@ -18,7 +18,7 @@ import type {
const dataListCriteria = defineModel<ListCriteria[]>("dataListCriteria", {
required: true,
});
const totalCompetency = defineModel("totalCompetency", {
const competencyScore = defineModel("competencyScore", {
type: Number,
default: 0,
});
@ -118,7 +118,6 @@ const lists = ref<any>([]);
const resultEvaluation = ref<string | 0>(0);
function getData(type: string) {
showLoader();
http
.get(config.API.kpiUserCapacity + `?id=${id.value}&type=${type}`)
.then(async (res) => {
@ -163,11 +162,8 @@ function getData(type: string) {
? (resultAvg / weightAvg) * store.dataEvaluation.capacityPoint
: 0;
resultEvaluation.value = sum.toFixed(2);
totalCompetency.value = sum;
competencyScore.value = sum;
}
// end cal summary
hideLoader();
});
}