数据快查样式修改
This commit is contained in:
parent
2ad03b6b20
commit
ee487e63bd
|
|
@ -101,6 +101,10 @@ class StudentDetails extends Object {
|
|||
@JsonKey(name: 'unrated')
|
||||
int unrated;
|
||||
|
||||
//全部未做
|
||||
@JsonKey(name: 'allNotDone')
|
||||
bool allNotDone;
|
||||
|
||||
StudentDetails(
|
||||
this.studentId,
|
||||
this.studentName,
|
||||
|
|
@ -111,7 +115,7 @@ class StudentDetails extends Object {
|
|||
this.kgDetails,
|
||||
this.zgDetails,
|
||||
this.readLevel,
|
||||
[this.kgError = 0,this.kgCorrect = 0,this.zgCorrect = 0,this.zgError = 0,this.unrated = 0]
|
||||
[this.kgError = 0,this.kgCorrect = 0,this.zgCorrect = 0,this.zgError = 0,this.unrated = 0,this.allNotDone = false]
|
||||
);
|
||||
|
||||
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
|
||||
|
|
|
|||
|
|
@ -101,39 +101,39 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
|||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
|
|
@ -149,9 +149,9 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
|||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/quick_data_check_bottom.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/quick_student_data_table.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
|
@ -35,6 +36,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
with CommonMixin {
|
||||
JobDataReport? jobData;
|
||||
|
||||
|
||||
|
||||
void initState() {
|
||||
super.initState();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
|
|
@ -58,36 +61,43 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
EasyLoading.dismiss();
|
||||
if (data.code == 200) {
|
||||
int totalUnrated = 0;
|
||||
|
||||
data.data!.studentDetails.forEach((element) {
|
||||
element.kgError = 0;
|
||||
element.kgCorrect = 0;
|
||||
element.zgError = 0;
|
||||
element.zgCorrect = 0;
|
||||
|
||||
int num = 0;
|
||||
element.kgDetails.forEach((item) {
|
||||
if (item.state == 1) {
|
||||
if (item.state == 0) {
|
||||
num = num + 1;
|
||||
}else if (item.state == 1) {
|
||||
element.kgError = element.kgError + 1;
|
||||
}
|
||||
if (item.state == 2) {
|
||||
}else if (item.state == 2) {
|
||||
element.kgCorrect = element.kgCorrect + 1;
|
||||
}
|
||||
});
|
||||
element.zgDetails.forEach((item) {
|
||||
if (item.state == 1) {
|
||||
if (item.state == 0) {
|
||||
num = num + 1;
|
||||
}else if (item.state == 1) {
|
||||
element.zgError = element.zgError + 1;
|
||||
}
|
||||
if (item.state == 2) {
|
||||
}else if (item.state == 2) {
|
||||
element.zgCorrect = element.zgCorrect + 1;
|
||||
}
|
||||
if (item.state == 3) {
|
||||
}else if (item.state == 3) {
|
||||
element.unrated = element.unrated + 1;
|
||||
totalUnrated = element.unrated;
|
||||
}
|
||||
});
|
||||
|
||||
if(num == (element.kgDetails.length+ element.zgDetails.length)){
|
||||
element.allNotDone = true;
|
||||
}
|
||||
});
|
||||
if (totalUnrated > 0) {
|
||||
data.data!.hasUnrated = true;
|
||||
}
|
||||
|
||||
setState(() {
|
||||
jobData = data.data;
|
||||
});
|
||||
|
|
@ -181,7 +191,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
height: 2.r,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
|
@ -225,15 +235,18 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
)
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 2.r,
|
||||
),
|
||||
//环形图
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.width * 0.5,
|
||||
height: MediaQuery.of(context).size.width * 0.3,
|
||||
child: PieChart(
|
||||
PieChartData(
|
||||
borderData: FlBorderData(show: false),
|
||||
sectionsSpace: 0,
|
||||
centerSpaceRadius:
|
||||
MediaQuery.of(context).size.width * 0.1,
|
||||
MediaQuery.of(context).size.width * 0.06,
|
||||
sections: [
|
||||
PieChartSectionData(
|
||||
color: Color(0xFF4CC793),
|
||||
|
|
@ -243,7 +256,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
100,
|
||||
radius:
|
||||
MediaQuery.of(context).size.width *
|
||||
0.1 +
|
||||
0.07 +
|
||||
5,
|
||||
title: '${jobData!.validCount}人',
|
||||
titleStyle: TextStyle(
|
||||
|
|
@ -259,7 +272,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
100,
|
||||
radius:
|
||||
MediaQuery.of(context).size.width *
|
||||
0.1,
|
||||
0.07,
|
||||
title: '${jobData!.noAnswerCount}人',
|
||||
titleStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
|
|
@ -350,164 +363,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: (){
|
||||
if (jobData == null) return;
|
||||
if (!jobData!.sortType) {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 =
|
||||
a.kgValidRate + a.zgValidRate;
|
||||
int num2 =
|
||||
b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
} else {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 =
|
||||
a.kgValidRate + a.zgValidRate;
|
||||
int num2 =
|
||||
b.kgValidRate + b.zgValidRate;
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
}
|
||||
jobData!.sortType = !jobData!.sortType;
|
||||
|
||||
setState(() {
|
||||
jobData!.sortLevel = false;
|
||||
jobData!.studentDetails;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
if(!jobData!.sortType)
|
||||
Image.asset(
|
||||
'assets/images/no_check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
if(jobData!.sortType)
|
||||
Image.asset(
|
||||
'assets/images/check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
SizedBox(width: 5.r,),
|
||||
Text(
|
||||
'未提交排序',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF707070)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
|
||||
SizedBox(
|
||||
width: 20.r,
|
||||
),
|
||||
|
||||
InkWell(
|
||||
onTap: (){
|
||||
if (jobData == null) return;
|
||||
if (!jobData!.sortLevel) {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
return a.readLevel!
|
||||
.compareTo(b.readLevel!);
|
||||
});
|
||||
} else {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
return b.readLevel!
|
||||
.compareTo(a.readLevel!);
|
||||
});
|
||||
}
|
||||
jobData!.sortLevel =
|
||||
!jobData!.sortLevel;
|
||||
setState(() {
|
||||
jobData!.sortType = false;
|
||||
jobData!.studentDetails;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
if(!jobData!.sortLevel)
|
||||
Image.asset(
|
||||
'assets/images/no_check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
if(jobData!.sortLevel)
|
||||
Image.asset(
|
||||
'assets/images/check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
SizedBox(width: 5.r,),
|
||||
Text(
|
||||
'未批阅排序',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF707070)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Text(
|
||||
'注:绿色代表正确,红色代表错误,白色代表已作答未批阅,灰色代表未做',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.r,
|
||||
),
|
||||
SizedBox(
|
||||
height: jobData!.studentDetails.length > 5
|
||||
? 350.r
|
||||
: jobData!.studentDetails.length * 50.r +
|
||||
40.r,
|
||||
child: QuickStudentDataTable(
|
||||
headList: [
|
||||
'学生姓名',
|
||||
'客观题',
|
||||
'主观题',
|
||||
'客观题详情',
|
||||
'主观题详情',
|
||||
'未批阅'
|
||||
],
|
||||
bodyList: jobData!.studentDetails,
|
||||
jobId: widget.jobId,
|
||||
fixedRows: 1,
|
||||
fixedCols: 0,
|
||||
hasUnrated: jobData!.hasUnrated,
|
||||
kgCount: jobData!.kgQuestionCount,
|
||||
zgCount: jobData!.zgQuestionCount,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
QuickDataCheckBottom(jobData:jobData,jobId: widget.jobId,),
|
||||
],
|
||||
),
|
||||
))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,266 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/quick_student_data_table.dart';
|
||||
|
||||
class QuickDataCheckBottom extends StatefulWidget {
|
||||
final int jobId;
|
||||
final JobDataReport? jobData;
|
||||
const QuickDataCheckBottom({Key? key,required this.jobId,required this.jobData}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<QuickDataCheckBottom> createState() => _QuickDataCheckBottomState();
|
||||
}
|
||||
|
||||
class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
|
||||
List<StudentDetails> showList = [];
|
||||
List<StudentDetails> followList = [];
|
||||
void initState() {
|
||||
super.initState();
|
||||
showList =widget.jobData!.studentDetails;
|
||||
widget.jobData!.studentDetails.forEach((e) {
|
||||
if(e.readLevel == 1){
|
||||
followList.add(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: (){
|
||||
if (widget.jobData == null) return;
|
||||
if (!widget.jobData!.sortType) {
|
||||
widget.jobData!.studentDetails.sort((a, b) {
|
||||
int num1 =
|
||||
a.kgValidRate + a.zgValidRate;
|
||||
int num2 =
|
||||
b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
} else {
|
||||
widget.jobData!.studentDetails.sort((a, b) {
|
||||
int num1 =
|
||||
a.kgValidRate + a.zgValidRate;
|
||||
int num2 =
|
||||
b.kgValidRate + b.zgValidRate;
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
}
|
||||
widget.jobData!.sortType = !widget.jobData!.sortType;
|
||||
|
||||
setState(() {
|
||||
widget.jobData!.sortLevel = false;
|
||||
showList = widget.jobData!.studentDetails;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
if(!widget.jobData!.sortType)
|
||||
Image.asset(
|
||||
'assets/images/no_check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
if(widget.jobData!.sortType)
|
||||
Image.asset(
|
||||
'assets/images/check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
SizedBox(width: 5.r,),
|
||||
Text(
|
||||
widget.jobData!.sortType?'已提交排序':'未提交排序',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF707070)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(
|
||||
width: 20.r,
|
||||
),
|
||||
|
||||
InkWell(
|
||||
onTap: (){
|
||||
if (widget.jobData == null) return;
|
||||
if (!widget.jobData!.sortLevel) {
|
||||
showList = followList;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
} else {
|
||||
widget.jobData!.studentDetails.sort((a, b) {
|
||||
int num1 =
|
||||
a.kgValidRate + a.zgValidRate;
|
||||
int num2 =
|
||||
b.kgValidRate + b.zgValidRate;
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
showList = widget.jobData!.studentDetails;
|
||||
setState(() {
|
||||
|
||||
});
|
||||
}
|
||||
widget.jobData!.sortLevel =
|
||||
!widget.jobData!.sortLevel;
|
||||
setState(() {
|
||||
widget.jobData!.sortType = false;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
if(!widget.jobData!.sortLevel)
|
||||
Image.asset(
|
||||
'assets/images/no_check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
if(widget.jobData!.sortLevel)
|
||||
Image.asset(
|
||||
'assets/images/check_icon.png',
|
||||
width: 16.r,
|
||||
height: 16.r,
|
||||
),
|
||||
SizedBox(width: 5.r,),
|
||||
Text(
|
||||
'看关注学生',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF707070)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'注:',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
Container(
|
||||
width:10.r,
|
||||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
color: Color(0xFF4CC793),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 2.r,),
|
||||
Text(
|
||||
'正确',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
SizedBox(width: 15.r,),
|
||||
Container(
|
||||
width:10.r,
|
||||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
color: Color(0xFFFF7474),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 2.r,),
|
||||
Text(
|
||||
'错误',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
SizedBox(width: 15.r,),
|
||||
Container(
|
||||
width:10.r,
|
||||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
color: Colors.white,
|
||||
// border: Border.all(width: 1.r,color: Colors.grey),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.grey,
|
||||
offset: Offset(1.w, 1.h), //阴影y轴偏移量
|
||||
blurRadius: 4, //阴影模糊程度
|
||||
spreadRadius: 0.1, //阴影扩散程度
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(width: 2.r,),
|
||||
Text(
|
||||
'已作答未批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
SizedBox(width: 15.r,),
|
||||
Container(
|
||||
width:10.r,
|
||||
height: 10.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
||||
color: Color(0xFFD3D3D3),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 2.r,),
|
||||
Text(
|
||||
'未做',
|
||||
style: TextStyle(
|
||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.r,
|
||||
),
|
||||
SizedBox(
|
||||
height: showList.length > 5
|
||||
? 350.r
|
||||
: showList.length * 50.r +
|
||||
40.r,
|
||||
child: QuickStudentDataTable(
|
||||
headList: [
|
||||
'学生姓名',
|
||||
'客观题',
|
||||
'主观题',
|
||||
'客观题状态',
|
||||
'主观题状态',
|
||||
'未批阅'
|
||||
],
|
||||
bodyList: showList,
|
||||
jobId: widget.jobId,
|
||||
fixedRows: 1,
|
||||
fixedCols: 0,
|
||||
// hasUnrated: widget.jobData!.hasUnrated,
|
||||
hasUnrated: false,
|
||||
kgCount: widget.jobData!.kgQuestionCount,
|
||||
zgCount: widget.jobData!.zgQuestionCount,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -38,8 +38,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
StudentDetails item = widget.bodyList[index];
|
||||
int num = 0;
|
||||
StudentDetails item = widget.bodyList[index];
|
||||
/* int num = 0;
|
||||
int total = 0;
|
||||
item.kgDetails.forEach((element) {
|
||||
if (element.state == 0) {
|
||||
|
|
@ -52,11 +52,11 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
num = num + 1;
|
||||
}
|
||||
total = total + 1;
|
||||
});
|
||||
});*/
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null
|
||||
? num == total
|
||||
? item.allNotDone
|
||||
? MaterialStateProperty.all(Color(0xFFFFD79C))
|
||||
: MaterialStateProperty.all(color)
|
||||
: null,
|
||||
|
|
@ -137,7 +137,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
child: SingleChildScrollView(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.center,
|
||||
alignment: WrapAlignment.start,
|
||||
spacing: 2,
|
||||
runSpacing: 2,
|
||||
children: List.generate(item.kgDetails.length, (index) {
|
||||
|
|
@ -157,7 +157,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
kgInfo.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: kgInfo.state == 0
|
||||
color: kgInfo.state == 3
|
||||
? Color(0xFF525252)
|
||||
: Colors.white),
|
||||
)),
|
||||
|
|
@ -172,7 +172,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
child: SingleChildScrollView(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.center,
|
||||
alignment: WrapAlignment.start,
|
||||
spacing: 2,
|
||||
runSpacing: 2,
|
||||
children: List.generate(item.zgDetails.length, (index) {
|
||||
|
|
@ -192,7 +192,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
kgInfo.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: kgInfo.state == 0
|
||||
color: kgInfo.state == 3
|
||||
? Color(0xFF525252)
|
||||
: Colors.white),
|
||||
)),
|
||||
|
|
@ -234,17 +234,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
/* headingRowDecoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.grey[400]!,
|
||||
Colors.grey[200]!,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),*/
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
|
|
@ -258,20 +248,20 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
var item = widget.headList[index];
|
||||
return index == 1?DataColumn2(
|
||||
label: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
Text('(${widget.kgCount})',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
||||
]
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
Text('(${widget.kgCount})',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
||||
]
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
||||
):index == 2?DataColumn2(
|
||||
label: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item,
|
||||
|
|
@ -292,6 +282,6 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,9 +157,6 @@ class _ReportTableState extends State<ReportTable> {
|
|||
var obj = {'noAnswerStudentNames':'-','answerNgStudentNames':answerNgStudentNames[i]};
|
||||
list.add(obj);
|
||||
}
|
||||
print('list.length=${list.length}');
|
||||
print('noAnswerStudentNames.length=${noAnswerStudentNames.length}');
|
||||
print('answerNgStudentNames.length=${answerNgStudentNames.length}');
|
||||
}
|
||||
|
||||
showPeopleListDialog(context:context, title:title, questionNo:questionNo,arr:list,dcList:[]);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
String sortString(String str) {
|
||||
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
||||
}
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
|
|
@ -44,9 +47,11 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252):
|
||||
item.state == 2?Color(0xFF4CC793):
|
||||
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white),
|
||||
),
|
||||
)),
|
||||
))),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
||||
class StudentZgTable extends StatefulWidget {
|
||||
final List headList;
|
||||
|
|
@ -28,31 +29,38 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
bool _sortAscending = true;
|
||||
|
||||
void showImgDialog(BuildContext context,String imgUrl){
|
||||
showDialog(context: context, builder: (BuildContext context){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: SizedBox(
|
||||
/* width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,*/
|
||||
child: PhotoView(
|
||||
imageProvider:
|
||||
NetworkImage(imgUrl)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
/* showDialog(context: context, builder: (BuildContext context){
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||
backgroundColor:Colors.transparent,
|
||||
contentPadding: EdgeInsets.all(20.r),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
content: SizedBox(
|
||||
content: Container(
|
||||
color: Colors.transparent,
|
||||
width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text('批注答案',style: TextStyle(fontSize: 15.sp,color: Color(0xFF3C3C3C),fontWeight: FontWeight.w500),),
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
Image.network(imgUrl,fit: BoxFit.cover, errorBuilder: (context, error, stackTrace) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 20.r),
|
||||
child: const MyEmptyWidget());
|
||||
}),
|
||||
],
|
||||
),
|
||||
child: PhotoView(
|
||||
imageProvider:
|
||||
NetworkImage(imgUrl)),
|
||||
),
|
||||
);
|
||||
});
|
||||
});*/
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
|
|
@ -80,8 +88,8 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: item.state == 2?
|
||||
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):
|
||||
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,),
|
||||
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):item.state == 1?
|
||||
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,):Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
|
|
|
|||
Loading…
Reference in New Issue