小题得分增加班级筛选
This commit is contained in:
parent
3eeaed4446
commit
ed45015c06
|
|
@ -151,10 +151,10 @@ class HeadData extends Object {
|
||||||
class Module2_ZDGZ extends Object {
|
class Module2_ZDGZ extends Object {
|
||||||
|
|
||||||
@JsonKey(name: 'TopExcelData')
|
@JsonKey(name: 'TopExcelData')
|
||||||
TopExcelData topExcelData;
|
TopExcelData? topExcelData;
|
||||||
|
|
||||||
@JsonKey(name: 'BottomExcelData')
|
@JsonKey(name: 'BottomExcelData')
|
||||||
BottomExcelData bottomExcelData;
|
BottomExcelData? bottomExcelData;
|
||||||
|
|
||||||
Module2_ZDGZ(this.topExcelData,this.bottomExcelData,);
|
Module2_ZDGZ(this.topExcelData,this.bottomExcelData,);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,13 @@ class ReportCardParams extends BasePageReport {
|
||||||
@JsonKey(name: 'ExamId')
|
@JsonKey(name: 'ExamId')
|
||||||
int examId;
|
int examId;
|
||||||
|
|
||||||
|
@JsonKey(name: 'Subject')
|
||||||
|
int? subject;
|
||||||
|
|
||||||
@JsonKey(name: 'ClassId')
|
@JsonKey(name: 'ClassId')
|
||||||
int 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);
|
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:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.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/question_know_point.dart';
|
||||||
import 'package:marking_app/common/model/report/report_card.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/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/basic_table.dart';
|
||||||
import 'package:marking_app/pages/report_detail/widgets/card_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';
|
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;
|
BaseInfo? baseInfo;
|
||||||
BaseStructureResultReport<DetailBaseInfo>? overallLevelRes;
|
BaseStructureResultReport<DetailBaseInfo>? overallLevelRes;
|
||||||
BaseStructureResultReport<QuestionKnowPoint>? questionKnowPointRes;
|
BaseStructureResultReport<QuestionKnowPoint>? knowPointRes;
|
||||||
|
BaseStructureResultReport<SmallQuestion>? smallQuestionRes;
|
||||||
List<ComboData> subjectList = []; //科目
|
List<ComboData> subjectList = []; //科目
|
||||||
List<ComboData> classList = []; //班级
|
List<ComboData> classList = []; //班级
|
||||||
ComboData currentSubject = ComboData('', '');
|
ComboData currentSubject = ComboData('', '');
|
||||||
ComboData currentClass = ComboData('', '');
|
ComboData currentClass = ComboData('', '');
|
||||||
|
// List<ComboData> questionClassList = []; //小题得分班级
|
||||||
|
ComboData questionCurrentClass = ComboData('', '');
|
||||||
bool isClass = false;
|
bool isClass = false;
|
||||||
|
|
||||||
// List cardHeadList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
// List cardHeadList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
||||||
|
|
@ -56,6 +62,10 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
bool isRefresh = true; //防止请求未返回多次点击
|
bool isRefresh = true; //防止请求未返回多次点击
|
||||||
List<Data> initialList = [];
|
List<Data> initialList = [];
|
||||||
|
|
||||||
|
int questionCurrentPage = 1; //成绩单当前页
|
||||||
|
int questionTotalPage = 1; //成绩单总页数
|
||||||
|
bool questionIsRefresh = true; //防止请求未返回多次点击
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
|
|
@ -71,18 +81,20 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
await clientReport.getExamsubject(widget.examId);
|
await clientReport.getExamsubject(widget.examId);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
classList = res.data!;
|
classList = List.from(res.data!);
|
||||||
classList[0].isCheck = true;
|
questionCurrentClass =ComboData(0, '全部',isCheck: true);
|
||||||
currentClass = classList[0];
|
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 = subjecData.data!;
|
||||||
subjectList[0].isCheck = true;
|
subjectList[0].isCheck = true;
|
||||||
currentSubject = subjectList[0];
|
currentSubject = subjectList[0];
|
||||||
});
|
});
|
||||||
getData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getData() {
|
|
||||||
getBaseInfo();
|
getBaseInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -92,15 +104,18 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
BaseStructureResultReport<DetailBaseInfo> result =
|
BaseStructureResultReport<DetailBaseInfo> result =
|
||||||
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;
|
||||||
|
questionCurrentPage = 1;
|
||||||
overallLevelRes = result;
|
overallLevelRes = result;
|
||||||
if (result!.data != null) {
|
if (result!.data != null) {
|
||||||
baseInfo = result!.data!.baseInfo;
|
baseInfo = result!.data!.baseInfo;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getQuestionKnowPointTable();
|
getQuestionTable();
|
||||||
|
getKnowPointTable();
|
||||||
getCard();
|
getCard();
|
||||||
}else{
|
}else{
|
||||||
Navigator.pop(context);
|
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();
|
RestClientReport clientReport = await getClientReport();
|
||||||
BaseStructureResultReport<QuestionKnowPoint> res =
|
BaseStructureResultReport<QuestionKnowPoint> res =
|
||||||
await clientReport.getQuestionKnowPoint(
|
await clientReport.getKnowPoint(
|
||||||
widget.examId, currentClass.value, currentSubject.value);
|
//494760774623317
|
||||||
|
widget.examId,isGrade ? questionCurrentClass.value:currentClass.value,currentSubject.value
|
||||||
|
);
|
||||||
setState(() {
|
setState(() {
|
||||||
questionKnowPointRes = res;
|
knowPointRes = res;
|
||||||
print(
|
|
||||||
"%%%%%%%%%%%%%%%%%%%widget.examId=${widget.examId}¤tClass.value=${currentClass.value}¤tSubject.value=${currentSubject.value}");
|
|
||||||
});
|
});
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getCard() async {
|
void getCard() async {
|
||||||
RestClientReport clientReport = await getClientReport();
|
RestClientReport clientReport = await getClientReport();
|
||||||
|
|
||||||
|
|
@ -134,8 +179,6 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
limit: pageSize);
|
limit: pageSize);
|
||||||
BaseStructureResultReport<ReportCard> result =
|
BaseStructureResultReport<ReportCard> result =
|
||||||
await clientReport.getReportCard(params);
|
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;
|
List<String> head = result.data!.head;
|
||||||
head.removeAt(0);
|
head.removeAt(0);
|
||||||
List<String> beforeList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
List<String> beforeList = ['序号', '考号', '姓名', '班级', '分数', '班次', '校次'];
|
||||||
|
|
@ -186,22 +229,31 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
void refreshData(item, bl) {
|
void refreshData(item, type,index) {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClass = bl;
|
if(type == 'classList'){
|
||||||
if (isClass) {
|
|
||||||
currentClass = item;
|
currentClass = item;
|
||||||
// getBaseInfo();
|
currentPage = 1;
|
||||||
} else {
|
}else if(type == 'questionClassList'){
|
||||||
|
questionCurrentClass = item;
|
||||||
|
questionCurrentPage = 1;
|
||||||
|
}else if(type == 'subjectList'){
|
||||||
currentSubject = item;
|
currentSubject = item;
|
||||||
|
questionCurrentPage = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
getData();
|
|
||||||
// getQuestionKnowPointTable();
|
if(type == 'classList'){
|
||||||
|
getBaseInfo();
|
||||||
|
}
|
||||||
|
if(type == 'questionClassList' || type == 'subjectList' || !isGrade){
|
||||||
|
getQuestionTable();
|
||||||
|
getKnowPointTable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showSubjectDialog(
|
void showSubjectDialog(
|
||||||
BuildContext context, List<ComboData> list, bool isclass) {
|
BuildContext context, List<ComboData> list, String type,ComboData currentSelect) {
|
||||||
showModalBottomSheet(
|
showModalBottomSheet(
|
||||||
context: context,
|
context: context,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
|
|
@ -221,20 +273,27 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
list.forEach((element) {
|
list.forEach((element) {
|
||||||
element.isCheck = false;
|
element.isCheck = false;
|
||||||
});
|
});
|
||||||
item!.isCheck = true;
|
// item!.isCheck = true;
|
||||||
|
if(item!.value == currentSelect.value){
|
||||||
|
item!.isCheck = true;
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
refreshData(item, isclass);
|
refreshData(item, type,index);
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: type == 'classList' && index ==0?Container():
|
||||||
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item!.text,
|
item!.text,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.r,
|
fontSize: 14.r,
|
||||||
color: item.isCheck
|
color:
|
||||||
|
item.value == currentSelect.value
|
||||||
|
// item.isCheck
|
||||||
? Color(0xFF5F81FD)
|
? Color(0xFF5F81FD)
|
||||||
: Color(0xFF2E2E2E)),
|
: Color(0xFF2E2E2E)),
|
||||||
))),
|
))),
|
||||||
|
|
@ -271,14 +330,19 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
alignment: const FractionalOffset(0.04, 0.1),
|
alignment: const FractionalOffset(0.04, 0.1),
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
width: MediaQuery.of(context).size.width - 50.r,
|
||||||
|
margin: EdgeInsets.only(left: 50.r),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Center(
|
||||||
baseInfo!.examName,
|
child: Text(
|
||||||
style: TextStyle(
|
// '2023-2024学年度(上)高一年级期末考试高一年级期末考试高一年级期末考试高一年级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试级期末考试高一年级期末考试',
|
||||||
fontSize: 16.sp, color: Color(0xFF2D384C)),
|
baseInfo!.examName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 16.sp, color: Color(0xFF2D384C)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -318,7 +382,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
isGrade = true;
|
isGrade = true;
|
||||||
});
|
});
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
getData();
|
getBaseInfo();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
|
@ -344,7 +408,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
isGrade = false;
|
isGrade = false;
|
||||||
});
|
});
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
getData();
|
getBaseInfo();
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
|
@ -387,7 +451,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showSubjectDialog(context, classList, true);
|
showSubjectDialog(context, classList, 'classList',currentClass);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
|
@ -414,20 +478,60 @@ 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(
|
OverallLevelTable(overallLevelRes!.data!.module1CJZL.sheets[0]),
|
||||||
overallLevelRes!.data!.module1CJZL.sheets[0]),
|
|
||||||
LabTitle('重点关注学生', 'assets/images/reports_focus.png'),
|
LabTitle('重点关注学生', 'assets/images/reports_focus.png'),
|
||||||
|
overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.topExcelData != null?
|
||||||
OverallLevelTable(overallLevelRes!
|
OverallLevelTable(overallLevelRes!
|
||||||
.data!.module2ZDGZ.topExcelData.sheets[0]),
|
.data!.module2ZDGZ.topExcelData?.sheets[0]):NoData(),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
),
|
),
|
||||||
|
if(overallLevelRes!
|
||||||
|
.data!.module2ZDGZ.topExcelData != null)
|
||||||
OverallLevelTable(overallLevelRes!
|
OverallLevelTable(overallLevelRes!
|
||||||
.data!.module2ZDGZ.bottomExcelData.sheets[0]),
|
.data!.module2ZDGZ.bottomExcelData?.sheets[0]),
|
||||||
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(''),),
|
||||||
|
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(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 2.r, horizontal: 10.r),
|
vertical: 2.r, horizontal: 10.r),
|
||||||
|
|
@ -439,7 +543,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
),
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showSubjectDialog(context, subjectList, false);
|
showSubjectDialog(context, subjectList, 'subjectList',currentSubject);
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
@ -462,10 +566,10 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (questionKnowPointRes != null)
|
if (knowPointRes != null)
|
||||||
Container(
|
Container(
|
||||||
// color: Colors.white,
|
// color: Colors.white,
|
||||||
margin: EdgeInsets.symmetric(horizontal: 14.r),
|
margin: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
|
|
@ -473,47 +577,122 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
(questionKnowPointRes!.data!.userQuestion
|
(smallQuestionRes !=null && smallQuestionRes!.data!.bodyExcelData
|
||||||
.sheets[0].headData.length >
|
.sheets[0].headData.length >
|
||||||
0 &&
|
0 &&
|
||||||
questionKnowPointRes!.data!.userQuestion
|
smallQuestionRes!.data!.bodyExcelData
|
||||||
.sheets[0].bodyData.length >
|
.sheets[0].bodyData.length >
|
||||||
0)
|
0)
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: questionKnowPointRes!
|
height: smallQuestionRes!
|
||||||
.data!
|
.data!
|
||||||
.userQuestion
|
.bodyExcelData
|
||||||
.sheets[0]
|
.sheets[0]
|
||||||
.bodyData
|
.bodyData
|
||||||
.length >
|
.length >
|
||||||
10
|
9
|
||||||
? 300.r
|
? 300.r
|
||||||
: questionKnowPointRes!
|
: smallQuestionRes!
|
||||||
.data!
|
.data!
|
||||||
.userQuestion
|
.bodyExcelData
|
||||||
.sheets[0]
|
.sheets[0]
|
||||||
.bodyData
|
.bodyData
|
||||||
.length *
|
.length *
|
||||||
30.r,
|
50.r + 40.r,
|
||||||
// width: MediaQuery.of(context).size.width,
|
// width: MediaQuery.of(context).size.width,
|
||||||
child: CardList(
|
child: CardList(
|
||||||
headList: questionKnowPointRes!.data!
|
headList: smallQuestionRes!.data!
|
||||||
.userQuestion.sheets[0].headData,
|
.bodyExcelData.sheets[0].headData,
|
||||||
bodyList: questionKnowPointRes!.data!
|
bodyList: smallQuestionRes!.data!
|
||||||
.userQuestion.sheets[0].bodyData,
|
.bodyExcelData.sheets[0].bodyData,
|
||||||
isScore: true,
|
isScore: true,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 3,
|
fixedCols: 3,
|
||||||
),
|
),
|
||||||
|
|
||||||
/*QuestionTable(
|
|
||||||
headList: questionKnowPointRes!.data!
|
|
||||||
.userQuestion.sheets[0].headData,
|
|
||||||
bodyList: questionKnowPointRes!.data!
|
|
||||||
.userQuestion.sheets[0].bodyData,
|
|
||||||
),*/
|
|
||||||
)
|
)
|
||||||
: NoData(),
|
: 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(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 10.r, horizontal: 10.r),
|
vertical: 10.r, horizontal: 10.r),
|
||||||
|
|
@ -525,19 +704,19 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
questionKnowPointRes!.data!.knowPointList.length >
|
knowPointRes!.data!.knowPointList.length >
|
||||||
0
|
0
|
||||||
? SizedBox(
|
? SizedBox(
|
||||||
height: 300.r,
|
height: 300.r,
|
||||||
child: KnowPointTable(
|
child: KnowPointTable(
|
||||||
questionKnowPointRes!
|
knowPointRes!
|
||||||
.data!.knowPointList),
|
.data!.knowPointList),
|
||||||
)
|
)
|
||||||
: NoData(),
|
: NoData(),
|
||||||
/* questionKnowPointRes!.data!.knowPointList.length >
|
/* knowPointRes!.data!.knowPointList.length >
|
||||||
0
|
0
|
||||||
? KnowPointTable(
|
? KnowPointTable(
|
||||||
questionKnowPointRes!.data!.knowPointList)
|
knowPointRes!.data!.knowPointList)
|
||||||
: NoData(),*/
|
: NoData(),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,14 @@ class BasicTableCell extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
padding: EdgeInsets.symmetric(vertical:6.r,horizontal: 8.r),
|
padding: EdgeInsets.symmetric(vertical:6.r,horizontal: 8.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: isBold?Colors.white:Color(0xFFF5F7FF),
|
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) {
|
children: List.generate(widget.examOriginItem.question.length, (index) {
|
||||||
var item = widget.examOriginItem.question[index];
|
var item = widget.examOriginItem.question[index];
|
||||||
return Positioned(
|
return Positioned(
|
||||||
left: item.x + item.width - 50,
|
left: item.x + item.width/2,
|
||||||
top: item.y,
|
top: item.y + item.height/2 - 25.r,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(item.score.toInt().toString(),style: TextStyle(fontSize: 12.sp,color: Colors.red),),
|
Text(item.score.toInt().toString(),style: TextStyle(fontSize: 30.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),),
|
|
||||||
],
|
],
|
||||||
));
|
));
|
||||||
}),
|
}),
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,20 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
List<ExamOriginPapers> examOriginList = [];
|
List<ExamOriginPapers> examOriginList = [];
|
||||||
int currentSubjectId = 0;
|
int currentSubjectId = 0;
|
||||||
|
|
||||||
|
final viewTransformationController = TransformationController();
|
||||||
|
|
||||||
void initState() {
|
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();
|
super.initState();
|
||||||
|
|
||||||
List<String> arr = widget.headList.slice(3);
|
List<String> arr = widget.headList.slice(3);
|
||||||
arr.asMap().forEach((index, name) {
|
arr.asMap().forEach((index, name) {
|
||||||
var subject = widget.cardItem.subjectDetails;
|
var subject = widget.cardItem.subjectDetails;
|
||||||
|
|
@ -56,6 +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}');
|
||||||
}else{
|
}else{
|
||||||
examOriginList = [];
|
examOriginList = [];
|
||||||
examOrigin = null;
|
examOrigin = null;
|
||||||
|
|
@ -66,6 +79,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: MediaQuery.of(context).size.height,
|
height: MediaQuery.of(context).size.height,
|
||||||
|
|
@ -257,6 +271,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
? Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(top:5.r),
|
padding: EdgeInsets.only(top:5.r),
|
||||||
child: InteractiveViewer(
|
child: InteractiveViewer(
|
||||||
|
transformationController: viewTransformationController,
|
||||||
constrained: false,
|
constrained: false,
|
||||||
boundaryMargin: EdgeInsets.all(140.r),
|
boundaryMargin: EdgeInsets.all(140.r),
|
||||||
minScale: 0.1, // 最小缩放
|
minScale: 0.1, // 最小缩放
|
||||||
|
|
|
||||||
|
|
@ -387,34 +387,39 @@ class _TheReportState extends ConsumerState<TheReport>
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
padding: EdgeInsets.only(top: 5.r,bottom: 5.r,right: 2.r),
|
||||||
crossAxisAlignment:
|
child: Row(
|
||||||
CrossAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
crossAxisAlignment:
|
||||||
Container(
|
CrossAxisAlignment.center,
|
||||||
padding: EdgeInsets.symmetric(
|
children: [
|
||||||
vertical: 20.r, horizontal: 25.r),
|
Container(
|
||||||
decoration: BoxDecoration(
|
padding: EdgeInsets.symmetric(
|
||||||
image: DecorationImage(
|
vertical: 20.r, horizontal: 25.r),
|
||||||
image: AssetImage(
|
decoration: BoxDecoration(
|
||||||
'assets/images/report_group_bg.png'),
|
image: DecorationImage(
|
||||||
fit: BoxFit.fill,
|
image: AssetImage(
|
||||||
)),
|
'assets/images/report_group_bg.png'),
|
||||||
child: Text(
|
fit: BoxFit.fill,
|
||||||
item.typeName,
|
)),
|
||||||
style: TextStyle(
|
child: Text(
|
||||||
fontSize: 12.sp,
|
item.typeName,
|
||||||
color: Colors.white),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: Colors.white),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
Flexible(
|
||||||
Text(
|
child: Text(
|
||||||
item.name,
|
item.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
color: Colors.black),
|
color: Colors.black),
|
||||||
)
|
),
|
||||||
],
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
padding:
|
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_home_model.dart';
|
||||||
import 'package:marking_app/common/model/report/report_marking_detail.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/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:marking_app/common/model/user/user_info_report.dart';
|
||||||
import 'package:retrofit/retrofit.dart' as the_retrofit;
|
import 'package:retrofit/retrofit.dart' as the_retrofit;
|
||||||
|
|
||||||
|
|
@ -120,7 +121,7 @@ abstract class RestClientReport {
|
||||||
);
|
);
|
||||||
// 报告 => 可选班级
|
// 报告 => 可选班级
|
||||||
@the_retrofit.GET("/api/exam/report/master_mobilesubject")
|
@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("examId") int examId,
|
||||||
@the_retrofit.Query("classId") int classId,
|
@the_retrofit.Query("classId") int classId,
|
||||||
@the_retrofit.Query("subject") int subject
|
@the_retrofit.Query("subject") int subject
|
||||||
|
|
@ -136,4 +137,10 @@ abstract class RestClientReport {
|
||||||
Future<BaseStructureResultReport<ReportMarkingDetail>> getMarkingDetail(
|
Future<BaseStructureResultReport<ReportMarkingDetail>> getMarkingDetail(
|
||||||
@the_retrofit.Body() ReportMarkingDetailParams params
|
@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