字段类型和样式修改

This commit is contained in:
machuanyu 2024-02-28 14:37:06 +08:00
parent 0b60055e88
commit 40ff80118c
6 changed files with 15 additions and 16 deletions

View File

@ -58,10 +58,10 @@ class BaseInfo extends Object {
String ratePass; String ratePass;
@JsonKey(name: 'TotalRank') @JsonKey(name: 'TotalRank')
int totalRank; int? totalRank;
@JsonKey(name: 'JoinCount') @JsonKey(name: 'JoinCount')
int 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,); 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,);

View File

@ -107,9 +107,9 @@ class BasicTable extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Expanded(flex: 1, child: BasicTableCell('平均分排名', false)), Expanded(flex: 1, child: BasicTableCell('平均分排名', false)),
Expanded(flex: 1, child: BasicTableCell(baseInfo!.totalRank.toString(), true)), Expanded(flex: 1, child: BasicTableCell(baseInfo!.totalRank != null?baseInfo!.totalRank.toString():'--', true)),
Expanded(flex: 1, child: BasicTableCell('参考班级总数', false)), Expanded(flex: 1, child: BasicTableCell('参考班级总数', false)),
Expanded(flex: 1, child: BasicTableCell(baseInfo!.joinCount.toString(), true)), Expanded(flex: 1, child: BasicTableCell(baseInfo!.joinCount != null?baseInfo!.joinCount.toString():'--', true)),
], ],
), ),
), ),

View File

@ -114,7 +114,7 @@ class _CardListState extends State<CardList> {
headingRowDecoration: BoxDecoration(color: Color(0xFFF0F3FF)), headingRowDecoration: BoxDecoration(color: Color(0xFFF0F3FF)),
fixedColumnsColor: Color(0xFFF0F3FF), fixedColumnsColor: Color(0xFFF0F3FF),
fixedCornerColor: Colors.grey[400], fixedCornerColor: Colors.grey[400],
minWidth: 70.r * widget.headList.length, minWidth: 70.r * widget.headList.length + 10.r,
fixedTopRows: widget.fixedRows!, fixedTopRows: widget.fixedRows!,
fixedLeftColumns: widget.fixedCols!, fixedLeftColumns: widget.fixedCols!,
sortColumnIndex: _sortColumnIndex, sortColumnIndex: _sortColumnIndex,

View File

@ -81,6 +81,7 @@ class _KnowPointTableState extends State<KnowPointTable> {
scrollController: _controller, scrollController: _controller,
columnSpacing: 0, columnSpacing: 0,
horizontalMargin: 0, horizontalMargin: 0,
dataRowHeight:50.r,
bottomMargin: 0, bottomMargin: 0,
border: TableBorder( border: TableBorder(
horizontalInside: BorderSide( horizontalInside: BorderSide(

View File

@ -269,7 +269,6 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if(examOrigin != null && examOrigin!.pageIndex > 1)
InkWell( InkWell(
onTap: () { onTap: () {
var num = examOrigin!.pageIndex; var num = examOrigin!.pageIndex;
@ -284,15 +283,15 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
vertical: 2.r, horizontal: 5.r), vertical: 2.r, horizontal: 5.r),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: Color(0xFF6787FD), color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9),
width: 1.r), width: 1.r),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(2.r)), Radius.circular(2.r)),
), ),
child: Text( child: Text(
'一页', '一页',
style: TextStyle( style: TextStyle(
color: Color(0xFF6787FD), color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9),
), ),
), ),
), ),
@ -303,9 +302,8 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
)*/ )*/
), ),
SizedBox( SizedBox(
width: 30.r, width: 15.r,
), ),
if(examOrigin != null && examOrigin!.pageIndex < examOriginList.length)
InkWell( InkWell(
onTap: () { onTap: () {
var num = examOrigin!.pageIndex; var num = examOrigin!.pageIndex;
@ -321,15 +319,15 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
vertical: 2.r, horizontal: 5.r), vertical: 2.r, horizontal: 5.r),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: Color(0xFF6787FD), color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9),
width: 1.r), width: 1.r),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(2.r)), Radius.circular(2.r)),
), ),
child: Text( child: Text(
'一页', '一页',
style: TextStyle( style: TextStyle(
color: Color(0xFF6787FD), color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9),
), ),
), ),
), ),

View File

@ -297,7 +297,7 @@ class _TheReportState extends ConsumerState<TheReport>
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 8.h, horizontal: 20.r), vertical: 8.h, horizontal: 20.r),
width: width:
MediaQuery.of(context).size.width / 2 - 50.r, (MediaQuery.of(context).size.width - 80.r) / 2,
child: Row( child: Row(
children: [ children: [
Text( Text(
@ -334,7 +334,7 @@ class _TheReportState extends ConsumerState<TheReport>
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 8.h, horizontal: 20.r), vertical: 8.h, horizontal: 20.r),
width: width:
MediaQuery.of(context).size.width / 2 - 60.r, (MediaQuery.of(context).size.width - 80.r) / 2,
child: Row( child: Row(
children: [ children: [
Text( Text(