no message
This commit is contained in:
parent
7bb6072a75
commit
d793161d67
|
|
@ -2,10 +2,8 @@ import 'package:json_annotation/json_annotation.dart';
|
|||
|
||||
part 'job_data_report.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobDataReport extends Object {
|
||||
|
||||
@JsonKey(name: 'jobId')
|
||||
int jobId;
|
||||
|
||||
|
|
@ -36,21 +34,28 @@ class JobDataReport extends Object {
|
|||
@JsonKey(name: 'zgQuestionCount')
|
||||
int zgQuestionCount;
|
||||
|
||||
bool sortType; // true 默认排序 ; false 未提交置顶
|
||||
|
||||
@JsonKey(name: 'studentDetails')
|
||||
List<StudentDetails> studentDetails;
|
||||
|
||||
JobDataReport(this.jobId,this.jobName,this.gradeName,this.className,this.validCount,this.noAnswerCount,this.kgValidRate,this.kgQuestionCount,this.zgValidRate,this.zgQuestionCount,this.studentDetails,);
|
||||
JobDataReport(this.jobId, this.jobName, this.gradeName, this.className, this.validCount, this.noAnswerCount,
|
||||
this.kgValidRate, this.kgQuestionCount, this.zgValidRate, this.zgQuestionCount, this.studentDetails,
|
||||
[this.sortType = true]) {
|
||||
this.studentDetails.sort((a, b) {
|
||||
int num1 = a.kgValidRate + a.zgValidRate;
|
||||
int num2 = b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
}
|
||||
|
||||
factory JobDataReport.fromJson(Map<String, dynamic> srcJson) => _$JobDataReportFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobDataReportToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class StudentDetails extends Object {
|
||||
|
||||
@JsonKey(name: 'studentId')
|
||||
int? studentId;
|
||||
|
||||
|
|
@ -75,18 +80,24 @@ class StudentDetails extends Object {
|
|||
@JsonKey(name: 'zgDetails')
|
||||
List<KgDetails> zgDetails;
|
||||
|
||||
StudentDetails(this.studentId,this.studentName,this.kgValidCount,this.kgValidRate,this.zgValidCount,this.zgValidRate,this.kgDetails,this.zgDetails,);
|
||||
StudentDetails(
|
||||
this.studentId,
|
||||
this.studentName,
|
||||
this.kgValidCount,
|
||||
this.kgValidRate,
|
||||
this.zgValidCount,
|
||||
this.zgValidRate,
|
||||
this.kgDetails,
|
||||
this.zgDetails,
|
||||
);
|
||||
|
||||
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StudentDetailsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class KgDetails extends Object {
|
||||
|
||||
@JsonKey(name: 'questionNo')
|
||||
String questionNo;
|
||||
|
||||
|
|
@ -114,12 +125,19 @@ class KgDetails extends Object {
|
|||
@JsonKey(name: 'score')
|
||||
double? score;
|
||||
|
||||
KgDetails(this.questionNo,this.questionId,this.partName,this.state,this.studentAnswer,this.questionAnswer,this.useTime,this.annotateAnswers,this.score,);
|
||||
KgDetails(
|
||||
this.questionNo,
|
||||
this.questionId,
|
||||
this.partName,
|
||||
this.state,
|
||||
this.studentAnswer,
|
||||
this.questionAnswer,
|
||||
this.useTime,
|
||||
this.annotateAnswers,
|
||||
this.score,
|
||||
);
|
||||
|
||||
factory KgDetails.fromJson(Map<String, dynamic> srcJson) => _$KgDetailsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$KgDetailsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -680,18 +680,25 @@ typedef ShowStudentsCall = Future<void> Function(
|
|||
String? className,
|
||||
]);
|
||||
|
||||
/// 收藏夹按钮
|
||||
class FavoriteButton extends HookWidget with CommonMixin {
|
||||
class FavoriteButton extends StatefulWidget {
|
||||
final int jobId;
|
||||
final String jobName;
|
||||
EdgeInsets? margin;
|
||||
final bool isRow;
|
||||
FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
||||
final EdgeInsets? margin;
|
||||
const FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
||||
|
||||
@override
|
||||
State<FavoriteButton> createState() => _FavoriteButtonState();
|
||||
}
|
||||
|
||||
class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
|
||||
late Future<int> _future; // 考试试卷
|
||||
|
||||
Future<int> getInvolveClasses() async {
|
||||
print('我的收藏请求数据');
|
||||
try {
|
||||
RestClient _client = await getClient();
|
||||
var result = await _client.getListOfJobFavoriteNumber(jobId);
|
||||
var result = await _client.getListOfJobFavoriteNumber(widget.jobId);
|
||||
|
||||
if (result.success && (result.data?.isNotEmpty ?? false)) {
|
||||
return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
||||
|
|
@ -704,66 +711,171 @@ class FavoriteButton extends HookWidget with CommonMixin {
|
|||
|
||||
// 收藏夹
|
||||
void bookmarks(BuildContext context) {
|
||||
RouterManager.router.navigateTo(
|
||||
RouterManager.router
|
||||
.navigateTo(
|
||||
context,
|
||||
RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
|
||||
RouterManager.jobFavoritePagePath + '?jobId=${widget.jobId}&jobName=${Uri.encodeComponent(widget.jobName)}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
)
|
||||
.then((value) {
|
||||
toUpState(setState, () {}, mounted);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
// _future = getInvolveClasses();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var favoriteNumber = useState(0);
|
||||
useEffect(() {
|
||||
getInvolveClasses().then((value) {
|
||||
var favoriteCount = favoriteNumber.value;
|
||||
if (favoriteCount != value) favoriteNumber.value = value;
|
||||
});
|
||||
return () {};
|
||||
}, []);
|
||||
if (favoriteNumber.value <= 0) return Container();
|
||||
margin ??= EdgeInsets.only(top: 15.h);
|
||||
return isRow
|
||||
? Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: margin,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () => bookmarks(context),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
child: quickText('收藏夹(${favoriteNumber.value})',
|
||||
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
var margin = widget.margin ?? EdgeInsets.only(top: 15.h);
|
||||
return FutureBuilder<int>(
|
||||
builder: (context, AsyncSnapshot<int> async) {
|
||||
//在这里根据快照的状态,返回相应的widget
|
||||
if (async.connectionState == ConnectionState.active || async.connectionState == ConnectionState.waiting) {
|
||||
return Container();
|
||||
}
|
||||
if (async.connectionState == ConnectionState.done) {
|
||||
var favoriteNumber = async.data;
|
||||
if (favoriteNumber == null || favoriteNumber <= 0) return Container();
|
||||
|
||||
return widget.isRow
|
||||
? Row(
|
||||
children: [
|
||||
Container(
|
||||
margin: margin,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () => bookmarks(context),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
child:
|
||||
quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: SizedBox())
|
||||
],
|
||||
)
|
||||
: Container(
|
||||
margin: margin,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () => bookmarks(context),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
child: quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(child: SizedBox())
|
||||
],
|
||||
)
|
||||
: Container(
|
||||
margin: margin,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () => bookmarks(context),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
child:
|
||||
quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
);
|
||||
}
|
||||
return Container();
|
||||
},
|
||||
future: getInvolveClasses(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// 收藏夹按钮
|
||||
// class FavoriteButton extends HookWidget with CommonMixin {
|
||||
// final int jobId;
|
||||
// final String jobName;
|
||||
// EdgeInsets? margin;
|
||||
// final bool isRow;
|
||||
// FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
||||
|
||||
// Future<int> getInvolveClasses() async {
|
||||
// print('我的收藏请求数据');
|
||||
// try {
|
||||
// RestClient _client = await getClient();
|
||||
// var result = await _client.getListOfJobFavoriteNumber(jobId);
|
||||
|
||||
// if (result.success && (result.data?.isNotEmpty ?? false)) {
|
||||
// return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
||||
// }
|
||||
// } catch (e) {
|
||||
// print(e);
|
||||
// }
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
// // 收藏夹
|
||||
// void bookmarks(BuildContext context) {
|
||||
// RouterManager.router.navigateTo(
|
||||
// context,
|
||||
// RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
|
||||
// transition: getTransition(),
|
||||
// );
|
||||
// }
|
||||
|
||||
// @override
|
||||
// Widget build(BuildContext context) {
|
||||
|
||||
// var favoriteNumber = useState(0);
|
||||
// useEffect(() {
|
||||
// getInvolveClasses().then((value) {
|
||||
// var favoriteCount = favoriteNumber.value;
|
||||
// if (favoriteCount != value) favoriteNumber.value = value;
|
||||
// });
|
||||
// return () {};
|
||||
// }, []);
|
||||
// if (favoriteNumber.value <= 0) return Container();
|
||||
// margin ??= EdgeInsets.only(top: 15.h);
|
||||
// return isRow
|
||||
// ? Row(
|
||||
// children: [
|
||||
// Container(
|
||||
// margin: margin,
|
||||
// child: Material(
|
||||
// color: Color.fromRGBO(244, 244, 244, 1),
|
||||
// borderRadius: BorderRadius.circular(20.r),
|
||||
// child: InkWell(
|
||||
// onTap: () => bookmarks(context),
|
||||
// borderRadius: BorderRadius.circular(8.r),
|
||||
// child: Container(
|
||||
// alignment: Alignment.center,
|
||||
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
// child: quickText('收藏夹(${favoriteNumber.value})',
|
||||
// size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Expanded(child: SizedBox())
|
||||
// ],
|
||||
// )
|
||||
// : Container(
|
||||
// margin: margin,
|
||||
// child: Material(
|
||||
// color: Color.fromRGBO(244, 244, 244, 1),
|
||||
// borderRadius: BorderRadius.circular(20.r),
|
||||
// child: InkWell(
|
||||
// onTap: () => bookmarks(context),
|
||||
// borderRadius: BorderRadius.circular(8.r),
|
||||
// child: Container(
|
||||
// alignment: Alignment.center,
|
||||
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||
// child:
|
||||
// quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ Widget $easyRefresh({
|
|||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 2.0 //宽高比为1时,子widget
|
||||
childAspectRatio: 1.81 //宽高比为1时,子widget
|
||||
),
|
||||
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
|
||||
)
|
||||
|
|
@ -428,8 +428,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
||||
),
|
||||
Expanded(
|
||||
child: quickText(jobTaskItem.title,
|
||||
size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500),
|
||||
child: quickText(jobTaskItem.title, size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1494,7 +1494,7 @@ Widget $personnelDataOverview(BuildContext context, List<StudentAnswerInfos> stu
|
|||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: isPad() ? 290 : 264.h,
|
||||
height: isPad() ? 290.h : 264.h,
|
||||
margin: EdgeInsets.only(top: 20.h),
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
|
||||
|
|
|
|||
|
|
@ -57,11 +57,14 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobFavoriteModel>> result = await _client.getListOfJobFavoriteNumber(widget.jobId);
|
||||
if (result.success) {
|
||||
if (result.data?.isEmpty ?? true) {
|
||||
favoriteMap = {};
|
||||
}
|
||||
result.data?.forEach((e) {
|
||||
favoriteMap['${e.schoolId}+${e.gradeId}+${e.className}'] = e.count;
|
||||
});
|
||||
toUpState(setState, () {}, mounted);
|
||||
}
|
||||
} else {}
|
||||
}
|
||||
|
||||
Future<List<MarkingTasks>?> getData() async {
|
||||
|
|
@ -268,12 +271,17 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
|
||||
// 收藏夹
|
||||
void bookmarks(MarkingTasks task) {
|
||||
RouterManager.router.navigateTo(
|
||||
RouterManager.router
|
||||
.navigateTo(
|
||||
context,
|
||||
RouterManager.jobFavoritePagePath +
|
||||
'?className=${Uri.encodeComponent(task.className)}&jobId=${widget.jobId}&schoolId=${task.dpcSchoolId}&gradeId=${task.dpcGradeId}&jobName=${Uri.encodeComponent(widget.jobName)}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
)
|
||||
.then((value) async {
|
||||
_future = getData()
|
||||
..then((value) => getListOfJobFavoritesData().then((value) => toUpState(setState, () {}, mounted)));
|
||||
});
|
||||
}
|
||||
|
||||
// 数据快查
|
||||
|
|
|
|||
|
|
@ -19,20 +19,14 @@ class QuickDataCheckPage extends StatefulWidget {
|
|||
final int? schoolId;
|
||||
final int? gradeId;
|
||||
|
||||
const QuickDataCheckPage(
|
||||
{Key? key,
|
||||
required this.jobId,
|
||||
required this.className,
|
||||
this.schoolId,
|
||||
this.gradeId})
|
||||
const QuickDataCheckPage({Key? key, required this.jobId, required this.className, this.schoolId, this.gradeId})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
|
||||
}
|
||||
|
||||
class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||
with CommonMixin {
|
||||
class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixin {
|
||||
JobDataReport? jobData;
|
||||
|
||||
void initState() {
|
||||
|
|
@ -53,8 +47,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
params['gradeId'] = widget.gradeId;
|
||||
}
|
||||
|
||||
BaseStructureResult<JobDataReport?> data =
|
||||
await _client.getJobDataCenterReport(params);
|
||||
BaseStructureResult<JobDataReport?> data = await _client.getJobDataCenterReport(params);
|
||||
EasyLoading.dismiss();
|
||||
if (data.code == 200) {
|
||||
setState(() {
|
||||
|
|
@ -76,17 +69,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xFF6889FD),
|
||||
Color(0xFFF5F5F5),
|
||||
],
|
||||
stops: [
|
||||
0.09,
|
||||
0.3
|
||||
])),
|
||||
gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [
|
||||
Color(0xFF6889FD),
|
||||
Color(0xFFF5F5F5),
|
||||
], stops: [
|
||||
0.09,
|
||||
0.3
|
||||
])),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
|
|
@ -98,14 +87,16 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'数据快查',
|
||||
style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'数据快查',
|
||||
style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
||||
)),
|
||||
)),
|
||||
)),
|
||||
SizedBox(width: 24.r,),
|
||||
SizedBox(
|
||||
width: 24.r,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r),
|
||||
|
|
@ -129,25 +120,22 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
),
|
||||
Text(
|
||||
widget.className,
|
||||
style: TextStyle(
|
||||
fontSize: 14.r, color: Colors.white),
|
||||
style: TextStyle(fontSize: 14.r, color: Colors.white),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 15.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(6.r))),
|
||||
padding: EdgeInsets.symmetric(vertical: 15.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
||||
decoration:
|
||||
BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 10.r,),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
|
@ -155,18 +143,14 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
width: 12.r,
|
||||
height: 12.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF4CC793),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(7.r))),
|
||||
color: Color(0xFF4CC793), borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.r,
|
||||
),
|
||||
Text(
|
||||
'已提交',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF333333)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 35.r,
|
||||
|
|
@ -175,18 +159,14 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
width: 12.r,
|
||||
height: 12.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(7.r))),
|
||||
color: Color(0xFF6888FD), borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.r,
|
||||
),
|
||||
Text(
|
||||
'未提交',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF333333)),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF333333)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
@ -197,19 +177,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
PieChartData(
|
||||
borderData: FlBorderData(show: false),
|
||||
sectionsSpace: 0,
|
||||
centerSpaceRadius:
|
||||
MediaQuery.of(context).size.width * 0.1,
|
||||
centerSpaceRadius: MediaQuery.of(context).size.width * 0.1,
|
||||
sections: [
|
||||
PieChartSectionData(
|
||||
color: Color(0xFF4CC793),
|
||||
value: jobData!.validCount /
|
||||
(jobData!.validCount +
|
||||
jobData!.noAnswerCount) *
|
||||
100,
|
||||
radius:
|
||||
MediaQuery.of(context).size.width *
|
||||
0.1 +
|
||||
5,
|
||||
value:
|
||||
jobData!.validCount / (jobData!.validCount + jobData!.noAnswerCount) * 100,
|
||||
radius: MediaQuery.of(context).size.width * 0.1 + 5,
|
||||
title: '${jobData!.validCount}人',
|
||||
titleStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
|
|
@ -219,12 +193,9 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
PieChartSectionData(
|
||||
color: Color(0xFF6888FD),
|
||||
value: jobData!.noAnswerCount /
|
||||
(jobData!.validCount +
|
||||
jobData!.noAnswerCount) *
|
||||
(jobData!.validCount + jobData!.noAnswerCount) *
|
||||
100,
|
||||
radius:
|
||||
MediaQuery.of(context).size.width *
|
||||
0.1,
|
||||
radius: MediaQuery.of(context).size.width * 0.1,
|
||||
title: '${jobData!.noAnswerCount}人',
|
||||
titleStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
|
|
@ -237,27 +208,21 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
),
|
||||
// 客观进度条
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'客观题答题进度',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF8B8B8B)),
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
Text(
|
||||
'${doubleToStringAsFixed(jobData!.kgValidRate)}%',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF333333)),
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 6.r),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
|
|
@ -276,27 +241,21 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
SizedBox(height: 20.r),
|
||||
// 主观进度条
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'主观题答题进度',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF8B8B8B)),
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
Text(
|
||||
'${doubleToStringAsFixed(jobData!.zgValidRate)}%',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF333333)),
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 6.r),
|
||||
Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
|
|
@ -316,23 +275,29 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(6.r))),
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
||||
decoration:
|
||||
BoxDecoration(color: Colors.white, borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 = a.kgValidRate + a.zgValidRate;
|
||||
int num2 = b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
if (jobData == null) return;
|
||||
if (!jobData!.sortType) {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 = a.kgValidRate + a.zgValidRate;
|
||||
int num2 = b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
} else {
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 = a.kgValidRate + a.zgValidRate;
|
||||
int num2 = b.kgValidRate + b.zgValidRate;
|
||||
return num1.compareTo(num2);
|
||||
});
|
||||
}
|
||||
jobData!.sortType = !jobData!.sortType;
|
||||
setState(() {
|
||||
jobData!.studentDetails;
|
||||
});
|
||||
|
|
@ -341,10 +306,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'未提交排序',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
(jobData?.sortType ?? true) ? '未提交置顶' : '已提交置顶',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
|
|
@ -363,16 +326,9 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
SizedBox(
|
||||
height: jobData!.studentDetails.length > 5
|
||||
? 350.r
|
||||
: jobData!.studentDetails.length * 50.r +
|
||||
40.r,
|
||||
: jobData!.studentDetails.length * 50.r + 40.r,
|
||||
child: QuickStudentDataTable(
|
||||
headList: [
|
||||
'学生姓名',
|
||||
'客观题',
|
||||
'主观题',
|
||||
'客观题错题',
|
||||
'主观题错题'
|
||||
],
|
||||
headList: ['学生姓名', '客观题', '主观题', '客观题错题', '主观题错题'],
|
||||
bodyList: jobData!.studentDetails,
|
||||
jobId: widget.jobId,
|
||||
fixedRows: 1,
|
||||
|
|
@ -386,8 +342,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
),
|
||||
))
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
)
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in New Issue