updated cal indicator
This commit is contained in:
parent
2f1a600c22
commit
448f94802f
1 changed files with 38 additions and 16 deletions
|
|
@ -42,12 +42,19 @@ function fetchListPlanned() {
|
|||
evaluationResults: (e.point / 5) * e.weight,
|
||||
}));
|
||||
rows_01.value = newRow;
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
|
||||
totalResults1.value = (result * 80) / 100;
|
||||
if (newRow.length > 0) {
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
const weight = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.weight,
|
||||
0
|
||||
);
|
||||
|
||||
totalResults1.value = (result * 60) / weight;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -68,11 +75,19 @@ function fetchListRole() {
|
|||
evaluationResults: (e.point / 5) * e.weight,
|
||||
}));
|
||||
rows_02.value = newRow;
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
totalResults2.value = (result * 80) / 100;
|
||||
|
||||
if (newRow.length > 0) {
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
const weight = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.weight,
|
||||
0
|
||||
);
|
||||
|
||||
totalResults2.value = (result * 60) / weight;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -94,12 +109,19 @@ function fetchAssigned() {
|
|||
}));
|
||||
|
||||
rows_03.value = newRow;
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
|
||||
totalResults3.value = (result * 80) / 100;
|
||||
if (newRow.length > 0) {
|
||||
const result = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.evaluationResults,
|
||||
0
|
||||
);
|
||||
const weight = newRow.reduce(
|
||||
(sum: number, e: any) => sum + e.weight,
|
||||
0
|
||||
);
|
||||
|
||||
totalResults3.value = (result * 20) / weight;
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
messageError($q, err);
|
||||
|
|
@ -114,7 +136,7 @@ function onInfo() {
|
|||
}
|
||||
const resultWork = computed(() => {
|
||||
const total = totalResults1.value + totalResults2.value + totalResults3.value;
|
||||
return parseFloat(((total * 80) ).toFixed(2));
|
||||
return total.toFixed(2);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue