Compare commits
No commits in common. "3944a72ab6380ded7a063d4a8c5a59dbbea7731e" and "ab6546a7af860d256f3600a6b768658a74dad00f" have entirely different histories.
3944a72ab6
...
ab6546a7af
Binary file not shown.
|
Before Width: | Height: | Size: 152 KiB |
|
|
@ -1,50 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'report_student_history_record.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ReportStudentHistoryRecord extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamId')
|
|
||||||
int examId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamName')
|
|
||||||
String examName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamStartTime')
|
|
||||||
String examStartTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'StudentExamNum')
|
|
||||||
String studentExamNum;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ScoreInfo')
|
|
||||||
List<ScoreInfo> scoreInfo;
|
|
||||||
|
|
||||||
ReportStudentHistoryRecord(this.examId,this.examName,this.examStartTime,this.studentExamNum,this.scoreInfo,);
|
|
||||||
|
|
||||||
factory ReportStudentHistoryRecord.fromJson(Map<String, dynamic> srcJson) => _$ReportStudentHistoryRecordFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ReportStudentHistoryRecordToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ScoreInfo extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'Value')
|
|
||||||
double value;
|
|
||||||
|
|
||||||
@JsonKey(name: 'Text')
|
|
||||||
String text;
|
|
||||||
|
|
||||||
ScoreInfo(this.value,this.text,);
|
|
||||||
|
|
||||||
factory ScoreInfo.fromJson(Map<String, dynamic> srcJson) => _$ScoreInfoFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ScoreInfoToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'report_student_info.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ReportStudentInfo extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamId')
|
|
||||||
int examId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'UserId')
|
|
||||||
int userId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ClassId')
|
|
||||||
int classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamName')
|
|
||||||
String examName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ExamNo')
|
|
||||||
String examNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'UserName')
|
|
||||||
String userName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ScoreInfo')
|
|
||||||
List<ScoreInfo> scoreInfo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'Subject')
|
|
||||||
List<Subject> subject;
|
|
||||||
|
|
||||||
ReportStudentInfo(this.examId,this.userId,this.classId,this.examName,this.examNo,this.userName,this.scoreInfo,this.subject,);
|
|
||||||
|
|
||||||
factory ReportStudentInfo.fromJson(Map<String, dynamic> srcJson) => _$ReportStudentInfoFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ReportStudentInfoToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ScoreInfo extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'Value')
|
|
||||||
double value;
|
|
||||||
|
|
||||||
@JsonKey(name: 'Text')
|
|
||||||
String text;
|
|
||||||
|
|
||||||
ScoreInfo(this.value,this.text,);
|
|
||||||
|
|
||||||
factory ScoreInfo.fromJson(Map<String, dynamic> srcJson) => _$ScoreInfoFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ScoreInfoToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Subject extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'Value')
|
|
||||||
int value;
|
|
||||||
|
|
||||||
@JsonKey(name: 'Text')
|
|
||||||
String text;
|
|
||||||
|
|
||||||
Subject(this.value,this.text,);
|
|
||||||
|
|
||||||
factory Subject.fromJson(Map<String, dynamic> srcJson) => _$SubjectFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$SubjectToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,499 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
|
||||||
import 'package:marking_app/common/model/common/base_structure_result_report.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_student_info.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/pages/report_detail/widgets/complete_table.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|
||||||
import 'package:marking_app/utils/request/rest_client_report.dart';
|
|
||||||
|
|
||||||
import 'widgets/custom_rect.dart';
|
|
||||||
|
|
||||||
class CompletedReport extends StatefulWidget {
|
|
||||||
final int examId;
|
|
||||||
final String studentNo;
|
|
||||||
|
|
||||||
const CompletedReport(
|
|
||||||
{Key? key, required this.examId, required this.studentNo})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<CompletedReport> createState() => _CompletedReportState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CompletedReportState extends State<CompletedReport> with CommonMixin {
|
|
||||||
ReportStudentInfo? studentInfo;
|
|
||||||
int currentSubjectId = 0;
|
|
||||||
ExamOriginPapers? examOrigin;
|
|
||||||
List<ExamOriginPapers> examOriginList = [];
|
|
||||||
List<QuestionAnswers> questionAnswers = [];
|
|
||||||
final viewTransformationController = TransformationController();
|
|
||||||
bool isList = false;
|
|
||||||
|
|
||||||
@override
|
|
||||||
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();
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getInfo() async {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
RestClientReport clientReport = await getClientReport();
|
|
||||||
BaseStructureResultReport<ReportStudentInfo> res =
|
|
||||||
await clientReport.getStudentInfo(widget.examId, widget.studentNo);
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
studentInfo = res.data!;
|
|
||||||
currentSubjectId =
|
|
||||||
studentInfo!.subject.length > 0 ? studentInfo!.subject[0].value : 0;
|
|
||||||
getImageDetail();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void getImageDetail() async {
|
|
||||||
RestClientReport clientReport = await getClientReport();
|
|
||||||
ReportMarkingDetailParams params =
|
|
||||||
ReportMarkingDetailParams(currentSubjectId, widget.studentNo);
|
|
||||||
BaseStructureResultReport<ReportMarkingDetail> res =
|
|
||||||
await clientReport.getMarkingDetail(params);
|
|
||||||
|
|
||||||
setState(() {
|
|
||||||
if (res.data != null) {
|
|
||||||
examOrigin = res.data!.examOriginPapers[0];
|
|
||||||
examOriginList = res.data!.examOriginPapers;
|
|
||||||
questionAnswers = res.data!.questionAnswers;
|
|
||||||
} else {
|
|
||||||
examOriginList = [];
|
|
||||||
examOrigin = null;
|
|
||||||
questionAnswers = [];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
if (studentInfo == null) {
|
|
||||||
return Container();
|
|
||||||
}
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color(0xFFEDF0FF),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text(
|
|
||||||
'${studentInfo!.userName}已完成考试报告',
|
|
||||||
style: TextStyle(fontSize: 14.r, color: Color(0xFF000000)),
|
|
||||||
),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.reportHistoryPath}?classId=${studentInfo!.classId}&userId=${studentInfo!.userId}&studentName=${Uri.encodeComponent(studentInfo!.userName)}');
|
|
||||||
},
|
|
||||||
child: UnconstrainedBox(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
margin: EdgeInsets.only(right: 14.r),
|
|
||||||
height: 22.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF6988FD)),
|
|
||||||
borderRadius: BorderRadius.circular(5.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'历次成绩',
|
|
||||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF6988FD)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 10.r, left: 14.r, right: 14.r),
|
|
||||||
child: Text(
|
|
||||||
'${studentInfo!.userName}${studentInfo!.examName}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF6787FD),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.r, left: 14.r, right: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.1),
|
|
||||||
offset: Offset(0, 0), //阴影y轴偏移量
|
|
||||||
blurRadius: 2, //阴影模糊程度
|
|
||||||
spreadRadius: 1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.r),
|
|
||||||
width: double.infinity,
|
|
||||||
height: 30.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFEFF1FF),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(2.r))),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: List.generate(
|
|
||||||
studentInfo!.scoreInfo.length > 7
|
|
||||||
? 7
|
|
||||||
: studentInfo!.scoreInfo.length, (index) {
|
|
||||||
var item = studentInfo!.scoreInfo[index];
|
|
||||||
return Container(
|
|
||||||
width: (MediaQuery.of(context).size.width - 48.r) / 7,
|
|
||||||
child: _subjectText(item.text));
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 30.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(2.r))),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: List.generate(
|
|
||||||
studentInfo!.scoreInfo.length > 7
|
|
||||||
? 7
|
|
||||||
: studentInfo!.scoreInfo.length, (index) {
|
|
||||||
var item = studentInfo!.scoreInfo[index];
|
|
||||||
return Container(
|
|
||||||
width: (MediaQuery.of(context).size.width - 48.r) / 7,
|
|
||||||
child: _subjectText(item.value.toString()));
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (studentInfo!.scoreInfo.length > 7)
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 30.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFEFF1FF),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(2.r))),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: List.generate(studentInfo!.scoreInfo.length - 7,
|
|
||||||
(index) {
|
|
||||||
var item = studentInfo!.scoreInfo[index + 7];
|
|
||||||
return Container(
|
|
||||||
width:
|
|
||||||
(MediaQuery.of(context).size.width - 48.r) / 7,
|
|
||||||
child: _subjectText(item.text));
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (studentInfo!.scoreInfo.length > 7)
|
|
||||||
Container(
|
|
||||||
width: double.infinity,
|
|
||||||
height: 30.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(2.r))),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: List.generate(studentInfo!.scoreInfo.length - 7,
|
|
||||||
(index) {
|
|
||||||
var subject = studentInfo!.scoreInfo[index + 7];
|
|
||||||
return Container(
|
|
||||||
width:
|
|
||||||
(MediaQuery.of(context).size.width - 48.r) / 7,
|
|
||||||
child: _subjectText(subject.value.toString()));
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Stack(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.r, left: 14.r, right: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.1),
|
|
||||||
offset: Offset(0, 0), //阴影y轴偏移量
|
|
||||||
blurRadius: 2, //阴影模糊程度
|
|
||||||
spreadRadius: 1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 30.r,
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
child: ListView.builder(
|
|
||||||
itemBuilder: (BuildContext context, int index) {
|
|
||||||
Subject item = studentInfo!.subject[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
currentSubjectId = item.value;
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getImageDetail();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 30.r,
|
|
||||||
height: 30.r,
|
|
||||||
margin: EdgeInsets.only(
|
|
||||||
right: index == studentInfo!.subject.length
|
|
||||||
? 0
|
|
||||||
: (MediaQuery.of(context).size.width -
|
|
||||||
30.r * 9 -
|
|
||||||
104.r) /
|
|
||||||
8),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: currentSubjectId == item.value
|
|
||||||
? Color(0xFF6787FD)
|
|
||||||
: Color(0xFFFFFFFF),
|
|
||||||
shape: BoxShape.circle,
|
|
||||||
// borderRadius: BorderRadius.all(Radius.circular(13.r)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item.text,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 11.sp,
|
|
||||||
color: currentSubjectId == item.value
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFF667095),
|
|
||||||
fontWeight: FontWeight.w400),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: studentInfo!.subject.length,
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: examOrigin != null && examOrigin!.imageUrl != ''
|
|
||||||
? !isList
|
|
||||||
? Padding(
|
|
||||||
padding: EdgeInsets.only(top: 5.r),
|
|
||||||
child: InteractiveViewer(
|
|
||||||
transformationController:
|
|
||||||
viewTransformationController,
|
|
||||||
constrained: false,
|
|
||||||
boundaryMargin: EdgeInsets.all(140.r),
|
|
||||||
minScale: 0.1,
|
|
||||||
// 最小缩放
|
|
||||||
maxScale: 4.0,
|
|
||||||
// 最大缩放
|
|
||||||
child: CustomRect(examOrigin!)),
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: EdgeInsets.only(top: 10.r),
|
|
||||||
child: questionAnswers.length > 0
|
|
||||||
? CompleteTable(
|
|
||||||
fixedCols: 0,
|
|
||||||
fixedRows: 1,
|
|
||||||
bodyList: questionAnswers,
|
|
||||||
)
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
)
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 15.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
isList = false;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 27.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: !isList
|
|
||||||
? Color(0xFF6988FD)
|
|
||||||
: Color(0xFFEDEFFF),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'查看原卷',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: !isList
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFF7B7B7E)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 20.r,
|
|
||||||
),
|
|
||||||
Flexible(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
isList = true;
|
|
||||||
setState(() {});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 27.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: isList
|
|
||||||
? Color(0xFF6988FD)
|
|
||||||
: Color(0xFFEDEFFF),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'查看列题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: isList
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFF7B7B7E)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (!isList)
|
|
||||||
Positioned(
|
|
||||||
left: 0.r,
|
|
||||||
top: MediaQuery.of(context).size.height / 4,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
var num = examOrigin!.pageIndex;
|
|
||||||
if (num > 1) {
|
|
||||||
setState(() {
|
|
||||||
examOrigin = examOriginList[num - 1 - 1];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Opacity(
|
|
||||||
opacity: examOrigin != null && examOrigin!.pageIndex > 1
|
|
||||||
? 1
|
|
||||||
: 0.3,
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/report_left_icon.png',
|
|
||||||
width: 33.r,
|
|
||||||
height: 33.r,
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (!isList)
|
|
||||||
Positioned(
|
|
||||||
right: 0,
|
|
||||||
top: MediaQuery.of(context).size.height / 4,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
var num = examOrigin!.pageIndex;
|
|
||||||
if (num < examOriginList.length) {
|
|
||||||
setState(() {
|
|
||||||
examOrigin = examOriginList[num];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Opacity(
|
|
||||||
opacity: examOrigin != null &&
|
|
||||||
examOrigin!.pageIndex < examOriginList.length
|
|
||||||
? 1
|
|
||||||
: 0.3,
|
|
||||||
child: Image.asset(
|
|
||||||
'assets/images/report_right_icon.png',
|
|
||||||
width: 33.r,
|
|
||||||
height: 33.r,
|
|
||||||
)),
|
|
||||||
/* Image.asset(
|
|
||||||
'assets/images/report_right_icon.png',
|
|
||||||
width: 33.r,
|
|
||||||
height: 33.r,
|
|
||||||
)*/
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class _subjectText extends StatelessWidget {
|
|
||||||
final String name;
|
|
||||||
final bool isTitle;
|
|
||||||
|
|
||||||
const _subjectText(this.name, {this.isTitle = true, Key? key})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Center(
|
|
||||||
child: Text(
|
|
||||||
name,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: isTitle ? 11.sp : 12.sp,
|
|
||||||
color: isTitle ? Color(0xFF667095) : Color(0xFF424242),
|
|
||||||
fontWeight: FontWeight.w400),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -23,7 +23,6 @@ import 'package:marking_app/pages/report_detail/widgets/no_data.dart';
|
||||||
import 'package:marking_app/pages/report_detail/widgets/overall_level_table.dart';
|
import 'package:marking_app/pages/report_detail/widgets/overall_level_table.dart';
|
||||||
import 'package:marking_app/pages/report_detail/widgets/report_card_dialog.dart';
|
import 'package:marking_app/pages/report_detail/widgets/report_card_dialog.dart';
|
||||||
import 'package:marking_app/pages/report_detail/widgets/question_table.dart';
|
import 'package:marking_app/pages/report_detail/widgets/question_table.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/request/rest_client_report.dart';
|
import 'package:marking_app/utils/request/rest_client_report.dart';
|
||||||
import 'package:marking_app/utils/toast_utils.dart';
|
import 'package:marking_app/utils/toast_utils.dart';
|
||||||
|
|
||||||
|
|
@ -106,6 +105,7 @@ 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}');
|
||||||
if (result.code == 200) {
|
if (result.code == 200) {
|
||||||
setState(() {
|
setState(() {
|
||||||
currentPage = 1;
|
currentPage = 1;
|
||||||
|
|
@ -139,6 +139,8 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
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 : ''}');
|
||||||
if (res.code != 200 || res.data == null) {
|
if (res.code != 200 || res.data == null) {
|
||||||
setState(() {
|
setState(() {
|
||||||
smallQuestionRes = null;
|
smallQuestionRes = null;
|
||||||
|
|
@ -210,10 +212,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
});
|
});
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
goCompleteReport(BuildContext context, int index,{String studentNo = 'true'}){
|
|
||||||
|
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.completedReportPath}?examId=${widget.examId}&studentNo=${studentNo == 'true'?initialList[index].examStudentId:studentNo}');
|
|
||||||
}
|
|
||||||
//成绩单详情
|
//成绩单详情
|
||||||
void showAlertDialog(BuildContext context, int index) {
|
void showAlertDialog(BuildContext context, int index) {
|
||||||
List<String> detailHead = [];
|
List<String> detailHead = [];
|
||||||
|
|
@ -519,7 +518,6 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
isHtml:true,
|
isHtml:true,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 1,
|
fixedCols: 1,
|
||||||
showCardDetail: goCompleteReport,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: NoData(),
|
: NoData(),
|
||||||
|
|
@ -542,7 +540,6 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
isHtml:true,
|
isHtml:true,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 1,
|
fixedCols: 1,
|
||||||
showCardDetail: goCompleteReport,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Row(
|
Row(
|
||||||
|
|
@ -671,8 +668,6 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
isScore: true,
|
isScore: true,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 3,
|
fixedCols: 3,
|
||||||
showCardDetail: goCompleteReport,
|
|
||||||
smallQuestion:true,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: NoData(),
|
: NoData(),
|
||||||
|
|
@ -802,8 +797,7 @@ class _ReportDetailState extends ConsumerState<ReportDetail> with CommonMixin {
|
||||||
child: CardList(
|
child: CardList(
|
||||||
headList: cardHeadList,
|
headList: cardHeadList,
|
||||||
bodyList: cardBodyList,
|
bodyList: cardBodyList,
|
||||||
// showCardDetail: showAlertDialog,
|
showCardDetail: showAlertDialog,
|
||||||
showCardDetail: goCompleteReport,
|
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 3,
|
fixedCols: 3,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,81 +1,15 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
|
||||||
import 'package:marking_app/common/model/common/base_structure_result_report.dart';
|
|
||||||
import 'package:marking_app/common/model/report/report_student_history_record.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/common_utils.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|
||||||
import 'package:marking_app/utils/index.dart';
|
|
||||||
import 'package:marking_app/utils/request/rest_client_report.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
class ReportHistory extends StatefulWidget {
|
class ReportHistory extends StatefulWidget {
|
||||||
final int userId;
|
const ReportHistory({Key? key}) : super(key: key);
|
||||||
final int classId;
|
|
||||||
final String studentName;
|
|
||||||
|
|
||||||
const ReportHistory({Key? key, required this.classId, required this.userId,required this.studentName})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<ReportHistory> createState() => _ReportHistoryState();
|
State<ReportHistory> createState() => _ReportHistoryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ReportHistoryState extends State<ReportHistory>
|
class _ReportHistoryState extends State<ReportHistory> {
|
||||||
with CommonMixin, TickerProviderStateMixin {
|
|
||||||
bool isWork = true;
|
bool isWork = true;
|
||||||
String startDataTime =
|
|
||||||
CommonUtils.getWeekStartDate().toString().substring(0, 10);
|
|
||||||
String endDataTime = CommonUtils.getWeekEndDate().toString().substring(0, 10);
|
|
||||||
String customTimeStr = '自定义';
|
|
||||||
late TabController tabController;
|
|
||||||
List<ReportStudentHistoryRecord> dataList = [];
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
print('userId=${widget.userId}&classId=${widget.classId}');
|
|
||||||
super.initState();
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
tabController = TabController(length: 3, vsync: this);
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getList() async {
|
|
||||||
if (startDataTime == DateTime.now().toString().substring(0, 10) ||
|
|
||||||
DateTime.parse(startDataTime).isAfter(DateTime.now())) {
|
|
||||||
DateTime now = DateTime.parse(startDataTime);
|
|
||||||
endDataTime = now.add(Duration(days: 1)).toString().substring(0, 10);
|
|
||||||
print(now.add(Duration(days: 1)));
|
|
||||||
} else {
|
|
||||||
endDataTime = DateTime.now().toString().substring(0, 10);
|
|
||||||
}
|
|
||||||
RestClientReport clientReport = await getClientReport();
|
|
||||||
BaseStructureResultReport<List<ReportStudentHistoryRecord>> res =
|
|
||||||
// 488491659239519, 488491659190341, '2023-03-08', '2024-04-19'
|
|
||||||
await clientReport.getStudentHistroyRecords(
|
|
||||||
widget.userId, widget.classId, startDataTime, endDataTime);
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
dataList = res.data!;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
// TODO: implement dispose
|
|
||||||
super.dispose();
|
|
||||||
tabController.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -84,7 +18,7 @@ class _ReportHistoryState extends State<ReportHistory>
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text(
|
title: Text(
|
||||||
'${widget.studentName}已完成考试报告',
|
'已完成报告',
|
||||||
style: TextStyle(fontSize: 14.r, color: Color(0xFF000000)),
|
style: TextStyle(fontSize: 14.r, color: Color(0xFF000000)),
|
||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
|
@ -92,13 +26,10 @@ class _ReportHistoryState extends State<ReportHistory>
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
),
|
),
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
body: Column(
|
body: Column(
|
||||||
children: [
|
children: [
|
||||||
/* Container(
|
Container(
|
||||||
width: MediaQuery.of(context).size.width * 0.8,
|
width: MediaQuery.of(context).size.width * 0.8,
|
||||||
height: 40.r,
|
height: 40.r,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
|
|
@ -158,400 +89,9 @@ class _ReportHistoryState extends State<ReportHistory>
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),*/
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
jobConditionFilter(context,
|
|
||||||
controller: tabController,
|
|
||||||
customTimeStr: customTimeStr,
|
|
||||||
customTime: tabController.index != 3 ||
|
|
||||||
((endDataTime == null || endDataTime == '') &&
|
|
||||||
(startDataTime == null || startDataTime == ''))
|
|
||||||
? null
|
|
||||||
: PickerDateRange(
|
|
||||||
startDataTime == null || startDataTime == ''
|
|
||||||
? null
|
|
||||||
: DateTime.parse(startDataTime!),
|
|
||||||
endDataTime == null || endDataTime == ''
|
|
||||||
? null
|
|
||||||
: DateTime.parse(endDataTime!),
|
|
||||||
), onTimeFilter: (String? startTime, String? endTime) {
|
|
||||||
if (startTime == null && endTime == null) {
|
|
||||||
if (tabController.index == 3) {
|
|
||||||
tabController.animateTo(0);
|
|
||||||
}
|
|
||||||
startDataTime = '';
|
|
||||||
endDataTime = '';
|
|
||||||
customTimeStr = '自定义';
|
|
||||||
} else {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
startDataTime = startTime != null ? startTime : '';
|
|
||||||
endDataTime = endTime != null ? endTime : '';
|
|
||||||
setState(() {});
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
// _refreshController2.callRefresh();
|
|
||||||
}, refreshTime: (value) {
|
|
||||||
if (value != null && value.startDate != null) {
|
|
||||||
customTimeStr =
|
|
||||||
value.startDate?.toString().substring(0, 10) ?? '';
|
|
||||||
setState(() {});
|
|
||||||
if (value.endDate != null) {
|
|
||||||
if (value.startDate!.year == value.endDate!.year) {
|
|
||||||
customTimeStr = value.startDate.toString().substring(5, 10) +
|
|
||||||
'~${value.endDate.toString().substring(5, 10)}';
|
|
||||||
setState(() {});
|
|
||||||
} else {
|
|
||||||
customTimeStr =
|
|
||||||
'$customTimeStr~${value.endDate?.toString().substring(0, 10)}';
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
|
||||||
child: EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
getList();
|
|
||||||
},
|
|
||||||
child: dataList.length > 0
|
|
||||||
? ListView.builder(
|
|
||||||
itemCount: dataList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
ReportStudentHistoryRecord item = dataList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.completedReportPath}?examId=${item.examId}&studentNo=${item.studentExamNum}');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
// padding: EdgeInsets.all(6.r),
|
|
||||||
margin: EdgeInsets.only(bottom: 10.r),
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage(
|
|
||||||
'assets/images/report_student_history_bg.png'),
|
|
||||||
fit: BoxFit.fill,
|
|
||||||
),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r,
|
|
||||||
color: Color.fromRGBO(46, 91, 255, 0.2)),
|
|
||||||
borderRadius: BorderRadius.circular(5.r),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 10.r,
|
|
||||||
horizontal: 10.r,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
item.examName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF000000)),
|
|
||||||
),
|
|
||||||
Spacer(),
|
|
||||||
Text(
|
|
||||||
item.examStartTime,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF4A4A4A)),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 2.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding:
|
|
||||||
EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(5.r),
|
|
||||||
),
|
|
||||||
child: item.scoreInfo.length > 0
|
|
||||||
? Scrollbar(
|
|
||||||
// thumbVisibility:true,
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
child: Row(
|
|
||||||
children: List.generate(
|
|
||||||
item.scoreInfo.length, (i) {
|
|
||||||
ScoreInfo score =
|
|
||||||
item.scoreInfo[i];
|
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 22.r,
|
|
||||||
width: item.scoreInfo
|
|
||||||
.length >
|
|
||||||
4
|
|
||||||
? 90.r
|
|
||||||
: (MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.width -
|
|
||||||
48.r -
|
|
||||||
(item.scoreInfo
|
|
||||||
.length - 1) *
|
|
||||||
1.5
|
|
||||||
.r) /
|
|
||||||
item.scoreInfo
|
|
||||||
.length,
|
|
||||||
decoration:
|
|
||||||
BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: i == 0
|
|
||||||
? Radius
|
|
||||||
.circular(
|
|
||||||
4.r)
|
|
||||||
: Radius
|
|
||||||
.zero,
|
|
||||||
topRight: i ==
|
|
||||||
item.scoreInfo.length -
|
|
||||||
1
|
|
||||||
? Radius
|
|
||||||
.circular(
|
|
||||||
4.r)
|
|
||||||
: Radius
|
|
||||||
.zero),
|
|
||||||
color: Color(
|
|
||||||
0xFFECECEC),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
score.text,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
12.sp,
|
|
||||||
color: Color(
|
|
||||||
0xFF8A8A8A)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 30.r,
|
|
||||||
width: item.scoreInfo
|
|
||||||
.length >
|
|
||||||
4
|
|
||||||
? 90.r
|
|
||||||
: (MediaQuery.of(
|
|
||||||
context)
|
|
||||||
.size
|
|
||||||
.width -
|
|
||||||
48.r -
|
|
||||||
(item.scoreInfo
|
|
||||||
.length - 1) *
|
|
||||||
1.5.r) /
|
|
||||||
item.scoreInfo
|
|
||||||
.length,
|
|
||||||
decoration:
|
|
||||||
BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
bottomLeft: i ==
|
|
||||||
0
|
|
||||||
? Radius
|
|
||||||
.circular(
|
|
||||||
4.r)
|
|
||||||
: Radius
|
|
||||||
.zero,
|
|
||||||
bottomRight: i ==
|
|
||||||
item.scoreInfo.length -
|
|
||||||
1
|
|
||||||
? Radius
|
|
||||||
.circular(
|
|
||||||
4.r)
|
|
||||||
: Radius
|
|
||||||
.zero),
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
score.value
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize:
|
|
||||||
12.sp,
|
|
||||||
color: Color(
|
|
||||||
0xFF4A4A4A)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: i <
|
|
||||||
item.scoreInfo
|
|
||||||
.length - 1
|
|
||||||
? 1.5.r
|
|
||||||
: 0.r,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Center(
|
|
||||||
child: Text(
|
|
||||||
'-暂无数据-',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF8A8A8A)),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.r,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@hwidget
|
|
||||||
Widget jobConditionFilter(BuildContext context,
|
|
||||||
{required TabController controller,
|
|
||||||
PickerDateRange? customTime,
|
|
||||||
required Function refreshTime,
|
|
||||||
required String customTimeStr,
|
|
||||||
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
|
||||||
var customTimeState = PickerDateRange(null, null);
|
|
||||||
if (customTime != null) {
|
|
||||||
customTimeState = PickerDateRange(
|
|
||||||
customTime!.startDate != null ? customTime!.startDate : null,
|
|
||||||
customTime!.endDate != null ? customTime!.endDate : null);
|
|
||||||
}
|
|
||||||
|
|
||||||
DateTime getMonthStartDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
return DateTime(now.year, now.month, 1); // 获取当前月份的第一天
|
|
||||||
}
|
|
||||||
|
|
||||||
DateTime getMonthEndDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
int nextMonth = now.month + 1;
|
|
||||||
if (nextMonth > 12) {
|
|
||||||
nextMonth = 1;
|
|
||||||
now = now.add(Duration(days: 31 - now.day)); // 跨年了,所以加到当前月的最后一天
|
|
||||||
} else {
|
|
||||||
now = now.add(Duration(
|
|
||||||
days: DateTime(now.year, nextMonth, 0).day -
|
|
||||||
now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
|
||||||
}
|
|
||||||
return now;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
// color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
// border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border:
|
|
||||||
Border(bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
|
||||||
child: TabBar(
|
|
||||||
controller: controller,
|
|
||||||
unselectedLabelStyle: TextStyle(
|
|
||||||
fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Color.fromRGBO(116, 145, 253, 1),
|
|
||||||
),
|
|
||||||
isScrollable: true,
|
|
||||||
labelColor: Color(0xFF7491FD),
|
|
||||||
unselectedLabelColor: Color(0xFF505E6E),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
|
||||||
onTap: (int val) async {
|
|
||||||
switch (val) {
|
|
||||||
case 0: // 近一周
|
|
||||||
onTimeFilter(
|
|
||||||
CommonUtils.getWeekStartDate().toString().substring(0, 10),
|
|
||||||
CommonUtils.getWeekEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 1: // 近一个月
|
|
||||||
onTimeFilter(
|
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default: // 自定义
|
|
||||||
var dialogData = await showDialog<PickerDateRange?>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context1) {
|
|
||||||
return Center(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
width: isPad()
|
|
||||||
? ScreenUtil().screenWidth / 2
|
|
||||||
: ScreenUtil().screenWidth / 1.3,
|
|
||||||
height: ScreenUtil().screenHeight / 2,
|
|
||||||
child: SfDateRangePicker(
|
|
||||||
showActionButtons: true,
|
|
||||||
confirmText: '确定',
|
|
||||||
cancelText: '取消',
|
|
||||||
onSubmit: (p0) {
|
|
||||||
print(p0);
|
|
||||||
Navigator.of(context1).pop(p0);
|
|
||||||
refreshTime(p0);
|
|
||||||
},
|
|
||||||
onCancel: () {
|
|
||||||
Navigator.of(context1).pop();
|
|
||||||
},
|
|
||||||
selectionMode: DateRangePickerSelectionMode.range,
|
|
||||||
initialSelectedRange: customTimeState,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
// startDate: 2024-03-04 18:47:00.117958, endDate: 2024-03-11 18:47:00.117986
|
|
||||||
// if (dialogData != null && (dialogData.startDate != null || dialogData.endDate != null)) {}
|
|
||||||
onTimeFilter(
|
|
||||||
dialogData?.startDate?.toString().substring(0, 10),
|
|
||||||
dialogData?.endDate?.toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
// customTimeState = dialogData!;
|
|
||||||
customTimeState = dialogData ?? PickerDateRange(null, null);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tabs: <Widget>[
|
|
||||||
const Tab(text: '近一周'),
|
|
||||||
const Tab(text: '近一月'),
|
|
||||||
Tab(text: customTimeStr),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ 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';
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
|
|
||||||
class CardList extends StatefulWidget {
|
class CardList extends StatefulWidget {
|
||||||
final List headList;
|
final List headList;
|
||||||
|
|
@ -12,7 +11,6 @@ class CardList extends StatefulWidget {
|
||||||
final int? fixedRows;
|
final int? fixedRows;
|
||||||
final int? fixedCols;
|
final int? fixedCols;
|
||||||
final bool? isHtml;
|
final bool? isHtml;
|
||||||
final bool? smallQuestion;
|
|
||||||
|
|
||||||
const CardList({
|
const CardList({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
|
@ -21,7 +19,6 @@ class CardList extends StatefulWidget {
|
||||||
this.showCardDetail,
|
this.showCardDetail,
|
||||||
this.isScore = false,
|
this.isScore = false,
|
||||||
this.isHtml = false,
|
this.isHtml = false,
|
||||||
this.smallQuestion = false,
|
|
||||||
this.fixedCols,
|
this.fixedCols,
|
||||||
this.fixedRows,
|
this.fixedRows,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
@ -35,7 +32,6 @@ class _CardListState extends State<CardList> {
|
||||||
int? _sortColumnIndex;
|
int? _sortColumnIndex;
|
||||||
bool _sortAscending = true;
|
bool _sortAscending = true;
|
||||||
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
var body = widget.bodyList[index];
|
var body = widget.bodyList[index];
|
||||||
|
|
@ -44,19 +40,16 @@ class _CardListState extends State<CardList> {
|
||||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||||
cells: List.generate(widget.headList.length, (itemIndex) {
|
cells: List.generate(widget.headList.length, (itemIndex) {
|
||||||
var item = body[itemIndex];
|
var item = body[itemIndex];
|
||||||
// print(item);
|
|
||||||
return
|
return
|
||||||
itemIndex == 0 && widget.isScore == false ?DataCell(Center(
|
itemIndex == 0 && widget.isScore == false ?DataCell(Center(
|
||||||
child: Text((index + 1).toString(),
|
child: Text((index + 1).toString(),
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
||||||
)):
|
)):
|
||||||
DataCell((itemIndex == 2 && widget.isScore == false)||(itemIndex == 1 && widget.smallQuestion == true)
|
DataCell(itemIndex == 2 && widget.isScore == false
|
||||||
? InkWell(
|
? InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (widget.showCardDetail != null && itemIndex == 1 && item.toString().contains('{') && item['ExamNo'] != '') {
|
if (widget.showCardDetail != null) {
|
||||||
widget.showCardDetail!(context, index,studentNo:item['ExamNo']);
|
|
||||||
}else if (widget.showCardDetail != null && itemIndex == 2) {
|
|
||||||
widget.showCardDetail!(context, index);
|
widget.showCardDetail!(context, index);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -65,7 +58,7 @@ class _CardListState extends State<CardList> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(item.toString().contains('{')?item['Name']:item.toString(),
|
child: Text(item.toString(),
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp, color: Color(0xFF262626))),
|
fontSize: 12.sp, color: Color(0xFF262626))),
|
||||||
),
|
),
|
||||||
|
|
@ -81,23 +74,15 @@ class _CardListState extends State<CardList> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: InkWell(
|
: Center(
|
||||||
onTap: (){
|
|
||||||
if (widget.showCardDetail != null && item.toString().contains('{') && item['ExamNo'] != '') {
|
|
||||||
// print(item);
|
|
||||||
widget.showCardDetail!(context, index,studentNo:item['ExamNo']);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child:
|
child:
|
||||||
widget.isHtml == true?HtmlWidget(item.toString().contains('{')?item['Name']: item.toString(),textStyle: TextStyle(fontSize: 12.sp,color: item.toString().contains('{') && item['ExamNo'] != ''?Color(0xFF6988FD):Color(0xFF262626)),):
|
widget.isHtml == true?HtmlWidget(item.toString(),textStyle: TextStyle(fontSize: 12.sp,color: Color(0xFF262626)),):
|
||||||
Text(item.toString().contains('{')?item['Name']:item.toString(),
|
Text(item.toString(),
|
||||||
style:
|
style:
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
));
|
));
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,161 +0,0 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
|
||||||
import 'package:marking_app/common/model/report/report_marking_detail.dart';
|
|
||||||
import 'package:photo_view/photo_view.dart';
|
|
||||||
|
|
||||||
class CompleteTable extends StatefulWidget {
|
|
||||||
final List bodyList;
|
|
||||||
final int? fixedRows;
|
|
||||||
final int? fixedCols;
|
|
||||||
|
|
||||||
const CompleteTable({
|
|
||||||
Key? key,
|
|
||||||
required this.bodyList,
|
|
||||||
this.fixedCols,
|
|
||||||
this.fixedRows,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<CompleteTable> createState() => _CompleteTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _CompleteTableState extends State<CompleteTable> {
|
|
||||||
final ScrollController _controller = ScrollController();
|
|
||||||
int? _sortColumnIndex;
|
|
||||||
bool _sortAscending = true;
|
|
||||||
final List<String> headList = ['题号','小题分','得分','用户答案','正确答案'];
|
|
||||||
|
|
||||||
showImg(String imgUrl) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: Container(
|
|
||||||
width: MediaQuery.of(context).size.width - 48.r,
|
|
||||||
height: MediaQuery.of(context).size.height * 0.6,
|
|
||||||
color: Colors.white,
|
|
||||||
child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
|
||||||
assert(index >= 0);
|
|
||||||
QuestionAnswers body = widget.bodyList[index];
|
|
||||||
return DataRow2.byIndex(
|
|
||||||
index: index,
|
|
||||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
|
||||||
cells: [
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(body.questionNum,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(body.totalScore.toString(),
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(body.score.toString(),
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child:
|
|
||||||
body.yourAnswer.contains('http')?
|
|
||||||
InkWell(
|
|
||||||
onTap: (){
|
|
||||||
showImg(body.yourAnswer);
|
|
||||||
},
|
|
||||||
child: Text('查看原题',style: TextStyle(fontSize: 12.sp,color: Color(0xFF6988FD)),),
|
|
||||||
):
|
|
||||||
Text(body.yourAnswer,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626)))
|
|
||||||
,
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(
|
|
||||||
Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(body.answer,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF262626))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return DataTable2(
|
|
||||||
dividerThickness: 0,
|
|
||||||
scrollController: _controller,
|
|
||||||
columnSpacing: 0,
|
|
||||||
horizontalMargin: 0,
|
|
||||||
dataRowHeight:40.r,
|
|
||||||
headingRowHeight: 30.r,
|
|
||||||
bottomMargin: 0,
|
|
||||||
border: TableBorder(
|
|
||||||
left: BorderSide(
|
|
||||||
width: 1, color: Color(0xFFEAEAEA), style: BorderStyle.solid),
|
|
||||||
right: BorderSide(
|
|
||||||
width: 1, color: Color(0xFFEAEAEA), style: BorderStyle.solid),
|
|
||||||
horizontalInside: BorderSide(
|
|
||||||
width: 1, color: Color(0xFFEAEAEA), style: BorderStyle.solid),
|
|
||||||
bottom: BorderSide(
|
|
||||||
width: 1, color: Color(0xFFEAEAEA), style: BorderStyle.solid),
|
|
||||||
verticalInside: BorderSide(
|
|
||||||
width: 1, color: Color(0xFFEAEAEA), style: BorderStyle.solid)),
|
|
||||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
|
||||||
widget.fixedCols! > 0 ? Color(0xFFF0F3FF) : Colors.transparent),
|
|
||||||
headingRowDecoration: BoxDecoration(color: Color(0xFFF0F3FF)),
|
|
||||||
fixedColumnsColor: Color(0xFFF0F3FF),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
|
||||||
minWidth:MediaQuery.of(context).size.width,
|
|
||||||
fixedTopRows: widget.fixedRows!,
|
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
|
||||||
sortColumnIndex: _sortColumnIndex,
|
|
||||||
sortAscending: _sortAscending,
|
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
|
||||||
columns: List.generate(headList.length, (index) {
|
|
||||||
var item = headList[index];
|
|
||||||
return DataColumn2(
|
|
||||||
label: Center(
|
|
||||||
child: Text(item,
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth:(MediaQuery.of(context).size.width - 48.r)/headList.length,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
|
||||||
(index) => _getRow(index, Colors.transparent)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,6 @@ import 'package:marking_app/common/model/report/report_card.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/pages/report_detail/widgets/custom_rect.dart';
|
import 'package:marking_app/pages/report_detail/widgets/custom_rect.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client_report.dart';
|
import 'package:marking_app/utils/request/rest_client_report.dart';
|
||||||
|
|
||||||
|
|
@ -33,7 +32,6 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
int currentSubjectId = 0;
|
int currentSubjectId = 0;
|
||||||
|
|
||||||
final viewTransformationController = TransformationController();
|
final viewTransformationController = TransformationController();
|
||||||
bool isList = false;
|
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
final zoomFactor = 0.5;
|
final zoomFactor = 0.5;
|
||||||
|
|
@ -70,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;
|
||||||
|
|
@ -84,9 +83,10 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
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,
|
||||||
color: Color(0xFFEDEFFF),
|
child: Column(children: [
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.only(top: 10.r, left: 20.r, right: 20.r),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
|
@ -105,45 +105,6 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
child: Icon(Icons.close,color: Colors.grey,size: 20.r,))
|
child: Icon(Icons.close,color: Colors.grey,size: 20.r,))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
'张沫凡重庆八中2023.2024 高二定时训练',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF6787FD),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context, RouterManager.reportHistoryPath);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 3.r,horizontal: 5.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFF6988FD)),
|
|
||||||
borderRadius: BorderRadius.circular(5.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text('历次成绩',style: TextStyle(fontSize: 10.r,color: Color(0xFF6988FD)),),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.r, left: 14.r, right: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.1),
|
|
||||||
offset: Offset(0, 0), //阴影y轴偏移量
|
|
||||||
blurRadius: 2, //阴影模糊程度
|
|
||||||
spreadRadius: 1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 10.r),
|
margin: EdgeInsets.only(top: 10.r),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
|
|
@ -158,7 +119,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
(index) {
|
(index) {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return Container(
|
return Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(item));
|
child: _subjectText(item));
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
@ -172,20 +133,20 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(
|
child: _subjectText(
|
||||||
widget.cardItem.totalScore.toString())),
|
widget.cardItem.totalScore.toString())),
|
||||||
Container(
|
Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(
|
child: _subjectText(
|
||||||
widget.cardItem.totalClassRanking.toString())),
|
widget.cardItem.totalClassRanking.toString())),
|
||||||
Container(
|
Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(
|
child: _subjectText(
|
||||||
widget.cardItem.totalRanking.toString())),
|
widget.cardItem.totalRanking.toString())),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width:
|
width:
|
||||||
(MediaQuery.of(context).size.width - 104.r) / 7 * 4,
|
(MediaQuery.of(context).size.width - 90.r) / 7 * 4,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: List.generate(
|
children: List.generate(
|
||||||
widget.cardItem.subjectDetails.length > 4
|
widget.cardItem.subjectDetails.length > 4
|
||||||
|
|
@ -195,7 +156,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
var subject = widget.cardItem.subjectDetails[index];
|
var subject = widget.cardItem.subjectDetails[index];
|
||||||
return Container(
|
return Container(
|
||||||
width:
|
width:
|
||||||
(MediaQuery.of(context).size.width - 104.r) /
|
(MediaQuery.of(context).size.width - 90.r) /
|
||||||
7,
|
7,
|
||||||
child: _subjectText(subject.score));
|
child: _subjectText(subject.score));
|
||||||
}),
|
}),
|
||||||
|
|
@ -216,7 +177,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
List.generate(widget.headList.length - 7, (index) {
|
List.generate(widget.headList.length - 7, (index) {
|
||||||
var item = widget.headList[index + 7];
|
var item = widget.headList[index + 7];
|
||||||
return Container(
|
return Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(item));
|
child: _subjectText(item));
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
@ -233,7 +194,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
widget.cardItem.subjectDetails.length - 4, (index) {
|
widget.cardItem.subjectDetails.length - 4, (index) {
|
||||||
var subject = widget.cardItem.subjectDetails[index + 4];
|
var subject = widget.cardItem.subjectDetails[index + 4];
|
||||||
return Container(
|
return Container(
|
||||||
width: (MediaQuery.of(context).size.width - 104.r) / 7,
|
width: (MediaQuery.of(context).size.width - 90.r) / 7,
|
||||||
child: _subjectText(subject.score));
|
child: _subjectText(subject.score));
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
|
@ -241,28 +202,16 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.r,),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Stack(
|
child: Container(
|
||||||
children: [
|
margin: EdgeInsets.only(top: 0.r),
|
||||||
Container(
|
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 20.r),
|
||||||
margin: EdgeInsets.only(top: 10.r, left: 14.r, right: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
|
||||||
/* margin: EdgeInsets.only(top: 0.r),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 20.r),*/
|
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
color: Color(0xFFEFF1FF),
|
||||||
color: Colors.white,
|
borderRadius: BorderRadius.only(
|
||||||
boxShadow: [
|
bottomLeft: Radius.circular(15.r),
|
||||||
BoxShadow(
|
bottomRight: Radius.circular(15.r))),
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.1),
|
|
||||||
offset: Offset(0, 0), //阴影y轴偏移量
|
|
||||||
blurRadius: 2, //阴影模糊程度
|
|
||||||
spreadRadius: 1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -291,7 +240,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
? 0
|
? 0
|
||||||
: (MediaQuery.of(context).size.width -
|
: (MediaQuery.of(context).size.width -
|
||||||
30.r * 9 -
|
30.r * 9 -
|
||||||
104.r) /
|
110.r) /
|
||||||
8),
|
8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: item.isCheck
|
color: item.isCheck
|
||||||
|
|
@ -319,7 +268,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: examOrigin != null && examOrigin!.imageUrl != ''
|
child: examOrigin != null && examOrigin!.imageUrl != ''
|
||||||
? !isList?Padding(
|
? Padding(
|
||||||
padding: EdgeInsets.only(top:5.r),
|
padding: EdgeInsets.only(top:5.r),
|
||||||
child: InteractiveViewer(
|
child: InteractiveViewer(
|
||||||
transformationController: viewTransformationController,
|
transformationController: viewTransformationController,
|
||||||
|
|
@ -328,59 +277,10 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
minScale: 0.1, // 最小缩放
|
minScale: 0.1, // 最小缩放
|
||||||
maxScale: 4.0, // 最大缩放
|
maxScale: 4.0, // 最大缩放
|
||||||
child: CustomRect(examOrigin!)),
|
child: CustomRect(examOrigin!)),
|
||||||
):Text('list')
|
)
|
||||||
: MyEmptyWidget(),
|
: MyEmptyWidget(),
|
||||||
),
|
),
|
||||||
SizedBox(height: 6.r,),
|
SizedBox(height: 6.r,),
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap:(){
|
|
||||||
isList = false;
|
|
||||||
setState(() {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 27.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: !isList?Color(0xFF6988FD):Color(0xFFEDEFFF),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text('查看原卷',style: TextStyle(fontSize: 12.sp,color: !isList?Colors.white:Color(0xFF7B7B7E)),),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 20.r,),
|
|
||||||
Flexible(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: (){
|
|
||||||
isList = true;
|
|
||||||
setState(() {
|
|
||||||
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
height: 27.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: isList?Color(0xFF6988FD):Color(0xFFEDEFFF),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text('查看列题',style: TextStyle(fontSize: 12.sp,color: isList?Colors.white:Color(0xFF7B7B7E)),),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
/*if(!isList)
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -393,17 +293,13 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child:Column(
|
child:Container(
|
||||||
children: [
|
padding: EdgeInsets.symmetric(
|
||||||
Opacity(
|
vertical: 2.r, horizontal: 5.r),
|
||||||
opacity: examOrigin != null && examOrigin!.pageIndex > 1?1:0.3,
|
|
||||||
child: Image.asset('assets/images/report_left_icon.png',width: 33.r,height: 33.r,)),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric( horizontal: 5.r),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
*//* border: Border.all(
|
border: Border.all(
|
||||||
color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9),
|
color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9),
|
||||||
width: 1.r),*//*
|
width: 1.r),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(2.r)),
|
Radius.circular(2.r)),
|
||||||
),
|
),
|
||||||
|
|
@ -414,13 +310,11 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
/* Image.asset(
|
||||||
),
|
|
||||||
*//* Image.asset(
|
|
||||||
'assets/images/report_left_icon.png',
|
'assets/images/report_left_icon.png',
|
||||||
width: 33.r,
|
width: 33.r,
|
||||||
height: 33.r,
|
height: 33.r,
|
||||||
)*//*
|
)*/
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 15.r,
|
width: 15.r,
|
||||||
|
|
@ -435,17 +329,13 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Container(
|
||||||
children: [
|
padding: EdgeInsets.symmetric(
|
||||||
Opacity(
|
vertical: 2.r, horizontal: 5.r),
|
||||||
opacity:examOrigin != null && examOrigin!.pageIndex < examOriginList.length?1:0.3,
|
|
||||||
child: Image.asset('assets/images/report_right_icon.png',width: 33.r,height: 33.r,)),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
*//* border: Border.all(
|
border: Border.all(
|
||||||
color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9),
|
color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9),
|
||||||
width: 1.r),*//*
|
width: 1.r),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(2.r)),
|
Radius.circular(2.r)),
|
||||||
),
|
),
|
||||||
|
|
@ -456,60 +346,16 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
*//* Image.asset(
|
|
||||||
'assets/images/report_right_icon.png',
|
|
||||||
width: 33.r,
|
|
||||||
height: 33.r,
|
|
||||||
)*//*
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),*/
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if(!isList)
|
|
||||||
Positioned(
|
|
||||||
left:0.r,
|
|
||||||
top: MediaQuery.of(context).size.height/4,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
var num = examOrigin!.pageIndex;
|
|
||||||
if (num > 1) {
|
|
||||||
setState(() {
|
|
||||||
examOrigin = examOriginList[num - 1 - 1];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child:Opacity(
|
|
||||||
opacity: examOrigin != null && examOrigin!.pageIndex > 1?1:0.3,
|
|
||||||
child: Image.asset('assets/images/report_left_icon.png',width: 33.r,height: 33.r,)),
|
|
||||||
),),
|
|
||||||
if(!isList)
|
|
||||||
Positioned(
|
|
||||||
right: 0,
|
|
||||||
top: MediaQuery.of(context).size.height/4,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
var num = examOrigin!.pageIndex;
|
|
||||||
if (num < examOriginList.length) {
|
|
||||||
setState(() {
|
|
||||||
examOrigin = examOriginList[num];
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Opacity(
|
|
||||||
opacity:examOrigin != null && examOrigin!.pageIndex < examOriginList.length?1:0.3,
|
|
||||||
child: Image.asset('assets/images/report_right_icon.png',width: 33.r,height: 33.r,)),
|
|
||||||
/* Image.asset(
|
/* Image.asset(
|
||||||
'assets/images/report_right_icon.png',
|
'assets/images/report_right_icon.png',
|
||||||
width: 33.r,
|
width: 33.r,
|
||||||
height: 33.r,
|
height: 33.r,
|
||||||
)*/
|
)*/
|
||||||
),)
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
))
|
))
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ import 'package:marking_app/pages/mine/index.dart';
|
||||||
import 'package:marking_app/pages/mine/log_off.dart';
|
import 'package:marking_app/pages/mine/log_off.dart';
|
||||||
import 'package:marking_app/pages/mine/other_pages/index.dart';
|
import 'package:marking_app/pages/mine/other_pages/index.dart';
|
||||||
import 'package:marking_app/pages/other/agreement_page.dart';
|
import 'package:marking_app/pages/other/agreement_page.dart';
|
||||||
|
import 'package:marking_app/pages/register/index.dart';
|
||||||
import 'package:marking_app/pages/report_detail/index.dart';
|
import 'package:marking_app/pages/report_detail/index.dart';
|
||||||
import 'package:marking_app/pages/report_detail/report_history.dart';
|
import 'package:marking_app/pages/report_detail/report_history.dart';
|
||||||
import 'package:marking_app/pages/reports/report_class_teacher.dart';
|
import 'package:marking_app/pages/reports/report_class_teacher.dart';
|
||||||
|
|
@ -43,8 +44,7 @@ import 'package:marking_app/pages/reports/report_personal_subject.dart';
|
||||||
import 'package:marking_app/pages/reports/report_subject_teacher.dart';
|
import 'package:marking_app/pages/reports/report_subject_teacher.dart';
|
||||||
import 'package:marking_app/utils/const_text.dart';
|
import 'package:marking_app/utils/const_text.dart';
|
||||||
import 'package:marking_app/utils/the_global.dart';
|
import 'package:marking_app/utils/the_global.dart';
|
||||||
import 'package:marking_app/pages/register/index.dart';
|
|
||||||
import 'package:marking_app/pages/report_detail/completed_report.dart';
|
|
||||||
import '../utils/index.dart';
|
import '../utils/index.dart';
|
||||||
|
|
||||||
class RouterManager {
|
class RouterManager {
|
||||||
|
|
@ -89,7 +89,6 @@ class RouterManager {
|
||||||
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
||||||
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
||||||
static const String answerTrajectoryJobDetailPath = '/homework_correction/answer_trajectory_job_detail';
|
static const String answerTrajectoryJobDetailPath = '/homework_correction/answer_trajectory_job_detail';
|
||||||
static const String completedReportPath = '/report_detail/completed_report';
|
|
||||||
// TheMine
|
// TheMine
|
||||||
|
|
||||||
static final FluroRouter router = FluroRouter();
|
static final FluroRouter router = FluroRouter();
|
||||||
|
|
@ -112,18 +111,14 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启动页
|
// 启动页
|
||||||
static final _startUpPageHandler =
|
static final _startUpPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
|
||||||
// 主页
|
// 主页
|
||||||
static final _mainPageHandler =
|
static final _mainPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
|
||||||
// 登录页
|
// 登录页
|
||||||
static final _loginPageHandler =
|
static final _loginPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
|
||||||
// 阅卷进度页面
|
// 阅卷进度页面
|
||||||
static final _progressPageHandler = Handler(
|
static final _progressPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
||||||
Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
|
||||||
// 回评页面
|
// 回评页面
|
||||||
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int markingUserId = int.parse(params['markingUserId']![0]);
|
int markingUserId = int.parse(params['markingUserId']![0]);
|
||||||
|
|
@ -142,11 +137,8 @@ class RouterManager {
|
||||||
|
|
||||||
// 回评异常页面
|
// 回评异常页面
|
||||||
static final _reviewAbnormalPageHandler = Handler(
|
static final _reviewAbnormalPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => ProgressAbnormal(
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
||||||
int.parse(params['examSubjectId']![0]),
|
ProgressAbnormal(int.parse(params['examSubjectId']![0]), params['markingId']![0], params['name']![0], params['questionNum']![0]));
|
||||||
params['markingId']![0],
|
|
||||||
params['name']![0],
|
|
||||||
params['questionNum']![0]));
|
|
||||||
// 阅卷页面
|
// 阅卷页面
|
||||||
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -188,8 +180,7 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 批阅作业页面
|
// 批阅作业页面
|
||||||
static final _markingHomeworkDoPageHandler =
|
static final _markingHomeworkDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
try {
|
try {
|
||||||
int taskId = int.parse(params['taskId']![0]);
|
int taskId = int.parse(params['taskId']![0]);
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
|
|
@ -233,8 +224,7 @@ class RouterManager {
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _reportClassTeacherPageHandler =
|
static final _reportClassTeacherPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
int examId = int.parse(params['examId']![0]);
|
int examId = int.parse(params['examId']![0]);
|
||||||
|
|
||||||
return ReportClassTeacher(examId: examId);
|
return ReportClassTeacher(examId: examId);
|
||||||
|
|
@ -377,10 +367,9 @@ class RouterManager {
|
||||||
// 学生历史报告
|
// 学生历史报告
|
||||||
static final _reportHistoryPathHandler = Handler(
|
static final _reportHistoryPathHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int classId = int.parse(params['classId']![0]);
|
/* String studentName = params['studentName']![0];
|
||||||
int userId = int.parse(params['userId']![0]);
|
int studentId = int.parse(params['studentId']![0]);*/
|
||||||
String studentName = params['studentName']![0];
|
return ReportHistory();
|
||||||
return ReportHistory(classId:classId,userId:userId,studentName:studentName);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -424,16 +413,6 @@ class RouterManager {
|
||||||
return AnswerTrajectoryJobDetail(jobId: jobId, jobName: jobName, genderName: genderName);
|
return AnswerTrajectoryJobDetail(jobId: jobId, jobName: jobName, genderName: genderName);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
//已完成考试报告
|
|
||||||
static final _completedReportPathHandler = Handler(
|
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
int examId = int.parse(params['examId']![0]);
|
|
||||||
String studentNo = params['studentNo']![0];
|
|
||||||
return CompletedReport(examId:examId,studentNo:studentNo);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
// 开始阅卷页面
|
// 开始阅卷页面
|
||||||
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
||||||
|
|
||||||
|
|
@ -451,30 +430,22 @@ class RouterManager {
|
||||||
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingHomeworkDoPath,
|
router.define(markingHomeworkDoPath, handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingReviewAbnormalPath, handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingReviewAbnormalPath,
|
|
||||||
handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
router.define(reportClassTeacherPath,
|
router.define(reportClassTeacherPath, handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
router.define(reportSubjectTeacherPath, handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportSubjectTeacherPath,
|
router.define(reportPersonalSubjectPath, handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(reportPersonalSubjectPath,
|
|
||||||
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
||||||
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobListParticipateInClassPath,
|
router.define(jobListParticipateInClassPath, handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickCheckPersonalPath,
|
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobPriorityReviewSetPath,
|
|
||||||
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||||
|
|
@ -487,9 +458,6 @@ class RouterManager {
|
||||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(answerTrajectoryJobDetailPath, handler: _answerTrajectoryJobDetailPathHandler, transitionType: TransitionType.material);
|
router.define(answerTrajectoryJobDetailPath, handler: _answerTrajectoryJobDetailPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(completedReportPath, handler: _completedReportPathHandler, transitionType: TransitionType.material);
|
|
||||||
|
|
||||||
// getTransition()
|
|
||||||
|
|
||||||
router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
toPrint(val: "ROUTE WAS NOT FOUND !!!");
|
toPrint(val: "ROUTE WAS NOT FOUND !!!");
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@ 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/report_student_history_record.dart';
|
|
||||||
import 'package:marking_app/common/model/report/report_student_info.dart';
|
|
||||||
import 'package:marking_app/common/model/report/small_question.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;
|
||||||
|
|
@ -145,20 +143,4 @@ abstract class RestClientReport {
|
||||||
Future<BaseStructureResultReport<SmallQuestion>> getQuestion(
|
Future<BaseStructureResultReport<SmallQuestion>> getQuestion(
|
||||||
@the_retrofit.Body() ReportCardParams params
|
@the_retrofit.Body() ReportCardParams params
|
||||||
);
|
);
|
||||||
|
|
||||||
// 报告 => 考试学生信息
|
|
||||||
@the_retrofit.GET("/api/exam/report/examstudentinfo")
|
|
||||||
Future<BaseStructureResultReport<ReportStudentInfo>> getStudentInfo(
|
|
||||||
@the_retrofit.Query("examId") int examId,
|
|
||||||
@the_retrofit.Query("studentNo") String studentNo,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 报告 => 学生考试历史记录
|
|
||||||
@the_retrofit.GET("/api/exam/report/studentexamrecords")
|
|
||||||
Future<BaseStructureResultReport<List<ReportStudentHistoryRecord>>> getStudentHistroyRecords(
|
|
||||||
@the_retrofit.Query("userId") int userId,
|
|
||||||
@the_retrofit.Query("classId") int classId,
|
|
||||||
@the_retrofit.Query("startTime") String startTime,
|
|
||||||
@the_retrofit.Query("endTime") String endTime,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue