调整贵装备学生管理浮点数问题

This commit is contained in:
fan 2020-07-07 15:09:45 +08:00
parent 9bef909f27
commit a902265f0e

View File

@ -331,30 +331,30 @@ export default {
item.scores.forEach(elem => {
if (elem.prdType === '01') {
this.showLocal = true;
localExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
localLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
localExamSocreRadio = elem.examSocreRadio * 60 / item.scores.length;
localLessonPassRate = elem.lessonPassRate * 30 / item.scores.length;
totolScore += localExamSocreRadio * 100;
totolScore += localLessonPassRate * 100;
} else if (elem.prdType === '02') {
this.showCenter = true;
centerExamSocreRadio = elem.examSocreRadio * 100 * 60 / 100 / item.scores.length;
centerLessonPassRate = elem.lessonPassRate * 100 * 30 / 100 / item.scores.length;
centerExamSocreRadio = elem.examSocreRadio * 60 / item.scores.length;
centerLessonPassRate = elem.lessonPassRate * 30 / item.scores.length;
totolScore += centerExamSocreRadio * 100;
totolScore += centerLessonPassRate * 100;
}
});
totolScore += item.attendance * 100 * 10 / 100 * 100;
totolScore += item.attendance * 100 * 10;
this.tableData.push(
{
index: index + 1,
name: item.name,
studentID: item.studentID,
attendance: item.attendance * 100 * 10 / 100,
localExamSocreRadio:localExamSocreRadio,
localLessonPassRate: localLessonPassRate,
centerExamSocreRadio: centerExamSocreRadio,
centerLessonPassRate: centerLessonPassRate,
totolScore: totolScore / 100
attendance: Math.round(item.attendance * 100) / 10,
localExamSocreRadio:Math.round(localExamSocreRadio * 10) / 10,
localLessonPassRate: Math.round(localLessonPassRate * 10) / 10,
centerExamSocreRadio: Math.round(centerExamSocreRadio * 10) / 10,
centerLessonPassRate: Math.round(centerLessonPassRate * 10) / 10,
totolScore: Math.round(totolScore) / 100
});
});
}).catch(() =>{