From 42d2e4ab3944b971c63dfb4f296ef66f57b891d7 Mon Sep 17 00:00:00 2001 From: machuanyu <840649825@qq.com> Date: Mon, 15 Apr 2024 13:47:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=86=E5=8F=B2=E4=BD=9C=E4=B8=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/homework_correction/job_home.dart | 15 ++++-- .../job_knowledge_points_detail.dart | 2 +- .../job_priority_review_set.dart | 48 ++++++++++++++++--- .../job_student_group.dart | 5 +- marking_app/lib/routes/RouterManager.dart | 6 ++- 5 files changed, 61 insertions(+), 15 deletions(-) diff --git a/marking_app/lib/pages/homework_correction/job_home.dart b/marking_app/lib/pages/homework_correction/job_home.dart index b7d94a0..f82a76c 100644 --- a/marking_app/lib/pages/homework_correction/job_home.dart +++ b/marking_app/lib/pages/homework_correction/job_home.dart @@ -34,7 +34,9 @@ class _JobHomeState extends State with CommonMixin, EventBusMixin, Auto EntranceModel( title: '学生历史作业', image: '', - navigationUrl: '', + navigationUrl: RouterManager.jobStudentGroupPath, + page:'history', + ), EntranceModel( title: '知识点掌握', @@ -50,6 +52,7 @@ class _JobHomeState extends State with CommonMixin, EventBusMixin, Auto title: '优先批阅设定', image: '', navigationUrl: RouterManager.jobStudentGroupPath, + page:'set', ), EntranceModel( title: '批阅设置', @@ -143,7 +146,12 @@ class _JobHomeState extends State with CommonMixin, EventBusMixin, Auto return InkWell( onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () { - RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition()); + if(e.page != ''){ + RouterManager.router.navigateTo(context, '${e.navigationUrl}?page=${e.page}', transition: getTransition()); + }else{ + RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition()); + } + }), child: badges.Badge( showBadge: isJob && data > 0, @@ -188,5 +196,6 @@ class EntranceModel extends Object { String title; String image; String navigationUrl; - EntranceModel({required this.title, required this.image, required this.navigationUrl}); + String? page; + EntranceModel({required this.title, required this.image, required this.navigationUrl,this.page = ''}); } diff --git a/marking_app/lib/pages/homework_correction/job_knowledge_points_detail.dart b/marking_app/lib/pages/homework_correction/job_knowledge_points_detail.dart index 8506b57..9b71be4 100644 --- a/marking_app/lib/pages/homework_correction/job_knowledge_points_detail.dart +++ b/marking_app/lib/pages/homework_correction/job_knowledge_points_detail.dart @@ -145,7 +145,7 @@ class _JobKnowledgePointsDetailState extends State borderRadius: BorderRadius.all(Radius.circular(15.r))), content: Container( width: MediaQuery.of(context).size.width, - height: MediaQuery.of(context).size.height, + // height: MediaQuery.of(context).size.height, child: Image.network(paperImg), ), ); 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 ceb876a..ce7d6ff 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 @@ -16,8 +16,9 @@ import 'package:marking_app/utils/request/rest_client.dart'; class JobPriorityReviewSet extends StatefulWidget { final String groupId; final String title; + final String? page; - const JobPriorityReviewSet({Key? key, required this.groupId,required this.title}) + const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''}) : super(key: key); @override @@ -208,7 +209,16 @@ class _JobPriorityReviewSetState extends State color: Color(0xFF6888FD)), )), item.readLevel == 1 - ? InkWell( + ? + widget.page == 'history'?Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + color: Color(0xFF6888FD), + borderRadius: BorderRadius.all(Radius.circular(20.r)) + ), + child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), + ):InkWell( onTap: () { setState(() { isClicking = true; @@ -218,7 +228,7 @@ class _JobPriorityReviewSetState extends State EasyLoading.show( status: 'loading...'); }, - child: Container( + child:Container( height: 20.r, width: 70.r, decoration: BoxDecoration( @@ -246,7 +256,15 @@ class _JobPriorityReviewSetState extends State ), ), ) - : InkWell( + : widget.page == 'history'?Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + color: Color(0xFF6888FD), + borderRadius: BorderRadius.all(Radius.circular(20.r)) + ), + child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), + ):InkWell( onTap: () { setState(() { isClicking = true; @@ -256,7 +274,7 @@ class _JobPriorityReviewSetState extends State EasyLoading.show( status: 'loading...'); }, - child: Container( + child: Container( height: 20.r, width: 70.r, decoration: BoxDecoration( @@ -347,7 +365,15 @@ class _JobPriorityReviewSetState extends State color: Color(0xFF6888FD)), )), item.readLevel == 1 - ? InkWell( + ? widget.page == 'history'?Container( + height: 24.r, + width: 82.r, + decoration: BoxDecoration( + color: Color(0xFF6888FD), + borderRadius: BorderRadius.all(Radius.circular(20.r)) + ), + child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), + ):InkWell( onTap: () { setState(() { isClicking = true; @@ -385,7 +411,15 @@ class _JobPriorityReviewSetState extends State ), ), ) - : InkWell( + : widget.page == 'history'?Container( + height: 24.r, + width: 82.r, + decoration: BoxDecoration( + color: Color(0xFF6888FD), + borderRadius: BorderRadius.all(Radius.circular(20.r)) + ), + child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), + ):InkWell( onTap: () { setJobReadLevel( item.studentGroupDetailId, 1); 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 c5856cb..1690ce6 100644 --- a/marking_app/lib/pages/homework_correction/job_student_group.dart +++ b/marking_app/lib/pages/homework_correction/job_student_group.dart @@ -16,7 +16,8 @@ import 'package:marking_app/utils/index.dart'; import 'package:marking_app/utils/request/rest_client.dart'; class JobStudentGroup extends StatefulWidget { - const JobStudentGroup({Key? key}) : super(key: key); + final String page; + const JobStudentGroup({Key? key,required this.page}) : super(key: key); @override State createState() => _JobStudentGroupState(); @@ -59,7 +60,7 @@ class _JobStudentGroupState extends State with CommonMixin { } void goNextPage(id,title){ - RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition()); + RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition()); } @override diff --git a/marking_app/lib/routes/RouterManager.dart b/marking_app/lib/routes/RouterManager.dart index a2f6186..2ae466d 100644 --- a/marking_app/lib/routes/RouterManager.dart +++ b/marking_app/lib/routes/RouterManager.dart @@ -317,14 +317,16 @@ class RouterManager { handlerFunc: (BuildContext? context, Map> params) { String groupId = params['groupId']![0]; String title = params['title']![0]; - return JobPriorityReviewSet(groupId: groupId,title:title); + String? page = params['page']?[0]; + return JobPriorityReviewSet(groupId: groupId,title:title,page:page); }, ); //学生分组 static final _jobStudentGroupPageHandler = Handler( handlerFunc: (BuildContext? context, Map> params) { - return JobStudentGroup(); + String page = params['page']![0]; + return JobStudentGroup(page:page); }, ); //作业收藏页面