diff --git a/marking_app/lib/common/model/report/detail_base_info.dart b/marking_app/lib/common/model/report/detail_base_info.dart index 58648a7..3fe2a91 100644 --- a/marking_app/lib/common/model/report/detail_base_info.dart +++ b/marking_app/lib/common/model/report/detail_base_info.dart @@ -57,7 +57,13 @@ class BaseInfo extends Object { @JsonKey(name: 'RatePass') String ratePass; - BaseInfo(this.examName,this.examType,this.grade,this.subject,this.examTime,this.totalScore,this.avgScore,this.maxScore,this.rateGood,this.ratePass,); + @JsonKey(name: 'TotalRank') + int totalRank; + + @JsonKey(name: 'JoinCount') + int joinCount; + + BaseInfo(this.examName,this.examType,this.grade,this.subject,this.examTime,this.totalScore,this.avgScore,this.maxScore,this.rateGood,this.ratePass,this.totalRank,this.joinCount,); factory BaseInfo.fromJson(Map srcJson) => _$BaseInfoFromJson(srcJson); diff --git a/marking_app/lib/pages/report_detail/index.dart b/marking_app/lib/pages/report_detail/index.dart index e74f68b..bb4e31a 100644 --- a/marking_app/lib/pages/report_detail/index.dart +++ b/marking_app/lib/pages/report_detail/index.dart @@ -404,7 +404,7 @@ class _ReportDetailState extends ConsumerState with CommonMixin { ), ), LabTitle('基本信息', 'assets/images/basic_info.png'), - BasicTable(baseInfo), + BasicTable(baseInfo,!widget.showGrade || !isGrade), LabTitle('总体水平', 'assets/images/overall_level.png'), OverallLevelTable( overallLevelRes!.data!.module1CJZL.sheets[0]), diff --git a/marking_app/lib/pages/report_detail/widgets/basic_table.dart b/marking_app/lib/pages/report_detail/widgets/basic_table.dart index 0a0b6b1..84bb212 100644 --- a/marking_app/lib/pages/report_detail/widgets/basic_table.dart +++ b/marking_app/lib/pages/report_detail/widgets/basic_table.dart @@ -5,8 +5,9 @@ import 'package:marking_app/pages/report_detail/widgets/basic_tablecell.dart'; class BasicTable extends StatelessWidget { final BaseInfo? baseInfo; + final bool? showGrade; - const BasicTable(this.baseInfo, {Key? key}) : super(key: key); + const BasicTable(this.baseInfo, this.showGrade ,{Key? key}) : super(key: key); @override Widget build(BuildContext context) { @@ -96,7 +97,23 @@ class BasicTable extends StatelessWidget { ], ), ), - ) + ), + if(showGrade == true) + Container( + decoration: BoxDecoration( + border: Border(bottom: BorderSide(width: 1, color: Color(0xFFE8EBFF))) + ), + child: IntrinsicHeight( + child: Row( + children: [ + Expanded(flex: 1, child: BasicTableCell('年级平均分排名', false)), + Expanded(flex: 1, child: BasicTableCell(baseInfo!.totalRank.toString(), true)), + Expanded(flex: 1, child: BasicTableCell('参考班级总数', false)), + Expanded(flex: 1, child: BasicTableCell(baseInfo!.joinCount.toString(), true)), + ], + ), + ), + ) ], ), );