Merge branch 'mcy' into main
This commit is contained in:
commit
ef069121f1
|
|
@ -151,10 +151,10 @@ class HeadData extends Object {
|
|||
class Module2_ZDGZ extends Object {
|
||||
|
||||
@JsonKey(name: 'TopExcelData')
|
||||
TopExcelData topExcelData;
|
||||
TopExcelData? topExcelData;
|
||||
|
||||
@JsonKey(name: 'BottomExcelData')
|
||||
BottomExcelData bottomExcelData;
|
||||
BottomExcelData? bottomExcelData;
|
||||
|
||||
Module2_ZDGZ(this.topExcelData,this.bottomExcelData,);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@ class ReportCardParams extends BasePageReport {
|
|||
@JsonKey(name: 'ExamId')
|
||||
int examId;
|
||||
|
||||
@JsonKey(name: 'Subject')
|
||||
int? subject;
|
||||
|
||||
@JsonKey(name: 'ClassId')
|
||||
int classId;
|
||||
|
||||
ReportCardParams({required this.examId,required this.classId,page,limit}):super(page,limit);
|
||||
ReportCardParams({required this.examId,required this.classId,this.subject,page,limit}):super(page,limit);
|
||||
|
||||
factory ReportCardParams.fromJson(Map<String, dynamic> srcJson) => _$ReportCardParamsFromJson(srcJson);
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marking_app/common/model/report/detail_base_info.dart';
|
||||
|
||||
part 'small_question.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class SmallQuestion extends Object {
|
||||
|
||||
@JsonKey(name: 'total')
|
||||
int total;
|
||||
|
||||
@JsonKey(name: 'BodyExcelData')
|
||||
BodyExcelData bodyExcelData;
|
||||
|
||||
SmallQuestion(this.total,this.bodyExcelData,);
|
||||
|
||||
factory SmallQuestion.fromJson(Map<String, dynamic> srcJson) => _$SmallQuestionFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$SmallQuestionToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class BodyExcelData extends Object {
|
||||
|
||||
@JsonKey(name: 'BatchNO')
|
||||
String batchNO;
|
||||
|
||||
@JsonKey(name: 'HeadStartRowIndex')
|
||||
int headStartRowIndex;
|
||||
|
||||
@JsonKey(name: 'BodyStartRowIndex')
|
||||
int bodyStartRowIndex;
|
||||
|
||||
@JsonKey(name: 'Sheets')
|
||||
List<Sheets> sheets;
|
||||
|
||||
BodyExcelData(this.batchNO,this.headStartRowIndex,this.bodyStartRowIndex,this.sheets,);
|
||||
|
||||
factory BodyExcelData.fromJson(Map<String, dynamic> srcJson) => _$BodyExcelDataFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BodyExcelDataToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
|
@ -12,6 +14,7 @@ import 'package:marking_app/common/model/report/exam_records_all.dart';
|
|||
import 'package:marking_app/common/model/report/question_know_point.dart';
|
||||
import 'package:marking_app/common/model/report/report_card.dart';
|
||||
import 'package:marking_app/common/model/report/report_card_params.dart';
|
||||
import 'package:marking_app/common/model/report/small_question.dart';
|
||||
import 'package:marking_app/pages/report_detail/widgets/basic_table.dart';
|
||||
import 'package:marking_app/pages/report_detail/widgets/card_table.dart';
|
||||
import 'package:marking_app/pages/report_detail/widgets/know_point_list.dart';
|
||||
|
|
@ -40,11 +43,14 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
|
||||
BaseInfo? baseInfo;
|
||||
BaseStructureResultReport<DetailBaseInfo>? overallLevelRes;
|
||||
BaseStructureResultReport<QuestionKnowPoint>? questionKnowPointRes;
|
||||
BaseStructureResultReport<QuestionKnowPoint>? knowPointRes;
|
||||
BaseStructureResultReport<SmallQuestion>? smallQuestionRes;
|
||||
List<ComboData> subjectList = []; //科目
|
||||
List<ComboData> classList = []; //班级
|
||||
ComboData currentSubject = ComboData('', '');
|
||||
ComboData currentClass = ComboData('', '');
|
||||
// List<ComboData> questionClassList = []; //小题得分班级
|
||||
ComboData questionCurrentClass = ComboData('', '');
|
||||
bool isClass = false;
|
||||
|
||||
// List cardHeadList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
||||
|
|
@ -56,6 +62,10 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
bool isRefresh = true; //防止请求未返回多次点击
|
||||
List<Data> initialList = [];
|
||||
|
||||
int questionCurrentPage = 1; //成绩单当前页
|
||||
int questionTotalPage = 1; //成绩单总页数
|
||||
bool questionIsRefresh = true; //防止请求未返回多次点击
|
||||
|
||||
void initState() {
|
||||
super.initState();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
|
|
@ -71,18 +81,20 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
await clientReport.getExamsubject(widget.examId);
|
||||
|
||||
setState(() {
|
||||
classList = res.data!;
|
||||
classList[0].isCheck = true;
|
||||
currentClass = classList[0];
|
||||
classList = List.from(res.data!);
|
||||
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
||||
classList.insert(0,questionCurrentClass);
|
||||
// classList[1].isCheck = true;
|
||||
currentClass = classList[1];
|
||||
|
||||
/* questionClassList = List.from(res.data!);
|
||||
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
||||
questionClassList.insert(0,questionCurrentClass);*/
|
||||
|
||||
subjectList = subjecData.data!;
|
||||
subjectList[0].isCheck = true;
|
||||
currentSubject = subjectList[0];
|
||||
});
|
||||
getData();
|
||||
}
|
||||
|
||||
void getData() {
|
||||
getBaseInfo();
|
||||
}
|
||||
|
||||
|
|
@ -92,15 +104,18 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
BaseStructureResultReport<DetailBaseInfo> result =
|
||||
await clientReport.getReportDetail(widget.examId,
|
||||
widget.showGrade && isGrade ? -1 : currentClass.value);
|
||||
print('*************result=${result.message}');
|
||||
// print('*************result=${result.message}');
|
||||
if(result.code == 200){
|
||||
setState(() {
|
||||
currentPage = 1;
|
||||
questionCurrentPage = 1;
|
||||
overallLevelRes = result;
|
||||
if (result!.data != null) {
|
||||
baseInfo = result!.data!.baseInfo;
|
||||
}
|
||||
});
|
||||
getQuestionKnowPointTable();
|
||||
getQuestionTable();
|
||||
getKnowPointTable();
|
||||
getCard();
|
||||
}else{
|
||||
Navigator.pop(context);
|
||||
|
|
@ -110,20 +125,50 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
|
||||
}
|
||||
|
||||
//小题得分,知识点
|
||||
void getQuestionKnowPointTable() async {
|
||||
//小题得分
|
||||
void getQuestionTable() async {
|
||||
RestClientReport clientReport = await getClientReport();
|
||||
print(
|
||||
"%%%%%%%%%%%%%%%%%%%widget.examId=${widget.examId}&questionCurrentClass.value=${questionCurrentClass.value}¤tSubject.value=${currentSubject.value}");
|
||||
ReportCardParams params = ReportCardParams(
|
||||
examId: widget.examId,
|
||||
classId: isGrade?questionCurrentClass.value:currentClass.value,
|
||||
// classId: 494760774623317,
|
||||
subject: currentSubject.value,
|
||||
page: questionCurrentPage,
|
||||
limit: pageSize);
|
||||
BaseStructureResultReport<SmallQuestion> res =
|
||||
await clientReport.getQuestion(params);
|
||||
print('res.data!.total=${res.code== 200 ?res.data!.bodyExcelData.sheets[0].bodyData.length:''}');
|
||||
if(res.code != 200 || res.data == null){
|
||||
setState(() {
|
||||
smallQuestionRes = null;
|
||||
questionTotalPage = 0;
|
||||
});
|
||||
|
||||
}else{
|
||||
setState(() {
|
||||
smallQuestionRes = res;
|
||||
questionTotalPage = (res.data!.total / pageSize).ceil();
|
||||
questionIsRefresh = true;
|
||||
});
|
||||
}
|
||||
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
//知识点
|
||||
void getKnowPointTable() async {
|
||||
RestClientReport clientReport = await getClientReport();
|
||||
BaseStructureResultReport<QuestionKnowPoint> res =
|
||||
await clientReport.getQuestionKnowPoint(
|
||||
widget.examId, currentClass.value, currentSubject.value);
|
||||
await clientReport.getKnowPoint(
|
||||
//494760774623317
|
||||
widget.examId,isGrade ? questionCurrentClass.value:currentClass.value,currentSubject.value
|
||||
);
|
||||
setState(() {
|
||||
questionKnowPointRes = res;
|
||||
print(
|
||||
"%%%%%%%%%%%%%%%%%%%widget.examId=${widget.examId}¤tClass.value=${currentClass.value}¤tSubject.value=${currentSubject.value}");
|
||||
knowPointRes = res;
|
||||
});
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
void getCard() async {
|
||||
RestClientReport clientReport = await getClientReport();
|
||||
|
||||
|
|
@ -134,8 +179,6 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
limit: pageSize);
|
||||
BaseStructureResultReport<ReportCard> result =
|
||||
await clientReport.getReportCard(params);
|
||||
print(
|
||||
"#######${params.examId}¶ms.classId=${params.classId}¶ms.page=${params.page}¶ms.limit=${params.limit}");
|
||||
List<String> head = result.data!.head;
|
||||
head.removeAt(0);
|
||||
List<String> beforeList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
||||
|
|
@ -186,22 +229,31 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
);
|
||||
}
|
||||
|
||||
void refreshData(item, bl) {
|
||||
void refreshData(item, type,index) {
|
||||
setState(() {
|
||||
isClass = bl;
|
||||
if (isClass) {
|
||||
if(type == 'classList'){
|
||||
currentClass = item;
|
||||
// getBaseInfo();
|
||||
} else {
|
||||
currentPage = 1;
|
||||
}else if(type == 'questionClassList'){
|
||||
questionCurrentClass = item;
|
||||
questionCurrentPage = 1;
|
||||
}else if(type == 'subjectList'){
|
||||
currentSubject = item;
|
||||
questionCurrentPage = 1;
|
||||
}
|
||||
});
|
||||
getData();
|
||||
// getQuestionKnowPointTable();
|
||||
|
||||
if(type == 'classList'){
|
||||
getBaseInfo();
|
||||
}
|
||||
if(type == 'questionClassList' || type == 'subjectList' || !isGrade){
|
||||
getQuestionTable();
|
||||
getKnowPointTable();
|
||||
}
|
||||
}
|
||||
|
||||
void showSubjectDialog(
|
||||
BuildContext context, List<ComboData> list, bool isclass) {
|
||||
BuildContext context, List<ComboData> list, String type,ComboData currentSelect) {
|
||||
showModalBottomSheet(
|
||||
context: context,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
|
@ -221,20 +273,27 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
list.forEach((element) {
|
||||
element.isCheck = false;
|
||||
});
|
||||
item!.isCheck = true;
|
||||
// item!.isCheck = true;
|
||||
if(item!.value == currentSelect.value){
|
||||
item!.isCheck = true;
|
||||
|
||||
}
|
||||
});
|
||||
EasyLoading.show(status: 'loading...');
|
||||
refreshData(item, isclass);
|
||||
refreshData(item, type,index);
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Padding(
|
||||
child: type == 'classList' && index ==0?Container():
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Center(
|
||||
child: Text(
|
||||
item!.text,
|
||||
style: TextStyle(
|
||||
fontSize: 14.r,
|
||||
color: item.isCheck
|
||||
color:
|
||||
item.value == currentSelect.value
|
||||
// item.isCheck
|
||||
? Color(0xFF5F81FD)
|
||||
: Color(0xFF2E2E2E)),
|
||||
))),
|
||||
|
|
@ -271,14 +330,19 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
alignment: const FractionalOffset(0.04, 0.1),
|
||||
children: [
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width - 50.r,
|
||||
margin: EdgeInsets.only(left: 50.r),
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
baseInfo!.examName,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp, color: Color(0xFF2D384C)),
|
||||
Center(
|
||||
child: Text(
|
||||
// '2023-2024学年度(上)高一年级期末考试高一年级期末考试高一年级期末考试高一年级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试',
|
||||
baseInfo!.examName,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp, color: Color(0xFF2D384C)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -318,7 +382,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
isGrade = true;
|
||||
});
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getData();
|
||||
getBaseInfo();
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
|
|
@ -344,7 +408,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
isGrade = false;
|
||||
});
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getData();
|
||||
getBaseInfo();
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
|
|
@ -387,7 +451,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showSubjectDialog(context, classList, true);
|
||||
showSubjectDialog(context, classList, 'classList',currentClass);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
|
|
@ -414,20 +478,60 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
LabTitle('基本信息', 'assets/images/basic_info.png'),
|
||||
BasicTable(baseInfo,!widget.showGrade || !isGrade),
|
||||
LabTitle('总体水平', 'assets/images/overall_level.png'),
|
||||
OverallLevelTable(
|
||||
overallLevelRes!.data!.module1CJZL.sheets[0]),
|
||||
OverallLevelTable(overallLevelRes!.data!.module1CJZL.sheets[0]),
|
||||
LabTitle('重点关注学生', 'assets/images/reports_focus.png'),
|
||||
overallLevelRes!
|
||||
.data!.module2ZDGZ.topExcelData != null?
|
||||
OverallLevelTable(overallLevelRes!
|
||||
.data!.module2ZDGZ.topExcelData.sheets[0]),
|
||||
.data!.module2ZDGZ.topExcelData?.sheets[0]):NoData(),
|
||||
SizedBox(
|
||||
height: 20.r,
|
||||
),
|
||||
if(overallLevelRes!
|
||||
.data!.module2ZDGZ.topExcelData != null)
|
||||
OverallLevelTable(overallLevelRes!
|
||||
.data!.module2ZDGZ.bottomExcelData.sheets[0]),
|
||||
.data!.module2ZDGZ.bottomExcelData?.sheets[0]),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
LabTitle('小题得分', 'assets/images/reports_score.png'),
|
||||
Expanded(child: Text(''),),
|
||||
if(isGrade)
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.only(right: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6787FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(15.r)),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showSubjectDialog(context, classList, 'questionClassList',questionCurrentClass);
|
||||
},
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
questionCurrentClass.text,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 8.r),
|
||||
child: Image.asset(
|
||||
'assets/images/right_icon.png',
|
||||
width: 6.r,
|
||||
height: 10.r,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.r, horizontal: 10.r),
|
||||
|
|
@ -439,7 +543,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showSubjectDialog(context, subjectList, false);
|
||||
showSubjectDialog(context, subjectList, 'subjectList',currentSubject);
|
||||
},
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
|
|
@ -462,10 +566,10 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
),
|
||||
if (questionKnowPointRes != null)
|
||||
if (knowPointRes != null)
|
||||
Container(
|
||||
// color: Colors.white,
|
||||
margin: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
|
|
@ -473,47 +577,122 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
(questionKnowPointRes!.data!.userQuestion
|
||||
(smallQuestionRes !=null && smallQuestionRes!.data!.bodyExcelData
|
||||
.sheets[0].headData.length >
|
||||
0 &&
|
||||
questionKnowPointRes!.data!.userQuestion
|
||||
smallQuestionRes!.data!.bodyExcelData
|
||||
.sheets[0].bodyData.length >
|
||||
0)
|
||||
? SizedBox(
|
||||
height: questionKnowPointRes!
|
||||
height: smallQuestionRes!
|
||||
.data!
|
||||
.userQuestion
|
||||
.bodyExcelData
|
||||
.sheets[0]
|
||||
.bodyData
|
||||
.length >
|
||||
10
|
||||
9
|
||||
? 300.r
|
||||
: questionKnowPointRes!
|
||||
: smallQuestionRes!
|
||||
.data!
|
||||
.userQuestion
|
||||
.bodyExcelData
|
||||
.sheets[0]
|
||||
.bodyData
|
||||
.length *
|
||||
30.r,
|
||||
50.r + 40.r,
|
||||
// width: MediaQuery.of(context).size.width,
|
||||
child: CardList(
|
||||
headList: questionKnowPointRes!.data!
|
||||
.userQuestion.sheets[0].headData,
|
||||
bodyList: questionKnowPointRes!.data!
|
||||
.userQuestion.sheets[0].bodyData,
|
||||
headList: smallQuestionRes!.data!
|
||||
.bodyExcelData.sheets[0].headData,
|
||||
bodyList: smallQuestionRes!.data!
|
||||
.bodyExcelData.sheets[0].bodyData,
|
||||
isScore: true,
|
||||
fixedRows: 1,
|
||||
fixedCols: 3,
|
||||
),
|
||||
|
||||
/*QuestionTable(
|
||||
headList: questionKnowPointRes!.data!
|
||||
.userQuestion.sheets[0].headData,
|
||||
bodyList: questionKnowPointRes!.data!
|
||||
.userQuestion.sheets[0].bodyData,
|
||||
),*/
|
||||
)
|
||||
: NoData(),
|
||||
if(smallQuestionRes !=null && smallQuestionRes!.data!.bodyExcelData
|
||||
.sheets[0].bodyData.length >
|
||||
0)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 14.r,top: 6.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (questionCurrentPage > 1 && questionIsRefresh) {
|
||||
questionIsRefresh = false;
|
||||
questionCurrentPage = questionCurrentPage - 1;
|
||||
getQuestionTable();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.r, horizontal: 5.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: questionCurrentPage == 1
|
||||
? Color(0xFFB3B9B9)
|
||||
: Color(0xFF6787FD),
|
||||
width: 1.r),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(2.r)),
|
||||
),
|
||||
child: Text(
|
||||
'上一页',
|
||||
style: TextStyle(
|
||||
color: questionCurrentPage == 1
|
||||
? Color(0xFFB3B9B9)
|
||||
: Color(0xFF6787FD)),
|
||||
),
|
||||
)
|
||||
),
|
||||
SizedBox(
|
||||
width: 15.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
if (questionCurrentPage < totalPage &&
|
||||
questionIsRefresh) {
|
||||
questionIsRefresh = false;
|
||||
questionCurrentPage = questionCurrentPage + 1;
|
||||
getQuestionTable();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
}
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 2.r, horizontal: 5.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
color: questionTotalPage - questionCurrentPage > 0
|
||||
? 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: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 10.r),
|
||||
|
|
@ -525,19 +704,19 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
|||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
questionKnowPointRes!.data!.knowPointList.length >
|
||||
knowPointRes!.data!.knowPointList.length >
|
||||
0
|
||||
? SizedBox(
|
||||
height: 300.r,
|
||||
child: KnowPointTable(
|
||||
questionKnowPointRes!
|
||||
knowPointRes!
|
||||
.data!.knowPointList),
|
||||
)
|
||||
: NoData(),
|
||||
/* questionKnowPointRes!.data!.knowPointList.length >
|
||||
/* knowPointRes!.data!.knowPointList.length >
|
||||
0
|
||||
? KnowPointTable(
|
||||
questionKnowPointRes!.data!.knowPointList)
|
||||
knowPointRes!.data!.knowPointList)
|
||||
: NoData(),*/
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -11,12 +11,14 @@ class BasicTableCell extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
height: double.infinity,
|
||||
padding: EdgeInsets.symmetric(vertical:6.r,horizontal: 8.r),
|
||||
decoration: BoxDecoration(
|
||||
color: isBold?Colors.white:Color(0xFFF5F7FF),
|
||||
),
|
||||
child: Text(content,style: TextStyle(fontSize: 12.sp,color: isBold?Colors.black:Color(0xFF505767),fontWeight: isBold?FontWeight.w500:FontWeight.w400),)
|
||||
child: Text(content,style: TextStyle(fontSize: 12.sp,color: isBold?Colors.black:Color(0xFF505767),fontWeight: isBold?FontWeight.w500:FontWeight.w400),
|
||||
textAlign: TextAlign.left,)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -30,13 +30,11 @@ class _CustomRectState extends State<CustomRect> {
|
|||
children: List.generate(widget.examOriginItem.question.length, (index) {
|
||||
var item = widget.examOriginItem.question[index];
|
||||
return Positioned(
|
||||
left: item.x + item.width - 50,
|
||||
top: item.y,
|
||||
left: item.x + item.width/2,
|
||||
top: item.y + item.height/2 - 25.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(item.score.toInt().toString(),style: TextStyle(fontSize: 12.sp,color: Colors.red),),
|
||||
Text('/',style: TextStyle(fontSize: 12.sp,color: Colors.red),),
|
||||
Text(item.totalScore.toInt().toString(),style: TextStyle(fontSize: 12.sp,color: Colors.red),),
|
||||
Text(item.score.toInt().toString(),style: TextStyle(fontSize: 30.sp,color: Colors.red),),
|
||||
],
|
||||
));
|
||||
}),
|
||||
|
|
|
|||
|
|
@ -31,8 +31,20 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
|||
List<ExamOriginPapers> examOriginList = [];
|
||||
int currentSubjectId = 0;
|
||||
|
||||
final viewTransformationController = TransformationController();
|
||||
|
||||
void initState() {
|
||||
final zoomFactor = 0.5;
|
||||
final xTranslate = 0.0;
|
||||
final yTranslate = 0.0;
|
||||
// final yTranslate = examOrigin!.width/2;
|
||||
viewTransformationController.value.setEntry(0, 0, zoomFactor);
|
||||
viewTransformationController.value.setEntry(1, 1, zoomFactor);
|
||||
viewTransformationController.value.setEntry(2, 2, zoomFactor);
|
||||
viewTransformationController.value.setEntry(0, 3, -xTranslate);
|
||||
viewTransformationController.value.setEntry(1, 3, -yTranslate);
|
||||
super.initState();
|
||||
|
||||
List<String> arr = widget.headList.slice(3);
|
||||
arr.asMap().forEach((index, name) {
|
||||
var subject = widget.cardItem.subjectDetails;
|
||||
|
|
@ -56,6 +68,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
|||
if(res.data!=null){
|
||||
examOrigin = res.data!.examOriginPapers[0];
|
||||
examOriginList = res.data!.examOriginPapers;
|
||||
print('examOrigin!.width=${examOrigin!.width}');
|
||||
}else{
|
||||
examOriginList = [];
|
||||
examOrigin = null;
|
||||
|
|
@ -66,6 +79,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
|
|
@ -257,6 +271,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
|||
? Padding(
|
||||
padding: EdgeInsets.only(top:5.r),
|
||||
child: InteractiveViewer(
|
||||
transformationController: viewTransformationController,
|
||||
constrained: false,
|
||||
boundaryMargin: EdgeInsets.all(140.r),
|
||||
minScale: 0.1, // 最小缩放
|
||||
|
|
|
|||
|
|
@ -387,34 +387,39 @@ class _TheReportState extends ConsumerState<TheReport>
|
|||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.r, horizontal: 25.r),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/report_group_bg.png'),
|
||||
fit: BoxFit.fill,
|
||||
)),
|
||||
child: Text(
|
||||
item.typeName,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Colors.white),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.r,bottom: 5.r,right: 2.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.r, horizontal: 25.r),
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/report_group_bg.png'),
|
||||
fit: BoxFit.fill,
|
||||
)),
|
||||
child: Text(
|
||||
item.typeName,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.black),
|
||||
)
|
||||
],
|
||||
Flexible(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.black),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding:
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import 'package:marking_app/common/model/report/report_for_subject_teacher_param
|
|||
import 'package:marking_app/common/model/report/report_home_model.dart';
|
||||
import 'package:marking_app/common/model/report/report_marking_detail.dart';
|
||||
import 'package:marking_app/common/model/report/report_marking_detail_params.dart';
|
||||
import 'package:marking_app/common/model/report/small_question.dart';
|
||||
import 'package:marking_app/common/model/user/user_info_report.dart';
|
||||
import 'package:retrofit/retrofit.dart' as the_retrofit;
|
||||
|
||||
|
|
@ -120,7 +121,7 @@ abstract class RestClientReport {
|
|||
);
|
||||
// 报告 => 可选班级
|
||||
@the_retrofit.GET("/api/exam/report/master_mobilesubject")
|
||||
Future<BaseStructureResultReport<QuestionKnowPoint>> getQuestionKnowPoint(
|
||||
Future<BaseStructureResultReport<QuestionKnowPoint>> getKnowPoint(
|
||||
@the_retrofit.Query("examId") int examId,
|
||||
@the_retrofit.Query("classId") int classId,
|
||||
@the_retrofit.Query("subject") int subject
|
||||
|
|
@ -136,4 +137,10 @@ abstract class RestClientReport {
|
|||
Future<BaseStructureResultReport<ReportMarkingDetail>> getMarkingDetail(
|
||||
@the_retrofit.Body() ReportMarkingDetailParams params
|
||||
);
|
||||
|
||||
// 报告 => 小题得分
|
||||
@the_retrofit.POST("/api/exam/report/master_usersmalltopicasync")
|
||||
Future<BaseStructureResultReport<SmallQuestion>> getQuestion(
|
||||
@the_retrofit.Body() ReportCardParams params
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue