From 0c54c16865a4063a81e6a9b93839eaa832585ebf Mon Sep 17 00:00:00 2001 From: machuanyu <840649825@qq.com> Date: Tue, 16 Apr 2024 13:44:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=94=E9=A2=98=E8=BD=A8=E8=BF=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../answer_trajectory.dart | 378 ++++++++++++++++++ .../pages/homework_correction/job_home.dart | 2 +- .../job_priority_review_set.dart | 109 ++--- .../widget/student_group_list.dart | 272 +++++++------ marking_app/lib/routes/RouterManager.dart | 13 +- 5 files changed, 561 insertions(+), 213 deletions(-) create mode 100644 marking_app/lib/pages/homework_correction/answer_trajectory.dart diff --git a/marking_app/lib/pages/homework_correction/answer_trajectory.dart b/marking_app/lib/pages/homework_correction/answer_trajectory.dart new file mode 100644 index 0000000..206b17c --- /dev/null +++ b/marking_app/lib/pages/homework_correction/answer_trajectory.dart @@ -0,0 +1,378 @@ +import 'dart:convert'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_easyloading/flutter_easyloading.dart'; +import 'package:flutter_easyrefresh/easy_refresh.dart'; +import 'package:flutter_screenutil/flutter_screenutil.dart'; +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_goups.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'; +import 'package:marking_app/utils/index.dart'; +import 'package:marking_app/utils/request/rest_client.dart'; + +class AnswerTrajectory extends StatefulWidget { + const AnswerTrajectory({Key? key}) : super(key: key); + + @override + State createState() => _AnswerTrajectoryState(); +} + +class _AnswerTrajectoryState extends State with CommonMixin,SingleTickerProviderStateMixin{ + late final EasyRefreshController refreshController; + late String loginName; + List studentGroups = []; + late TabController tabController; + int tabIndex = 0; + + @override + void initState() { + super.initState(); + refreshController = EasyRefreshController(); + tabController = + TabController(initialIndex: tabIndex, length: 2, vsync: this); + FastData fastData = FastData.getInstance(); + fastData.getUser().then((value) { + if (value == null || value == '') return; + Map userInfo = json.decode(value); + setState(() { + loginName = userInfo['loginName']; + }); + getStudentGroups(); + print(userInfo); + }); + } + + void getStudentGroups() async { + RestClient _client = await getClient(); + BaseStructureResult> res = + await _client.getJobLevelStudentGroups(loginName); + setState(() { + if(res.code == 200){ + studentGroups = res.data!; + }else{ + studentGroups = []; + } + + }); + refreshController.finishRefresh(); + EasyLoading.dismiss(); + } + + void goNextPage(id,title){ + RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=answerTrajectory',transition: getTransition()); + } + + @override + void dispose() { + super.dispose(); + refreshController.dispose(); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Color.fromRGBO(245, 245, 245, 1), + appBar: AppBar( + backgroundColor: Colors.white, + title: Text( + '答题轨迹', + style: TextStyle(fontSize: 16.sp, color: Color(0xFF333333)), + ), + centerTitle: true, + leading: IconButton( + icon: Icon(Icons.arrow_back_ios, color: Colors.black), + onPressed: () => Navigator.of(context).pop(), + ), + actions: [ + ReturnToHomepage(), + ], + ), + body: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + SizedBox( + height: 10.r, + ), + Container( + padding: EdgeInsets.symmetric(horizontal: 14.r), + decoration: BoxDecoration( + border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC))) + ), + child: TabBar( + onTap: (int val) { + print(val); + setState(() { + tabIndex = val; + }); + EasyLoading.show(status: 'loading...'); + getStudentGroups(); + }, + tabs: [ + SizedBox( + width: (MediaQuery.of(context).size.width - 28.r) /2, + child: Tab( + text: '按学生', + ), + ), + SizedBox( + width: (MediaQuery.of(context).size.width - 28.r) /2, + child: Tab( + text: '按作业', + ), + ) + ], + controller: tabController, + unselectedLabelStyle: TextStyle( + fontSize: 14.sp, color:Color(0xFF666666)), + labelStyle: TextStyle( + fontSize: 14.sp, + color: Color(0xFF6888FD), + ), + isScrollable: true, + labelColor: Color(0xFF6888FD), + unselectedLabelColor: Color(0xFF666666), + indicatorSize: TabBarIndicatorSize.label, + labelPadding: const EdgeInsets.all(0), + ), + ), + Expanded( + child: Padding( + padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r), + child: EasyRefresh( + firstRefresh: false, + taskIndependence: true, + controller: refreshController, + header: MaterialHeader(), + footer: TaurusFooter(), + onRefresh: () async{ + getStudentGroups(); + }, + child: + + tabIndex == 0?StudentGroupList(studentGroups,goNextPage, rightBtn:Container( + margin: EdgeInsets.only(left: 5.r), + height: 20.r, + width: 55.r, + decoration: BoxDecoration( + borderRadius: + BorderRadius.all(Radius.circular(20.r)), + border: Border.all(width: 1.r,color: Color(0xFFFF9800)), + ), + child: Center( + child: Text( + '详情', + style: TextStyle( + fontSize: 10.sp, color: Color(0xFFFF9800)), + ), + ), + )): + MyEmptyWidget() + /*Container( + 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:Colors.white), + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Container( + width: 32.w, + height: 18.h, + alignment: Alignment.center, + padding: EdgeInsets.only(left: 2.w), + decoration: BoxDecoration( + color: const Color.fromRGBO(104, 136, 253, 1), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(14.r), + topRight: Radius.circular(3.r), + bottomLeft: Radius.circular(4.r), + bottomRight: Radius.circular(4.r), + ), + ), + margin: EdgeInsets.only(right: 4.w), + child: Text( + '作业', + style: TextStyle(fontSize: 10.sp, color: Colors.white), + ), + ), + Expanded( + child: Text( + '解析几何小题', + style: TextStyle(fontSize: 12.sp, color: Color(0xFF464646)), + )), + // SizedBox(width: 5.r,), + // Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),), + + Container( + width: 40.r, + height: 20.r, + decoration: BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(4.r)), + border: Border.all(width: 1.r, color: Color(0xFF4CC793)), + ), + child: Center( + child: Text( + '数学', + style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), + )), + ), + ], + ), + SizedBox( + height: 10.r, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '客:', + style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), + ), + SizedBox( + width: 5.r, + ), + *//* item.objectiveDtls.length > 0 + ? + Expanded( + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.start, + spacing: 8, + runSpacing: 5, + children: List.generate(1, (i) { + SubjectiveDtls subjective = item.objectiveDtls[i]; + return Container( + width: 20.r, + height: 20.r, + decoration: BoxDecoration( + color: Colors.transparent, + border: Border.all( + width: 1.r, + color: subjective.state == 0 + ? Color(0xFFDDDDDD) + : subjective.state == 3 + ? Color(0xFF666666) + : subjective.state == 1 + ? Color(0xFFFF7474) + : Color(0xFF4CC793)), + borderRadius: BorderRadius.all(Radius.circular(10.r))), + child: Center( + child: Text( + subjective.questionNo, + style: TextStyle( + fontSize: 10.r, + color: subjective.state == 0 + ? Color(0xFFDDDDDD) + : subjective.state == 3 + ? Color(0xFF666666) + : subjective.state == 1 + ? Color(0xFFFF7474) + : Color(0xFF4CC793)), + )), + ); + }), + ), + ) + : Text( + '无', + style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), + ),*//* + ], + ), + SizedBox( + height: 10.r, + ), + Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '主:', + style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), + ), + SizedBox( + width: 5.r, + ), + *//* item.subjectiveDtls.length > 0 + ? Expanded( + child: Wrap( + direction: Axis.horizontal, + alignment: WrapAlignment.start, + spacing: 8, + runSpacing: 5, + children: List.generate(item.subjectiveDtls.length, (i) { + SubjectiveDtls subjective = item.subjectiveDtls[i]; + return Container( + width: 20.r, + height: 20.r, + decoration: BoxDecoration( + color: Colors.transparent, + border: Border.all( + width: 1.r, + color: subjective.state == 0 + ? Color(0xFFDDDDDD) + : subjective.state == 3 + ? Color(0xFF666666) + : subjective.state == 1 + ? Color(0xFFFF7474) + : Color(0xFF4CC793)), + borderRadius: BorderRadius.all(Radius.circular(10.r))), + child: Center( + child: Text( + subjective.questionNo, + style: TextStyle( + fontSize: 10.r, + color: subjective.state == 0 + ? Color(0xFFDDDDDD) + : subjective.state == 3 + ? Color(0xFF666666) + : subjective.state == 1 + ? Color(0xFFFF7474) + : Color(0xFF4CC793)), + )), + ); + }), + ), + ) + : Text( + '无', + style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)), + ),*//* + ], + ), + SizedBox(height: 10.r,), + Center( + child: Container( + width: 142.r, + height: 25.r, + decoration: BoxDecoration( + border: Border.all(width: 1.r,color: Color(0xFFFFA41E)), + borderRadius: BorderRadius.circular(20.r), + ), + child: Center( + child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E)),), + ), + ), + ) + ], + ), + )*/, + ), + ), + ), + ], + ), + ); + } +} diff --git a/marking_app/lib/pages/homework_correction/job_home.dart b/marking_app/lib/pages/homework_correction/job_home.dart index f82a76c..a92cec4 100644 --- a/marking_app/lib/pages/homework_correction/job_home.dart +++ b/marking_app/lib/pages/homework_correction/job_home.dart @@ -46,7 +46,7 @@ class _JobHomeState extends State with CommonMixin, EventBusMixin, Auto EntranceModel( title: '答题轨迹', image: '', - navigationUrl: '', + navigationUrl: RouterManager.answerTrajectoryPath, ), EntranceModel( title: '优先批阅设定', 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 ce7d6ff..1e4585b 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 @@ -208,9 +208,17 @@ class _JobPriorityReviewSetState extends State fontSize: 12.sp, color: Color(0xFF6888FD)), )), - item.readLevel == 1 - ? - widget.page == 'history'?Container( + + widget.page == 'answerTrajectory'?Container( + height: 20.r, + width: 70.r, + decoration: BoxDecoration( + border: Border.all(width: 1.r,color: Color(0xFFFFA41E)), + borderRadius: BorderRadius.all(Radius.circular(20.r)), + + ), + child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))), + )):widget.page == 'history'?Container( height: 20.r, width: 70.r, decoration: BoxDecoration( @@ -218,7 +226,9 @@ class _JobPriorityReviewSetState extends State borderRadius: BorderRadius.all(Radius.circular(20.r)) ), child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), - ):InkWell( + ): item.readLevel == 1 + ? + InkWell( onTap: () { setState(() { isClicking = true; @@ -256,15 +266,7 @@ class _JobPriorityReviewSetState extends State ), ), ) - : 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( + :InkWell( onTap: () { setState(() { isClicking = true; @@ -302,34 +304,6 @@ class _JobPriorityReviewSetState extends State ), ), ), - /* 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)), - ), - ), - ), - )*/ ], ), ), @@ -364,8 +338,16 @@ class _JobPriorityReviewSetState extends State fontSize: 12.sp, color: Color(0xFF6888FD)), )), - item.readLevel == 1 - ? widget.page == 'history'?Container( + widget.page == 'answerTrajectory'?Container( + height: 24.r, + width: 72.r, + decoration: BoxDecoration( + border: Border.all(width: 1.r,color: Color(0xFFFFA41E)), + borderRadius: BorderRadius.all(Radius.circular(20.r)), + + ), + child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))), + )):widget.page == 'history'?Container( height: 24.r, width: 82.r, decoration: BoxDecoration( @@ -373,7 +355,8 @@ class _JobPriorityReviewSetState extends State borderRadius: BorderRadius.all(Radius.circular(20.r)) ), child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)), - ):InkWell( + ):item.readLevel == 1 + ? InkWell( onTap: () { setState(() { isClicking = true; @@ -411,15 +394,7 @@ class _JobPriorityReviewSetState extends State ), ), ) - : 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( + : InkWell( onTap: () { setJobReadLevel( item.studentGroupDetailId, 1); @@ -454,34 +429,6 @@ class _JobPriorityReviewSetState extends State ), ), ), - /* 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)), - ), - ), - ), - )*/ ], ), ), 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 index 10f4fec..4af8df9 100644 --- a/marking_app/lib/pages/homework_correction/widget/student_group_list.dart +++ b/marking_app/lib/pages/homework_correction/widget/student_group_list.dart @@ -7,143 +7,155 @@ 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); + final Widget? rightBtn; + + const StudentGroupList(this.studentGroups, this.goNextPage, + {Key? key,this.rightBtn}) + : 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)), - ), + ? isPad() + ? GridView( + shrinkWrap: true, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 2, + mainAxisSpacing: 10.r, + crossAxisSpacing: 10.r, + childAspectRatio: 556 / 112, ), - Expanded( - child: Text( - classNames, - style: TextStyle( - fontSize: 10.sp, - color: Color(0xFF999999), - overflow: TextOverflow.ellipsis, + 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, + ), + ), + rightBtn != null + ? rightBtn! + : 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), + ), + ), + ) + ], + ), ), - 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), - ), - ), - ), + ); + }), + ) + : ListView.builder( + shrinkWrap: true, + itemBuilder: (context, 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(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, + ), + ), + rightBtn != null + ? rightBtn! + : 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, ) - ], - ), - ); - }, - itemCount: studentGroups.length, - ) : Padding( - padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r), - child: MyEmptyWidget(), - ); + 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 2ae466d..0b0a0f0 100644 --- a/marking_app/lib/routes/RouterManager.dart +++ b/marking_app/lib/routes/RouterManager.dart @@ -13,6 +13,7 @@ import 'package:fluro/fluro.dart'; import 'package:flutter/material.dart'; import 'package:marking_app/common/model/enum/marking_list_type.dart'; import 'package:marking_app/pages/common/startUpPage.dart'; +import 'package:marking_app/pages/homework_correction/answer_trajectory.dart'; import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart'; import 'package:marking_app/pages/homework_correction/index.dart'; import 'package:marking_app/pages/homework_correction/job_knowledge_points.dart'; @@ -84,7 +85,7 @@ class RouterManager { static const String reportHistoryPath = '/report_detail/report_history'; static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points'; static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail'; - + static const String answerTrajectoryPath = '/homework_correction/answer_trajectory'; // TheMine static final FluroRouter router = FluroRouter(); @@ -395,6 +396,15 @@ class RouterManager { return JobKnowledgePointsDetail(knowledgeName:knowledgeName,knowledgeId:knowledgeId); }, ); + +//答题轨迹 + static final _answerTrajectoryPathHandler = Handler( + handlerFunc: (BuildContext? context, Map> params) { + return AnswerTrajectory(); + }, + ); + + // 开始阅卷页面 // static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map> params) => MarkingPapers()); @@ -444,6 +454,7 @@ class RouterManager { router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material); router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material); router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material); + router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material); // getTransition()