添加继续批阅按钮的 顺序批阅逻辑
This commit is contained in:
parent
4919e72008
commit
951175a5cc
|
|
@ -65,6 +65,10 @@ class DoPaperDetailsResult extends Object {
|
||||||
@JsonKey(name: 'lastPage', toJson: _lastPageToJson)
|
@JsonKey(name: 'lastPage', toJson: _lastPageToJson)
|
||||||
LastPage? lastPage;
|
LastPage? lastPage;
|
||||||
|
|
||||||
|
@JsonKey(name: 'continuePage', toJson: _continuePageToJson)
|
||||||
|
ContinuePage? continuePage;
|
||||||
|
|
||||||
|
|
||||||
@JsonKey(name: 'nextPage', toJson: _nextPageToJson)
|
@JsonKey(name: 'nextPage', toJson: _nextPageToJson)
|
||||||
NextPage? nextPage;
|
NextPage? nextPage;
|
||||||
|
|
||||||
|
|
@ -91,6 +95,7 @@ class DoPaperDetailsResult extends Object {
|
||||||
this.unSubmitStudents,
|
this.unSubmitStudents,
|
||||||
this.lastPage,
|
this.lastPage,
|
||||||
this.nextPage,
|
this.nextPage,
|
||||||
|
this.continuePage,
|
||||||
this.templateIdKeys,
|
this.templateIdKeys,
|
||||||
this.templateIdKeyMap,
|
this.templateIdKeyMap,
|
||||||
this.priority,
|
this.priority,
|
||||||
|
|
@ -140,6 +145,8 @@ class DoPaperDetailsResult extends Object {
|
||||||
|
|
||||||
static Map<String, dynamic>? _nextPageToJson(NextPage? example) => example?.toJson();
|
static Map<String, dynamic>? _nextPageToJson(NextPage? example) => example?.toJson();
|
||||||
static Map<String, dynamic>? _lastPageToJson(LastPage? example) => example?.toJson();
|
static Map<String, dynamic>? _lastPageToJson(LastPage? example) => example?.toJson();
|
||||||
|
static Map<String, dynamic>? _continuePageToJson(ContinuePage? example) => example?.toJson();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
|
|
@ -252,3 +259,23 @@ class NextPage extends Object {
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$NextPageToJson(this);
|
Map<String, dynamic> 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<String, dynamic> srcJson) => _$ContinuePageFromJson(srcJson);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$ContinuePageToJson(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -237,8 +237,8 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
int? submitCount = data?.submitCount; // 提交数量
|
int? submitCount = data?.submitCount; // 提交数量
|
||||||
int? annotatedCount = data?.annotatedCount; // 批阅数量
|
int? annotatedCount = data?.annotatedCount; // 批阅数量
|
||||||
// || (submitCount == annotatedCount || (param.templateId == null && param.studentId == null))
|
// || (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(
|
callFun() => easyThrottle(
|
||||||
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
|
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
|
||||||
() {
|
() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue