mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
4 changed files with 33 additions and 3 deletions
Showing only changes of commit 1a6f376e76 - Show all commits

View File

@ -185,6 +185,9 @@ class Students extends Object {
@JsonKey(name: 'useTime') @JsonKey(name: 'useTime')
int? useTime; int? useTime;
@JsonKey(name: 'ttlSec')
String? ttlSec;
Students(this.studentId,this.studentName,this.state,this.priorityAnnotate,this.kgtStu,this.kgtOkCount,this.kgtAnswerCount,this.zgtStu,this.zgtAnswerCount,this.zgtOkCount,this.allOk,this.kgtErrorCount,this.zgtErrorCount,this.zgtUnrated,this.allNotDone,this.queDtls,this.okRate,this.noAnswerCount,this.useTime,this.isAllCorrect); Students(this.studentId,this.studentName,this.state,this.priorityAnnotate,this.kgtStu,this.kgtOkCount,this.kgtAnswerCount,this.zgtStu,this.zgtAnswerCount,this.zgtOkCount,this.allOk,this.kgtErrorCount,this.zgtErrorCount,this.zgtUnrated,this.allNotDone,this.queDtls,this.okRate,this.noAnswerCount,this.useTime,this.isAllCorrect);
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson); factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);
@ -227,6 +230,9 @@ class Dtls extends Object {
@JsonKey(name: 'useTime') @JsonKey(name: 'useTime')
int useTime; int useTime;
@JsonKey(name: 'lastAnswerTime')
String? lastAnswerTime;
@JsonKey(name: 'annotatePicture') @JsonKey(name: 'annotatePicture')
String? annotatePicture; String? annotatePicture;

View File

@ -152,6 +152,24 @@ class Utils {
int okCount = stu.queDtls!.where((w) => w.state == 3).length; int okCount = stu.queDtls!.where((w) => w.state == 3).length;
int ttlCount = stu.queDtls!.length; int ttlCount = stu.queDtls!.length;
stu.okRate = Utils.calcRate(okCount, ttlCount); stu.okRate = Utils.calcRate(okCount, ttlCount);
var stuDtls = data.dtls.where((w) => w.studentId == stu.studentId);
var secList = [];
for(var sec in stuDtls){
if(sec.useTime >= 1){
var date = DateTime.parse(sec.lastAnswerTime!);
var lastSec =(date.difference(DateTime(1970)).inSeconds).floor();
secList.add(lastSec);
secList.add(lastSec - sec.useTime);
}
}
secList.sort();
var maxSec = secList.isNotEmpty?secList.last:0;
var minSec = secList.isNotEmpty?secList.first:0;
var secTime = secList.isNotEmpty?maxSec-minSec:0;
stu.ttlSec = second2HMS(secTime);
} }
data.students.sort((a, b) { data.students.sort((a, b) {

View File

@ -232,7 +232,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
return SizedBox( return SizedBox(
height: showList.value.length > 5 ? 350.r : showList.value.length * 50.r + 40.r, height: showList.value.length > 5 ? 350.r : showList.value.length * 50.r + 40.r,
child: QuickStudentDataTable( child: QuickStudentDataTable(
headList: ['学生姓名', '客观题', '主观题', '客观题状态', '主观题状态', '未批阅'], headList: ['学生姓名', '总用时','客观题', '主观题', '客观题状态', '主观题状态', '未批阅'],
bodyList: showList.value, bodyList: showList.value,
jobId: widget.jobId, jobId: widget.jobId,
fixedRows: 1, fixedRows: 1,

View File

@ -72,6 +72,12 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
), ),
), ),
)), )),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.ttlSec.toString(), style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252), overflow: TextOverflow.ellipsis)),
),
)),
DataCell(Center( DataCell(Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
@ -203,7 +209,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
// onSelectAll: (val) => setState(() => selectAll(val)), // onSelectAll: (val) => setState(() => selectAll(val)),
columns: List.generate(widget.headList.length, (index) { columns: List.generate(widget.headList.length, (index) {
var item = widget.headList[index]; var item = widget.headList[index];
return index == 1 return index == 2
? DataColumn2( ? DataColumn2(
label: Row(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ label: Row(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [
Text(item, style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))), Text(item, style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
@ -212,7 +218,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
// size: ColumnSize.S, // size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length, fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
) )
: index == 2 : index == 3
? DataColumn2( ? DataColumn2(
label: Row(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ label: Row(mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [
Text(item, style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))), Text(item, style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),