旋转监听

This commit is contained in:
machuanyu 2024-06-26 15:38:47 +08:00
parent e95bf53b7a
commit a3fd75efb5
11 changed files with 2067 additions and 1903 deletions

View File

@ -24,6 +24,8 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String homeworkId = state.homeworkId.value; String homeworkId = state.homeworkId.value;
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -114,6 +116,8 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
), ),
); );
} }
);
}
@override @override
void dispose() { void dispose() {

View File

@ -24,6 +24,8 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -166,6 +168,10 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
), ),
); );
} }
);
}
@override @override
void dispose() { void dispose() {

View File

@ -29,6 +29,8 @@ class _AnswerTrajectoryDetailPageState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: Color(0xFFF5F5F5), backgroundColor: Color(0xFFF5F5F5),
appBar: AppBar( appBar: AppBar(
@ -238,6 +240,8 @@ class _AnswerTrajectoryDetailPageState
), ),
); );
} }
);
}
@override @override
void dispose() { void dispose() {

View File

@ -24,6 +24,8 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -420,6 +422,8 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
), ),
); );
} }
);
}
@override @override
void dispose() { void dispose() {

View File

@ -113,7 +113,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
ReturnToHomepage(), ReturnToHomepage(),
], ],
), ),
body: Column( body:OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Column(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r), padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
@ -373,7 +375,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
}), }),
], ],
), );
}
)
); );
} }

View File

@ -25,6 +25,8 @@ class _JobReportPageState extends State<JobReportPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -114,6 +116,8 @@ class _JobReportPageState extends State<JobReportPage> {
}), }),
); );
} }
);
}
@override @override
void dispose() { void dispose() {

View File

@ -27,6 +27,8 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -239,6 +241,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
], ],
), ),
); );
});
} }
@override @override

View File

@ -68,6 +68,8 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -244,6 +246,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
}), }),
), ),
); );
});
} }
@override @override

View File

@ -20,6 +20,8 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold( return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -52,6 +54,8 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
), ),
), ),
); );
});
} }
@override @override

View File

