Compare commits

..

No commits in common. "76b15038c69079efd2c94d4846fc858a07602e7c" and "25e95b44e087258a5f55b20b9217ebdb0011de15" have entirely different histories.

5 changed files with 88 additions and 134 deletions

View File

@ -10,8 +10,6 @@ class JobDoPapersStudentBus extends Object {
@JsonKey(name: 'studentName') @JsonKey(name: 'studentName')
String studentName; String studentName;
bool isFinish;
int pageIndex; int pageIndex;
bool isFirst; bool isFirst;
@ -21,7 +19,6 @@ class JobDoPapersStudentBus extends Object {
this.studentName, this.studentName,
this.pageIndex, this.pageIndex,
this.isFirst, this.isFirst,
this.isFinish,
); );
factory JobDoPapersStudentBus.fromJson(Map<String, dynamic> srcJson) => _$JobDoPapersStudentBusFromJson(srcJson); factory JobDoPapersStudentBus.fromJson(Map<String, dynamic> srcJson) => _$JobDoPapersStudentBusFromJson(srcJson);

View File

@ -90,9 +90,7 @@ class Questions extends Object {
@JsonKey(name: 'score') @JsonKey(name: 'score')
double? score; double? score;
double accuracy; // Questions(this.questionNo, this.answer, [this.score]);
Questions(this.questionNo, this.answer, this.accuracy, [this.score]);
factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson); factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson);

View File

@ -1,23 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/anti_shake_throttling.dart';
//
class ReturnToHomepage extends StatelessWidget {
const ReturnToHomepage({super.key});
@override
Widget build(BuildContext context) {
return InkWell(
onTap: () => easyThrottle('RETURN_TO_HOMEPAGE', () {
Navigator.of(context).popUntil(ModalRoute.withName(RouterManager.root));
}),
child: Container(
padding: EdgeInsets.only(right: 4.5.w),
alignment: Alignment.center,
child: Icon(Icons.home_rounded, size: 22.sp, color: Color.fromRGBO(135, 135, 135, 1)),
),
);
}
}

View File

@ -17,7 +17,6 @@ import 'package:marking_app/common/model/job/job_page_tab.dart';
import 'package:marking_app/common/model/job/job_review_submission.dart'; import 'package:marking_app/common/model/job/job_review_submission.dart';
import 'package:marking_app/common/model/job/marking_text_question_job.dart'; import 'package:marking_app/common/model/job/marking_text_question_job.dart';
import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart'; import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart';
import 'package:marking_app/components/ReturnToHomepage.dart';
import 'package:marking_app/pages/common/event_bus_mixin.dart'; import 'package:marking_app/pages/common/event_bus_mixin.dart';
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/bottom_annotation_switch_job.dart'; import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/bottom_annotation_switch_job.dart';
import 'package:marking_app/pages/homework_correction/eventBus/marking_text_question_job_tab_params_bus.dart'; import 'package:marking_app/pages/homework_correction/eventBus/marking_text_question_job_tab_params_bus.dart';
@ -75,8 +74,14 @@ class DoPapersJob extends HookWidget with EventBusMixin<DoPapersJobRefreshBus> {
elevation: 0, elevation: 0,
actions: [ actions: [
FavoriteWidget(() => refresh = true), FavoriteWidget(() => refresh = true),
SizedBox(width: 5.w), // Container(
ReturnToHomepage(), // padding: EdgeInsets.only(right: 4.w),
// alignment: Alignment.center,
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.end,
// children: [Icon(Icons.lightbulb_outline, size: 12.sp), SizedBox(width: 1.w), quickText('查看原卷')],
// ),
// ),
], ],
), ),
body: SafeArea( body: SafeArea(
@ -127,7 +132,8 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
try { try {
ToastUtils.showLoading(); ToastUtils.showLoading();
var _client = await getClient(); var _client = await getClient();
var _result = await _client.getJobWithStudents(JobConcernedWithStudentParams([taskId], isCommit: false, pageIndex: pageIndex)); var _result = await _client
.getJobWithStudents(JobConcernedWithStudentParams([taskId], isCommit: false, pageIndex: pageIndex));
if (_result.success) return _result.data; if (_result.success) return _result.data;
} catch (e) { } catch (e) {
ToastUtils.showError('获取数据失败,请重试'); ToastUtils.showError('获取数据失败,请重试');
@ -212,7 +218,8 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
quickText('已阅', color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp), quickText('已阅', color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
quickText(doMarkingInfo.value!.finishCount, color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.bold), quickText(doMarkingInfo.value!.finishCount,
color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.bold),
quickText('/', color: Color.fromRGBO(117, 117, 117, 1), size: 12.sp), quickText('/', color: Color.fromRGBO(117, 117, 117, 1), size: 12.sp),
quickText(doMarkingInfo.value!.surplusNo, color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp), quickText(doMarkingInfo.value!.surplusNo, color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
], ],
@ -224,7 +231,8 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
// //
@hwidget @hwidget
Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Function() exitCallback, required int taskId, required int jobId}) { Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context,
{required Function() exitCallback, required int taskId, required int jobId}) {
UseSwitchStudentAndType _useSwitchStudentAndType = UseSwitchStudentAndType.use(); // UseSwitchStudentAndType _useSwitchStudentAndType = UseSwitchStudentAndType.use(); //
// tab改变时 // tab改变时
@ -267,18 +275,23 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
case JobDoPapersStudentBus: case JobDoPapersStudentBus:
var studentInfo = val as JobDoPapersStudentBus; var studentInfo = val as JobDoPapersStudentBus;
_useSwitchStudentAndType.studentBusInfo.value = studentInfo; // _useSwitchStudentAndType.studentBusInfo.value = studentInfo; //
var selectedStudent = var selectedStudent = _useSwitchStudentAndType.studentData.value
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == studentInfo.studentId); .firstWhereOrNull((element) => element.studentId == studentInfo.studentId);
if (selectedStudent == null) { if (selectedStudent == null) {
// //
selectedStudent = JobConcernedWithStudent.fromJson(studentInfo.toJson()); selectedStudent = JobConcernedWithStudent.fromJson(studentInfo.toJson());
_useSwitchStudentAndType.studentData.value = [..._useSwitchStudentAndType.studentData.value, selectedStudent]; _useSwitchStudentAndType.studentData.value = [
..._useSwitchStudentAndType.studentData.value,
selectedStudent
];
_useSwitchStudentAndType.getDataForStudents(taskId: taskId); _useSwitchStudentAndType.getDataForStudents(taskId: taskId);
} }
_useSwitchStudentAndType.currentStudent.value = selectedStudent; _useSwitchStudentAndType.currentStudent.value = selectedStudent;
_useSwitchStudentAndType.isFinish.value = studentInfo.isFinish; print('是否是优先批阅:${studentInfo.isFirst}');
_useSwitchStudentAndType.isFirst.value = studentInfo.isFirst; _useSwitchStudentAndType.isFirst.value = studentInfo.isFirst;
_useSwitchStudentAndType.currentTab.value = _useSwitchStudentAndType.tabs.value.firstWhere((e) => e.pageIndex == studentInfo.pageIndex); _useSwitchStudentAndType.currentTab.value =
_useSwitchStudentAndType.tabs.value.firstWhere((e) => e.pageIndex == studentInfo.pageIndex);
print('是否是优先批阅1111${_useSwitchStudentAndType.isFirst}');
break; break;
case JobCheckSwitchingQuestionTabBus: case JobCheckSwitchingQuestionTabBus:
// //
@ -298,8 +311,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
}; };
}, []); }, []);
var _currentTab = _useSwitchStudentAndType.currentTab.value; print('加载的是否优先批阅:${_useSwitchStudentAndType.isFirst}');
return Container( return Container(
padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r), padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -316,7 +328,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
flex: 3, flex: 7,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10.w), padding: EdgeInsets.only(left: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -341,14 +353,15 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
); );
}).toList(), }).toList(),
onChanged: (value) { onChanged: (value) {
_useSwitchStudentAndType.currentTab.value = _useSwitchStudentAndType.tabs.value.firstWhere((element) => element.pageIndex == value); _useSwitchStudentAndType.currentTab.value =
_useSwitchStudentAndType.tabs.value.firstWhere((element) => element.pageIndex == value);
}, },
), ),
), ),
), ),
Expanded(flex: 1, child: SizedBox()), Expanded(flex: 1, child: SizedBox()),
Expanded( Expanded(
flex: 5, flex: 7,
child: Container( child: Container(
padding: EdgeInsets.only(left: 10.w), padding: EdgeInsets.only(left: 10.w),
decoration: BoxDecoration( decoration: BoxDecoration(
@ -376,55 +389,28 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value; JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
if (currentStudent?.studentId == value) return; if (currentStudent?.studentId == value) return;
_useSwitchStudentAndType.studentBusInfo.value = null; // BUS通知记录 _useSwitchStudentAndType.studentBusInfo.value = null; // BUS通知记录
_useSwitchStudentAndType.currentStudent.value = _useSwitchStudentAndType.currentStudent.value = _useSwitchStudentAndType.studentData.value
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value); .firstWhereOrNull((element) => element.studentId == value);
}, },
), ),
), ),
), ),
Expanded(flex: 1, child: SizedBox()), Expanded(flex: 1, child: SizedBox()),
Expanded( Expanded(
flex: 4, flex: 3,
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
if (_useSwitchStudentAndType.isFinish.value && _currentTab?.finishCount != _currentTab?.total)
Expanded(
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Icon(Icons.flip_camera_android_outlined, size: 10.sp, color: Theme.of(context).primaryColor.withOpacity(0.8)),
SizedBox(width: 1.w),
InkWell(
onTap: () => easyThrottle(
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
() {
var _pageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
if (_pageIndex == null) return;
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex));
},
),
child: quickText(
'继续批阅',
size: 10.sp,
decoration: TextDecoration.underline,
color: Theme.of(context).primaryColor.withOpacity(0.9),
),
),
SizedBox(width: 2.w),
],
),
),
Stack( Stack(
alignment: const FractionalOffset(0.52, 0.24), alignment: const FractionalOffset(0.52, 0.24),
children: [ children: [
Icon( Icon(
const IconData(0xe63d, fontFamily: "AlibabaIcon"), const IconData(0xe63d, fontFamily: "AlibabaIcon"),
size: 12.sp, size: 12.sp,
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1), color: _useSwitchStudentAndType.isFirst.value
? Color.fromRGBO(76, 199, 147, 1)
: Color.fromRGBO(164, 164, 164, 1),
), ),
quickText('优先', size: 4.sp, color: Colors.white), quickText('优先', size: 4.sp, color: Colors.white),
], ],
@ -433,7 +419,9 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
quickText( quickText(
'优先批阅', '优先批阅',
size: 10.sp, size: 10.sp,
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1), color: _useSwitchStudentAndType.isFirst.value
? Color.fromRGBO(76, 199, 147, 1)
: Color.fromRGBO(164, 164, 164, 1),
), ),
], ],
), ),
@ -548,13 +536,7 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
eventFire(model: JobQuestionsSwitch(jobDetails.taskId, jobDetails.studentId, jobDetails.paperId)); eventFire(model: JobQuestionsSwitch(jobDetails.taskId, jobDetails.studentId, jobDetails.paperId));
eventFire( eventFire(
model: JobDoPapersStudentBus( model: JobDoPapersStudentBus(
jobDetails.studentId, jobDetails.studentId, jobDetails.studentName, jobDetails.pageIndex, jobDetails.isFirst));
jobDetails.studentName,
jobDetails.pageIndex,
jobDetails.isFirst,
jobDetails.isFinish,
),
);
} }
return jobDetails; return jobDetails;
} }
@ -609,7 +591,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
return MyFutureBuilder.buildFutureBuilderOfSingleInstance<MarkingTextQuestionJob>(context, _future!, (jobData) { return MyFutureBuilder.buildFutureBuilderOfSingleInstance<MarkingTextQuestionJob>(context, _future!, (jobData) {
List<Questions> questions = jobData?.questions ?? []; List<Questions> questions = jobData?.questions ?? [];
bool canNormalPrevious = jobData != null && (jobData.prevId != 0 || jobData.previousPageIndex != null); // bool canNormalPrevious =
jobData != null && (jobData.prevId != 0 || jobData.previousPageIndex != null); //
bool canNormalNext = jobData != null && (jobData.nextId != 0 || jobData.nextPageIndex != null); // bool canNormalNext = jobData != null && (jobData.nextId != 0 || jobData.nextPageIndex != null); //
return Stack( return Stack(
@ -647,8 +630,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
focusColor: Theme.of(context).primaryColor, focusColor: Theme.of(context).primaryColor,
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1), backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
elevation: 6.r, elevation: 6.r,
onPressed: () => onPressed: () => easyThrottle('TestQuestionSwitch',
easyThrottle('TestQuestionSwitch', () => switchTestQuestions(jobData: jobData, toNextQuestion: false)), () => switchTestQuestions(jobData: jobData, toNextQuestion: false)),
child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 22.sp), child: Icon(Icons.arrow_back_ios, color: Colors.white, size: 22.sp),
), ),
), ),
@ -662,7 +645,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
tooltip: '点击前往下一题', tooltip: '点击前往下一题',
elevation: 6.r, elevation: 6.r,
backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1), backgroundColor: const Color.fromRGBO(24, 32, 32, 0.1),
onPressed: () => easyThrottle('TestQuestionSwitch', () => switchTestQuestions(jobData: jobData)), onPressed: () =>
easyThrottle('TestQuestionSwitch', () => switchTestQuestions(jobData: jobData)),
child: Icon(Icons.arrow_forward_ios, color: Colors.white, size: 22.sp), child: Icon(Icons.arrow_forward_ios, color: Colors.white, size: 22.sp),
), ),
), ),
@ -707,8 +691,10 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
eventFire(model: JobCheckSwitchingQuestionTabBus(jobData.pageIndex)); eventFire(model: JobCheckSwitchingQuestionTabBus(jobData.pageIndex));
}, },
viewHomeworkNotes: (JobReviewQuestions subJobQuestion) { viewHomeworkNotes: (JobReviewQuestions subJobQuestion) {
var _theBusModel = var _theBusModel = JobNotesViewBus(
JobNotesViewBus(taskId: jobData.taskId, paperId: jobData.paperId, questionNo: subJobQuestion.questionNo); taskId: jobData.taskId,
paperId: jobData.paperId,
questionNo: subJobQuestion.questionNo);
eventFire(model: _theBusModel); eventFire(model: _theBusModel);
}, },
scaffoldKeyPictureOverview: scaffoldKeyPictureOverview, scaffoldKeyPictureOverview: scaffoldKeyPictureOverview,
@ -803,12 +789,9 @@ Widget $examPaperAndScoringKeyboardView(
child: Container( child: Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w), padding: EdgeInsets.symmetric(vertical: 8.h),
decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 0.2.r, color: Colors.white))), decoration:
child: Row( BoxDecoration(border: Border(bottom: BorderSide(width: 0.2.r, color: Colors.white))),
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
@ -819,16 +802,7 @@ Widget $examPaperAndScoringKeyboardView(
child: quickText('', size: 11.sp, color: textColor), child: quickText('', size: 11.sp, color: textColor),
), ),
], ],
), )),
),
if (question.accuracy > 0)
Padding(
padding: EdgeInsets.only(bottom: 1.5.h),
child: quickText('正确率:${question.accuracy}%', size: 8.sp, color: Colors.white, align: TextAlign.end),
)
],
),
),
), ),
Container( Container(
child: Row( child: Row(
@ -841,7 +815,8 @@ Widget $examPaperAndScoringKeyboardView(
scoring: ScoringMethodEnum.CORRECT, scoring: ScoringMethodEnum.CORRECT,
questionNo: question.questionNo, questionNo: question.questionNo,
); );
var noAnswerQuestion = _useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null); var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit(); if (noAnswerQuestion == null) toSubmit();
}, },
child: Container( child: Container(
@ -849,7 +824,9 @@ Widget $examPaperAndScoringKeyboardView(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText( child: quickText(
'', '',
color: subJobQuestion.score == 2 ? Color.fromRGBO(255, 152, 0, 1) : Color.fromRGBO(114, 114, 114, 1), color: subJobQuestion.score == 2
? Color.fromRGBO(255, 152, 0, 1)
: Color.fromRGBO(114, 114, 114, 1),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
size: 12.sp, size: 12.sp,
), ),
@ -864,7 +841,8 @@ Widget $examPaperAndScoringKeyboardView(
scoring: ScoringMethodEnum.CORRECT_HALF, scoring: ScoringMethodEnum.CORRECT_HALF,
questionNo: question.questionNo, questionNo: question.questionNo,
); );
var noAnswerQuestion = _useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null); var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit(); if (noAnswerQuestion == null) toSubmit();
}, },
bgc: Color.fromRGBO(237, 237, 237, 1), bgc: Color.fromRGBO(237, 237, 237, 1),
@ -873,7 +851,9 @@ Widget $examPaperAndScoringKeyboardView(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText( child: quickText(
'', '',
color: subJobQuestion.score == 1 ? Color.fromRGBO(255, 152, 0, 1) : Color.fromRGBO(114, 114, 114, 1), color: subJobQuestion.score == 1
? Color.fromRGBO(255, 152, 0, 1)
: Color.fromRGBO(114, 114, 114, 1),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
size: 12.sp, size: 12.sp,
), ),
@ -888,7 +868,8 @@ Widget $examPaperAndScoringKeyboardView(
scoring: ScoringMethodEnum.WRONG, scoring: ScoringMethodEnum.WRONG,
questionNo: question.questionNo, questionNo: question.questionNo,
); );
var noAnswerQuestion = _useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null); var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit(); if (noAnswerQuestion == null) toSubmit();
}, },
bgc: Color.fromRGBO(237, 237, 237, 1), bgc: Color.fromRGBO(237, 237, 237, 1),
@ -897,7 +878,9 @@ Widget $examPaperAndScoringKeyboardView(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText( child: quickText(
'', '',
color: subJobQuestion.score == 0 ? Color.fromRGBO(255, 152, 0, 1) : Color.fromRGBO(114, 114, 114, 1), color: subJobQuestion.score == 0
? Color.fromRGBO(255, 152, 0, 1)
: Color.fromRGBO(114, 114, 114, 1),
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
size: 12.sp, size: 12.sp,
), ),
@ -1004,7 +987,8 @@ Widget $examPaperAndScoringKeyboardView(
bgc: Colors.white, bgc: Colors.white,
splashColor: Theme.of(context).primaryColor.withOpacity(0.8), splashColor: Theme.of(context).primaryColor.withOpacity(0.8),
borderRadius: BorderRadius.circular(2.r), borderRadius: BorderRadius.circular(2.r),
onTap: () => easyThrottle('homework_review_submission_main_callback', () => toSubmit(), duration: Duration(seconds: 1)), onTap: () => easyThrottle('homework_review_submission_main_callback', () => toSubmit(),
duration: Duration(seconds: 1)),
child: Container( child: Container(
width: double.infinity, width: double.infinity,
alignment: Alignment.center, alignment: Alignment.center,
@ -1027,7 +1011,8 @@ Widget $examPaperAndScoringKeyboardView(
} }
@swidget @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, BorderRadius? borderRadius}) {
return Material( return Material(
color: bgc, color: bgc,
borderRadius: borderRadius, borderRadius: borderRadius,

View File

@ -15,8 +15,6 @@ import 'package:marking_app/utils/request/rest_client.dart';
class UseSwitchStudentAndType with CommonMixin, EventBusMixin { class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
ValueNotifier<bool> exitPromptFlag; // 退 ValueNotifier<bool> exitPromptFlag; // 退
ValueNotifier<bool> isFirst; ValueNotifier<bool> isFirst;
ValueNotifier<bool> isFinish;
ValueNotifier<List<JobConcernedWithStudent>> studentData; // ValueNotifier<List<JobConcernedWithStudent>> studentData; //
ValueNotifier<List<JobPageTab>> tabs; // ValueNotifier<List<JobPageTab>> tabs; //
@ -38,7 +36,6 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
required this.studentBusInfo, required this.studentBusInfo,
required this.exitPromptFlag, required this.exitPromptFlag,
required this.isFirst, required this.isFirst,
required this.isFinish,
}); });
// //
@ -63,7 +60,6 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
studentBusInfo: theStudentBus, studentBusInfo: theStudentBus,
exitPromptFlag: useState<bool>(false), exitPromptFlag: useState<bool>(false),
isFirst: useState<bool>(false), isFirst: useState<bool>(false),
isFinish: useState<bool>(false),
); );
} }
@ -99,7 +95,8 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
} }
/// tab类型数据 /// tab类型数据
Future<JobPageTab?> refreshQuestionTypeData(BuildContext context, {required int taskId, required Function() exitCallback}) async { Future<JobPageTab?> refreshQuestionTypeData(BuildContext context,
{required int taskId, required Function() exitCallback}) async {
List<JobPageTab>? tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false); List<JobPageTab>? tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false);
if (tabDatas?.isNotEmpty ?? false) { if (tabDatas?.isNotEmpty ?? false) {
JobPageTab? tabJob = tabDatas!.firstWhereOrNull((e) => e.finishCount < e.total); JobPageTab? tabJob = tabDatas!.firstWhereOrNull((e) => e.finishCount < e.total);