答题时长修改
This commit is contained in:
parent
f677fa4032
commit
7c5ef98014
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,17 +26,21 @@ class _PersonnelDataOverviewState extends State<PersonnelDataOverview> {
|
|||
|
||||
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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue