修复优化BUG
This commit is contained in:
parent
a8d5be898e
commit
2e1ca0f6b2
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 69 B |
|
|
@ -149,7 +149,7 @@ class TheError extends Interceptor {
|
||||||
message = '请求发送超时';
|
message = '请求发送超时';
|
||||||
break;
|
break;
|
||||||
case DioExceptionType.receiveTimeout:
|
case DioExceptionType.receiveTimeout:
|
||||||
message = '接收超时时发生';
|
message = '接收超时';
|
||||||
break;
|
break;
|
||||||
case DioExceptionType.badResponse:
|
case DioExceptionType.badResponse:
|
||||||
if (error.response == null) {
|
if (error.response == null) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import 'package:making_school_asignment_app/page/home_page/children/quick_data_c
|
||||||
import 'job_report_logic.dart';
|
import 'job_report_logic.dart';
|
||||||
|
|
||||||
class JobReportPage extends StatefulWidget {
|
class JobReportPage extends StatefulWidget {
|
||||||
const JobReportPage({Key? key}) : super(key: key);
|
const JobReportPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobReportPage> createState() => _JobReportPageState();
|
State<JobReportPage> createState() => _JobReportPageState();
|
||||||
|
|
@ -26,8 +26,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
|
@ -76,8 +75,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
//完成率、正确率
|
//完成率、正确率
|
||||||
TopCount(
|
TopCount(state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value, state.subject),
|
||||||
state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value,state.subject),
|
|
||||||
//客观题、主观题
|
//客观题、主观题
|
||||||
KgtZgtTable(
|
KgtZgtTable(
|
||||||
studentCount: state.dataCount.studentCount!,
|
studentCount: state.dataCount.studentCount!,
|
||||||
|
|
@ -97,7 +95,8 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
data: state.homeData,
|
data: state.homeData,
|
||||||
className: state.classData.value.className,
|
className: state.classData.value.className,
|
||||||
homeworkId: state.homeworkId.value,
|
homeworkId: state.homeworkId.value,
|
||||||
subject:state.subject,)),
|
subject: state.subject,
|
||||||
|
)),
|
||||||
// 掌握知识点的情况
|
// 掌握知识点的情况
|
||||||
/* Container(
|
/* Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
|
|
@ -120,8 +119,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -268,9 +268,15 @@ class _KnowledgePointState extends State<KnowledgePoint> {
|
||||||
int ttlCount = stu.queDtls!.length;
|
int ttlCount = stu.queDtls!.length;
|
||||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
||||||
stu.queDtls!.sort((a, b) {
|
stu.queDtls!.sort((a, b) {
|
||||||
num num1 = num.parse(a.questionNo);
|
try {
|
||||||
num num2 = num.parse(b.questionNo);
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
return num1.compareTo(num2);
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
||||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
|
|
||||||
import 'knowledge_points_grasp_state.dart';
|
import 'knowledge_points_grasp_state.dart';
|
||||||
|
|
||||||
|
|
@ -27,9 +29,15 @@ class KnowledgePointsGraspLogic extends GetxController with RequestToolMixin, Ge
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getList() async {
|
||||||
List<KnowledgePointsGrasp> data = await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text,state.classId,state.subject);
|
try {
|
||||||
|
ToastUtils.showLoading();
|
||||||
|
List<KnowledgePointsGrasp> data =
|
||||||
|
await getClient().getKnowledgeReport(state.dateStart, state.dateEnd, textController.text, state.classId, state.subject);
|
||||||
state.dataList.value = data;
|
state.dataList.value = data;
|
||||||
EasyLoading.dismiss();
|
} catch (_) {
|
||||||
|
} finally {
|
||||||
|
ToastUtils.dismiss();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
|
import 'package:easy_debounce/easy_throttle.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
import 'package:making_school_asignment_app/common/job/knowledge_points_grasp.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
|
|
@ -15,7 +17,7 @@ import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||||
import 'knowledge_points_grasp_logic.dart';
|
import 'knowledge_points_grasp_logic.dart';
|
||||||
|
|
||||||
class KnowledgePointsGraspPage extends StatefulWidget {
|
class KnowledgePointsGraspPage extends StatefulWidget {
|
||||||
const KnowledgePointsGraspPage({Key? key}) : super(key: key);
|
const KnowledgePointsGraspPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KnowledgePointsGraspPage> createState() => _KnowledgePointsGraspPageState();
|
State<KnowledgePointsGraspPage> createState() => _KnowledgePointsGraspPageState();
|
||||||
|
|
@ -27,16 +29,15 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333))),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Get.back(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
|
|
@ -56,7 +57,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
border: Border.all(width: 1.r, color: const Color(0xFFDDDDDD)),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: TextField(
|
child: TextField(
|
||||||
|
|
@ -79,17 +80,14 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () => easyThrottle('zshi_shi_dian_cx', () {
|
||||||
state.page = 1;
|
Utils.hideKeyboard();
|
||||||
logic.getList();
|
logic.refreshController.callRefresh();
|
||||||
},
|
}),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 50.r,
|
width: 50.r,
|
||||||
height: 30.r,
|
height: 30.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(4.r), color: Theme.of(context).primaryColor),
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Theme.of(context).primaryColor,
|
|
||||||
),
|
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'查询',
|
'查询',
|
||||||
|
|
@ -194,7 +192,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.knowledgeName,
|
item.knowledgeName,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
width: 49.r,
|
width: 49.r,
|
||||||
|
|
@ -211,11 +209,16 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
'${item.count}次',
|
'${item.count}次',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor),
|
||||||
),
|
),
|
||||||
Image.asset(
|
SizedBox(width: 1.w),
|
||||||
'assets/images/job_data_right_icon.png',
|
Padding(
|
||||||
width: 10.r,
|
padding: EdgeInsets.only(top: 2.h),
|
||||||
height: 10.r,
|
child: Icon(Icons.chevron_right, size: 12.r, color: Theme.of(context).primaryColor),
|
||||||
),
|
),
|
||||||
|
// Image.asset(
|
||||||
|
// 'assets/images/job_data_right_icon.png',
|
||||||
|
// width: 10.r,
|
||||||
|
// height: 10.r,
|
||||||
|
// ),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -226,7 +229,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
),
|
),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
title: '正确率:',
|
title: '正确率:',
|
||||||
color: Color(0xFFB2DA93),
|
color: const Color(0xFFB2DA93),
|
||||||
percent: item.correctRate / 100,
|
percent: item.correctRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import 'package:making_school_asignment_app/page/global_widget/show_student_list
|
||||||
import 'knowledge_points_grasp_detail_logic.dart';
|
import 'knowledge_points_grasp_detail_logic.dart';
|
||||||
|
|
||||||
class KnowledgePointsGraspDetailPage extends StatefulWidget {
|
class KnowledgePointsGraspDetailPage extends StatefulWidget {
|
||||||
const KnowledgePointsGraspDetailPage({Key? key}) : super(key: key);
|
const KnowledgePointsGraspDetailPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<KnowledgePointsGraspDetailPage> createState() => _KnowledgePointsGraspDetailPageState();
|
State<KnowledgePointsGraspDetailPage> createState() => _KnowledgePointsGraspDetailPageState();
|
||||||
|
|
@ -70,18 +70,17 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation){
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Obx(() {
|
title: Obx(() {
|
||||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||||
}),
|
}),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Get.back(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
|
|
@ -132,7 +131,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
item.publishTime.substring(0, 10),
|
item.publishTime.substring(0, 10),
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -140,7 +139,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.homeworkName,
|
item.homeworkName,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505050)),
|
||||||
)),
|
)),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -148,16 +147,16 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
showImg(item.questionPicture, context);
|
showImg(item.questionPicture, context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 49.r,
|
|
||||||
height: 22.r,
|
height: 22.r,
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 4.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF8B8B8B)),
|
border: Border.all(width: 1.r, color: const Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'第${item.questionNo}题',
|
'第${item.questionNo}题',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -184,13 +183,13 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
width: 56.r,
|
width: 56.r,
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFFE9FFD9),
|
color: const Color(0xFFE9FFD9),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
quickText('正确率', color: Color(0xFF313131), size: 10.sp),
|
quickText('正确率', color: const Color(0xFF313131), size: 10.sp),
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/job_data_right_icon.png',
|
'assets/images/job_data_right_icon.png',
|
||||||
width: 8.r,
|
width: 8.r,
|
||||||
|
|
|
||||||
|
|
@ -57,11 +57,9 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题',
|
'客观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 20.r,
|
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 20.r),
|
||||||
ProgressBar(
|
ProgressBar(
|
||||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
percent: double.parse(widget.kgtCorrectRate) / 100,
|
percent: double.parse(widget.kgtCorrectRate) / 100,
|
||||||
|
|
@ -80,9 +78,7 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
|
||||||
lineHeight: 10.h,
|
lineHeight: 10.h,
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
marginEdg: EdgeInsets.only(top: 5.h),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 10.r),
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
|
||||||
child: ReportTable(
|
child: ReportTable(
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
contentPadding: EdgeInsets.all(20.r),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.5,
|
width: MediaQuery.of(context).size.width * 0.5,
|
||||||
height: MediaQuery.of(context).size.height * 0.4,
|
height: MediaQuery.of(context).size.height * 0.4,
|
||||||
|
|
@ -65,10 +64,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'作答效率',
|
'作答效率',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 10.r),
|
||||||
|
|
@ -76,27 +72,33 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
mapIcon(const Color(0xFFB8A1FF)),
|
mapIcon(const Color(0xFFB8A1FF)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('优'),
|
mapTxt('优'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFF4CC793)),
|
mapIcon(const Color(0xFF4CC793)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('良'),
|
mapTxt('良'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFF90E0BE)),
|
mapIcon(const Color(0xFF90E0BE)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('中'),
|
mapTxt('中'),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
mapIcon(const Color(0xFFFF6B6B)),
|
mapIcon(const Color(0xFFFF6B6B)),
|
||||||
SizedBox(width: 5.r,),
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
mapTxt('差'),
|
mapTxt('差'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child:
|
child: PieChart(
|
||||||
|
|
||||||
PieChart(
|
|
||||||
PieChartData(
|
PieChartData(
|
||||||
borderData: FlBorderData(show: true),
|
borderData: FlBorderData(show: true),
|
||||||
sectionsSpace: 0,
|
sectionsSpace: 0,
|
||||||
|
|
@ -151,20 +153,14 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void showPeopleListDialog(
|
void showPeopleListDialog({required BuildContext context, required String title, required String questionNo, required List arr, List? dcList}) {
|
||||||
{required BuildContext context,
|
|
||||||
required String title,
|
|
||||||
required String questionNo,
|
|
||||||
required List arr,
|
|
||||||
List? dcList}) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
contentPadding: EdgeInsets.all(20.r),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.7,
|
width: MediaQuery.of(context).size.width * 0.7,
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
height: MediaQuery.of(context).size.height * 0.7,
|
||||||
|
|
@ -174,10 +170,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 15.sp, color: const Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -187,18 +180,15 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
widget.isZG == true ? '主观题' : '客观题',
|
widget.isZG == true ? '主观题' : '客观题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'―',
|
'―',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'第$questionNo题',
|
'第$questionNo题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
||||||
fontSize: 14.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -213,27 +203,21 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'未作答人',
|
'未作答人',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'答对人数',
|
'答对人数',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'答错人',
|
'答错人',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
))),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
@ -241,8 +225,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
padding: EdgeInsets.only(left: 15.r),
|
padding: EdgeInsets.only(left: 15.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
title,
|
title,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
||||||
fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -256,60 +239,41 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
var item = arr[index];
|
var item = arr[index];
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
padding: EdgeInsets.symmetric(vertical: 5.r),
|
||||||
color:
|
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||||
index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['noAnswerStudents'].studentId);
|
||||||
item['noAnswerStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['noAnswerStudents']
|
item['noAnswerStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['answerOkStudents'].studentId);
|
||||||
item['answerOkStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['answerOkStudents']
|
item['answerOkStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goQuickCheckPersonalPath(
|
goQuickCheckPersonalPath(item['answerNgStudents'].studentId);
|
||||||
item['answerNgStudents']
|
|
||||||
.studentId);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item['answerNgStudents']
|
item['answerNgStudents']?.studentName ?? '--',
|
||||||
?.studentName ??
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
)))),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -330,16 +294,11 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
goQuickCheckPersonalPath(item.studentId);
|
goQuickCheckPersonalPath(item.studentId);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 15.r),
|
||||||
vertical: 5.r, horizontal: 15.r),
|
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
||||||
color: index.isOdd
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFFF0F0F0),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
item.studentName! ?? '--',
|
item.studentName! ?? '--',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -357,65 +316,56 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
|
|
||||||
void goQuickCheckPersonalPath(id) {
|
void goQuickCheckPersonalPath(id) {
|
||||||
if (id != null) {
|
if (id != null) {
|
||||||
Get.toNamed(Routes.studentPersonalPage,
|
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': id, 'homeworkId': widget.jobId, 'subject': widget.subject});
|
||||||
arguments: {'studentId': id, 'homeworkId': widget.jobId,'subject':widget.subject});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void zdHandle(BuildContext context, String title, String questionNo,
|
void zdHandle(BuildContext context, String title, String questionNo, List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
||||||
List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
|
||||||
List list = [];
|
List list = [];
|
||||||
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
||||||
if (noAnswerStudents.length > answerNgStudents.length &&
|
if (noAnswerStudents.length > answerNgStudents.length && noAnswerStudents.length > answerOkStudents.length) {
|
||||||
noAnswerStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < noAnswerStudents.length; i++) {
|
for (int i = 0; i < noAnswerStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents': noAnswerStudents[i],
|
'noAnswerStudents': noAnswerStudents[i],
|
||||||
'answerNgStudents':
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||||
'answerOkStudents':
|
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
} else if (answerNgStudents.length > noAnswerStudents.length &&
|
} else if (answerNgStudents.length > noAnswerStudents.length && answerNgStudents.length > answerOkStudents.length) {
|
||||||
answerNgStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < answerNgStudents.length; i++) {
|
for (int i = 0; i < answerNgStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents':
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
|
||||||
'answerNgStudents': answerNgStudents[i],
|
'answerNgStudents': answerNgStudents[i],
|
||||||
'answerOkStudents':
|
'answerOkStudents': answerOkStudents.length > i ? answerOkStudents[i] : null
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
} else if (answerOkStudents.length > noAnswerStudents.length &&
|
} else if (answerOkStudents.length > noAnswerStudents.length && answerOkStudents.length > answerNgStudents.length) {
|
||||||
answerOkStudents.length > answerNgStudents.length) {
|
|
||||||
for (int i = 0; i < answerOkStudents.length; i++) {
|
for (int i = 0; i < answerOkStudents.length; i++) {
|
||||||
var obj = {
|
var obj = {
|
||||||
'noAnswerStudents':
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
'answerNgStudents':
|
'answerOkStudents': answerOkStudents[i]
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
};
|
||||||
|
list.add(obj);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (int i = 0; i < answerOkStudents.length; i++) {
|
||||||
|
var obj = {
|
||||||
|
'noAnswerStudents': noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
||||||
|
'answerNgStudents': answerNgStudents.length > i ? answerNgStudents[i] : null,
|
||||||
'answerOkStudents': answerOkStudents[i]
|
'answerOkStudents': answerOkStudents[i]
|
||||||
};
|
};
|
||||||
list.add(obj);
|
list.add(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
showPeopleListDialog(
|
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: list, dcList: []);
|
||||||
context: context,
|
|
||||||
title: title,
|
|
||||||
questionNo: questionNo,
|
|
||||||
arr: list,
|
|
||||||
dcList: []);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void dcHandle(
|
void dcHandle(BuildContext context, String title, String questionNo, List arr) {
|
||||||
BuildContext context, String title, String questionNo, List arr) {
|
showPeopleListDialog(context: context, title: title, questionNo: questionNo, arr: arr);
|
||||||
showPeopleListDialog(
|
|
||||||
context: context, title: title, questionNo: questionNo, arr: arr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
|
|
@ -428,28 +378,18 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.questionNo.toString(),
|
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.answerRate.toStringAsFixed(0)}%',
|
child: Text('${item.answerRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
zdHandle(
|
zdHandle(context, '作答人数', item.questionNo.toString(), item.noAnswerStudents, item.answerNgStudents, item.answerOkStudents);
|
||||||
context,
|
|
||||||
'作答人数',
|
|
||||||
item.questionNo.toString(),
|
|
||||||
item.noAnswerStudents,
|
|
||||||
item.answerNgStudents,
|
|
||||||
item.answerOkStudents);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -457,9 +397,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text('${item.answerCount}/${widget.studentCount}',
|
Text('${item.answerCount}/${widget.studentCount}', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/green_right_icon.png',
|
'assets/images/green_right_icon.png',
|
||||||
width: 12.r,
|
width: 12.r,
|
||||||
|
|
@ -470,19 +408,16 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.correctRate.toStringAsFixed(0)}%',
|
child: Text('${item.correctRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text('${item.okRate.toStringAsFixed(0)}%',
|
child: Text('${item.okRate.toStringAsFixed(0)}%', style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
|
|
@ -494,30 +429,20 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
if (item.questionPicture == null) {
|
if (item.questionPicture == null) {
|
||||||
ToastUtils.showInfo('当前试题没有原题');
|
ToastUtils.showInfo('当前试题没有原题');
|
||||||
} else {
|
} else {
|
||||||
ImageDialog.showImgDialog(
|
ImageDialog.showImgDialog(context, item.questionPicture);
|
||||||
context, item.questionPicture);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text('原题',
|
child: Text('原题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
)
|
)
|
||||||
: Text(item.answer,
|
: Text(item.answer,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// List<String> parts = item.priorityGeneral.split('人');
|
// List<String> parts = item.priorityGeneral.split('人');
|
||||||
dcHandle(context, '优先批阅答错人', item.questionNo.toString(),
|
dcHandle(context, '优先批阅答错人', item.questionNo.toString(), item.priorityInfo);
|
||||||
item.priorityInfo);
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -525,9 +450,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text('${item.priorityInfo.length}人答错',
|
Text('${item.priorityInfo.length}人答错', style: TextStyle(fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp, color: Theme.of(context).primaryColor)),
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/green_right_icon.png',
|
'assets/images/green_right_icon.png',
|
||||||
width: 12.r,
|
width: 12.r,
|
||||||
|
|
@ -548,18 +471,10 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
showAnswerEfficiency(item.overallTitles);
|
showAnswerEfficiency(item.overallTitles);
|
||||||
},
|
},
|
||||||
child: Text('查看',
|
child: Text('查看',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
)
|
)
|
||||||
: Text(item.answer,
|
: Text(item.answer,
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.sp, color: widget.isZG == true ? const Color(0xFFFF8A00) : Theme.of(context).primaryColor)),
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isZG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: Theme.of(context).primaryColor)),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|
@ -577,16 +492,12 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
dataRowHeight: 40.r,
|
dataRowHeight: 40.r,
|
||||||
bottomMargin: 0,
|
bottomMargin: 0,
|
||||||
border: const TableBorder(
|
border: const TableBorder(
|
||||||
horizontalInside: BorderSide(
|
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
bottom: BorderSide(
|
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||||
verticalInside: BorderSide(
|
headingRowDecoration: const BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
fixedColumnsColor: const Color(0xFFE6E6E6),
|
||||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
|
||||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
|
||||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
fixedCornerColor: Colors.grey[400],
|
||||||
minWidth: widget.headList.length > 6
|
minWidth: widget.headList.length > 6
|
||||||
? 80.r * widget.headList.length
|
? 80.r * widget.headList.length
|
||||||
|
|
@ -601,38 +512,46 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
columns: List.generate(widget.headList.length, (index) {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return DataColumn2(
|
return DataColumn2(
|
||||||
label: index == 3 ?
|
label: index == 3
|
||||||
Row(
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(item,
|
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
SizedBox(
|
||||||
SizedBox(width: 2.r,),
|
width: 2.r,
|
||||||
|
),
|
||||||
const Tooltip(
|
const Tooltip(
|
||||||
message: '答对人数/作答人数',
|
message: '答对人数/作答人数',
|
||||||
triggerMode: TooltipTriggerMode.tap,
|
triggerMode: TooltipTriggerMode.tap,
|
||||||
preferBelow: false,
|
preferBelow: false,
|
||||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
child: Icon(
|
||||||
|
Icons.info_outline_rounded,
|
||||||
|
color: Colors.grey,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
):
|
)
|
||||||
index == 4 ?Row(
|
: index == 4
|
||||||
|
? Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(item,
|
Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
SizedBox(
|
||||||
SizedBox(width: 2.r,),
|
width: 2.r,
|
||||||
|
),
|
||||||
const Tooltip(
|
const Tooltip(
|
||||||
message: '答对人数/总人数',
|
message: '答对人数/总人数',
|
||||||
triggerMode: TooltipTriggerMode.tap,
|
triggerMode: TooltipTriggerMode.tap,
|
||||||
preferBelow: false,
|
preferBelow: false,
|
||||||
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
|
child: Icon(
|
||||||
|
Icons.info_outline_rounded,
|
||||||
|
color: Colors.grey,
|
||||||
|
)),
|
||||||
],
|
],
|
||||||
):
|
)
|
||||||
Center(
|
: Center(
|
||||||
child: Text(item,
|
child: Text(item, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF505767))),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: index == 0
|
fixedWidth: index == 0
|
||||||
|
|
@ -640,13 +559,11 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
: widget.headList.length > 6
|
: widget.headList.length > 6
|
||||||
? 80.r
|
? 80.r
|
||||||
: isPadFlag
|
: isPadFlag
|
||||||
? (MediaQuery.of(context).size.width - 8.r) /
|
? (MediaQuery.of(context).size.width - 8.r) / widget.headList.length
|
||||||
widget.headList.length
|
|
||||||
: 85.r,
|
: 85.r,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, const Color(0xFFF5F5F5))));
|
||||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -660,6 +577,10 @@ return Container(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget mapTxt(String title) {
|
Widget mapTxt(String title) {
|
||||||
return Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF525252),fontWeight: FontWeight.w400),);
|
return Text(
|
||||||
|
title,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF525252), fontWeight: FontWeight.w400),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -18,6 +18,28 @@ class StudentPersonalLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
void getInfo() async {
|
void getInfo() async {
|
||||||
StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId, state.studentId);
|
StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId, state.studentId);
|
||||||
|
data.kgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
data.zgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
state.studentInfo.value = data;
|
state.studentInfo.value = data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
import 'student_personal_logic.dart';
|
import 'student_personal_logic.dart';
|
||||||
|
|
||||||
class StudentPersonalPage extends StatefulWidget {
|
class StudentPersonalPage extends StatefulWidget {
|
||||||
const StudentPersonalPage({Key? key}) : super(key: key);
|
const StudentPersonalPage({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
||||||
|
|
@ -54,8 +54,11 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// RouterManager.router.navigateTo(context,
|
// RouterManager.router.navigateTo(context,
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,
|
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||||
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName,'subject':state.subject});
|
'studentId': state.studentInfo.value.studentId,
|
||||||
|
'studentName': state.studentInfo.value.studentName,
|
||||||
|
'subject': state.subject
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,30 @@ class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSi
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
);
|
);
|
||||||
StudentHistory data = await getClient().getStudentHistory(params);
|
StudentHistory data = await getClient().getStudentHistory(params);
|
||||||
|
data.items.items.forEach((e) {
|
||||||
|
e.kgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
e.zgtList.sort((a, b) {
|
||||||
|
try {
|
||||||
|
if (RegExp(r'^\d*\.?\d+$').hasMatch(a.questionNo) && RegExp(r'^\d*\.?\d+$').hasMatch(b.questionNo)) {
|
||||||
|
return num.parse(a.questionNo).compareTo(num.parse(b.questionNo));
|
||||||
|
} else {
|
||||||
|
throw Exception();
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
return a.questionNo.toLowerCase().compareTo(b.questionNo.toLowerCase());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
state.studentData.value = data;
|
state.studentData.value = data;
|
||||||
/* state.kgtLine.value = [{'id':0,'rate':0}];
|
/* state.kgtLine.value = [{'id':0,'rate':0}];
|
||||||
state.zgtLine.value = [{'id':0,'rate':0}];
|
state.zgtLine.value = [{'id':0,'rate':0}];
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
# In Windows, build-name is used as the major, minor, and patch parts
|
# In Windows, build-name is used as the major, minor, and patch parts
|
||||||
# of the product and file versions while build-number is used as the build suffix.
|
# of the product and file versions while build-number is used as the build suffix.
|
||||||
version: 1.0.1+2
|
version: 1.0.2+3
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=3.4.1 <4.0.0'
|
sdk: '>=3.4.1 <4.0.0'
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,8 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue