diff --git a/marking_app/lib/common/model/job/marking_text_question_job_tab_params.dart b/marking_app/lib/common/model/job/marking_text_question_job_tab_params.dart index 5aad5b9..469cde5 100644 --- a/marking_app/lib/common/model/job/marking_text_question_job_tab_params.dart +++ b/marking_app/lib/common/model/job/marking_text_question_job_tab_params.dart @@ -18,17 +18,20 @@ class MarkingTextQuestionJobTabParams extends Object { @JsonKey(name: 'studentId') int? studentId; + @JsonKey(name: 'defaultFirst') + bool? isDefaultFirst; + MarkingTextQuestionJobTabParams({ required this.taskId, required this.pageIndex, + this.isDefaultFirst, this.paperId, this.studentId, this.nextPageIndex, this.previousPageIndex, }); - factory MarkingTextQuestionJobTabParams.fromJson(Map srcJson) => - _$MarkingTextQuestionJobTabParamsFromJson(srcJson); + factory MarkingTextQuestionJobTabParams.fromJson(Map srcJson) => _$MarkingTextQuestionJobTabParamsFromJson(srcJson); Map toJson() => _$MarkingTextQuestionJobTabParamsToJson(this); } diff --git a/marking_app/lib/pages/homework_correction/do_papers_job.dart b/marking_app/lib/pages/homework_correction/do_papers_job.dart index 17d49d6..8199917 100644 --- a/marking_app/lib/pages/homework_correction/do_papers_job.dart +++ b/marking_app/lib/pages/homework_correction/do_papers_job.dart @@ -151,7 +151,6 @@ class ReviewStatusInfo extends HookWidget with CommonMixin { if (doMarkingInfo.value == null) return Container(); return InkWell( onTap: () async { - print('点击了...'); List? students = await getStudents(); if (students == null) return; students = students..sort((e, e1) => e.studentName.compareTo(e1.studentName)); @@ -237,7 +236,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func }); // 当前tab改变时 - useValueChanged(_useSwitchStudentAndType.currentTab.value, (_, __) { + useValueChanged(_useSwitchStudentAndType.currentTab.value, (_oldValue, __) { var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex; JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value; if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据 @@ -313,7 +312,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func _useSwitchStudentAndType.eventCancel(); }; }, []); - print(_useSwitchStudentAndType.tabs.value.firstWhereOrNull((e) => e.finishCount < e.total)?.toJson()); return Container( padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r), decoration: BoxDecoration( @@ -524,6 +522,7 @@ class ExamPaperAndScoringView extends StatefulHookConsumerWidget { class _EexamPaperAndScoringViewState extends ConsumerState with EventBusMixin, CommonMixin { final GlobalKey scaffoldKeyPictureOverview = GlobalKey(); Future? _future; // 考试试卷 + MarkingTextQuestionJob? theJobData; bool firstLoading = true; JobDoSynchroTab? synchroTabs; late RemoveListener _doJobObtainGradingDataProviderListener; // 批注关闭监听 @@ -539,13 +538,18 @@ class _EexamPaperAndScoringViewState extends ConsumerState _result = await _client.getJobTabOfExam(params); if (_result.success) { var jobDetails = _result.data; + theJobData = jobDetails; if (jobDetails != null) { jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex - 1); jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex - 1); @@ -613,6 +618,7 @@ class _EexamPaperAndScoringViewState extends ConsumerState 0) Padding( padding: EdgeInsets.only(bottom: 1.5.h), - child: quickText('正确率:${question.accuracy}%', size: 8.sp, color: Colors.white, align: TextAlign.end), + child: quickText( + '正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%', + size: 8.sp, + color: Colors.white, + align: TextAlign.end, + ), ) ], ), @@ -1063,7 +1073,7 @@ Widget $examPaperAndScoringKeyboardView( } @swidget -Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadius? borderRadius}) { +Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadiusGeometry? borderRadius}) { return Material( color: bgc, borderRadius: borderRadius,