From ec9a94f1ea7073a1f4c51ce17fe72b10143994a4 Mon Sep 17 00:00:00 2001 From: machuanyu <840649825@qq.com> Date: Thu, 10 Oct 2024 09:46:58 +0800 Subject: [PATCH] -- --- .../assets/images/youx_icon_active.png | Bin 1258 -> 657 bytes .../lib/common/job/homework_details.dart | 5 +- .../page/global_widget/show_student_list.dart | 7 +- .../annotate_class/widget/annotate_item.dart | 68 ++-- .../widget/completed_annotate_item.dart | 13 +- .../annotate_class/widget/item_btn.dart | 7 +- .../answer_trajectory_view.dart | 10 +- .../widget/answer_trajectory_job.dart | 38 +-- .../answer_trajectory_detail_logic.dart | 1 + .../answer_trajectory_detail_state.dart | 1 + .../answer_trajectory_detail_view.dart | 18 +- .../class_student/class_student_view.dart | 17 +- .../fav_student/fav_student_view.dart | 6 +- .../widget/favorite_student_dialog.dart | 2 +- .../children/job_report/job_report_logic.dart | 1 + .../children/job_report/job_report_state.dart | 1 + .../children/job_report/job_report_view.dart | 8 +- .../job_report/widget/knowledge_point.dart | 7 +- .../children/job_report/widget/top_count.dart | 186 +++++++---- .../knowledge_points_grasp_view.dart | 11 +- .../knowledge_points_grasp_detail_logic.dart | 1 + .../knowledge_points_grasp_detail_state.dart | 1 + .../knowledge_points_grasp_detail_view.dart | 7 +- .../quick_data_check_logic.dart | 1 + .../quick_data_check_state.dart | 1 + .../quick_data_check_view.dart | 10 +- .../widget/kgt_zgt_table.dart | 6 +- .../widget/quick_data_check_bottom.dart | 4 +- .../widget/quick_student_data_table.dart | 4 +- .../quick_data_check/widget/report_table.dart | 39 +-- .../children/read_over/read_over_view.dart | 2 +- .../read_over/widget/annotate_list.dart | 75 +++-- .../read_over/widget/task_list_item.dart | 305 +++++++++--------- .../student_personal_logic.dart | 1 + .../student_personal_state.dart | 1 + .../student_personal_view.dart | 2 +- .../student_work_detail_view.dart | 53 ++- .../widget/personal_detail_topbar.dart | 6 +- .../home_page/widget/student_group_list.dart | 8 +- 39 files changed, 504 insertions(+), 430 deletions(-) diff --git a/making_school_asignment_app/assets/images/youx_icon_active.png b/making_school_asignment_app/assets/images/youx_icon_active.png index 9a75b84fa5935134bc84434b1ee8a4d186edc8be..7e2c8821cc5d8cf681d38c1d201f99d1370a4951 100644 GIT binary patch delta 618 zcmV-w0+s#h36TXMiBL{Q4GJ0x0000DNk~Le0000V0000V2nGNE03WUvIgueWe*z{+ zL_t(|0qs^hEObE>{>J|&yQ{E&evb-~coaw^Dy#Bn2#F{tJ-Y4K1TA`k3Q3tq4KkQLHiNp1s*&->fCEUvhWO?94si`Och~JHT&+pq~k+lt?oa;aL{G z5gGCfd4~KA3d^~*WCK+W?vt$}erO_D^|oCOZ-l?gWtKo;r`Pjl2>k| zvK_cM=5yGpl-^ydOmqRy%AwW9^JvVy&SUftOq(8y4aqAf1*DANJK&bSe*&c5yBnHU z+sp)%YWsiS(hs!uvf}3l4q$UBNpkmEsE7!qHNfdX_`KCQZp&(TnO5h4mLA~9qk=y{ zR3yCBa)Rsa)5uAw4q77LVfecpPDDi9g42ogR8x_W(!DLV>)W}=yq?e;s(x$s2iM#L zZK*4N$T1ZcIW~hSC;~j|e_WU*s9#yfJ7Q-!vfsFu33D$~;iM9DnTV@A)ucLpz}YUa zkM!f*R6dS0Lk2KtkPpp@6`95WW&^$eg09N}bh;FAupf>| zr|eVBsLDnOQiqv8R*bo(#jO@hWCXJ?rp#V^0;Ki@=pUXFI}yfWK;x5H2veIBIbmv0 z{tG-ASr|xUek`@`<|PhV3gvV=Ru+WBN|p`%(bVdA1(?mN`xDsyvj6}907*qoM6N<$ Eg06%dxc~qF delta 1224 zcmV;(1ULJU1?mYQiBL{Q4GJ0x0000DNk~Le0000s0000t2nGNE07n_Qc#$DAe*}L? zL_t(|0qvPjOcYlf$A52U3(6MKHbQGkQoyGFqSd_=Fl}lJCsT{wS`HRcduSp8*LnaB zZLcdm^q@_(hxXWQk((;qby;G zcy+<~_PSTq-g>VXN8i{>pEtgjKOflENn>q?sa(nu_S3F|t3Il^W($4)&H>uN;zoCT zMkkU7)p0RiuCAlDms+Tyx|V__PCn_Ve_MHFHZxyvFSEQv-~9VKea9lPe;uDYPk-LL zR4`5(1p@oGb*N))2z_qmD!*kNTwX{GN?#JqcY{npDJL=z3 zMu0GEAYoLg{kwII1i{_h!7xfWe|Q##kLu2a(Cwu~l~>xj+S(X{kb*ZdE05GQwKoZvVWE=$ znMDPOXJLn4dw*53BQ$h)z%vm2?f>I+jEjfW8=4w6z?nP$u_2yRQ8Rk(?Ins1yzhi3 zVF){H7w*ndEAOqeB(^9oJy?EJa-Of6J}6l&0jjGV$lXI1e<3G4e+fec{O$VRJo%!n zum%pn*@yFv^PFH$CXAN)?3KWlRQZo9QvOTPnKRT?2XA|6 ztc!fIYq&sHP~^^xe?w8|ZfsSn88-wX4Al_UoZw1lM?>!8tsr!d#$6+aj9tqRLORT!Bqo>^H^Lb|r@R2#r5Mbp{vq~hr+XcvML^Ou$Qf38<{7F>4&{@NnRBdCf4 zoHJPHqP)YJ*4$G6b;+$nfb~8+?WQ%D3kFs%Zp*zdVfv%JylB1g6^d#NxIqPJDnAW` zjR*@9G)+-M(sYbu_792}S<0S^#W!VBLehPT5LKco6-y@v?~{;&6cw^Gl5YQcPUv%P z)Wf_Rq7Wk`f1MiN-PeO-VZOoQ_6QO`^N%b|6e5sHSrQ}TyAP-G*X#y{%6mdg$E9%q z;kW8?vGMySe{5Qzm9rb%dn2dY`-bgq2y$TG)aU?Z#gG*A0&NgDUFO)}y)5dlVq+Xv z9%F4sQig~px#^Yn(`-OwB^@(1C6c8?0Y{IS**7`bf5WyIdKTg7#!F^Atrf@GkDN5f z_-MVo=hjPRJbBE_db9?VacNNR>DIn9dBnFc&6>3aDbK|>*X~azdwnhU$`%HKYz=nJ z*4I1~AgVRUSif(9@RE40$J%WD5U4N!?=8#aVV?O5x6cISrB!p%8leRWAwIP8pehU` mFYyPY9*xblC;jG9F&+bH{M%WY&y*1W0000 dtls; - HomeworkDetails(this.questions,this.knows,this.students,this.dtls); + @JsonKey(name: 'subject') + int? subject; + + HomeworkDetails(this.questions,this.knows,this.students,this.dtls,this.subject); factory HomeworkDetails.fromJson(Map srcJson) => _$HomeworkDetailsFromJson(srcJson); diff --git a/making_school_asignment_app/lib/page/global_widget/show_student_list.dart b/making_school_asignment_app/lib/page/global_widget/show_student_list.dart index ebc4d09..7e995e3 100644 --- a/making_school_asignment_app/lib/page/global_widget/show_student_list.dart +++ b/making_school_asignment_app/lib/page/global_widget/show_student_list.dart @@ -9,7 +9,8 @@ class ShowStudentList extends StatelessWidget { final String title; final String homeworkId; final List studentList; - const ShowStudentList({Key? key, required this.title, required this.studentList, required this.homeworkId}) : super(key: key); + final int subject; + const ShowStudentList({Key? key, required this.title, required this.studentList, required this.homeworkId,required this.subject}) : super(key: key); @override Widget build(BuildContext context) { @@ -44,12 +45,12 @@ class ShowStudentList extends StatelessWidget { children: studentList.map((e) { return InkWell( onTap: () { - Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': e.studentId, 'homeworkId': homeworkId}); + Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': e.studentId, 'homeworkId': homeworkId,'subject':subject}); }, child: Container( padding: EdgeInsets.symmetric(vertical: 4.r, horizontal: 8.r), decoration: BoxDecoration( - color: e.state == 3 ? Color(0xFF4CC793) : Color(0xFFE2E2E2), + color: e.state == 3 ? Color(0xFF4CC793) : Color(0xFFF0ECFF), borderRadius: BorderRadius.circular(4.r), ), child: quickText(e.studentName, color: e.state == 3 ? Colors.white : Color(0xFF505E6E), size: 10.sp), diff --git a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/annotate_item.dart b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/annotate_item.dart index 1b721a9..6ce64c0 100644 --- a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/annotate_item.dart +++ b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/annotate_item.dart @@ -46,7 +46,7 @@ class _AnnotateItemState extends State { height: 27.r, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: const Color(0xFF4CC793), + color: Theme.of(context).primaryColor, ), child: const Center( child: Text( @@ -157,6 +157,7 @@ class _AnnotateItemState extends State { widget.logic.getAllCorrect(widget.item.classId); } }, + bgColor: Theme.of(context).primaryColor, ), ), const Expanded( @@ -196,55 +197,56 @@ class _AnnotateItemState extends State { ), ), Padding( - padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r), - child: Row( - children: [ - Expanded( - child: LinearPercentIndicator( - padding: EdgeInsets.zero, - animation: true, - lineHeight: 8.h, - animationDuration: 2500, + padding: EdgeInsets.only(top: 10.r,left: 14.r,right: 14.r), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + quickText('批阅进度', size: widget.font - 2.sp, color: const Color(0xFF8E8E8E)), + quickText('${widget.item.annotateRate}%', size: widget.font + 10.sp, color: const Color(0xFF464646)) + ], + ),), + Padding( + padding: EdgeInsets.only(top: 0.r, left: 14.r,right: 14.r,bottom: 10.r), + child: LinearPercentIndicator( + padding: EdgeInsets.zero, + animation: true, + lineHeight: 8.h, + animationDuration: 2500, - percent: widget.item.annotateRate / 100, - linearGradient: LinearGradient( - tileMode: TileMode.mirror, - stops: const [0.0, 1.0], - colors: widget.item.annotateRate / 100 != 1 - ? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor] - : [ - const Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1), - const Color.fromRGBO(144, 224, 190, 1), - ], - ), - // linearStrokeCap: LinearStrokeCap.butt, - // progressColor: Theme.of(context).primaryColor, - backgroundColor: const Color.fromRGBO(232, 232, 232, 1), - barRadius: Radius.circular(10.r), - ), - ), - SizedBox(width: 7.w), - quickText('${widget.item.annotateRate}%', size: widget.font - 2.sp, color: const Color.fromRGBO(70, 70, 70, 1)) - ], + percent: widget.item.annotateRate / 100, + linearGradient: LinearGradient( + tileMode: TileMode.mirror, + stops: const [0.0, 1.0], + colors: widget.item.annotateRate / 100 != 1 + ? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor] + : [ + const Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1), + const Color.fromRGBO(144, 224, 190, 1), + ], + ), + // linearStrokeCap: LinearStrokeCap.butt, + // progressColor: Theme.of(context).primaryColor, + backgroundColor: const Color.fromRGBO(232, 232, 232, 1), + barRadius: Radius.circular(10.r), ), ), ProgressBar( title: '客观题正确率:', - color: const Color(0xFF4CC793), + color: const Color(0xFFADDCA5), percent: widget.item.kgtCorrectRate / 100, marginEdg: EdgeInsets.zero, padingEdg: EdgeInsets.only(top: 8.h, left: 14.r, right: 14.r), fontSize: widget.font - 2.sp), ProgressBar( title: '主观题正确率:', - color: const Color(0xFF4CC793), + color: const Color(0xFFADDCA5), percent: widget.item.zgtCorrectRate / 100, padingEdg: EdgeInsets.symmetric(horizontal: 10.r), marginEdg: EdgeInsets.only(top: 8.h), fontSize: widget.font - 2.sp), ProgressBar( title: '总正确率:', - color: const Color(0xFF4CC793), + color: const Color(0xFFADDCA5), percent: widget.item.correctRate / 100, padingEdg: EdgeInsets.symmetric(horizontal: 10.r), marginEdg: EdgeInsets.only(top: 8.h), diff --git a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/completed_annotate_item.dart b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/completed_annotate_item.dart index 2236cf4..a71bbc3 100644 --- a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/completed_annotate_item.dart +++ b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/completed_annotate_item.dart @@ -24,6 +24,7 @@ class CompletedAnnotateItem extends StatelessWidget { title: '${taskItem.className ?? ''} ${submitted ? '已提交' : '未提交'}作业学生', studentList: students, homeworkId: logic.state.homeworkId.value, + subject:logic.state.subject, ); }, ); @@ -43,13 +44,13 @@ class CompletedAnnotateItem extends StatelessWidget { decoration: BoxDecoration( border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)), ), - child: quickText(taskItem.className, color: Color(0xFF4CC793), size: 12.sp), + child: quickText(taskItem.className, color: Theme.of(context).primaryColor, size: 12.sp), ), Column( mainAxisSize: MainAxisSize.min, children: [ ProgressBar( - color: const Color.fromRGBO(76, 199, 147, 1), + color: const Color(0xFFADDCA5), percent: taskItem.kgtCorrectRate / 100, title: '客观题正确率:', padingEdg: EdgeInsets.only(left: 10.w, right: 10.w), @@ -58,7 +59,7 @@ class CompletedAnnotateItem extends StatelessWidget { marginEdg: EdgeInsets.only(top: 5.h), ), ProgressBar( - color: const Color.fromRGBO(76, 199, 147, 1), + color: const Color(0xFFADDCA5), percent: taskItem.zgtCorrectRate / 100, title: '主观题正确率:', fontSize: 8.sp, @@ -67,7 +68,7 @@ class CompletedAnnotateItem extends StatelessWidget { marginEdg: EdgeInsets.only(top: 5.h), ), ProgressBar( - color: const Color.fromRGBO(76, 199, 147, 1), + color: const Color(0xFFADDCA5), percent: taskItem.correctRate / 100, title: '总正确率:', fontSize: 8.sp, @@ -86,7 +87,7 @@ class CompletedAnnotateItem extends StatelessWidget { Expanded( flex: 4, child: Material( - color: Color.fromRGBO(244, 244, 244, 1), + color: Theme.of(context).primaryColor, borderRadius: BorderRadius.circular(16.r), child: InkWell( onTap: () { @@ -101,7 +102,7 @@ class CompletedAnnotateItem extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(20.r), ), - child: quickText('已提交:${taskItem.commitStudentCount}', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), + child: quickText('已提交:${taskItem.commitStudentCount}', size: 8.sp, color: Colors.white), ), ), ), diff --git a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/item_btn.dart b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/item_btn.dart index de8edfc..0577a75 100644 --- a/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/item_btn.dart +++ b/making_school_asignment_app/lib/page/home_page/children/annotate_class/widget/item_btn.dart @@ -4,8 +4,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart'; class ItemBtn extends StatelessWidget { final String title; final double font; + final Color? bgColor; final Function? clickFunction; - const ItemBtn({Key? key,required this.title,required this.font,this.clickFunction}) : super(key: key); + const ItemBtn({Key? key,required this.title,required this.font,this.clickFunction,this.bgColor}) : super(key: key); @override Widget build(BuildContext context) { @@ -18,7 +19,7 @@ class ItemBtn extends StatelessWidget { const Color(0xFFE8E8E8)), backgroundColor: WidgetStateProperty.all( - const Color(0xFFF4F4F4)), + bgColor??const Color(0xFFF4F4F4)), // foregroundColor: MaterialStateProperty.all(Colors.red.shade200),//文字颜色 shape: WidgetStateProperty.all( RoundedRectangleBorder( @@ -37,7 +38,7 @@ class ItemBtn extends StatelessWidget { title, style: TextStyle( fontSize: font, - color: const Color(0xFF666666)), + color: bgColor != null?Colors.white:const Color(0xFF666666)), )), ); } diff --git a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/answer_trajectory_view.dart b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/answer_trajectory_view.dart index 5675426..a6f5606 100644 --- a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/answer_trajectory_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/answer_trajectory_view.dart @@ -59,7 +59,7 @@ class _AnswerTrajectoryPageState extends State { tabAlignment: TabAlignment.start, indicator: const UnderlineTabIndicator( borderSide: BorderSide( - color: const Color(0xFF4CC793), + color: Color(0xFF8C68FF), ), ), @@ -97,10 +97,10 @@ class _AnswerTrajectoryPageState extends State { TextStyle(fontSize: 14.sp, color: Color(0xFF666666)), labelStyle: TextStyle( fontSize: 14.sp, - color: Color(0xFF4CC793), + color: Color(0xFF8C68FF), ), isScrollable: true, - labelColor: Color(0xFF4CC793), + labelColor: Color(0xFF8C68FF), unselectedLabelColor: Color(0xFF666666), indicatorSize: TabBarIndicatorSize.label, labelPadding: const EdgeInsets.all(0), @@ -133,13 +133,13 @@ class _AnswerTrajectoryPageState extends State { borderRadius: BorderRadius.all(Radius.circular(20.r)), border: Border.all( - width: 1.r, color: Color(0xFFFF9800)), + width: 1.r, color: Color(0xFF7EB752)), ), child: Center( child: Text( '详情', style: TextStyle( - fontSize: 10.sp, color: Color(0xFFFF9800)), + fontSize: 10.sp, color: Color(0xFF7EB752)), ), ), )), diff --git a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/widget/answer_trajectory_job.dart b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/widget/answer_trajectory_job.dart index a8e2a4e..2b8b756 100644 --- a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/widget/answer_trajectory_job.dart +++ b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory/widget/answer_trajectory_job.dart @@ -30,7 +30,7 @@ class AnswerTrajectoryJob extends StatelessWidget { Items item = jobList[index]; return InkWell( onTap: () { - Get.toNamed(Routes.answerTrajectoryDetailPage,arguments: {'homeworkId':item.id,'title':item.name,'grade':item.grade}); + Get.toNamed(Routes.answerTrajectoryDetailPage,arguments: {'homeworkId':item.id,'title':item.name,'grade':item.grade,'subject':item.subject}); }, child: Container( padding: EdgeInsets.only(top: 10.h), @@ -58,17 +58,13 @@ class AnswerTrajectoryJob extends StatelessWidget { children: [ Container( width: 32.w, - height: 18.h, + height: 22.h, alignment: Alignment.center, - padding: EdgeInsets.only(left: 2.w), + // padding: EdgeInsets.only(left: 2.w), decoration: BoxDecoration( - color: - const Color(0xFF4CC793), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(14.r), - topRight: Radius.circular(3.r), - bottomLeft: Radius.circular(4.r), - bottomRight: Radius.circular(4.r), + color:Theme.of(context).primaryColor, + borderRadius: BorderRadius.all( + Radius.circular(5.r) ), ), margin: EdgeInsets.only(top:3.h,right: 4.w), @@ -92,14 +88,14 @@ class AnswerTrajectoryJob extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(4.r), border: Border.all( - width: 1.r, color: Color(0xFF4CC793)), + width: 1.r, color: Theme.of(context).primaryColor), ), child: Center( child: Text( EnumUtils.formatSubject(item.subject), style: TextStyle( fontSize: 8.r, - color: Color(0xFF4CC793)), + color: Theme.of(context).primaryColor), ), ), ) @@ -190,17 +186,13 @@ class AnswerTrajectoryJob extends StatelessWidget { children: [ Container( width: 32.w, - height: 18.h, + height: 22.h, alignment: Alignment.center, - padding: EdgeInsets.only(left: 2.w), + // padding: EdgeInsets.only(left: 2.w), decoration: BoxDecoration( - color: - const Color(0xFF4CC793), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(14.r), - topRight: Radius.circular(3.r), - bottomLeft: Radius.circular(4.r), - bottomRight: Radius.circular(4.r), + color:Theme.of(context).primaryColor, + borderRadius: BorderRadius.all( + Radius.circular(5.r) ), ), margin: EdgeInsets.only(top:3.h,right: 4.w), @@ -224,14 +216,14 @@ class AnswerTrajectoryJob extends StatelessWidget { decoration: BoxDecoration( borderRadius: BorderRadius.circular(4.r), border: Border.all( - width: 1.r, color: Color(0xFF4CC793)), + width: 1.r, color: Theme.of(context).primaryColor), ), child: Center( child: Text( EnumUtils.formatSubject(item.subject), style: TextStyle( fontSize: 12.r, - color: Color(0xFF4CC793)), + color: Theme.of(context).primaryColor), ), ), ) diff --git a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_logic.dart b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_logic.dart index 78cd609..097855f 100644 --- a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_logic.dart +++ b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_logic.dart @@ -15,6 +15,7 @@ class AnswerTrajectoryDetailLogic extends GetxController with RequestToolMixin{ state.homeworkId.value = Get.arguments['homeworkId'] ?? ''; state.title.value = Get.arguments['title'] ?? ''; state.grade = Get.arguments['grade'] ?? -1; + state.subject = Get.arguments['subject'] ?? -1; refreshController = EasyRefreshController(); EasyLoading.show(status: 'loading...'); getList(); diff --git a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_state.dart b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_state.dart index 5ee6023..3b1c603 100644 --- a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_state.dart +++ b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_state.dart @@ -9,6 +9,7 @@ class AnswerTrajectoryDetailState { late RxString homeworkId = ''.obs; late RxString title = ''.obs; late int grade = -1; + late int subject = -1; late RxList classList = RxList(); late Rx currentClass=Rx(AnnotatedClass('',-1,'','','',-1,-1,-1,-1,-1,[],[],-1,-1,-1,-1,-1,[],[])); } diff --git a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_view.dart b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_view.dart index 72aa596..f5af960 100644 --- a/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/answer_trajectory_detail/answer_trajectory_detail_view.dart @@ -94,7 +94,7 @@ class _AnswerTrajectoryDetailPageState fontSize: 10.sp, color: state.currentClass.value .classId == item.classId - ? Color(0xFF4CC793) + ? Theme.of(context).primaryColor : Color(0xFF686868)), ), ), @@ -141,7 +141,7 @@ class _AnswerTrajectoryDetailPageState AnnotatedStudents item = state.currentClass.value.students[index]; return InkWell( onTap: () { - Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value}); + Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value,'subject':state.subject}); }, child: Container( padding: EdgeInsets.symmetric(horizontal: 10.r), @@ -159,7 +159,7 @@ class _AnswerTrajectoryDetailPageState item.studentName, style: TextStyle( fontSize: 12.sp, - color: Color(0xFF4CC793)), + color: Color(0xFF5E5E5E)), )), Container( @@ -167,14 +167,14 @@ class _AnswerTrajectoryDetailPageState width: 70.r, decoration: BoxDecoration( border: Border.all( - width: 1.r, color: Color(0xFFFFA41E)), + width: 1.r, color: Color(0xFFB2DA93)), borderRadius: BorderRadius.all( Radius.circular(20.r)), ), child: Center(child: Text('详情', style: TextStyle(fontSize: 10.r, - color: Color(0xFFFFA41E))), + color: Color(0xFFB2DA93))), )), ], ), @@ -188,7 +188,7 @@ class _AnswerTrajectoryDetailPageState .students[index]; return InkWell( onTap: () { - Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value}); + Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value,'subject':state.subject}); }, child: Container( padding: EdgeInsets.symmetric( @@ -208,21 +208,21 @@ class _AnswerTrajectoryDetailPageState item.studentName, style: TextStyle( fontSize: 12.sp, - color: Color(0xFF4CC793)), + color: Color(0xFF5E5E5E)), )), Container( height: 24.r, width: 72.r, decoration: BoxDecoration( border: Border.all( - width: 1.r, color: Color(0xFFFFA41E)), + width: 1.r, color: Color(0xFFB2DA93)), borderRadius: BorderRadius.all( Radius.circular(20.r)), ), child: Center(child: Text('详情', style: TextStyle(fontSize: 10.r, - color: Color(0xFFFFA41E))), + color: Color(0xFFB2DA93))), )), ], ), diff --git a/making_school_asignment_app/lib/page/home_page/children/class_student/class_student_view.dart b/making_school_asignment_app/lib/page/home_page/children/class_student/class_student_view.dart index acbca66..17f88ce 100644 --- a/making_school_asignment_app/lib/page/home_page/children/class_student/class_student_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/class_student/class_student_view.dart @@ -97,7 +97,7 @@ class _ClassStudentPageState extends State { item.name, style: TextStyle( fontSize: 12.sp, - color: const Color(0xFF4CC793)), + color: Theme.of(context).primaryColor), )), state.page == 'answerTrajectory' ? Container( @@ -106,7 +106,7 @@ class _ClassStudentPageState extends State { decoration: BoxDecoration( border: Border.all( width: 1.r, - color: const Color(0xFFFFA41E)), + color: const Color(0xFFB2DA93)), borderRadius: BorderRadius.all( Radius.circular(20.r)), ), @@ -114,7 +114,7 @@ class _ClassStudentPageState extends State { child: Text('详情', style: TextStyle( fontSize: 10.r, - color: Color(0xFFFFA41E))), + color: Color(0xFFB2DA93))), )) : state.page == 'history' ? Container( @@ -122,7 +122,7 @@ class _ClassStudentPageState extends State { width: 70.r, decoration: BoxDecoration( color: - const Color(0xFF4CC793), + Theme.of(context).primaryColor, borderRadius: BorderRadius.all( Radius.circular( @@ -152,7 +152,7 @@ class _ClassStudentPageState extends State { Radius.circular( 4.r)), color: const Color( - 0xFFB7FFE0), + 0xFFEBE4FF), ), child: Row( crossAxisAlignment: @@ -178,8 +178,7 @@ class _ClassStudentPageState extends State { '优先批阅', style: TextStyle( fontSize: 10.sp, - color: const Color( - 0xFF4CC793)), + color: Theme.of(context).primaryColor), ), ), ], @@ -283,7 +282,7 @@ class _ClassStudentPageState extends State { decoration: BoxDecoration( border: Border.all( width: 1.r, - color: const Color(0xFFFFA41E)), + color: const Color(0xFFB2DA93)), borderRadius: BorderRadius.all( Radius.circular(20.r)), ), @@ -291,7 +290,7 @@ class _ClassStudentPageState extends State { child: Text('详情', style: TextStyle( fontSize: 10.r, - color: Color(0xFFFFA41E))), + color: Color(0xFFB2DA93))), )) : state.page == 'history' ? Container( diff --git a/making_school_asignment_app/lib/page/home_page/children/fav_student/fav_student_view.dart b/making_school_asignment_app/lib/page/home_page/children/fav_student/fav_student_view.dart index 6550fdb..e49e1fd 100644 --- a/making_school_asignment_app/lib/page/home_page/children/fav_student/fav_student_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/fav_student/fav_student_view.dart @@ -58,7 +58,7 @@ class _FavStudentPageState extends State { height: 27.r, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: const Color(0xFF4CC793), + color: Theme.of(context).primaryColor, ), child: const Center( child: Text( @@ -194,7 +194,7 @@ class _FavStudentPageState extends State { '第${item['questionPage']}页', style: TextStyle( fontSize: 12.sp, - color: const Color(0xFF2E5BFF)), + color:Theme.of(context).primaryColor), ), ), GridView( @@ -294,7 +294,7 @@ class _FavStudentPageState extends State { '第${item['questionPage']}页', style: TextStyle( fontSize: 14.sp, - color: const Color(0xFF2E5BFF)), + color:Theme.of(context).primaryColor), ), ), ListView.builder( diff --git a/making_school_asignment_app/lib/page/home_page/children/fav_student/widget/favorite_student_dialog.dart b/making_school_asignment_app/lib/page/home_page/children/fav_student/widget/favorite_student_dialog.dart index 5675a8c..61cf1a8 100644 --- a/making_school_asignment_app/lib/page/home_page/children/fav_student/widget/favorite_student_dialog.dart +++ b/making_school_asignment_app/lib/page/home_page/children/fav_student/widget/favorite_student_dialog.dart @@ -76,7 +76,7 @@ class _FavoriteStudentDialogState extends State { return Text( '${currentStudent.value.className} ${currentStudent.value .studentName}', - style: TextStyle(fontSize: 12.sp, color: Color(0xFF4E73FD)), + style: TextStyle(fontSize: 12.sp, color: Theme.of(context).primaryColor), ); }), Expanded(child: Container()), diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_logic.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_logic.dart index ea611da..edbf0af 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_logic.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_logic.dart @@ -39,6 +39,7 @@ class JobReportLogic extends GetxController with RequestToolMixin { HomeworkDetails data = await getClient().getHomeworkDetails(state.homeworkId.value, state.classData.value.classId != '-1' ? state.classData.value.classId : ''); state.dataCount = Utils.getHomeworkData(data); + state.subject = data.subject!; state.homeData = data; state.kgReport.value = data.questions.where((w) => w.questionType == 1).toList(); state.zgReport.value = data.questions.where((w) => w.questionType == 2).toList(); diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_state.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_state.dart index bb986c0..e532728 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_state.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_state.dart @@ -23,4 +23,5 @@ class JobReportState { late RxList involveClasses = RxList(); late AnnotatedClass defaultClass = AnnotatedClass('', -1, '-1', '', '', -1, -1, -1, -1, -1, [], [], -1, -1, -1, -1, -1, [], []); late Rx classData = defaultClass.obs; + late int subject = -1; } diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_view.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_view.dart index 233b364..114b697 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/job_report_view.dart @@ -77,7 +77,7 @@ class _JobReportPageState extends State { ), //完成率、正确率 TopCount( - state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value), + state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value,state.subject), //客观题、主观题 KgtZgtTable( studentCount: state.dataCount.studentCount!, @@ -87,7 +87,8 @@ class _JobReportPageState extends State { kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0), zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0), kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0), - zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0)), + zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0), + subject:state.subject), // 掌握知识点的情况 Container( margin: EdgeInsets.symmetric(horizontal: 10.r), @@ -95,7 +96,8 @@ class _JobReportPageState extends State { knowsList: state.knowsList, data: state.homeData, className: state.classData.value.className, - homeworkId: state.homeworkId.value)), + homeworkId: state.homeworkId.value, + subject:state.subject,)), // 掌握知识点的情况 /* Container( margin: EdgeInsets.symmetric(horizontal: 10.r), diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/knowledge_point.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/knowledge_point.dart index d391bea..a1f2277 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/knowledge_point.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/knowledge_point.dart @@ -13,7 +13,8 @@ class KnowledgePoint extends StatefulWidget { final HomeworkDetails data; final String className; final String homeworkId; - KnowledgePoint({Key? key, required this.knowsList, required this.data, required this.className, required this.homeworkId}) : super(key: key); + final int subject; + KnowledgePoint({Key? key, required this.knowsList, required this.data, required this.className, required this.homeworkId,required this.subject}) : super(key: key); @override State createState() => _KnowledgePointState(); @@ -22,7 +23,7 @@ class KnowledgePoint extends StatefulWidget { class _KnowledgePointState extends State { void goQuickCheckPersonalPath(studentId) { if (studentId != null) { - Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': studentId, 'homeworkId': widget.homeworkId}); + Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': studentId, 'homeworkId': widget.homeworkId,'subject':widget.subject}); } } @@ -166,7 +167,7 @@ class _KnowledgePointState extends State { ? Colors.white : kgInfo.state == 2 ? const Color(0xFFFF7474) - : const Color(0xFF4CC793), + : Theme.of(context).primaryColor, borderRadius: BorderRadius.all(Radius.circular(10.r))), child: Center( child: Text( diff --git a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/top_count.dart b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/top_count.dart index 1f6a954..43b7ec2 100644 --- a/making_school_asignment_app/lib/page/home_page/children/job_report/widget/top_count.dart +++ b/making_school_asignment_app/lib/page/home_page/children/job_report/widget/top_count.dart @@ -12,8 +12,9 @@ class TopCount extends StatelessWidget { final CountData data; final String className; final String jobId; + final int subject; - const TopCount(this.data, this.className, this.jobId, {Key? key}) : super(key: key); + const TopCount(this.data, this.className, this.jobId, this.subject,{Key? key}) : super(key: key); void showStudentListDialog({required BuildContext context, required String title, required List students}) { showDialog( @@ -23,6 +24,7 @@ class TopCount extends StatelessWidget { title: title, studentList: students, homeworkId: jobId, + subject: subject, ); }, ); @@ -91,7 +93,7 @@ class TopCount extends StatelessWidget { double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3; double rightWidth = (MediaQuery.of(context).size.width - 40.r) * 0.3 / 2; return Container( - padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r), + padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 20.r), margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r), decoration: BoxDecoration( color: Colors.white, @@ -100,34 +102,80 @@ class TopCount extends StatelessWidget { child: Column( children: [ Row( - mainAxisAlignment: MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ InkWell( onTap: () { showStudentListDialog(context: context, title: '未提交作业学生', students: data.noAnswerStudents!); }, - child: leftContainer(context, count: data.noAnswerCount!, name: '未提交', nameColor: Color(0xFFD92F2F), bgColor: Color(0xFFEEEEEE)), + child: leftContainer(context, count: data.noAnswerCount!, name: '未提交', nameColor: Color(0xFF10978E), bgColor: Color(0xFFE8F8F7)), ), InkWell( onTap: () { showStudentListDialog(context: context, title: '已提交作业学生', students: data.studentSubmitStudents!); }, - child: leftContainer(context, count: data.studentSubmitCount!, name: '已提交', nameColor: Color(0xFF4CC793), bgColor: Color(0xFFF5F5F5)), + child: leftContainer(context, count: data.studentSubmitCount!, name: '已提交', nameColor: Color(0xFFEF5614), bgColor: Color(0xFFFCEFEA)), ), InkWell( onTap: () { showStudentListDialog(context: context, title: '全对作业学生', students: data.allCorrectStudents!); }, - child: leftContainer(context, count: data.allCorrect!, name: '全对', nameColor: Color(0xFFFF9800), bgColor: Color(0xFFEEEEEE)), + child: leftContainer(context, count: data.allCorrect!, name: '全对', nameColor: Color(0xFF8C68FF), bgColor: Color(0xFFE9EBFD)), ), - Container( - height: 92.r, - width: rightWidth, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: InkWell( + + ], + ), + SizedBox(height: 15.r,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () { + showStudentListDialog(context: context, title: '优等作业学生', students: data.levelOneStudents!); + }, + child: rightContainer( + context, + count: data.levelOneCount!, + bgColor: const Color(0xFFE8F8F7), + nameColor: const Color(0xFF009254), + borderColor: const Color(0xFF4CC793), + name: '优', + ), + ), + InkWell( + onTap: () { + showStudentListDialog(context: context, title: '良等作业学生', students: data.levelTwoStudents!); + }, + child: rightContainer(context,count: data.levelTwoCount!, bgColor: Color(0xFFFEF9F6), nameColor: Color(0xFFE87F0B), borderColor: const Color(0xFFFF9F46), name: '良'), + ) + ], + ), + SizedBox(height: 10.r,), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + InkWell( + onTap: () { + showStudentListDialog(context: context, title: '中等作业学生', students: data.levelThreeStudents!); + }, + child: rightContainer(context,count: data.levelThreeCount!, bgColor: Color(0xFFFFF6F6), nameColor: Color(0xFFFF7474), borderColor: const Color(0xFFFFCACA),name: '中'), + ), + InkWell( + onTap: () { + showStudentListDialog(context: context, title: '差等作业学生', students: data.levelFourStudents!); + }, + child: rightContainer(context,count: data.levelFourCount!, bgColor: Color(0xFFECEFEF), nameColor: Color(0xFF5C5B59), borderColor: const Color(0xFFD8D8D8),name: '差'), + ) + ], + ), + /* Container( + height: 92.r, + width: rightWidth, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: InkWell( onTap: () { showStudentListDialog(context: context, title: '优等作业学生', students: data.levelOneStudents!); }, @@ -138,41 +186,39 @@ class TopCount extends StatelessWidget { name: '优', ), )), - Expanded( - child: InkWell( + Expanded( + child: InkWell( onTap: () { showStudentListDialog(context: context, title: '中等作业学生', students: data.levelThreeStudents!); }, child: rightContainer(count: data.levelThreeCount!, bgColor: Color(0xFFD3FF93), nameColor: Color(0xFF3F6605), name: '中'), )), - ], - ), - ), - Container( - height: 92.r, - width: rightWidth, - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Expanded( - child: InkWell( + ], + ), + ), + Container( + height: 92.r, + width: rightWidth, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Expanded( + child: InkWell( onTap: () { showStudentListDialog(context: context, title: '良等作业学生', students: data.levelTwoStudents!); }, - child: rightContainer(count: data.levelTwoCount!, bgColor: Color(0xFFFFC38C), nameColor: Color(0xFFD36500), name: '良'), + child: rightContainer(context,count: data.levelTwoCount!, bgColor: Color(0xFFFFC38C), nameColor: Color(0xFFD36500), name: '良'), )), - Expanded( - child: InkWell( + Expanded( + child: InkWell( onTap: () { showStudentListDialog(context: context, title: '差等作业学生', students: data.levelFourStudents!); }, - child: rightContainer(count: data.levelFourCount!, bgColor: Color(0xFFFF9D94), nameColor: Color(0xFFD12616), name: '差'), + child: rightContainer(context,count: data.levelFourCount!, bgColor: Color(0xFFFF9D94), nameColor: Color(0xFFD12616), name: '差'), )), - ], - ), - ) - ], - ), + ], + ), + )*/ ], ), ); @@ -181,12 +227,15 @@ class TopCount extends StatelessWidget { @swidget Widget leftContainer(context, {required int count, required String name, required Color nameColor, required Color bgColor}) { - double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3; + double leftWidth = (MediaQuery.of(context).size.width - 100.r) / 3; return Container( width: leftWidth, - height: 92.r, + height: 108.r, padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 6.r), - color: bgColor, + decoration: BoxDecoration( + color: bgColor, + borderRadius: BorderRadius.all(Radius.circular(10.r)), + ), child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -208,7 +257,7 @@ Widget leftContainer(context, {required int count, required String name, require ], ), SizedBox( - height: 20.r, + height: 30.r, ), Text( name, @@ -220,35 +269,42 @@ Widget leftContainer(context, {required int count, required String name, require } @swidget -Widget rightContainer({required int count, required Color bgColor, required Color nameColor, required String name}) { +Widget rightContainer(context,{required int count, required Color bgColor, required Color nameColor, required Color borderColor,required String name}) { return Container( - color: bgColor, - child: Column( + width: (MediaQuery.of(context).size.width - 80.r) / 2, + height: 48.r, + decoration: BoxDecoration( + color: bgColor, + borderRadius: BorderRadius.all(Radius.circular(10.r)), + border: Border.all(color: borderColor,width: 1.r), + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox( - height: 5.r, - ), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Text( - count.toString(), - style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w600), - ), - Text( - '人', - style: TextStyle(fontSize: 8.sp, color: nameColor, fontWeight: FontWeight.w600), - ), - ], - ), - SizedBox( - height: 5.r, - ), + SizedBox(width: 20.r,), +Expanded(child: Row( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Text( + count.toString(), + style: TextStyle(fontSize: 24.sp, color: const Color(0xFF505251), fontWeight: FontWeight.w300), + ), + Padding( + padding: EdgeInsets.only(top: 3.r), + child: Text( + '人', + style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505251), fontWeight: FontWeight.w300), + ), + ), + ], +)), + + Text( name, - style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w500), - ) + style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w600), + ), + SizedBox(width: 20.r,), ], ), ); diff --git a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart index edbca95..6906d10 100644 --- a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart @@ -88,7 +88,7 @@ class _KnowledgePointsGraspPageState extends State { height: 30.r, decoration: BoxDecoration( borderRadius: BorderRadius.circular(4.r), - color: Color(0xFF4CC793), + color: Theme.of(context).primaryColor, ), child: Center( child: Text( @@ -175,7 +175,8 @@ class _KnowledgePointsGraspPageState extends State { 'dateStart': state.dateStart, 'dateEnd': state.dateEnd, 'knowledgeId': item.knowledgeId, - 'knowledgeName': item.knowledgeName + 'knowledgeName': item.knowledgeName, + 'subject':state.subject }); }, child: Container( @@ -200,7 +201,7 @@ class _KnowledgePointsGraspPageState extends State { height: 22.r, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.r)), - border: Border.all(width: 1.r, color: Color(0xFF4CC793)), + border: Border.all(width: 1.r, color: Theme.of(context).primaryColor), ), child: Row( mainAxisAlignment: MainAxisAlignment.center, @@ -208,7 +209,7 @@ class _KnowledgePointsGraspPageState extends State { children: [ Text( '${item.count}次', - style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), + style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor), ), Image.asset( 'assets/images/job_data_right_icon.png', @@ -225,7 +226,7 @@ class _KnowledgePointsGraspPageState extends State { ), ProgressBar( title: '正确率:', - color: Color(0xFF90E0BE), + color: Color(0xFFB2DA93), percent: item.correctRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), diff --git a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_logic.dart b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_logic.dart index cbda5f3..e637b4a 100644 --- a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_logic.dart +++ b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_logic.dart @@ -18,6 +18,7 @@ class KnowledgePointsGraspDetailLogic extends GetxController with RequestToolMix state.dateEnd = Get.arguments['dateEnd']; state.knowledgeId = Get.arguments['knowledgeId']; state.knowledgeName.value = Get.arguments['knowledgeName']; + state.subject = Get.arguments['subject'] ?? -1; refreshController = EasyRefreshController(); EasyLoading.show(status: 'loading...'); getList(); diff --git a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_state.dart b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_state.dart index 3eaec13..ad20dc6 100644 --- a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_state.dart +++ b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_state.dart @@ -10,6 +10,7 @@ class KnowledgePointsGraspDetailState { late String dateStart = ''; late String dateEnd = ''; late int knowledgeId = 0; + late int subject = -1; late RxList dataList = RxList(); late RxList studentList = RxList(); late RxString knowledgeName = ''.obs; diff --git a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart index e15b169..df6e4ea 100644 --- a/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart @@ -62,6 +62,7 @@ class _KnowledgePointsGraspDetailPageState extends State w.questionType == 1).toList(); diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_state.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_state.dart index ed8f0bb..d872390 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_state.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_state.dart @@ -16,6 +16,7 @@ class QuickDataCheckState { late RxList zgReport = RxList(); late RxList studentList = RxList(); late HomeworkDetails homeData; + late int subject = -1; } class CountData extends Object { diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_view.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_view.dart index dc0eb9b..1dcc1cc 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/quick_data_check_view.dart @@ -40,7 +40,7 @@ class _QuickDataCheckPageState extends State { height: MediaQuery.of(context).size.height, decoration: const BoxDecoration( gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ - Color(0xFF4CC793), + Color(0xFF8C68FF), Color(0xFFF5F5F5), ], stops: [ 0.09, @@ -201,7 +201,7 @@ class _QuickDataCheckPageState extends State { lineHeight: 9.h, animationDuration: 2500, percent: state.dataCount.kgtAnswerRate! / 100, - progressColor: const Color(0xFFFF7F22), + progressColor: const Color(0xFFB2DA93), backgroundColor: const Color(0xFFEAEAEA), barRadius: Radius.circular(10.r), )), @@ -234,7 +234,7 @@ class _QuickDataCheckPageState extends State { lineHeight: 9.h, animationDuration: 2500, percent: state.dataCount.zgtAnswerRate! / 100, - progressColor: const Color(0xFFFF7F22), + progressColor: const Color(0xFFB2DA93), backgroundColor: const Color(0xFFEAEAEA), barRadius: Radius.circular(10.r), )), @@ -248,6 +248,7 @@ class _QuickDataCheckPageState extends State { jobId: state.homeworkId.value, kgCount: state.dataCount.kgtDtlCount!, zgCount: state.dataCount.zgtDtlCount!, + subject:state.subject, ), //客观题、主观题 KgtZgtTable( @@ -258,7 +259,8 @@ class _QuickDataCheckPageState extends State { kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0), kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0), zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0), - zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0)), + zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0), + subject:state.subject), ], ), )); diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart index d688c0b..f8243a1 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart @@ -16,6 +16,7 @@ class KgtZgtTable extends StatefulWidget { final String zgtOkRate; final String kgtCorrectRate; final String zgtCorrectRate; + final int subject; const KgtZgtTable( {Key? key, @@ -26,7 +27,8 @@ class KgtZgtTable extends StatefulWidget { required this.kgtOkRate, required this.kgtCorrectRate, required this.zgtOkRate, - required this.zgtCorrectRate,}) + required this.zgtCorrectRate, + required this.subject}) : super(key: key); @override @@ -90,6 +92,7 @@ class _KgtZgtTableState extends State { fixedRows: 1, jobId: widget.homeworkId, studentCount: widget.studentCount, + subject:widget.subject, ), ), if (widget.kgReport.isEmpty) MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp), @@ -144,6 +147,7 @@ class _KgtZgtTableState extends State { isZG: true, jobId: widget.homeworkId, studentCount: widget.studentCount, + subject: widget.subject, ), ), if (widget.zgReport.isEmpty) MyEmptyWidget(imgWidth: 100.r, imgHeight: 100.r, font: 8.sp), diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart index 6bbbbc8..585979a 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart @@ -8,9 +8,10 @@ class QuickDataCheckBottom extends StatefulWidget { final String jobId; final int kgCount; final int zgCount; + final int subject; final List? jobData; - const QuickDataCheckBottom({Key? key, required this.jobId, required this.jobData, required this.kgCount, required this.zgCount}) : super(key: key); + const QuickDataCheckBottom({Key? key, required this.jobId, required this.jobData, required this.kgCount, required this.zgCount,required this.subject}) : super(key: key); @override State createState() => _QuickDataCheckBottomState(); @@ -241,6 +242,7 @@ class _QuickDataCheckBottomState extends State { hasUnrated: false, kgCount: widget.kgCount, zgCount: widget.zgCount, + subject:widget.subject, ), ); }) diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart index b3f6475..1c35985 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart @@ -14,6 +14,7 @@ class QuickStudentDataTable extends StatefulWidget { final bool hasUnrated; final int kgCount; final int zgCount; + final int subject; const QuickStudentDataTable({ Key? key, @@ -23,6 +24,7 @@ class QuickStudentDataTable extends StatefulWidget { required this.hasUnrated, required this.kgCount, required this.zgCount, + required this.subject, this.fixedCols = 0, this.fixedRows = 0, }) : super(key: key); @@ -49,7 +51,7 @@ class _QuickStudentDataTableState extends State { cells: [ DataCell(InkWell( onTap: () { - Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': widget.jobId}); + Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': widget.jobId,'subject':widget.subject}); }, child: Center( child: Padding( diff --git a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/report_table.dart b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/report_table.dart index ce64a7a..ee5ad10 100644 --- a/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/report_table.dart +++ b/making_school_asignment_app/lib/page/home_page/children/quick_data_check/widget/report_table.dart @@ -20,6 +20,7 @@ class ReportTable extends StatefulWidget { final bool? isZG; final String jobId; final int studentCount; + final int subject; const ReportTable({ Key? key, @@ -27,6 +28,7 @@ class ReportTable extends StatefulWidget { required this.bodyList, required this.jobId, required this.studentCount, + required this.subject, this.fixedCols = 0, this.fixedRows = 0, this.isZG = false, @@ -41,10 +43,10 @@ class _ReportTableState extends State { int? _sortColumnIndex; final bool _sortAscending = true; List colorMap = const [ - Color.fromRGBO(0, 179, 134, 1), - Color.fromRGBO(1, 193, 254, 1), - Color.fromRGBO(239, 135, 20, 1), - Color.fromRGBO(219, 0, 0, 1), + Color.fromRGBO(184, 161, 255, 1), + Color.fromRGBO(79, 199, 147, 1), + Color.fromRGBO(144, 224, 190, 1), + Color.fromRGBO(255, 107, 107, 1), Color.fromRGBO(211, 211, 211, 1), ]; @@ -73,19 +75,19 @@ class _ReportTableState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - mapIcon(const Color(0xFF4CC793)), + mapIcon(const Color(0xFFB8A1FF)), SizedBox(width: 5.r,), mapTxt('优'), const Spacer(), - mapIcon(const Color(0xFF01C1FE)), + mapIcon(const Color(0xFF4CC793)), SizedBox(width: 5.r,), mapTxt('良'), const Spacer(), - mapIcon(const Color(0xFFEF8714)), + mapIcon(const Color(0xFF90E0BE)), SizedBox(width: 5.r,), mapTxt('中'), const Spacer(), - mapIcon(const Color(0xFFDB0000)), + mapIcon(const Color(0xFFFF6B6B)), SizedBox(width: 5.r,), mapTxt('差'), ], @@ -105,6 +107,7 @@ class _ReportTableState extends State { color: colorMap[index], value: e.count / widget.studentCount * 100, radius: 110, + // borderSide:BorderSide(color: const Color(0xFF273366),width: 0.5.r), // title: e.title + (Utils.doubleToStringAsFixed(e.count / widget.studentCount * 100) + '%'), title: e.title + e.count.toString(), titleStyle: TextStyle(fontSize: 12.sp, color: Color(0xFFFFFFFF)), @@ -185,17 +188,17 @@ class _ReportTableState extends State { Text( widget.isZG == true ? '主观题' : '客观题', style: TextStyle( - fontSize: 14.sp, color: const Color(0xFF4CC793)), + fontSize: 14.sp, color: Theme.of(context).primaryColor), ), Text( '―', style: TextStyle( - fontSize: 14.sp, color: const Color(0xFF4CC793)), + fontSize: 14.sp, color: Theme.of(context).primaryColor), ), Text( '第$questionNo题', style: TextStyle( - fontSize: 14.sp, color: Color(0xFF4CC793)), + fontSize: 14.sp, color: Theme.of(context).primaryColor), ), ], ), @@ -355,7 +358,7 @@ class _ReportTableState extends State { void goQuickCheckPersonalPath(id) { if (id != null) { Get.toNamed(Routes.studentPersonalPage, - arguments: {'studentId': id, 'homeworkId': widget.jobId}); + arguments: {'studentId': id, 'homeworkId': widget.jobId,'subject':widget.subject}); } } @@ -456,7 +459,7 @@ class _ReportTableState extends State { children: [ Text('${item.answerCount}/${widget.studentCount}', style: TextStyle( - fontSize: 10.sp, color: const Color(0xFF4CC793))), + fontSize: 10.sp, color: Theme.of(context).primaryColor)), Image.asset( 'assets/images/green_right_icon.png', width: 12.r, @@ -500,14 +503,14 @@ class _ReportTableState extends State { fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) - : const Color(0xFF4CC793))), + : Theme.of(context).primaryColor)), ) : Text(item.answer, style: TextStyle( fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) - : const Color(0xFF4CC793))), + : Theme.of(context).primaryColor)), ), )), DataCell(InkWell( @@ -524,7 +527,7 @@ class _ReportTableState extends State { children: [ Text('${item.priorityInfo.length}人答错', style: TextStyle( - fontSize: 10.sp, color: const Color(0xFF4CC793))), + fontSize: 10.sp, color: Theme.of(context).primaryColor)), Image.asset( 'assets/images/green_right_icon.png', width: 12.r, @@ -549,14 +552,14 @@ class _ReportTableState extends State { fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) - : const Color(0xFF4CC793))), + : Theme.of(context).primaryColor)), ) : Text(item.answer, style: TextStyle( fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) - : const Color(0xFF4CC793))), + : Theme.of(context).primaryColor)), ), )), ], diff --git a/making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.dart b/making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.dart index 7b0aeaa..cdfeffc 100644 --- a/making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/read_over/read_over_view.dart @@ -90,7 +90,7 @@ class _ReadOverPageState extends State { ), labelStyle: TextStyle( fontSize: 14.sp, - color: const Color(0xFF4CC793), + color: const Color(0xFF8C68FF), ), // labelColor: const Color.fromRGBO(45, 56, 76, 1), indicator: const UnderlineTabIndicator( diff --git a/making_school_asignment_app/lib/page/home_page/children/read_over/widget/annotate_list.dart b/making_school_asignment_app/lib/page/home_page/children/read_over/widget/annotate_list.dart index 407a4c1..e791d77 100644 --- a/making_school_asignment_app/lib/page/home_page/children/read_over/widget/annotate_list.dart +++ b/making_school_asignment_app/lib/page/home_page/children/read_over/widget/annotate_list.dart @@ -269,7 +269,7 @@ Widget $reviewedItem({ arguments: {'id': jobTaskItem.id, 'name': jobTaskItem.name, 'grade': jobTaskItem.grade,'subject':jobTaskItem.subject, 'completed': true,'tabIndex':tabIndex}); }, child: Container( - padding: EdgeInsets.only(top: 10.h), + padding: EdgeInsets.only(right: 5.w), decoration: BoxDecoration( borderRadius: BorderRadius.circular(6.r), color: Colors.white, @@ -286,42 +286,39 @@ Widget $reviewedItem({ mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ // 顶部任务名称 - Padding( - padding: padEdg, - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, + Row( + crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: 32.w, - height: 18.h, - alignment: Alignment.center, - padding: EdgeInsets.only(left: 2.w), - decoration: BoxDecoration( - color: type == 1 ? const Color(0xFF4CC793) : const Color.fromRGBO(255, 175, 56, 1), - borderRadius: BorderRadius.only( - topLeft: Radius.circular(14.r), - topRight: Radius.circular(3.r), - bottomLeft: Radius.circular(4.r), - bottomRight: Radius.circular(4.r), - ), + children: [ + Container( + width: 32.w, + height: 18.h, + alignment: Alignment.center, + padding: EdgeInsets.only(left: 2.w), + decoration: BoxDecoration( + color: type == 1 ? const Color(0xFFB2DA93) : const Color(0xFFEF8714), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6.r), + topRight: Radius.circular(0.r), + bottomLeft: Radius.circular(0.r), + bottomRight: Radius.circular(12.r), ), - margin: EdgeInsets.only(top:3.h,right: 4.w), - child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), ), - Expanded( - child: quickText(jobTaskItem.name, size: 14.sp, color: const Color.fromRGBO(70, 70, 70, 1), maxLines: 2), - ), - if (jobTaskItem.isFixed!) - Padding( - padding: EdgeInsets.only(top: 3.r), - child: Text( - '已订正', - style: TextStyle(fontSize: 10.sp, color: const Color(0xFFF16262)), - ), + margin: EdgeInsets.only(top:0.h,right: 4.w), + child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), + ), + Expanded( + child: quickText(jobTaskItem.name, size: 14.sp, color: const Color.fromRGBO(70, 70, 70, 1), maxLines: 2), + ), + if (jobTaskItem.isFixed!) + Padding( + padding: EdgeInsets.only(top: 3.r), + child: Text( + '已订正', + style: TextStyle(fontSize: 10.sp, color: const Color(0xFFF16262)), ), - ], - ), + ), + ], ), Padding( @@ -335,21 +332,21 @@ Widget $reviewedItem({ size: 10.sp, fontWeight: FontWeight.w500, ), - quickText(' / ', color: const Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500), + quickText(' / ', color: const Color(0xFF8C68FF), size: 10.sp, fontWeight: FontWeight.w500), quickText( '参与班级:', - color: const Color.fromRGBO(76, 199, 147, 1), + color: const Color(0xFF8C68FF), size: 9.sp, ), quickText( '${jobTaskItem.classCount}', - color: const Color.fromRGBO(76, 199, 147, 1), + color: const Color(0xFF8C68FF), size: 10.sp, ), - quickText(' / ', color: const Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500), + quickText(' / ', color: const Color(0xFF8C68FF), size: 10.sp, fontWeight: FontWeight.w500), quickText( '科目:$subjectName', - color: const Color.fromRGBO(116, 145, 253, 1), + color: const Color(0xFF8C68FF), size: 9.sp, ), ], @@ -394,7 +391,7 @@ Widget $reviewedItem({ decoration: BoxDecoration( border: Border(right: BorderSide(width: 1.r, color: const Color(0xFFDCDCDC))), ), - child: quickText('收集订正', color: const Color(0xFF4CC793), size: 11.sp), + child: quickText('收集订正', color: const Color(0xFF8C68FF), size: 11.sp), ), ), ), diff --git a/making_school_asignment_app/lib/page/home_page/children/read_over/widget/task_list_item.dart b/making_school_asignment_app/lib/page/home_page/children/read_over/widget/task_list_item.dart index 72d4af7..0e73dbb 100644 --- a/making_school_asignment_app/lib/page/home_page/children/read_over/widget/task_list_item.dart +++ b/making_school_asignment_app/lib/page/home_page/children/read_over/widget/task_list_item.dart @@ -64,7 +64,7 @@ class _TaskListItemState extends State { alignment: Alignment.center, padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), decoration: BoxDecoration( - color: const Color(0xFF4CC793), + color: const Color(0xFFB2DA93), borderRadius: BorderRadius.only( topLeft: Radius.circular(14.r), topRight: Radius.circular(3.r), @@ -155,167 +155,168 @@ class _TaskListItemState extends State { ), ), ) - : InkWell( - onTap: () { - Get.toNamed(Routes.annotateClassPage, - arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject':widget.jobTaskItem.subject,'tabIndex':widget.tabIndex}); - }, - child: Stack( - alignment: const FractionalOffset(0.95, 0), - children: [ - Container( - color: Colors.transparent, - padding: EdgeInsets.only(top: 40.r), - child: Container( - margin: EdgeInsets.only(bottom: 16.h), - padding: EdgeInsets.symmetric(vertical: 16.h,horizontal: 10.w), - width: Get.width, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(6.r), - color: const Color.fromRGBO(255, 255, 255, 1), - boxShadow: const [ - BoxShadow( - color: Color.fromRGBO(210, 216, 241, 1), - offset: Offset.zero, //阴影y轴偏移量 - blurRadius: 5.8, //阴影模糊程度 - spreadRadius: 0, //阴影扩散程度 - ) - ], - ), - child: Row( - children: [ - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + : Padding( + padding: EdgeInsets.only(top: 10.r), + child: InkWell( + onTap: () { + Get.toNamed(Routes.annotateClassPage, + arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject':widget.jobTaskItem.subject,'tabIndex':widget.tabIndex}); + }, + child: Container( + margin: EdgeInsets.only(bottom: 16.h), + width: Get.width, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(6.r), + color: const Color.fromRGBO(255, 255, 255, 1), + boxShadow: const [ + BoxShadow( + color: Color.fromRGBO(210, 216, 241, 1), + offset: Offset.zero, //阴影y轴偏移量 + blurRadius: 5.8, //阴影模糊程度 + spreadRadius: 0, //阴影扩散程度 + ) + ], + ), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - SizedBox(height: 10.h), - Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Container( - width: Utils.isPad() ? 32.w : 38.w, - height: 18.h, - alignment: Alignment.center, - padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), - decoration: BoxDecoration( - color: widget.type == 1 ? const Color(0xFF4CC793) : const Color.fromRGBO(255, 175, 56, 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(top:3.h,right: 4.w), - child: quickText(widget.jobTaskItem.assessType == 0?'作业':'考试', color: Colors.white, size: 10.sp), - ), - Expanded( - child: quickText( - widget.jobTaskItem.name, - maxLines: 2, - size: Utils.isPad() ? 14.sp : 16.sp, - color: const Color.fromRGBO(70, 70, 70, 1), - fontWeight: FontWeight.bold, - ), - ) - ], - ), - SizedBox(height: 10.h), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - quickText( - EnumUtils.formatSubject(widget.jobTaskItem.subject), - color: const Color.fromRGBO(97, 97, 97, 1), - size: 12.sp, - ), - quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), - Row( - crossAxisAlignment: CrossAxisAlignment.end, - children: [ - quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp), - quickText( - '${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}', - color: const Color.fromRGBO(97, 97, 97, 1), - size: 13.sp, - ), - ], - ), - quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), - quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10), - color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp), - ], - ), - SizedBox(height: 10.h), - InkWell( - onTap: () { - if (!widget.jobTaskItem.isFixed!) { - EasyLoading.show(status: 'loading...'); - widget.collectFun(widget.jobTaskItem); - } - }, - child: Container( - padding: EdgeInsets.symmetric(vertical: 4.r, horizontal: 20.r), - decoration: BoxDecoration( - color: widget.jobTaskItem.isFixed! ? Color(0xFFF4F4F4) : Color(0xFFF2FFFA), - border: Border.all(width: 1.r, color: widget.jobTaskItem.isFixed! ? Colors.transparent : Color(0xFF4CC793)), - borderRadius: BorderRadius.all(Radius.circular(20.r)), - ), - child: Text( - widget.jobTaskItem.isFixed! ? '已订正' : '收集订正', - style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)), + Container( + width: Utils.isPad() ? 32.w : 38.w, + height: 18.h, + alignment: Alignment.center, + padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), + decoration: BoxDecoration( + color: widget.type == 1 ? const Color(0xFFB2DA93) : const Color(0xFFEF8714), + borderRadius: BorderRadius.only( + topLeft: Radius.circular(6.r), + topRight: Radius.circular(0.r), + bottomLeft: Radius.circular(0.r), + bottomRight: Radius.circular(12.r), ), ), + margin: EdgeInsets.only(top:0.h,right: 4.w), + child: quickText(widget.jobTaskItem.assessType == 0?'作业':'考试', color: Colors.white, size: 10.sp), ), - // FavoriteButton(jobTaskItem.id, jobTaskItem.title), + Expanded( + child: Padding( + padding: EdgeInsets.only(top: 2.r), + child: quickText( + widget.jobTaskItem.name, + maxLines: 2, + size: Utils.isPad() ? 14.sp : 16.sp, + color: const Color.fromRGBO(70, 70, 70, 1), + fontWeight: FontWeight.bold, + ), + ), + ) ], ), - ), - SizedBox(width: 130.r,), - ], - ), - ), - ), - Container( - padding: EdgeInsets.all(9.r), - decoration: const BoxDecoration(shape: BoxShape.circle, color: Colors.white), - child: CircularPercentIndicator( - radius: 50.r, - lineWidth: 18.r, - animation: true, - percent: widget.jobTaskItem.annotateRate == null ? 0 : widget.jobTaskItem.annotateRate! / 100, - center: Text.rich(TextSpan(children: [ - TextSpan( - text: Utils.getDoubleRemoveZero(widget.jobTaskItem.annotateRate, '0'), - style: TextStyle( - fontWeight: FontWeight.bold, - fontSize: 16.sp, - color: Theme.of(context).primaryColor, - ), + SizedBox(height: 10.h), + Padding( + padding: EdgeInsets.only(left: 20.r), + child: Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + quickText( + EnumUtils.formatSubject(widget.jobTaskItem.subject), + color: const Color.fromRGBO(97, 97, 97, 1), + size: 12.sp, + ), + quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + Row( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp), + quickText( + '${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}', + color: const Color.fromRGBO(97, 97, 97, 1), + size: 13.sp, + ), + ], + ), + quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500), + quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10), + color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp), + ], + ), + ), + SizedBox(height: 10.h), + InkWell( + onTap: () { + if (!widget.jobTaskItem.isFixed!) { + EasyLoading.show(status: 'loading...'); + widget.collectFun(widget.jobTaskItem); + } + }, + child: Container( + padding: EdgeInsets.symmetric(vertical: 4.r, horizontal: 20.r), + margin: EdgeInsets.only(left: 20.r), + decoration: BoxDecoration( + color: widget.jobTaskItem.isFixed! ? Color(0xFFF4F4F4) : Color(0xFFF2EEFF), + border: Border.all(width: 1.r, color: widget.jobTaskItem.isFixed! ? Colors.transparent : const Color(0xFF8C68FF)), + borderRadius: BorderRadius.all(Radius.circular(20.r)), + ), + child: Text( + widget.jobTaskItem.isFixed! ? '已订正' : '收集订正', + style: TextStyle(fontSize: 10.sp, color: widget.jobTaskItem.isFixed! ?const Color(0xFFF16262): const Color(0xFF8C68FF)), + ), + ), + ), + // FavoriteButton(jobTaskItem.id, jobTaskItem.title), + ], ), - TextSpan( - text: "%", - style: TextStyle(color: const Color.fromRGBO(70, 70, 70, 1), fontSize: 12.sp, fontWeight: FontWeight.bold), - ), - ])), - circularStrokeCap: CircularStrokeCap.round, - // progressColor: Theme.of(context).primaryColor, - linearGradient: LinearGradient( - begin: Alignment.topCenter, - end: Alignment.bottomCenter, - tileMode: TileMode.clamp, - stops: const [0.0, 1.0], - colors: [ - Theme.of(context).primaryColor.withOpacity(0.1), - Theme.of(context).primaryColor, - ], ), - backgroundColor: const Color.fromRGBO(244, 244, 244, 1), - ), + SizedBox(width: 10.r,), + Container( + padding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 9.r), + decoration: const BoxDecoration(shape: BoxShape.circle, color: Colors.white), + child: CircularPercentIndicator( + radius: 50.r, + lineWidth: 10.r, + animation: true, + reverse:true, + percent: widget.jobTaskItem.annotateRate == null ? 0 : widget.jobTaskItem.annotateRate! / 100, + center: Text.rich(TextSpan(children: [ + TextSpan( + text: Utils.getDoubleRemoveZero(widget.jobTaskItem.annotateRate, '0'), + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16.sp, + color: Theme.of(context).primaryColor, + ), + ), + TextSpan( + text: "%", + style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 12.sp, fontWeight: FontWeight.bold), + ), + ])), + circularStrokeCap: CircularStrokeCap.round, + // progressColor: Theme.of(context).primaryColor, + linearGradient: LinearGradient( + begin: Alignment.topCenter, + end: Alignment.bottomCenter, + tileMode: TileMode.clamp, + stops: const [0.0, 1.0], + colors: [ + Theme.of(context).primaryColor.withOpacity(0.1), + Theme.of(context).primaryColor, + ], + ), + backgroundColor: const Color.fromRGBO(244, 244, 244, 1), + ), + ), + ], ), - ], + ), ), - ); + ); } } diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_logic.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_logic.dart index 21dad65..370098c 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_logic.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_logic.dart @@ -11,6 +11,7 @@ class StudentPersonalLogic extends GetxController with RequestToolMixin { void onInit() { super.onInit(); state.studentId = Get.arguments['studentId']; + state.subject = Get.arguments['subject']??-1; state.homeworkId = Get.arguments['homeworkId']; getInfo(); } diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_state.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_state.dart index 0eb0c66..3c8735e 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_state.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_state.dart @@ -8,5 +8,6 @@ class StudentPersonalState { } late Rx studentInfo = Rx(StudentPersonalInfo(0, '', 0, 0, [], 0, [])); late int studentId; + late int subject; late String homeworkId; } diff --git a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart index 471f529..ac1d347 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_personal/student_personal_view.dart @@ -55,7 +55,7 @@ class _StudentPersonalPageState extends State { // 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}); + arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName,'subject':state.subject}); }, child: Container( width: 93.r, diff --git a/making_school_asignment_app/lib/page/home_page/children/student_work_detail/student_work_detail_view.dart b/making_school_asignment_app/lib/page/home_page/children/student_work_detail/student_work_detail_view.dart index 1efb7cc..f35531f 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_work_detail/student_work_detail_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_work_detail/student_work_detail_view.dart @@ -76,7 +76,7 @@ class _StudentWorkDetailPageState extends State { style: TextStyle( fontSize: 14.sp, color: state.isJob.value - ? Color(0xFF4CC793) + ? Theme.of(context).primaryColor : Color(0xFF505E6E)), )); }), @@ -104,7 +104,7 @@ class _StudentWorkDetailPageState extends State { style: TextStyle( fontSize: 14.sp, color: !state.isJob.value - ? Color(0xFF4CC793) + ? Theme.of(context).primaryColor : Color(0xFF505E6E)), ); })), @@ -128,24 +128,24 @@ class _StudentWorkDetailPageState extends State { '总览:', style: TextStyle( fontSize: 12.sp, - color: Color(0xFF4CC793), + color: Theme.of(context).primaryColor, fontWeight: FontWeight.w600), ), ProgressBar( title: '客观题正确率:', - color: Color.fromRGBO(76, 199, 147, 0.36), + color:Theme.of(context).primaryColor, percent: state.studentData.value.kgtCorrectRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), ProgressBar( title: '主观题正确率:', - color: Color.fromRGBO(76, 199, 147, 0.36), + color: Theme.of(context).primaryColor, percent: state.studentData.value.zgtCorrectRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), ProgressBar( title: '总正确率:', - color: Color.fromRGBO(76, 199, 147, 0.36), + color: Theme.of(context).primaryColor, percent: state.studentData.value.correctRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), @@ -222,7 +222,7 @@ class _StudentWorkDetailPageState extends State { decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(5.r)), // color: Color(0xFF4CC793), - border: Border.all(width: 1.r, color: Color(0xFF4CC793)), + border: Border.all(width: 1.r, color: Theme.of(context).primaryColor), ), ), SizedBox( @@ -333,7 +333,8 @@ class _StudentWorkDetailPageState extends State { Get.toNamed(Routes.studentPersonalPage, arguments: { 'homeworkId': item.id, - 'studentId': state.studentId + 'studentId': state.studentId, + 'subject':item.subject }); }, child: Container( @@ -360,21 +361,15 @@ class _StudentWorkDetailPageState extends State { children: [ Container( width: 32.w, - height: 18.h, + height: 22.h, alignment: Alignment.center, - padding: EdgeInsets.only(left: 2.w), + // padding: EdgeInsets.only(left: 2.w), decoration: BoxDecoration( color: state.isJob.value - ? const Color.fromRGBO( - 104, 136, 253, 1) + ? Theme.of(context).primaryColor : 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), + borderRadius: BorderRadius.all( + Radius.circular(5.r) ), ), margin: EdgeInsets.only(right: 4.w), @@ -403,7 +398,7 @@ class _StudentWorkDetailPageState extends State { Radius.circular(4.r)), border: Border.all( width: 1.r, - color: Color(0xFF4CC793)), + color: Theme.of(context).primaryColor), ), child: Center( child: Text( @@ -411,7 +406,7 @@ class _StudentWorkDetailPageState extends State { item.subject), style: TextStyle( fontSize: 10.sp, - color: Color(0xFF4CC793)), + color: Theme.of(context).primaryColor), )), ), ], @@ -455,7 +450,7 @@ class _StudentWorkDetailPageState extends State { color: subjective.state == 0 ? Color(0xFFDDDDDD) : subjective.state == 3 - ? Color(0xFF4CC793) + ?Theme.of(context).primaryColor : subjective.state == 2 ? Color(0xFFFF7474) : Color(0xFF666666)), @@ -473,8 +468,7 @@ class _StudentWorkDetailPageState extends State { 0xFFDDDDDD) : subjective.state == 3 - ? Color( - 0xFF4CC793) + ? Theme.of(context).primaryColor : subjective.state == 2 ? Color( @@ -533,7 +527,7 @@ class _StudentWorkDetailPageState extends State { color: subjective.state == 0 ? Color(0xFFDDDDDD) : subjective.state == 3 - ? Color(0xFF4CC793) + ? Theme.of(context).primaryColor : subjective.state == 2 ? Color(0xFFFF7474) : Color(0xFF666666)), @@ -551,8 +545,7 @@ class _StudentWorkDetailPageState extends State { 0xFFDDDDDD) : subjective.state == 3 - ? Color( - 0xFF4CC793) + ? Theme.of(context).primaryColor : subjective.state == 2 ? Color( @@ -574,19 +567,19 @@ class _StudentWorkDetailPageState extends State { ), ProgressBar( title: '客观题正确率:', - color: Color(0xFF90E0BE), + color: Color(0xFFB2DA93), percent: item.kgtCorrectRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), ProgressBar( title: '主观题正确率:', - color: Color(0xFF90E0BE), + color: Color(0xFFB2DA93), percent: item.zgtCorrectRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), ProgressBar( title: '总正确率:', - color: Color(0xFF90E0BE), + color: Color(0xFFB2DA93), percent: item.correctRate / 100, padingEdg: EdgeInsets.zero, marginEdg: EdgeInsets.only(top: 8.h)), diff --git a/making_school_asignment_app/lib/page/home_page/children/student_work_detail/widget/personal_detail_topbar.dart b/making_school_asignment_app/lib/page/home_page/children/student_work_detail/widget/personal_detail_topbar.dart index 59ae57f..3924fd0 100644 --- a/making_school_asignment_app/lib/page/home_page/children/student_work_detail/widget/personal_detail_topbar.dart +++ b/making_school_asignment_app/lib/page/home_page/children/student_work_detail/widget/personal_detail_topbar.dart @@ -33,10 +33,10 @@ class _PersonalDetailTopBarState extends State { labelStyle: TextStyle( fontSize: 12.sp, fontWeight: FontWeight.bold, - color: const Color(0xFF4CC793), + color: const Color(0xFF8C68FF), ), isScrollable: true, - labelColor: const Color(0xFF4CC793), + labelColor:const Color(0xFF8C68FF), unselectedLabelColor: const Color(0xFF505E6E), padding: EdgeInsets.symmetric(horizontal: 14.r), // indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高 @@ -44,7 +44,7 @@ class _PersonalDetailTopBarState extends State { indicator: UnderlineTabIndicator( borderSide: BorderSide( width: 2.r, - color:const Color(0xFF4CC793) + color:const Color(0xFF8C68FF) ), ), tabs: [ diff --git a/making_school_asignment_app/lib/page/home_page/widget/student_group_list.dart b/making_school_asignment_app/lib/page/home_page/widget/student_group_list.dart index fe0660f..515e7d0 100644 --- a/making_school_asignment_app/lib/page/home_page/widget/student_group_list.dart +++ b/making_school_asignment_app/lib/page/home_page/widget/student_group_list.dart @@ -45,7 +45,7 @@ class StudentGroupList extends StatelessWidget { padding: EdgeInsets.only(right: 8.r), child: Text( '${EnumUtils.formatGrade(item.grade)}${item.className}', - style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), + style: TextStyle(fontSize: 10.sp, color:Theme.of(context).primaryColor), ), ), Text( @@ -72,7 +72,7 @@ class StudentGroupList extends StatelessWidget { width: 55.r, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: const Color(0xFF4CC793), + color: Theme.of(context).primaryColor, ), child: Center( child: Text( @@ -109,7 +109,7 @@ class StudentGroupList extends StatelessWidget { padding: EdgeInsets.only(right: 8.r), child: Text( '${EnumUtils.formatGrade(item.grade)}${item.className}', - style: TextStyle(fontSize: 14.sp, color: Color(0xFF4CC793)), + style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor), ), ), Text( @@ -136,7 +136,7 @@ class StudentGroupList extends StatelessWidget { width: 55.r, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(20.r)), - color: const Color(0xFF4CC793), + color: Theme.of(context).primaryColor, ), child: Center( child: Text(