班级基本信息字段增加
This commit is contained in:
parent
09a275b12f
commit
65e57bcae8
|
|
@ -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<String, dynamic> srcJson) => _$BaseInfoFromJson(srcJson);
|
||||
|
||||
|
|
|
|||
|
|
@ -404,7 +404,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> 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]),
|
||||
|
|
|
|||
|
|
@ -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)),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue