diff --git a/making_school_asignment_app/lib/common/job/marking_models/do_paper_details_result.dart b/making_school_asignment_app/lib/common/job/marking_models/do_paper_details_result.dart index d8a8406..3cb579e 100644 --- a/making_school_asignment_app/lib/common/job/marking_models/do_paper_details_result.dart +++ b/making_school_asignment_app/lib/common/job/marking_models/do_paper_details_result.dart @@ -65,6 +65,10 @@ class DoPaperDetailsResult extends Object { @JsonKey(name: 'lastPage', toJson: _lastPageToJson) LastPage? lastPage; + @JsonKey(name: 'continuePage', toJson: _continuePageToJson) + ContinuePage? continuePage; + + @JsonKey(name: 'nextPage', toJson: _nextPageToJson) NextPage? nextPage; @@ -91,6 +95,7 @@ class DoPaperDetailsResult extends Object { this.unSubmitStudents, this.lastPage, this.nextPage, + this.continuePage, this.templateIdKeys, this.templateIdKeyMap, this.priority, @@ -140,6 +145,8 @@ class DoPaperDetailsResult extends Object { static Map? _nextPageToJson(NextPage? example) => example?.toJson(); static Map? _lastPageToJson(LastPage? example) => example?.toJson(); + static Map? _continuePageToJson(ContinuePage? example) => example?.toJson(); + } @JsonSerializable() @@ -252,3 +259,23 @@ class NextPage extends Object { Map toJson() => _$NextPageToJson(this); } + + +@JsonSerializable() + class ContinuePage extends Object { + + @JsonKey(name: 'templateId') + int templateId; + + @JsonKey(name: 'studentId') + int studentId; + + ContinuePage(this.templateId,this.studentId,); + + factory ContinuePage.fromJson(Map srcJson) => _$ContinuePageFromJson(srcJson); + + Map toJson() => _$ContinuePageToJson(this); + +} + + diff --git a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/dropdown_switch_students_type.dart b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/dropdown_switch_students_type.dart index aa86086..191a0ed 100644 --- a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/dropdown_switch_students_type.dart +++ b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/dropdown_switch_students_type.dart @@ -237,8 +237,8 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false}) int? submitCount = data?.submitCount; // 提交数量 int? annotatedCount = data?.annotatedCount; // 批阅数量 // || (submitCount == annotatedCount || (param.templateId == null && param.studentId == null)) - // TODO true 这里如何判断当前题是否是顺序应该批阅的题 如 1/2/3/4 题 1、2题都已经批阅 目前所在位置是第4题 这个继续批阅的按钮如何判断应该展示 - if (data == null || (data.needAnnotate ? true : data.totalUnAnnotateCount <= 0) ) return const SizedBox(); + // if (data == null || (data.needAnnotate ? true : data.totalUnAnnotateCount <= 0) ) return const SizedBox(); + if (data == null || (data.needAnnotate ? (data.continuePage == null ? true : data.continuePage!.templateId == data.templateId) : data.totalUnAnnotateCount <= 0)) return const SizedBox(); callFun() => easyThrottle( 'DO_PAPERS_JOB_CONTINUE_TO_REVIEW', () {