Merge branch 'mcy_new' of https://gitea.23544.com/marking/Making.School.Asignment.app into mcy_new
This commit is contained in:
commit
4a03e92468
|
|
@ -239,8 +239,10 @@ class Utils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
secList.sort();
|
secList.sort();
|
||||||
var maxSec = secList.isNotEmpty ? secList.last : 0;
|
/* var maxSec = secList.isNotEmpty ? secList.last : 0;
|
||||||
var minSec = secList.isNotEmpty ? secList.first : 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;
|
var secTime = secList.isNotEmpty ? maxSec - minSec : 0;
|
||||||
stu.ttlSec = second2HMS(secTime);
|
stu.ttlSec = second2HMS(secTime);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,17 +26,21 @@ class _PersonnelDataOverviewState extends State<PersonnelDataOverview> {
|
||||||
|
|
||||||
for (var i = 0; i < widget.studentList.length; i++) {
|
for (var i = 0; i < widget.studentList.length; i++) {
|
||||||
var student = widget.studentList[i];
|
var student = widget.studentList[i];
|
||||||
TimeUnits timeUnits = convertMilliseconds(student.useTime!);
|
/*TimeUnits timeUnits = convertMilliseconds(student.useTime!);
|
||||||
String timeerStr = '';
|
String timeerStr = '';
|
||||||
if (timeUnits.hours > 0) timeerStr = '${timeUnits.hours}:';
|
if (timeUnits.hours > 0) timeerStr = '${timeUnits.hours}:';
|
||||||
if (timeUnits.minutes > 0) timeerStr += '${timeUnits.minutes}:';
|
if (timeUnits.minutes > 0) timeerStr += '${timeUnits.minutes}:';
|
||||||
timeerStr += timeUnits.seconds.toString();
|
timeerStr += timeUnits.seconds.toString();*/
|
||||||
|
|
||||||
names.add(student.studentName);
|
names.add(student.studentName);
|
||||||
useTimes.add(timeerStr);
|
// useTimes.add(timeerStr);
|
||||||
|
useTimes.add(student.ttlSec!);
|
||||||
|
|
||||||
correctRates.add('${student.okRate!.toStringAsFixed(0)}%');
|
correctRates.add('${student.okRate!.toStringAsFixed(0)}%');
|
||||||
noAnswerCounts.add(student.noAnswerCount.toString());
|
noAnswerCounts.add(student.noAnswerCount.toString());
|
||||||
rankings.add('${i + 1}名');
|
rankings.add('${i + 1}名');
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
mapData = {
|
mapData = {
|
||||||
'姓名': names,
|
'姓名': names,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue