diff --git a/making_school_asignment_app/lib/common/utils/utils.dart b/making_school_asignment_app/lib/common/utils/utils.dart index 4a040a9..fd50d73 100644 --- a/making_school_asignment_app/lib/common/utils/utils.dart +++ b/making_school_asignment_app/lib/common/utils/utils.dart @@ -239,8 +239,10 @@ class Utils { } } secList.sort(); - var maxSec = secList.isNotEmpty ? secList.last : 0; - var minSec = secList.isNotEmpty ? secList.first : 0; + /* var maxSec = secList.isNotEmpty ? secList.last : 0; + var minSec = secList.isNotEmpty ? secList.first : 0;*/ + var maxSec = secList.isNotEmpty ? secList.reduce((value, element) => value > element ? value : element):0; + var minSec = secList.isNotEmpty ? secList.reduce((value, element) => value < element ? value : element):0; var secTime = secList.isNotEmpty ? maxSec - minSec : 0; stu.ttlSec = second2HMS(secTime); } diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/personnel_data_overview.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/personnel_data_overview.dart index 41f633a..46c61a2 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/personnel_data_overview.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/personnel_data_overview.dart @@ -26,17 +26,21 @@ class _PersonnelDataOverviewState extends State { for (var i = 0; i < widget.studentList.length; i++) { var student = widget.studentList[i]; - TimeUnits timeUnits = convertMilliseconds(student.useTime!); + /*TimeUnits timeUnits = convertMilliseconds(student.useTime!); String timeerStr = ''; if (timeUnits.hours > 0) timeerStr = '${timeUnits.hours}:'; if (timeUnits.minutes > 0) timeerStr += '${timeUnits.minutes}:'; - timeerStr += timeUnits.seconds.toString(); + timeerStr += timeUnits.seconds.toString();*/ names.add(student.studentName); - useTimes.add(timeerStr); + // useTimes.add(timeerStr); + useTimes.add(student.ttlSec!); + correctRates.add('${student.okRate!.toStringAsFixed(0)}%'); noAnswerCounts.add(student.noAnswerCount.toString()); rankings.add('${i + 1}名'); + + } mapData = { '姓名': names,