历史作业

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>
],
),
),
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.symmetric(horizontal: 14.r),
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '主观题正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.subjectiveCorrectRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 14.r),
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
progressBar(context,
title: '总正确率:',
color: Color(0xFFB8C7FF),
percent: studentData!.correctRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 14.r),
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
SizedBox(
height: 10.r,
],
),
),
/* 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,7 +382,22 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
itemCount: dataList.length,
itemBuilder: (context, index) {
Items item = dataList[index];
return Container(
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(
@ -544,6 +661,7 @@ class _JobPersonalDetailState extends State<JobPersonalDetail>
marginEdg: EdgeInsets.only(top: 8.h)),
],
),
),
);
})
: MyEmptyWidget(),