总体水平,重点关注列表固定第一列
This commit is contained in:
parent
ea250d0c62
commit
39d0686b91
|
|
@ -49,6 +49,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
List<ComboData> classList = []; //班级
|
List<ComboData> classList = []; //班级
|
||||||
ComboData currentSubject = ComboData('', '');
|
ComboData currentSubject = ComboData('', '');
|
||||||
ComboData currentClass = ComboData('', '');
|
ComboData currentClass = ComboData('', '');
|
||||||
|
|
||||||
// List<ComboData> questionClassList = []; //小题得分班级
|
// List<ComboData> questionClassList = []; //小题得分班级
|
||||||
ComboData questionCurrentClass = ComboData('', '');
|
ComboData questionCurrentClass = ComboData('', '');
|
||||||
bool isClass = false;
|
bool isClass = false;
|
||||||
|
|
@ -82,12 +83,12 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
classList = List.from(res.data!);
|
classList = List.from(res.data!);
|
||||||
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
questionCurrentClass = ComboData(0, '全部', isCheck: true);
|
||||||
classList.insert(0,questionCurrentClass);
|
classList.insert(0, questionCurrentClass);
|
||||||
// classList[1].isCheck = true;
|
// classList[1].isCheck = true;
|
||||||
currentClass = classList[1];
|
currentClass = classList[1];
|
||||||
|
|
||||||
/* questionClassList = List.from(res.data!);
|
/* questionClassList = List.from(res.data!);
|
||||||
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
||||||
questionClassList.insert(0,questionCurrentClass);*/
|
questionClassList.insert(0,questionCurrentClass);*/
|
||||||
|
|
||||||
|
|
@ -105,7 +106,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
await clientReport.getReportDetail(widget.examId,
|
await clientReport.getReportDetail(widget.examId,
|
||||||
widget.showGrade && isGrade ? -1 : currentClass.value);
|
widget.showGrade && isGrade ? -1 : currentClass.value);
|
||||||
// print('*************result=${result.message}');
|
// print('*************result=${result.message}');
|
||||||
if(result.code == 200){
|
if (result.code == 200) {
|
||||||
setState(() {
|
setState(() {
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
questionCurrentPage = 1;
|
questionCurrentPage = 1;
|
||||||
|
|
@ -117,12 +118,11 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
getQuestionTable();
|
getQuestionTable();
|
||||||
getKnowPointTable();
|
getKnowPointTable();
|
||||||
getCard();
|
getCard();
|
||||||
}else{
|
} else {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
ToastUtils.showError(result.message.toString());
|
ToastUtils.showError(result.message.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//小题得分
|
//小题得分
|
||||||
|
|
@ -132,21 +132,21 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
"%%%%%%%%%%%%%%%%%%%widget.examId=${widget.examId}&questionCurrentClass.value=${questionCurrentClass.value}¤tSubject.value=${currentSubject.value}");
|
"%%%%%%%%%%%%%%%%%%%widget.examId=${widget.examId}&questionCurrentClass.value=${questionCurrentClass.value}¤tSubject.value=${currentSubject.value}");
|
||||||
ReportCardParams params = ReportCardParams(
|
ReportCardParams params = ReportCardParams(
|
||||||
examId: widget.examId,
|
examId: widget.examId,
|
||||||
classId: isGrade?questionCurrentClass.value:currentClass.value,
|
classId: isGrade ? questionCurrentClass.value : currentClass.value,
|
||||||
// classId: 494760774623317,
|
// classId: 494760774623317,
|
||||||
subject: currentSubject.value,
|
subject: currentSubject.value,
|
||||||
page: questionCurrentPage,
|
page: questionCurrentPage,
|
||||||
limit: pageSize);
|
limit: pageSize);
|
||||||
BaseStructureResultReport<SmallQuestion> res =
|
BaseStructureResultReport<SmallQuestion> res =
|
||||||
await clientReport.getQuestion(params);
|
await clientReport.getQuestion(params);
|
||||||
print('res.data!.total=${res.code== 200 ?res.data!.bodyExcelData.sheets[0].bodyData.length:''}');
|
print(
|
||||||
if(res.code != 200 || res.data == null){
|
'res.data!.total=${res.code == 200 ? res.data!.bodyExcelData.sheets[0].bodyData.length : ''}');
|
||||||
|
if (res.code != 200 || res.data == null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
smallQuestionRes = null;
|
smallQuestionRes = null;
|
||||||
questionTotalPage = 0;
|
questionTotalPage = 0;
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
}else{
|
|
||||||
setState(() {
|
setState(() {
|
||||||
smallQuestionRes = res;
|
smallQuestionRes = res;
|
||||||
questionTotalPage = (res.data!.total / pageSize).ceil();
|
questionTotalPage = (res.data!.total / pageSize).ceil();
|
||||||
|
|
@ -156,19 +156,22 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
//知识点
|
//知识点
|
||||||
void getKnowPointTable() async {
|
void getKnowPointTable() async {
|
||||||
RestClientReport clientReport = await getClientReport();
|
RestClientReport clientReport = await getClientReport();
|
||||||
BaseStructureResultReport<QuestionKnowPoint> res =
|
BaseStructureResultReport<QuestionKnowPoint> res =
|
||||||
await clientReport.getKnowPoint(
|
await clientReport.getKnowPoint(
|
||||||
//494760774623317
|
//494760774623317
|
||||||
widget.examId,isGrade ? questionCurrentClass.value:currentClass.value,currentSubject.value
|
widget.examId,
|
||||||
);
|
isGrade ? questionCurrentClass.value : currentClass.value,
|
||||||
|
currentSubject.value);
|
||||||
setState(() {
|
setState(() {
|
||||||
knowPointRes = res;
|
knowPointRes = res;
|
||||||
});
|
});
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getCard() async {
|
void getCard() async {
|
||||||
RestClientReport clientReport = await getClientReport();
|
RestClientReport clientReport = await getClientReport();
|
||||||
|
|
||||||
|
|
@ -229,31 +232,31 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void refreshData(item, type,index) {
|
void refreshData(item, type, index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
if(type == 'classList'){
|
if (type == 'classList') {
|
||||||
currentClass = item;
|
currentClass = item;
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
}else if(type == 'questionClassList'){
|
} else if (type == 'questionClassList') {
|
||||||
questionCurrentClass = item;
|
questionCurrentClass = item;
|
||||||
questionCurrentPage = 1;
|
questionCurrentPage = 1;
|
||||||
}else if(type == 'subjectList'){
|
} else if (type == 'subjectList') {
|
||||||
currentSubject = item;
|
currentSubject = item;
|
||||||
questionCurrentPage = 1;
|
questionCurrentPage = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if(type == 'classList'){
|
if (type == 'classList') {
|
||||||
getBaseInfo();
|
getBaseInfo();
|
||||||
}
|
}
|
||||||
if(type == 'questionClassList' || type == 'subjectList' || !isGrade){
|
if (type == 'questionClassList' || type == 'subjectList' || !isGrade) {
|
||||||
getQuestionTable();
|
getQuestionTable();
|
||||||
getKnowPointTable();
|
getKnowPointTable();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showSubjectDialog(
|
void showSubjectDialog(BuildContext context, List<ComboData> list,
|
||||||
BuildContext context, List<ComboData> list, String type,ComboData currentSelect) {
|
String type, ComboData currentSelect) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|
@ -274,29 +277,28 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
element.isCheck = false;
|
element.isCheck = false;
|
||||||
});
|
});
|
||||||
// item!.isCheck = true;
|
// item!.isCheck = true;
|
||||||
if(item!.value == currentSelect.value){
|
if (item!.value == currentSelect.value) {
|
||||||
item!.isCheck = true;
|
item!.isCheck = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
refreshData(item, type,index);
|
refreshData(item, type, index);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
child: type == 'classList' && index ==0?Container():
|
child: type == 'classList' && index == 0
|
||||||
Padding(
|
? Container()
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
: Padding(
|
||||||
child: Center(
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
child: Text(
|
child: Center(
|
||||||
item!.text,
|
child: Text(
|
||||||
style: TextStyle(
|
item!.text,
|
||||||
fontSize: 14.r,
|
style: TextStyle(
|
||||||
color:
|
fontSize: 14.r,
|
||||||
item.value == currentSelect.value
|
color: item.value == currentSelect.value
|
||||||
// item.isCheck
|
// item.isCheck
|
||||||
? Color(0xFF5F81FD)
|
? Color(0xFF5F81FD)
|
||||||
: Color(0xFF2E2E2E)),
|
: Color(0xFF2E2E2E)),
|
||||||
))),
|
))),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: list.length,
|
itemCount: list.length,
|
||||||
|
|
@ -451,7 +453,8 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showSubjectDialog(context, classList, 'classList',currentClass);
|
showSubjectDialog(context, classList,
|
||||||
|
'classList', currentClass);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
|
@ -476,62 +479,116 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
LabTitle('基本信息', 'assets/images/basic_info.png'),
|
LabTitle('基本信息', 'assets/images/basic_info.png'),
|
||||||
BasicTable(baseInfo,!widget.showGrade || !isGrade),
|
BasicTable(baseInfo, !widget.showGrade || !isGrade),
|
||||||
LabTitle('总体水平', 'assets/images/overall_level.png'),
|
LabTitle('总体水平', 'assets/images/overall_level.png'),
|
||||||
OverallLevelTable(overallLevelRes!.data!.module1CJZL.sheets[0]),
|
overallLevelRes!.data!.module1CJZL != null && overallLevelRes!
|
||||||
|
.data!.module1CJZL.sheets[0].bodyData.length > 0
|
||||||
|
?
|
||||||
|
Container(
|
||||||
|
height: overallLevelRes!
|
||||||
|
.data!.module1CJZL.sheets[0].bodyData.length>5? 300.r : overallLevelRes!
|
||||||
|
.data!.module1CJZL.sheets[0].bodyData.length * 50.r + 40.r,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
|
child: CardList(
|
||||||
|
headList: overallLevelRes!
|
||||||
|
.data!.module1CJZL.sheets[0].headData,
|
||||||
|
bodyList: overallLevelRes!
|
||||||
|
.data!.module1CJZL.sheets[0].bodyData,
|
||||||
|
isScore: true,
|
||||||
|
fixedRows: 1,
|
||||||
|
fixedCols: 1,
|
||||||
|
),
|
||||||
|
):NoData(),
|
||||||
|
|
||||||
|
// OverallLevelTable(overallLevelRes!.data!.module1CJZL.sheets[0]),
|
||||||
LabTitle('重点关注学生', 'assets/images/reports_focus.png'),
|
LabTitle('重点关注学生', 'assets/images/reports_focus.png'),
|
||||||
overallLevelRes!
|
overallLevelRes!.data!.module2ZDGZ.topExcelData != null
|
||||||
.data!.module2ZDGZ.topExcelData != null?
|
?
|
||||||
OverallLevelTable(overallLevelRes!
|
/*OverallLevelTable(overallLevelRes!
|
||||||
.data!.module2ZDGZ.topExcelData?.sheets[0]):NoData(),
|
.data!.module2ZDGZ.topExcelData?.sheets[0])*/
|
||||||
|
Container(
|
||||||
|
height: 300.r,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
|
child: CardList(
|
||||||
|
headList: overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.topExcelData!.sheets[0].headData,
|
||||||
|
bodyList: overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.topExcelData!.sheets[0].bodyData,
|
||||||
|
isScore: true,
|
||||||
|
isHtml:true,
|
||||||
|
fixedRows: 1,
|
||||||
|
fixedCols: 1,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: NoData(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
),
|
),
|
||||||
if(overallLevelRes!
|
if (overallLevelRes!.data!.module2ZDGZ.topExcelData !=
|
||||||
.data!.module2ZDGZ.topExcelData != null)
|
null)
|
||||||
OverallLevelTable(overallLevelRes!
|
/* OverallLevelTable(overallLevelRes!
|
||||||
.data!.module2ZDGZ.bottomExcelData?.sheets[0]),
|
.data!.module2ZDGZ.bottomExcelData?.sheets[0]),*/
|
||||||
|
Container(
|
||||||
|
height: 300.r,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
|
child: CardList(
|
||||||
|
headList: overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.bottomExcelData!.sheets[0].headData,
|
||||||
|
bodyList: overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.bottomExcelData!.sheets[0].bodyData,
|
||||||
|
isScore: true,
|
||||||
|
isHtml:true,
|
||||||
|
fixedRows: 1,
|
||||||
|
fixedCols: 1,
|
||||||
|
),
|
||||||
|
),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
LabTitle('小题得分', 'assets/images/reports_score.png'),
|
LabTitle('小题得分', 'assets/images/reports_score.png'),
|
||||||
Expanded(child: Text(''),),
|
Expanded(
|
||||||
if(isGrade)
|
child: Text(''),
|
||||||
Container(
|
),
|
||||||
padding: EdgeInsets.symmetric(
|
if (isGrade)
|
||||||
vertical: 2.r, horizontal: 10.r),
|
Container(
|
||||||
margin: EdgeInsets.only(right: 14.r),
|
padding: EdgeInsets.symmetric(
|
||||||
decoration: BoxDecoration(
|
vertical: 2.r, horizontal: 10.r),
|
||||||
color: Color(0xFF6787FD),
|
margin: EdgeInsets.only(right: 14.r),
|
||||||
borderRadius:
|
decoration: BoxDecoration(
|
||||||
BorderRadius.all(Radius.circular(15.r)),
|
color: Color(0xFF6787FD),
|
||||||
),
|
borderRadius:
|
||||||
child: InkWell(
|
BorderRadius.all(Radius.circular(15.r)),
|
||||||
onTap: () {
|
),
|
||||||
showSubjectDialog(context, classList, 'questionClassList',questionCurrentClass);
|
child: InkWell(
|
||||||
},
|
onTap: () {
|
||||||
child: Row(
|
showSubjectDialog(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
context,
|
||||||
children: [
|
classList,
|
||||||
Text(
|
'questionClassList',
|
||||||
questionCurrentClass.text,
|
questionCurrentClass);
|
||||||
style: TextStyle(
|
},
|
||||||
fontSize: 14.sp,
|
child: Row(
|
||||||
color: Colors.white,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
fontWeight: FontWeight.w500),
|
children: [
|
||||||
),
|
Text(
|
||||||
Padding(
|
questionCurrentClass.text,
|
||||||
padding: EdgeInsets.only(left: 8.r),
|
style: TextStyle(
|
||||||
child: Image.asset(
|
fontSize: 14.sp,
|
||||||
'assets/images/right_icon.png',
|
color: Colors.white,
|
||||||
width: 6.r,
|
fontWeight: FontWeight.w500),
|
||||||
height: 10.r,
|
|
||||||
),
|
),
|
||||||
)
|
Padding(
|
||||||
],
|
padding: EdgeInsets.only(left: 8.r),
|
||||||
|
child: Image.asset(
|
||||||
|
'assets/images/right_icon.png',
|
||||||
|
width: 6.r,
|
||||||
|
height: 10.r,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 2.r, horizontal: 10.r),
|
vertical: 2.r, horizontal: 10.r),
|
||||||
|
|
@ -543,7 +600,8 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showSubjectDialog(context, subjectList, 'subjectList',currentSubject);
|
showSubjectDialog(context, subjectList,
|
||||||
|
'subjectList', currentSubject);
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
@ -577,10 +635,11 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
(smallQuestionRes !=null && smallQuestionRes!.data!.bodyExcelData
|
(smallQuestionRes != null &&
|
||||||
|
smallQuestionRes!.data!.bodyExcelData
|
||||||
.sheets[0].headData.length >
|
.sheets[0].headData.length >
|
||||||
0 &&
|
0 &&
|
||||||
smallQuestionRes!.data!.bodyExcelData
|
smallQuestionRes!.data!.bodyExcelData
|
||||||
.sheets[0].bodyData.length >
|
.sheets[0].bodyData.length >
|
||||||
0)
|
0)
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
|
|
@ -593,12 +652,13 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
9
|
9
|
||||||
? 300.r
|
? 300.r
|
||||||
: smallQuestionRes!
|
: smallQuestionRes!
|
||||||
.data!
|
.data!
|
||||||
.bodyExcelData
|
.bodyExcelData
|
||||||
.sheets[0]
|
.sheets[0]
|
||||||
.bodyData
|
.bodyData
|
||||||
.length *
|
.length *
|
||||||
50.r + 40.r,
|
50.r +
|
||||||
|
40.r,
|
||||||
// width: MediaQuery.of(context).size.width,
|
// width: MediaQuery.of(context).size.width,
|
||||||
child: CardList(
|
child: CardList(
|
||||||
headList: smallQuestionRes!.data!
|
headList: smallQuestionRes!.data!
|
||||||
|
|
@ -611,88 +671,97 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: NoData(),
|
: NoData(),
|
||||||
if(smallQuestionRes !=null && smallQuestionRes!.data!.bodyExcelData
|
if (smallQuestionRes != null &&
|
||||||
.sheets[0].bodyData.length >
|
smallQuestionRes!.data!.bodyExcelData
|
||||||
0)
|
.sheets[0].bodyData.length >
|
||||||
Padding(
|
0)
|
||||||
padding: EdgeInsets.only(right: 14.r,top: 6.r),
|
Padding(
|
||||||
child: Row(
|
padding:
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
EdgeInsets.only(right: 14.r, top: 6.r),
|
||||||
children: [
|
child: Row(
|
||||||
InkWell(
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
onTap: () {
|
children: [
|
||||||
setState(() {
|
InkWell(
|
||||||
if (questionCurrentPage > 1 && questionIsRefresh) {
|
onTap: () {
|
||||||
questionIsRefresh = false;
|
setState(() {
|
||||||
questionCurrentPage = questionCurrentPage - 1;
|
if (questionCurrentPage > 1 &&
|
||||||
getQuestionTable();
|
questionIsRefresh) {
|
||||||
EasyLoading.show(status: 'loading...');
|
questionIsRefresh = false;
|
||||||
}
|
questionCurrentPage =
|
||||||
});
|
questionCurrentPage - 1;
|
||||||
},
|
getQuestionTable();
|
||||||
child: Container(
|
EasyLoading.show(
|
||||||
padding: EdgeInsets.symmetric(
|
status: 'loading...');
|
||||||
vertical: 2.r, horizontal: 5.r),
|
}
|
||||||
decoration: BoxDecoration(
|
});
|
||||||
border: Border.all(
|
},
|
||||||
color: questionCurrentPage == 1
|
child: Container(
|
||||||
? Color(0xFFB3B9B9)
|
padding: EdgeInsets.symmetric(
|
||||||
: Color(0xFF6787FD),
|
vertical: 2.r, horizontal: 5.r),
|
||||||
width: 1.r),
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(
|
border: Border.all(
|
||||||
Radius.circular(2.r)),
|
color:
|
||||||
),
|
questionCurrentPage == 1
|
||||||
child: Text(
|
? Color(0xFFB3B9B9)
|
||||||
'上一页',
|
: Color(0xFF6787FD),
|
||||||
style: TextStyle(
|
width: 1.r),
|
||||||
color: questionCurrentPage == 1
|
borderRadius: BorderRadius.all(
|
||||||
? Color(0xFFB3B9B9)
|
Radius.circular(2.r)),
|
||||||
: Color(0xFF6787FD)),
|
),
|
||||||
),
|
child: Text(
|
||||||
)
|
'上一页',
|
||||||
),
|
style: TextStyle(
|
||||||
SizedBox(
|
color:
|
||||||
width: 15.r,
|
questionCurrentPage == 1
|
||||||
),
|
? Color(0xFFB3B9B9)
|
||||||
InkWell(
|
: Color(0xFF6787FD)),
|
||||||
onTap: () {
|
),
|
||||||
setState(() {
|
)),
|
||||||
if (questionCurrentPage < totalPage &&
|
SizedBox(
|
||||||
questionIsRefresh) {
|
width: 15.r,
|
||||||
questionIsRefresh = false;
|
),
|
||||||
questionCurrentPage = questionCurrentPage + 1;
|
InkWell(
|
||||||
getQuestionTable();
|
onTap: () {
|
||||||
EasyLoading.show(status: 'loading...');
|
setState(() {
|
||||||
}
|
if (questionCurrentPage <
|
||||||
});
|
totalPage &&
|
||||||
},
|
questionIsRefresh) {
|
||||||
child: Container(
|
questionIsRefresh = false;
|
||||||
padding: EdgeInsets.symmetric(
|
questionCurrentPage =
|
||||||
vertical: 2.r, horizontal: 5.r),
|
questionCurrentPage + 1;
|
||||||
decoration: BoxDecoration(
|
getQuestionTable();
|
||||||
border: Border.all(
|
EasyLoading.show(
|
||||||
color: questionTotalPage - questionCurrentPage > 0
|
status: 'loading...');
|
||||||
? Color(0xFF6787FD)
|
}
|
||||||
: Color(0xFFB3B9B9),
|
});
|
||||||
width: 1.r),
|
},
|
||||||
borderRadius: BorderRadius.all(
|
child: Container(
|
||||||
Radius.circular(2.r)),
|
padding: EdgeInsets.symmetric(
|
||||||
),
|
vertical: 2.r, horizontal: 5.r),
|
||||||
child: Text(
|
decoration: BoxDecoration(
|
||||||
'下一页',
|
border: Border.all(
|
||||||
style: TextStyle(
|
color: questionTotalPage -
|
||||||
color: questionTotalPage - questionCurrentPage > 0
|
questionCurrentPage >
|
||||||
? Color(0xFF6787FD)
|
0
|
||||||
: Color(0xFFB3B9B9)),
|
? Color(0xFF6787FD)
|
||||||
),
|
: Color(0xFFB3B9B9),
|
||||||
)
|
width: 1.r),
|
||||||
)
|
borderRadius: BorderRadius.all(
|
||||||
],
|
Radius.circular(2.r)),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'下一页',
|
||||||
|
style: TextStyle(
|
||||||
|
color: questionTotalPage -
|
||||||
|
questionCurrentPage >
|
||||||
|
0
|
||||||
|
? Color(0xFF6787FD)
|
||||||
|
: Color(0xFFB3B9B9)),
|
||||||
|
),
|
||||||
|
))
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 10.r, horizontal: 10.r),
|
vertical: 10.r, horizontal: 10.r),
|
||||||
|
|
@ -704,13 +773,11 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
knowPointRes!.data!.knowPointList.length >
|
knowPointRes!.data!.knowPointList.length > 0
|
||||||
0
|
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: 300.r,
|
height: 300.r,
|
||||||
child: KnowPointTable(
|
child: KnowPointTable(
|
||||||
knowPointRes!
|
knowPointRes!.data!.knowPointList),
|
||||||
.data!.knowPointList),
|
|
||||||
)
|
)
|
||||||
: NoData(),
|
: NoData(),
|
||||||
/* knowPointRes!.data!.knowPointList.length >
|
/* knowPointRes!.data!.knowPointList.length >
|
||||||
|
|
@ -737,7 +804,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
if (cardBodyList.length > 0)
|
if (cardBodyList.length > 0)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(right: 14.r,top: 6.r),
|
padding: EdgeInsets.only(right: 14.r, top: 6.r),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
import 'package:data_table_2/data_table_2.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||||
|
|
||||||
class CardList extends StatefulWidget {
|
class CardList extends StatefulWidget {
|
||||||
final List headList;
|
final List headList;
|
||||||
|
|
@ -9,6 +10,7 @@ class CardList extends StatefulWidget {
|
||||||
final bool? isScore;
|
final bool? isScore;
|
||||||
final int? fixedRows;
|
final int? fixedRows;
|
||||||
final int? fixedCols;
|
final int? fixedCols;
|
||||||
|
final bool? isHtml;
|
||||||
|
|
||||||
const CardList({
|
const CardList({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
|
@ -16,6 +18,7 @@ class CardList extends StatefulWidget {
|
||||||
required this.bodyList,
|
required this.bodyList,
|
||||||
this.showCardDetail,
|
this.showCardDetail,
|
||||||
this.isScore = false,
|
this.isScore = false,
|
||||||
|
this.isHtml = false,
|
||||||
this.fixedCols,
|
this.fixedCols,
|
||||||
this.fixedRows,
|
this.fixedRows,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
@ -74,7 +77,9 @@ class _CardListState extends State<CardList> {
|
||||||
: Center(
|
: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.toString(),
|
child:
|
||||||
|
widget.isHtml == true?HtmlWidget(item.toString(),textStyle: TextStyle(fontSize: 12.sp,color: Color(0xFF262626)),):
|
||||||
|
Text(item.toString(),
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
||||||
),
|
),
|
||||||
|
|
@ -114,7 +119,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 + 10.r,
|
minWidth: widget.headList.length > 5?70.r * widget.headList.length + 10.r:MediaQuery.of(context).size.width,
|
||||||
fixedTopRows: widget.fixedRows!,
|
fixedTopRows: widget.fixedRows!,
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
fixedLeftColumns: widget.fixedCols!,
|
||||||
sortColumnIndex: _sortColumnIndex,
|
sortColumnIndex: _sortColumnIndex,
|
||||||
|
|
@ -128,7 +133,7 @@ class _CardListState extends State<CardList> {
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: index == 0 && widget.isScore == false?50.r:70.r,
|
fixedWidth: index == 0 && widget.isScore == false?50.r:widget.headList.length > 5 ?70.r:(MediaQuery.of(context).size.width - 28.r)/widget.headList.length,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
if(res.data!=null){
|
if(res.data!=null){
|
||||||
examOrigin = res.data!.examOriginPapers[0];
|
examOrigin = res.data!.examOriginPapers[0];
|
||||||
examOriginList = res.data!.examOriginPapers;
|
examOriginList = res.data!.examOriginPapers;
|
||||||
print('examOrigin!.width=${examOrigin!.width}');
|
// print('examOrigin!.width=${examOrigin!.width}');
|
||||||
}else{
|
}else{
|
||||||
examOriginList = [];
|
examOriginList = [];
|
||||||
examOrigin = null;
|
examOrigin = null;
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ class _TheReportState extends ConsumerState<TheReport>
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context); //调用super.build(返回值始终返回null,应将其忽略)
|
super.build(context); //调用super.build(返回值始终返回null,应将其忽略)
|
||||||
|
final userState = ref.watch(userProvider);
|
||||||
return AnnotatedRegion(
|
return AnnotatedRegion(
|
||||||
value: const SystemUiOverlayStyle(
|
value: const SystemUiOverlayStyle(
|
||||||
systemNavigationBarColor: Color(0xFF000000),
|
systemNavigationBarColor: Color(0xFF000000),
|
||||||
|
|
@ -274,7 +274,7 @@ class _TheReportState extends ConsumerState<TheReport>
|
||||||
height: 22.w,
|
height: 22.w,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'远轩高级中学',
|
userState.schoolName,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
color: Color.fromRGBO(62, 86, 173, 1)),
|
color: Color.fromRGBO(62, 86, 173, 1)),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue