Compare commits

..

5 Commits

Author SHA1 Message Date
machuanyu a3fd75efb5 旋转监听 2024-06-26 15:38:47 +08:00
machuanyu e95bf53b7a Merge branch 'new_main' into mcy_new 2024-06-26 14:10:14 +08:00
machuanyu b217b98598 样式修改 2024-06-26 14:08:40 +08:00
machuanyu cbd5b724e9 Merge branch 'new_main' into mcy_new
# Conflicts:
#	making_school_asignment_app/lib/page/home_page/home_view.dart
2024-06-25 17:12:36 +08:00
machuanyu 1bfbeec334 样式修改 2024-06-25 17:09:36 +08:00
17 changed files with 2073 additions and 1909 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

View File

@ -13,7 +13,7 @@ class AppConfig {
static const UI_WIDTH = 375.0;
/// ui width
static const UI_HEIGHT = 812.0;
static const UI_HEIGHT = 867.0;
static const SKIP_UPDATING_USER = '18888888888';
static const APP_NAME = '18888888888';

View File

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

View File

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

View File

@ -71,7 +71,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(
item.assessType == 0 ? '作业' : '考试',
color: Colors.white,
@ -203,7 +203,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(
item.assessType == 0 ? '作业' : '考试',
color: Colors.white,

View File

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

View File

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

View File

@ -113,7 +113,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
ReturnToHomepage(),
],
),
body: Column(
body:OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Column(
children: [
Padding(
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
Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
@ -114,6 +116,8 @@ class _JobReportPageState extends State<JobReportPage> {
}),
);
}
);
}
@override
void dispose() {

View File

@ -27,6 +27,8 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
@override
Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation){
return Scaffold(
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
@ -46,7 +48,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
children: [
Container(
margin: EdgeInsets.all(15.r),
height: 30.r,
// height: 30.r,
child: Row(
children: [
Expanded(
@ -239,6 +241,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
],
),
);
});
}
@override

View File

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

View File

@ -306,7 +306,7 @@ Widget $reviewedItem({
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
),
Expanded(

View File

@ -207,7 +207,7 @@ class _TaskListItemState extends State<TaskListItem> {
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
),
Expanded(

View File

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

View File

@ -24,6 +24,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
@override
Widget build(BuildContext context) {
return OrientationBuilder(
builder: (BuildContext context, Orientation orientation) {
return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
@ -54,8 +56,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
onTap: () {
// RouterManager.router.navigateTo(context,
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
Get.toNamed(Routes.studentWorkDetailPage,
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName});
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
'studentId': state.studentInfo.value.studentId,
'studentName': state.studentInfo.value.studentName
});
},
child: Container(
width: 93.r,
@ -67,7 +71,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
child: Center(
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,
),
InkWell(
onTap: () =>
showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()),
onTap: () => showAnswerHandwriting(context,
homeworkId: state.homeworkId,
studentId: state.studentId)
.then((e) => ToastUtils.dismiss()),
child: Container(
width: 93.r,
height: 28.r,
@ -88,7 +95,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
child: Center(
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: [
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(
width: 10.r,
@ -120,7 +131,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
Obx(() {
return Text(
'${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(() {
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(
headList: const ['题号', '学生答案', '标准答案'],
bodyList: state.studentInfo.value.kgtList,
questionNumCall: (questionNo, templateId) {
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());
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
@ -167,7 +187,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
children: [
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(
width: 10.r,
@ -175,7 +198,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
Obx(() {
return Text(
'${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(() {
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(
headList: const ['题号', '用时', '批注结果', '答案'],
bodyList: state.studentInfo.value.zgtList,
@ -194,7 +223,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});*/
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());
},
),
@ -207,6 +239,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
),
),
);
});
}
@override

View File

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

View File

@ -167,7 +167,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
bottomRight: Radius.circular(4.r),
),
),
margin: EdgeInsets.only(right: 4.w),
margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(state.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
),
Expanded(