历史作业

This commit is contained in:
machuanyu 2024-03-29 11:37:35 +08:00
parent 85a80c364a
commit 9c66503154
2 changed files with 375 additions and 251 deletions

View File

@ -99,11 +99,17 @@ class Items extends Object {
@JsonKey(name: 'subjectiveDtls')
List<SubjectiveDtls> subjectiveDtls;
@JsonKey(name: 'gradeName')
String gradeName;
@JsonKey(name: 'className')
String className;
//
@JsonKey(name: 'allNotDone')
bool allNotDone;
Items(this.id,this.name,this.subject,this.subjectName,this.publishTime,this.isPaper,this.studentJobId,this.correctRate,this.objectiveCorrectRate,this.objectiveDtls,this.subjectiveCorrectRate,this.subjectiveDtls,[this.allNotDone = false,]);
Items(this.id,this.name,this.subject,this.subjectName,this.publishTime,this.gradeName,this.className,this.isPaper,this.studentJobId,this.correctRate,this.objectiveCorrectRate,this.objectiveDtls,this.subjectiveCorrectRate,this.subjectiveDtls,[this.allNotDone = false,]);
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);

View File

@ -7,6 +7,7 @@ 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_student_history.dart';
import 'package:marking_app/pages/homework_correction/widget/personal_detail_topbar.dart';
import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
import 'package:marking_app/utils/index.dart';
import 'package:marking_app/utils/my_text.dart';
@ -179,27 +180,43 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
],
),
),
progressBar(context,
title: '客观题正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.objectiveCorrectRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 14.r),
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '主观题正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.subjectiveCorrectRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 14.r),
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '总正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.correctRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 14.r),
marginEdg: EdgeInsets.only(top: 8.h)),
SizedBox(
height: 10.r,
Container(
margin: EdgeInsets.symmetric(
vertical: 10.r, horizontal: 14.r),
padding: EdgeInsets.only(top: 10.r,left: 10.r,right: 10.r,bottom: 10.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: Colors.white),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('总览:',style: TextStyle(fontSize: 12.sp,color: Color(0xFF7491FD),fontWeight: FontWeight.w600),),
progressBar(context,
title: '客观题正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.objectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '主观题正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.subjectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '总正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
),
/* SizedBox(
height: 5.r,
),*/
jobConditionFilter(context,
controller: tabController,
jobType: isJob ? 1 : 2,
@ -252,6 +269,91 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
}
}
}),
Padding(
padding: EdgeInsets.only(top: 14.r,right: 14.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
'注:',
style: TextStyle(
fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
Container(
width:10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFF4CC793),
border: Border.all(width: 1.r,color: Color(0xFF4CC793)),
),
),
SizedBox(width: 2.r,),
Text(
'正确',
style: TextStyle(
fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
SizedBox(width: 15.r,),
Container(
width:10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFFFF7474),
border: Border.all(width: 1.r,color: Color(0xFFFF7474)),
),
),
SizedBox(width: 2.r,),
Text(
'错误',
style: TextStyle(
fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
SizedBox(width: 15.r,),
Container(
width:10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
// color: Color(0xFF666666),
border: Border.all(width: 1.r,color: Color(0xFF666666)),
// 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(0xFF8B8B8B)),
),
SizedBox(width: 15.r,),
Container(
width:10.r,
height: 10.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(5.r)),
border: Border.all(width: 1.r,color: Color(0xFFDDDDDD)),
// color: Color(0xFFDDDDDD),
),
),
SizedBox(width: 2.r,),
Text(
'未做',
style: TextStyle(
fontSize: 8.sp, color: Color(0xFF8B8B8B)),
),
],
),
),
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.r),
@ -280,119 +382,157 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
itemCount: dataList.length,
itemBuilder: (context, index) {
Items item = dataList[index];
return Container(
margin: EdgeInsets.symmetric(
vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(
vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: item.allNotDone
? Color(0xFFFFEDD3)
: Colors.white),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: 32.w,
height: 18.h,
alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration(
color: isJob
? const Color.fromRGBO(
104, 136, 253, 1)
: Color(0xFFFFA116),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r),
bottomRight: Radius.circular(4.r),
return InkWell(
onTap: (){
/* RouterManager.router.navigateTo(
context,
RouterManager.quickDataCheckPath +
'?gradeName=${Uri.encodeComponent(item.gradeName)}&className=${Uri.encodeComponent(item.className)}&jobId=${item.id}',
transition: getTransition(),
);*/
RouterManager.router.navigateTo(
context,
RouterManager.quickCheckPersonalPath +
'?jobId=${item.id}&studentId=${widget.studentId}',
transition: getTransition(),
);
},
child: Container(
margin: EdgeInsets.symmetric(
vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(
vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: item.allNotDone
? Color(0xFFFFEDD3)
: Colors.white),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Container(
width: 32.w,
height: 18.h,
alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration(
color: isJob
? const Color.fromRGBO(
104, 136, 253, 1)
: Color(0xFFFFA116),
borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r),
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
child: Text(
isJob ? '作业' : '考试',
style: TextStyle(
fontSize: 10.sp,
color: Colors.white),
),
),
margin: EdgeInsets.only(right: 4.w),
child: Text(
isJob ? '作业' : '考试',
style: TextStyle(
fontSize: 10.sp,
color: Colors.white),
),
),
Expanded(
child: Text(
item.name,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF464646)),
)),
// SizedBox(width: 5.r,),
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
Container(
width: 40.r,
height: 20.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
border: Border.all(
width: 1.r,
color: Color(0xFF4CC793)),
),
child: Center(
Expanded(
child: Text(
item.subjectName,
item.name,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF4CC793)),
fontSize: 12.sp,
color: Color(0xFF464646)),
)),
),
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'客:',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.objectiveDtls.length > 0
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.objectiveDtls.length,
(i) {
SubjectiveDtls subjective =
item.objectiveDtls[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
// SizedBox(width: 5.r,),
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
Container(
width: 40.r,
height: 20.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(4.r)),
border: Border.all(
width: 1.r,
color: Color(0xFF4CC793)),
),
child: Center(
child: Text(
item.subjectName,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF4CC793)),
)),
),
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'客:',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.objectiveDtls.length > 0
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.objectiveDtls.length,
(i) {
SubjectiveDtls subjective =
item.objectiveDtls[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
color: subjective
.state ==
0
? Color(
0xFFDDDDDD)
: subjective.state ==
3
? Color(
0xFF666666)
: subjective.state ==
1
? Color(
0xFFFF7474)
: Color(
0xFF4CC793)),
borderRadius:
BorderRadius.all(
Radius.circular(
10.r))),
child: Center(
child: Text(
subjective.questionNo,
style: TextStyle(
fontSize: 10.r,
color: subjective
.state ==
0
? Color(
0xFFDDDDDD)
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(
@ -403,81 +543,81 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
0xFFFF7474)
: Color(
0xFF4CC793)),
borderRadius:
BorderRadius.all(
Radius.circular(
10.r))),
child: Center(
child: Text(
subjective.questionNo,
style: TextStyle(
fontSize: 10.r,
color: subjective
.state ==
0
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(
0xFF666666)
: subjective.state ==
1
? Color(
0xFFFF7474)
: Color(
0xFF4CC793)),
)),
);
}),
)),
);
}),
),
)
: Text(
'',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
)
: Text(
'',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'主:',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.subjectiveDtls.length > 0
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.subjectiveDtls.length,
(i) {
SubjectiveDtls subjective =
item.subjectiveDtls[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
],
),
SizedBox(
height: 10.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'主:',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
SizedBox(
width: 5.r,
),
item.subjectiveDtls.length > 0
? Expanded(
child: Wrap(
direction: Axis.horizontal,
alignment: WrapAlignment.start,
spacing: 8,
runSpacing: 5,
children: List.generate(
item.subjectiveDtls.length,
(i) {
SubjectiveDtls subjective =
item.subjectiveDtls[i];
return Container(
width: 20.r,
height: 20.r,
decoration: BoxDecoration(
color: Colors.transparent,
border: Border.all(
width: 1.r,
color: subjective
.state ==
0
? Color(
0xFFDDDDDD)
: subjective.state ==
3
? Color(
0xFF666666)
: subjective.state ==
1
? Color(
0xFFFF7474)
: Color(
0xFF4CC793)),
borderRadius:
BorderRadius.all(
Radius.circular(
10.r))),
child: Center(
child: Text(
subjective.questionNo,
style: TextStyle(
fontSize: 10.r,
color: subjective
.state ==
0
? Color(
0xFFDDDDDD)
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(
@ -488,61 +628,39 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
0xFFFF7474)
: Color(
0xFF4CC793)),
borderRadius:
BorderRadius.all(
Radius.circular(
10.r))),
child: Center(
child: Text(
subjective.questionNo,
style: TextStyle(
fontSize: 10.r,
color: subjective
.state ==
0
? Color(0xFFDDDDDD)
: subjective.state ==
3
? Color(
0xFF666666)
: subjective.state ==
1
? Color(
0xFFFF7474)
: Color(
0xFF4CC793)),
)),
);
}),
)),
);
}),
),
)
: Text(
'',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
)
: Text(
'',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
),
],
),
progressBar(context,
title: '客观题正确率:',
color: Color(0xFF90E0BE),
percent: item.objectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '主观题正确率:',
color: Color(0xFF90E0BE),
percent: item.subjectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '总正确率:',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
],
),
progressBar(context,
title: '客观题正确率:',
color: Color(0xFF90E0BE),
percent: item.objectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '主观题正确率:',
color: Color(0xFF90E0BE),
percent: item.subjectiveCorrectRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '总正确率:',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
),
);
})