@ -24,6 +24,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation) {
return Scaffold( return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -54,8 +56,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
onTap: () { onTap: () {
// RouterManager.router.navigateTo(context, // RouterManager.router.navigateTo(context,
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}'); // '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
Get.toNamed(Routes.studentWorkDetailPage, Get.toNamed(Routes.studentWorkDetailPage, arguments: {
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName}); 'studentId': state.studentInfo.value.studentId,
'studentName': state.studentInfo.value.studentName
});
}, },
child: Container( child: Container(
width: 93.r, width: 93.r,
@ -67,7 +71,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
child: Center( child: Center(
child: Text( child: Text(
'历史作业', '历史作业',
style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)), style: TextStyle(
fontSize: 10.r, color: const Color(0xFF2080F7)),
), ),
), ),
), ),
@ -76,8 +81,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
width: 10.r, width: 10.r,
), ),
InkWell( InkWell(
onTap: () => onTap: () => showAnswerHandwriting(context,
showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()), homeworkId: state.homeworkId,
studentId: state.studentId)
.then((e) => ToastUtils.dismiss()),
child: Container( child: Container(
width: 93.r, width: 93.r,
height: 28.r, height: 28.r,
@ -88,7 +95,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
child: Center( child: Center(
child: Text( child: Text(
'原稿笔迹', '原稿笔迹',
style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)), style: TextStyle(
fontSize: 10.r, color: const Color(0xFF4CC793)),
), ),
), ),
), ),
@ -112,7 +120,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
children: [ children: [
Text( Text(
'客观题', '客观题',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600), style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF5C5C5C),
fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
width: 10.r, width: 10.r,
@ -120,7 +131,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
Obx(() { Obx(() {
return Text( return Text(
'${state.studentInfo.value.kgtCorrectRate}%', '${state.studentInfo.value.kgtCorrectRate}%',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600), style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF6888FD),
fontWeight: FontWeight.w600),
); );
}), }),
], ],
@ -130,13 +144,19 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
), ),
Obx(() { Obx(() {
return SizedBox( return SizedBox(
height: state.studentInfo.value.kgtList.length > 8 ? 300.r : state.studentInfo.value.kgtList.length * 40.r + 40.r, height: state.studentInfo.value.kgtList.length > 8
? 300.r
: state.studentInfo.value.kgtList.length * 40.r +
40.r,
child: StudentKgTable( child: StudentKgTable(
headList: const ['题号', '学生答案', '标准答案'], headList: const ['题号', '学生答案', '标准答案'],
bodyList: state.studentInfo.value.kgtList, bodyList: state.studentInfo.value.kgtList,
questionNumCall: (questionNo, templateId) { questionNumCall: (questionNo, templateId) {
showAnswerHandwriting(context, showAnswerHandwriting(context,
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId) homeworkId: state.homeworkId,
studentId: state.studentId,
questionNo: questionNo,
templateId: templateId)
.then((e) => ToastUtils.dismiss()); .then((e) => ToastUtils.dismiss());
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) { // showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]); // ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
@ -167,7 +187,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
children: [ children: [
Text( Text(
'主观题', '主观题',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600), style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF5C5C5C),
fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
width: 10.r, width: 10.r,
@ -175,7 +198,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
Obx(() { Obx(() {
return Text( return Text(
'${state.studentInfo.value.zgtCorrectRate}%', '${state.studentInfo.value.zgtCorrectRate}%',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600), style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF6888FD),
fontWeight: FontWeight.w600),
); );
}), }),
], ],
@ -185,7 +211,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
), ),
Obx(() { Obx(() {
return SizedBox( return SizedBox(
height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r, height: state.studentInfo.value.zgtList.length > 8
? 300.r
: state.studentInfo.value.zgtList.length * 40.r +
40.r,
child: StudentZgTable( child: StudentZgTable(
headList: const ['题号', '用时', '批注结果', '答案'], headList: const ['题号', '用时', '批注结果', '答案'],
bodyList: state.studentInfo.value.zgtList, bodyList: state.studentInfo.value.zgtList,
@ -194,7 +223,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]); ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});*/ });*/
showAnswerHandwriting(context, showAnswerHandwriting(context,
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId) homeworkId: state.homeworkId,
studentId: state.studentId,
questionNo: questionNo,
templateId: templateId)
.then((e) => ToastUtils.dismiss()); .then((e) => ToastUtils.dismiss());
}, },
), ),
@ -207,6 +239,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
), ),
), ),
); );
});
} }
@override @override

View File

