From c1741913365ac3dd19375b9d512a41f9676facc3 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Tue, 12 Mar 2019 19:30:06 +0800 Subject: [PATCH] real_value_total --- .../ec/graduatesRequirement/GraduatesRequirement.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js index e68a0527..827144b5 100644 --- a/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js +++ b/public/react/src/modules/ec/graduatesRequirement/GraduatesRequirement.js @@ -236,10 +236,15 @@ function getTableData(data_args) { targetValueRowData[`c${courseIndex + 1}`] = course.target_value && course.target_value.toFixed ? course.target_value.toFixed(3) : course.target_value ; - target_value_total = target_value_total + targetValueRowData[`c${courseIndex + 1}`] + if (course.target_value) { + target_value_total = target_value_total + course.target_value + } + realValueRowData[`c${courseIndex + 1}`] = course.real_value && course.real_value.toFixed ? course.real_value.toFixed(3) : course.real_value ; - real_value_total = real_value_total + realValueRowData[`c${courseIndex + 1}`] + if (course.real_value) { + real_value_total = real_value_total + course.real_value + } }) if (real_value_total >= target_value_total && real_value_total != 0) { nameRowData.status = true