From 46f4beaf81c2fe4ad14e314bbff63690e9f4465b Mon Sep 17 00:00:00 2001 From: machuanyu <840649825@qq.com> Date: Thu, 11 Apr 2024 10:35:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=85=88=E9=85=8D=E7=BD=AE=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../job_priority_review_set.dart | 472 +++++++++++------- .../job_student_group.dart | 136 +---- .../widget/student_group_list.dart | 149 ++++++ marking_app/lib/routes/RouterManager.dart | 3 +- marking_app/lib/utils/common_utils.dart | 4 +- 5 files changed, 454 insertions(+), 310 deletions(-) create mode 100644 marking_app/lib/pages/homework_correction/widget/student_group_list.dart diff --git a/marking_app/lib/pages/homework_correction/job_priority_review_set.dart b/marking_app/lib/pages/homework_correction/job_priority_review_set.dart index b42de7d..37d8239 100644 --- a/marking_app/lib/pages/homework_correction/job_priority_review_set.dart +++ b/marking_app/lib/pages/homework_correction/job_priority_review_set.dart @@ -15,17 +15,22 @@ import 'package:marking_app/utils/request/rest_client.dart'; class JobPriorityReviewSet extends StatefulWidget { final String groupId; - const JobPriorityReviewSet({Key? key,required this.groupId}) : super(key: key); + final String title; + + const JobPriorityReviewSet({Key? key, required this.groupId,required this.title}) + : super(key: key); @override State createState() => _JobPriorityReviewSetState(); } class _JobPriorityReviewSetState extends State - with CommonMixin,SingleTickerProviderStateMixin { + with CommonMixin, SingleTickerProviderStateMixin { late final EasyRefreshController refreshController; late TabController tabController; int tabIndex = 0; + List list1 = []; + List list2 = []; List levelList = []; bool isClicking = false; @@ -36,32 +41,47 @@ class _JobPriorityReviewSetState extends State refreshController = EasyRefreshController(); tabController = TabController(initialIndex: tabIndex, length: 2, vsync: this); - getReadLevel(); + getList(); } - void getReadLevel() async{ - RestClient _client = await getClient(); - BaseStructureResult> res = await _client.getJobReadLevel(widget.groupId,tabIndex == 0?1:0); + void getList() async { + await getReadLevel(1); + await getReadLevel(0); + setState(() { - if(res.success){ - levelList = res.data!; - isClicking = false; - }else{ - levelList = []; - } + levelList = [...list1, ...list2]; + isClicking = false; }); EasyLoading.dismiss(); refreshController.finishRefresh(); } - void setJobReadLevel(int studentId,int level) async{ + getReadLevel(int readLevel) async { + RestClient _client = await getClient(); + BaseStructureResult> res = + await _client.getJobReadLevel(widget.groupId, readLevel); + if (res.success) { + if (readLevel == 1) { + list1 = res.data!; + } else { + list2 = res.data!; + } + } else { + if (readLevel == 1) { + list1 = []; + } else { + list2 = []; + } + } + } + + void setJobReadLevel(int studentId, int level) async { RestClient _client = await getClient(); JobLevelSetParams params = JobLevelSetParams(studentId, level); - BaseStructureResult res = await _client.getSetJobReadLevel(params); - if(res.code == 200){ - getReadLevel(); - - } + BaseStructureResult res = await _client.getSetJobReadLevel(params); + if (res.code == 200) { + getList(); + } } @override @@ -79,7 +99,7 @@ class _JobPriorityReviewSetState extends State appBar: AppBar( backgroundColor: Colors.white, title: Text( - '优先批阅人配置', + widget.title, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)), ), centerTitle: true, @@ -94,8 +114,10 @@ class _JobPriorityReviewSetState extends State body: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 10.r,), - Container( + SizedBox( + height: 10.r, + ), + /* Container( padding: EdgeInsets.symmetric(horizontal: 14.r), decoration: BoxDecoration( border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC))) @@ -136,171 +158,268 @@ class _JobPriorityReviewSetState extends State indicatorSize: TabBarIndicatorSize.label, labelPadding: const EdgeInsets.all(0), ), - ), + ),*/ Expanded( - child:Padding( - padding: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r), + child: Padding( + padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), child: EasyRefresh( firstRefresh: true, taskIndependence: true, controller: refreshController, header: MaterialHeader(), footer: TaurusFooter(), - onRefresh: () async{ - getReadLevel(); + onRefresh: () async { + getList(); }, - child: levelList.length>0?isPadFlag?GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - mainAxisSpacing: 10.r, - crossAxisSpacing: 10.r, - childAspectRatio: 556 / 112, - ),children: List.generate(levelList.length, (index) { - JobStudentLevel item = levelList[index]; - return Container( - padding: EdgeInsets.symmetric(horizontal: 10.r), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10.r)), - color: Colors.white, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded(child: Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),)), - - tabIndex == 0?InkWell( - onTap: (){ - setState(() { - isClicking = true; - }); - setJobReadLevel(item.studentGroupDetailId,0); - EasyLoading.show(status: 'loading...'); - }, - child: Container( - height: 20.r, - width: 70.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD), + child: levelList.length > 0 + ? isPadFlag + ? GridView( + gridDelegate: + SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 10.r, + crossAxisSpacing: 10.r, + childAspectRatio: 556 / 112, ), - child: Center( - child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),), - ), - ), - ):InkWell( - onTap: (){ - setState(() { - isClicking = true; - }); - setJobReadLevel(item.studentGroupDetailId,1); - EasyLoading.show(status: 'loading...'); - }, - child: Container( - height: 20.r, - width: 70.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: isClicking?Color(0xFF6888FD):Color(0xFFFFFFFF), - border: Border.all(width: 1.r,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)), - ), - child: Center( - child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)),), - ), - ), - ), - SizedBox(width: 5.r,), - InkWell( - onTap: (){ - RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); - }, - child: Container( - height: 20.r, - width: 70.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: Colors.white, - border: Border.all(width: 1.r,color: Color(0xFFFCA017)) - ), - child: Center( - child: Text('详情',style: TextStyle(fontSize: 10.sp,color: Color(0xFFFCA017)),), - ), - ), - ) - ], - ), - ); - }),):ListView.builder(itemBuilder: (context,index){ - JobStudentLevel item = levelList[index]; - return Container( - padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 15.r), - margin: EdgeInsets.only(bottom: 15.r), - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(10.r)), - color: Colors.white, - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded(child: Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),)), - tabIndex == 0?InkWell( - onTap: (){ - setState(() { - isClicking = true; - }); - setJobReadLevel(item.studentGroupDetailId,0); - EasyLoading.show(status: 'loading...'); - }, - child: Container( - height: 24.r, - width: 82.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD), - ), - child: Center( - child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),), - ), - ), - ):InkWell( - onTap: (){ - setJobReadLevel(item.studentGroupDetailId,1); - EasyLoading.show(status: 'loading...'); - }, - child: Container( - height: 24.r, - width: 82.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: Color(0xFFFFFFFF), - border: Border.all(width: 1.r,color: Color(0xFF6888FD)), - ), - child: Center( - child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: Color(0xFF6888FD)),), - ), - ), - ), - SizedBox(width: 5.r,), - InkWell( - onTap: (){ - RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); - }, - child: Container( - height: 20.r, - width: 70.r, - decoration: BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: Colors.white, - border: Border.all(width: 1.r,color: Color(0xFFFCA017)) - ), - child: Center( - child: Text('详情',style: TextStyle(fontSize: 10.sp,color: Color(0xFFFCA017)),), - ), - ), - ) - ], - ), - ); - },itemCount: levelList.length,):MyEmptyWidget(), + children: List.generate(levelList.length, (index) { + JobStudentLevel item = levelList[index]; + return Container( + padding: EdgeInsets.symmetric(horizontal: 10.r), + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(10.r)), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + item.studentName, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF6888FD)), + )), + item.readLevel == 1 + ? InkWell( + onTap: () { + setState(() { + isClicking = true; + }); + setJobReadLevel( + item.studentGroupDetailId, 0); + EasyLoading.show( + status: 'loading...'); + }, + child: Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: isClicking + ? Color(0xFFDCE3FF) + : Color(0xFF6888FD), + ), + child: Center( + child: Text( + '取消优先', + style: TextStyle( + fontSize: 10.sp, + color: Colors.white), + ), + ), + ), + ) + : InkWell( + onTap: () { + setState(() { + isClicking = true; + }); + setJobReadLevel( + item.studentGroupDetailId, 1); + EasyLoading.show( + status: 'loading...'); + }, + child: Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: isClicking + ? Color(0xFF6888FD) + : Color(0xFFFFFFFF), + border: Border.all( + width: 1.r, + color: isClicking + ? Color(0xFFFFFFFF) + : Color(0xFF6888FD)), + ), + child: Center( + child: Text( + '设为优先', + style: TextStyle( + fontSize: 10.sp, + color: isClicking + ? Color(0xFFFFFFFF) + : Color(0xFF6888FD)), + ), + ), + ), + ), + SizedBox( + width: 5.r, + ), + InkWell( + onTap: () { + RouterManager.router.navigateTo(context, + '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); + }, + child: Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: Colors.white, + border: Border.all( + width: 1.r, + color: Color(0xFFFCA017))), + child: Center( + child: Text( + '详情', + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFFCA017)), + ), + ), + ), + ) + ], + ), + ); + }), + ) + : ListView.builder( + itemBuilder: (context, index) { + JobStudentLevel item = levelList[index]; + return Container( + padding: EdgeInsets.symmetric( + vertical: 20.r, horizontal: 15.r), + margin: EdgeInsets.only(bottom: 15.r), + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(10.r)), + color: Colors.white, + ), + child: Row( + mainAxisAlignment: + MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + item.studentName, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF6888FD)), + )), + item.readLevel == 1 + ? InkWell( + onTap: () { + setState(() { + isClicking = true; + }); + setJobReadLevel( + item.studentGroupDetailId, 0); + EasyLoading.show( + status: 'loading...'); + }, + child: Container( + height: 24.r, + width: 82.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: isClicking + ? Color(0xFFDCE3FF) + : Color(0xFF6888FD), + ), + child: Center( + child: Text( + '取消优先', + style: TextStyle( + fontSize: 10.sp, + color: Colors.white), + ), + ), + ), + ) + : InkWell( + onTap: () { + setJobReadLevel( + item.studentGroupDetailId, 1); + EasyLoading.show( + status: 'loading...'); + }, + child: Container( + height: 24.r, + width: 82.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: Color(0xFFFFFFFF), + border: Border.all( + width: 1.r, + color: Color(0xFF6888FD)), + ), + child: Center( + child: Text( + '设为优先', + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFF6888FD)), + ), + ), + ), + ), + SizedBox( + width: 5.r, + ), + InkWell( + onTap: () { + RouterManager.router.navigateTo(context, + '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); + }, + child: Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all( + Radius.circular(20.r)), + color: Colors.white, + border: Border.all( + width: 1.r, + color: Color(0xFFFCA017))), + child: Center( + child: Text( + '详情', + style: TextStyle( + fontSize: 10.sp, + color: Color(0xFFFCA017)), + ), + ), + ), + ) + ], + ), + ); + }, + itemCount: levelList.length, + ) + : MyEmptyWidget(), ), ), ) @@ -309,4 +428,3 @@ class _JobPriorityReviewSetState extends State ); } } - diff --git a/marking_app/lib/pages/homework_correction/job_student_group.dart b/marking_app/lib/pages/homework_correction/job_student_group.dart index dcb5294..c5856cb 100644 --- a/marking_app/lib/pages/homework_correction/job_student_group.dart +++ b/marking_app/lib/pages/homework_correction/job_student_group.dart @@ -8,6 +8,7 @@ import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/job/job_student_goups.dart'; import 'package:marking_app/common/model/user/user_info.dart'; import 'package:marking_app/components/ReturnToHomepage.dart'; +import 'package:marking_app/pages/homework_correction/widget/student_group_list.dart'; import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart'; import 'package:marking_app/utils/fast_data.dart'; @@ -57,6 +58,10 @@ class _JobStudentGroupState extends State with CommonMixin { refreshController.finishRefresh(); } + void goNextPage(id,title){ + RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition()); + } + @override void dispose() { super.dispose(); @@ -94,136 +99,7 @@ class _JobStudentGroupState extends State with CommonMixin { onRefresh: () async{ getStudentGroups(); }, - child: studentGroups != null && studentGroups.length > 0 - ? isPadFlag?GridView( - gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - mainAxisSpacing: 10.r, - crossAxisSpacing: 10.r, - childAspectRatio: 556 / 112, - ), - children: List.generate(studentGroups.length, (index) { - JobStudentGroups item = studentGroups[index]; - String classNames = item.classNames.join(" "); - 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)), - ), - ), - 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, - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(20.r)), - color: Color(0xFF6888FD), - ), - child: Center( - child: Text( - '设置', - style: TextStyle( - fontSize: 10.sp, color: Colors.white), - ), - ), - ) - ], - ), - ), - ); - }), - ):ListView.builder( - itemBuilder: (context,index){ - JobStudentGroups item = studentGroups[index]; - String classNames = item.classNames.join(" "); - return Container( - padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r), - margin: EdgeInsets.only(bottom: 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: 14.sp, color: Color(0xFF6888FD)), - ), - ), - Expanded( - child: Text( - classNames, - style: TextStyle( - fontSize: 12.sp, - color: Color(0xFF999999), - overflow: TextOverflow.ellipsis, - ), - textAlign: TextAlign.end, - ), - ), - InkWell( - onTap: (){ - RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition()); - }, - child: Container( - margin: EdgeInsets.only(left: 5.r), - height: 24.r, - width: 55.r, - decoration: BoxDecoration( - borderRadius: - BorderRadius.all(Radius.circular(20.r)), - color: Color(0xFF6888FD), - ), - child: Center( - child: Text( - '设置', - style: TextStyle( - fontSize: 10.sp, color: Colors.white), - ), - ), - ), - ) - ], - ), - ); - }, - itemCount: studentGroups.length, - ) - : Padding( - padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r), - child: MyEmptyWidget(), - ), + child: StudentGroupList(studentGroups,goNextPage), ), ), ); diff --git a/marking_app/lib/pages/homework_correction/widget/student_group_list.dart b/marking_app/lib/pages/homework_correction/widget/student_group_list.dart new file mode 100644 index 0000000..10f4fec --- /dev/null +++ b/marking_app/lib/pages/homework_correction/widget/student_group_list.dart @@ -0,0 +1,149 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +import 'package:marking_app/common/model/job/job_student_goups.dart'; +import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart'; +import 'package:marking_app/utils/index.dart'; + +class StudentGroupList extends StatelessWidget { + final List studentGroups; + final Function goNextPage; + const StudentGroupList(this.studentGroups,this.goNextPage,{Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return studentGroups != null && studentGroups.length > 0 + ? isPad()?GridView( + shrinkWrap: true, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 10.r, + crossAxisSpacing: 10.r, + childAspectRatio: 556 / 112, + ), + children: List.generate(studentGroups.length, (index) { + JobStudentGroups item = studentGroups[index]; + String classNames = item.classNames.join(" "); + return InkWell( + onTap: (){ + goNextPage(item.groupId,item.groupName); + // 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)), + ), + ), + 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, + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(20.r)), + color: Color(0xFF6888FD), + ), + child: Center( + child: Text( + '详情', + style: TextStyle( + fontSize: 10.sp, color: Colors.white), + ), + ), + ) + ], + ), + ), + ); + }), + ):ListView.builder( + shrinkWrap: true, + itemBuilder: (context,index){ + JobStudentGroups item = studentGroups[index]; + String classNames = item.classNames.join(" "); + return Container( + padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r), + margin: EdgeInsets.only(bottom: 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: 14.sp, color: Color(0xFF6888FD)), + ), + ), + Expanded( + child: Text( + classNames, + style: TextStyle( + fontSize: 12.sp, + color: Color(0xFF999999), + overflow: TextOverflow.ellipsis, + ), + textAlign: TextAlign.end, + ), + ), + InkWell( + onTap: (){ + goNextPage(item.groupId,item.groupName); + // RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition()); + }, + child: Container( + margin: EdgeInsets.only(left: 5.r), + height: 24.r, + width: 55.r, + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(20.r)), + color: Color(0xFF6888FD), + ), + child: Center( + child: Text( + '详情', + style: TextStyle( + fontSize: 10.sp, color: Colors.white), + ), + ), + ), + ) + ], + ), + ); + }, + itemCount: studentGroups.length, + ) + : Padding( + padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r), + child: MyEmptyWidget(), + ); + } +} diff --git a/marking_app/lib/routes/RouterManager.dart b/marking_app/lib/routes/RouterManager.dart index 409bad8..21516c5 100644 --- a/marking_app/lib/routes/RouterManager.dart +++ b/marking_app/lib/routes/RouterManager.dart @@ -309,7 +309,8 @@ class RouterManager { static final _jobPriorityReviewSetPageHandler = Handler( handlerFunc: (BuildContext? context, Map> params) { String groupId = params['groupId']![0]; - return JobPriorityReviewSet(groupId: groupId); + String title = params['title']![0]; + return JobPriorityReviewSet(groupId: groupId,title:title); }, ); diff --git a/marking_app/lib/utils/common_utils.dart b/marking_app/lib/utils/common_utils.dart index ce6ab22..19d129f 100644 --- a/marking_app/lib/utils/common_utils.dart +++ b/marking_app/lib/utils/common_utils.dart @@ -25,8 +25,8 @@ class CommonUtils { } /// 秒转时分秒 static String second2HMS(int sec, {bool isEasy = false}) { - String hms = "00:00:00"; - if (!isEasy) hms = "00时00分00秒"; + String hms = "0"; + if (!isEasy) hms = "0秒"; if (sec > 0) { int h = sec ~/ 3600; int m = (sec % 3600) ~/ 60;