@ -28,11 +28,14 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation) {
return Scaffold( return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
title: Text('${state.studentName}作业详情', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))), title: Text('${state.studentName}作业详情',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
centerTitle: true, centerTitle: true,
leading: IconButton( leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black), icon: Icon(Icons.arrow_back_ios, color: Colors.black),
@ -70,7 +73,11 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
return Center( return Center(
child: Text( child: Text(
'作业', '作业',
style: TextStyle(fontSize: 14.sp, color: state.isJob.value ? Color(0xFF7491FD) : Color(0xFF505E6E)), style: TextStyle(
fontSize: 14.sp,
color: state.isJob.value
? Color(0xFF7491FD)
: Color(0xFF505E6E)),
)); ));
}), }),
), ),
@ -94,7 +101,11 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
child: Center(child: Obx(() { child: Center(child: Obx(() {
return Text( return Text(
'考试', '考试',
style: TextStyle(fontSize: 14.sp, color: !state.isJob.value ? Color(0xFF7491FD) : Color(0xFF505E6E)), style: TextStyle(
fontSize: 14.sp,
color: !state.isJob.value
? Color(0xFF7491FD)
: Color(0xFF505E6E)),
); );
})), })),
), ),
@ -105,14 +116,20 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
Obx(() { Obx(() {
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r), margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
padding: EdgeInsets.only(top: 10.r, left: 10.r, right: 10.r, bottom: 10.r), padding: EdgeInsets.only(
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white), 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( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'总览:', '总览:',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF7491FD), fontWeight: FontWeight.w600), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7491FD),
fontWeight: FontWeight.w600),
), ),
ProgressBar( ProgressBar(
title: '客观题正确率:', title: '客观题正确率:',
@ -142,11 +159,17 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
jobType: state.isJob.value ? 1 : 2, jobType: state.isJob.value ? 1 : 2,
customTimeStr: state.customTimeStr.value, customTimeStr: state.customTimeStr.value,
customTime: logic.tabController.index != 2 || customTime: logic.tabController.index != 2 ||
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == '')) ((state.dateEnd == null || state.dateEnd == '') &&
(state.dateStart == null ||
state.dateStart == ''))
? null ? null
: PickerDateRange( : PickerDateRange(
state.dateStart == null || state.dateStart == '' ? null : DateTime.parse(state.dateStart!), state.dateStart == null || state.dateStart == ''
state.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!), ? null
: DateTime.parse(state.dateStart!),
state.dateEnd == null || state.dateEnd == ''
? null
: DateTime.parse(state.dateEnd!),
), ),
onTimeFilter: (String? startTime, String? endTime) { onTimeFilter: (String? startTime, String? endTime) {
EasyLoading.show(status: 'loading...'); EasyLoading.show(status: 'loading...');
@ -154,8 +177,10 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
if (logic.tabController.index == 2) { if (logic.tabController.index == 2) {
logic.tabController.animateTo(0); logic.tabController.animateTo(0);
} }
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10); state.dateStart =
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10); Utils.getWeekStartDate().toString().substring(0, 10);
state.dateEnd =
Utils.getWeekEndDate().toString().substring(0, 10);
state.customTimeStr.value = '自定义'; state.customTimeStr.value = '自定义';
} else { } else {
state.dateStart = startTime ?? ''; state.dateStart = startTime ?? '';
@ -166,13 +191,17 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
}, },
refreshTime: (value) { refreshTime: (value) {
if (value != null && value.startDate != null) { if (value != null && value.startDate != null) {
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? ''; state.customTimeStr.value =
value.startDate?.toString().substring(0, 10) ?? '';
if (value.endDate != null) { if (value.endDate != null) {
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) { if (!Utils.isPad() &&
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}'; value.startDate!.year == value.endDate!.year) {
state.customTimeStr.value =
'${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
} else { } else {
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}'; state.customTimeStr.value =
'${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
} }
} }
} }
@ -294,26 +323,40 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
}, },
child: state.studentData.value.items.items.isNotEmpty child: state.studentData.value.items.items.isNotEmpty
? ListView.builder( ? ListView.builder(
itemCount: state.studentData.value.items.items.length, itemCount:
state.studentData.value.items.items.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
StudentItems item = state.studentData.value.items.items[index]; StudentItems item =
state.studentData.value.items.items[index];
return InkWell( return InkWell(
onTap: () { onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {'homeworkId': item.id, 'studentId': state.studentId}); Get.toNamed(Routes.studentPersonalPage,
arguments: {
'homeworkId': item.id,
'studentId': state.studentId
});
}, },
child: Container( child: Container(
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r), margin: EdgeInsets.symmetric(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r), vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(
vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)), borderRadius: BorderRadius.all(
color: item.allNotDone ? const Color(0xFFFFEDD3) : Colors.white), Radius.circular(10.r)),
color: item.allNotDone
? const Color(0xFFFFEDD3)
: Colors.white),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment:
crossAxisAlignment: CrossAxisAlignment.start, MainAxisAlignment.start,
crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Container( Container(
width: 32.w, width: 32.w,
@ -321,24 +364,33 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w), padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: state.isJob.value ? const Color.fromRGBO(104, 136, 253, 1) : const Color(0xFFFFA116), color: state.isJob.value
? const Color.fromRGBO(
104, 136, 253, 1)
: const Color(0xFFFFA116),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
bottomLeft: Radius.circular(4.r), bottomLeft:
bottomRight: Radius.circular(4.r), Radius.circular(4.r),
bottomRight:
Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: Text( child: Text(
state.isJob.value ? '作业' : '考试', state.isJob.value ? '作业' : '考试',
style: TextStyle(fontSize: 10.sp, color: Colors.white), style: TextStyle(
fontSize: 10.sp,
color: Colors.white),
), ),
), ),
Expanded( Expanded(
child: Text( child: Text(
item.name, item.name,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF464646)), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF464646)),
)), )),
// SizedBox(width: 5.r,), // SizedBox(width: 5.r,),
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),), // Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
@ -347,13 +399,19 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
width: 40.r, width: 40.r,
height: 20.r, height: 20.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(4.r)), borderRadius: BorderRadius.all(
border: Border.all(width: 1.r, color: Color(0xFF4CC793)), Radius.circular(4.r)),
border: Border.all(
width: 1.r,
color: Color(0xFF4CC793)),
), ),
child: Center( child: Center(
child: Text( child: Text(
EnumUtils.formatSubject(item.subject), EnumUtils.formatSubject(
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), item.subject),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFF4CC793)),
)), )),
), ),
], ],
@ -362,11 +420,14 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
height: 10.r, height: 10.r,
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'客:', '客:',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
), ),
SizedBox( SizedBox(
width: 5.r, width: 5.r,
@ -375,11 +436,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
? Expanded( ? Expanded(
child: Wrap( child: Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
alignment: WrapAlignment.start, alignment:
WrapAlignment.start,
spacing: 8, spacing: 8,
runSpacing: 5, runSpacing: 5,
children: List.generate(item.kgtList.length, (i) { children: List.generate(
KgtList subjective = item.kgtList[i]; item.kgtList.length,
(i) {
KgtList subjective =
item.kgtList[i];
return Container( return Container(
width: 20.r, width: 20.r,
height: 20.r, height: 20.r,
@ -397,16 +462,25 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
borderRadius: BorderRadius.all(Radius.circular(10.r))), borderRadius: BorderRadius.all(Radius.circular(10.r))),
child: Center( child: Center(
child: Text( child: Text(
subjective.questionNo.toString(), subjective.questionNo
.toString(),
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: subjective.state == 0 color: subjective
? Color(0xFFDDDDDD) .state ==
: subjective.state == 3 0
? Color(0xFF4CC793) ? Color(
: subjective.state == 2 0xFFDDDDDD)
? Color(0xFFFF7474) : subjective.state ==
: Color(0xFF666666)), 3
? Color(
0xFF4CC793)
: subjective.state ==
2
? Color(
0xFFFF7474)
: Color(
0xFF666666)),
)), )),
); );
}), }),
@ -414,7 +488,9 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
) )
: Text( : Text(
'', '',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
), ),
], ],
), ),
@ -422,11 +498,14 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
height: 10.r, height: 10.r,
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment:
CrossAxisAlignment.start,
children: [ children: [
Text( Text(
'主:', '主:',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
), ),
SizedBox( SizedBox(
width: 5.r, width: 5.r,
@ -435,11 +514,15 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
? Expanded( ? Expanded(
child: Wrap( child: Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
alignment: WrapAlignment.start, alignment:
WrapAlignment.start,
spacing: 8, spacing: 8,
runSpacing: 5, runSpacing: 5,
children: List.generate(item.zgtList.length, (i) { children: List.generate(
ZgtList subjective = item.zgtList[i]; item.zgtList.length,
(i) {
ZgtList subjective =
item.zgtList[i];
return Container( return Container(
width: 20.r, width: 20.r,
height: 20.r, height: 20.r,
@ -457,16 +540,25 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
borderRadius: BorderRadius.all(Radius.circular(10.r))), borderRadius: BorderRadius.all(Radius.circular(10.r))),
child: Center( child: Center(
child: Text( child: Text(
subjective.questionNo.toString(), subjective.questionNo
.toString(),
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: subjective.state == 0 color: subjective
? Color(0xFFDDDDDD) .state ==
: subjective.state == 3 0
? Color(0xFF4CC793) ? Color(
: subjective.state == 2 0xFFDDDDDD)
? Color(0xFFFF7474) : subjective.state ==
: Color(0xFF666666)), 3
? Color(
0xFF4CC793)
: subjective.state ==
2
? Color(
0xFFFF7474)
: Color(
0xFF666666)),
)), )),
); );
}), }),
@ -474,7 +566,9 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
) )
: Text( : Text(
'', '',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF5B5B5B)),
), ),
], ],
), ),
@ -509,6 +603,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
], ],
), ),
); );
});
} }
@override @override