mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
7 changed files with 274 additions and 185 deletions
Showing only changes of commit a43f803cca - Show all commits

View File

@ -185,6 +185,9 @@ class Students extends Object {
@JsonKey(name: 'okRate')
double? okRate;
@JsonKey(name: 'answerRate')
double? answerRate;
@JsonKey(name: 'noAnswerCount')
int? noAnswerCount;
@ -194,7 +197,7 @@ class Students extends Object {
@JsonKey(name: 'ttlSec')
String? ttlSec;
Students(this.studentId,this.studentName,this.state,this.priorityAnnotate,this.kgtStu,this.kgtOkCount,this.kgtAnswerCount,this.zgtStu,this.zgtAnswerCount,this.zgtOkCount,this.allOk,this.kgtErrorCount,this.zgtErrorCount,this.zgtUnrated,this.allNotDone,this.queDtls,this.okRate,this.noAnswerCount,this.useTime,this.isAllCorrect);
Students(this.studentId,this.studentName,this.state,this.priorityAnnotate,this.kgtStu,this.kgtOkCount,this.kgtAnswerCount,this.zgtStu,this.zgtAnswerCount,this.zgtOkCount,this.allOk,this.kgtErrorCount,this.zgtErrorCount,this.zgtUnrated,this.allNotDone,this.queDtls,this.okRate,this.noAnswerCount,this.useTime,this.isAllCorrect,this.answerRate);
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);

View File

@ -191,6 +191,9 @@ class StudentQuestions extends Object {
@JsonKey(name: 'height')
double height;
@JsonKey(name: 'useTime')
int? useTime;
StudentQuestions({
required this.height,
required this.questionNo,
@ -200,6 +203,7 @@ class StudentQuestions extends Object {
this.scoreStep,
this.studentScore,
this.isCorrect,
this.useTime,
});
factory StudentQuestions.fromJson(Map<String, dynamic> srcJson) =>

View File

@ -124,9 +124,13 @@ class Utils {
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
stu.zgtStu!.sort((a, b) => num.parse(a.questionNo).compareTo(num.parse(b.questionNo)));
//
stu.zgtOkCount = stu.zgtStu!.where((w) => w.state == 3).length;
//
stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length;
//
stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length;
//
stu.zgtAnswerCount = stu.zgtStu!.where((w) => w.state != 0).length;
stu.isAllCorrect = stu.kgtOkCount! + stu.zgtOkCount! == kgt.length + zgt.length ? true : false;
stu.allOk = data.dtls.where((w) {
@ -157,6 +161,10 @@ class Utils {
int ttlCount = stu.queDtls!.length;
stu.okRate = Utils.calcRate(okCount, ttlCount);
//
int answerCount = stu.queDtls!.where((w) => w.state != 0).length;
stu.answerRate = Utils.calcRate(answerCount, ttlCount);
var stuDtls = data.dtls.where((w) => w.studentId == stu.studentId);
var secList = [];
for(var sec in stuDtls){

View File

@ -71,6 +71,35 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
// padding: EdgeInsets.symmetric(vertical: 1.h),
child: Row(
children: [
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
child: quickText('提 交', size: 14.sp, color: Theme.of(context).primaryColor),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
child: quickText('取 消', size: 14.sp, color: Colors.white),
),
),
),
],
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
flex: 7,
child: Column(
@ -189,35 +218,6 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
],
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
flex: 3,
child: Row(
children: [
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
child: quickText('取 消', size: 14.sp, color: Colors.white),
),
),
),
Container(width: 0.3.w, height: double.infinity, color: Colors.white),
Expanded(
child: SizedBox(
width: double.infinity,
height: double.infinity,
child: TextButton(
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
child: quickText('提 交', size: 14.sp, color: Theme.of(context).primaryColor),
),
),
),
],
),
),
],
),
);

View File

@ -302,7 +302,6 @@ Widget $questionNumberView(BuildContext context, HomeworkReviewLogic logic,
var imageVal = sateData.imageScale.value;
if (imageVal == null) return const SizedBox();
var studentQuestions = sateData.studentQuestions.value;
var boxHeight = imageVal.boxHeight;
var actualImgHeight = imageVal.actualImgHeight; //
@ -360,14 +359,13 @@ Widget $scoringQuestionsView(
useEffect(() {
return () {};
}, []);
var padinVal = item.correctRate > 0
? EdgeInsets.only(top: 6.4.h)
: EdgeInsets.symmetric(vertical: 2.h);
return Container(
height: item.height * scaleRatio,
padding: EdgeInsets.zero,
child: Stack(
child: item.useTime == 0?Container():Stack(
alignment: const FractionalOffset(0, 0),
children: [
Row(

View File

@ -100,12 +100,16 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
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,
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
SizedBox(
height: 2.r,
),
Expanded(child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -144,16 +148,17 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
//
SizedBox(
height: MediaQuery.of(context).size.width * 0.3,
// width: MediaQuery.of(context).size.width * 0.08,
child: PieChart(
PieChartData(
borderData: FlBorderData(show: false),
sectionsSpace: 0,
centerSpaceRadius: MediaQuery.of(context).size.width * 0.06,
centerSpaceRadius: MediaQuery.of(context).size.width * 0.04,
sections: [
PieChartSectionData(
color: const Color(0xFF4CC793),
value: state.dataCount.studentSubmitCount! / state.dataCount.studentCount! * 100,
radius: MediaQuery.of(context).size.width * 0.07 + 5,
radius: MediaQuery.of(context).size.width * 0.06 + 5,
title: '${state.dataCount.studentSubmitCount}',
titleStyle: TextStyle(
fontSize: 14.sp,
@ -164,7 +169,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
color: const Color(0xFF6888FD),
value:
(state.dataCount.studentCount! - state.dataCount.studentSubmitCount!) / state.dataCount.studentCount! * 100,
radius: MediaQuery.of(context).size.width * 0.07,
radius: MediaQuery.of(context).size.width * 0.06,
title: '${state.dataCount.studentCount! - state.dataCount.studentSubmitCount!}',
titleStyle: TextStyle(
fontSize: 14.sp,
@ -175,6 +180,12 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
),
),
),
],
)),
SizedBox(width: 20.r,),
Expanded(child: Column(
children: [
//
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@ -240,6 +251,9 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
)),
],
),
],))
],
),
),

View File

@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/homework_details.dart';
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart';
class QuickDataCheckBottom extends StatefulWidget {
@ -22,6 +24,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
RxList<Students> followList = RxList();
RxBool sortType = true.obs;
RxBool sortLevel = false.obs;
RxBool sortCompleteRate = false.obs;
@override
void initState() {
@ -63,6 +66,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
sortType.value = !sortType.value;
sortLevel.value = false;
sortCompleteRate.value = false;
},
child: Obx(() {
return Row(
@ -107,6 +111,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
sortType.value = true;
}
sortCompleteRate.value = false;
sortLevel.value = !sortLevel.value;
},
child: Obx(() {
@ -135,6 +140,56 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
);
}),
),
SizedBox(
width: 20.r,
),
InkWell(
onTap: () {
if (widget.jobData!.isEmpty) return;
showList.value = [...widget.jobData!];
if (!sortCompleteRate.value) {
showList.sort((a, b) {
return b.answerRate!.toInt().compareTo(a.answerRate!.toInt());
});
sortType.value = false;
} else {
showList.value = [...widget.jobData!];
showList.sort((a, b) {
return b.state.compareTo(a.state);
});
sortType.value = true;
}
sortLevel.value = false;
sortCompleteRate.value = !sortCompleteRate.value;
},
child: Obx(() {
return Row(
children: [
if (!sortCompleteRate.value)
Image.asset(
'assets/images/no_check_icon.png',
width: 16.r,
height: 16.r,
),
if (sortCompleteRate.value)
Image.asset(
'assets/images/check_icon.png',
width: 16.r,
height: 16.r,
),
SizedBox(
width: 5.r,
),
Text(
'完成率排序',
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF707070)),
),
],
);
}),
),
],
),
SizedBox(
@ -230,8 +285,10 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
height: 10.r,
),
Obx(() {
return SizedBox(
height: showList.value.length > 5 ? 350.r : showList.value.length * 50.r + 40.r,
return Column(
children: [
SizedBox(
height: showList.value.length > 5 ? 350.r : showList.value.length * 50.r + 60.r,
child: QuickStudentDataTable(
headList: ['学生姓名', '总用时','客观题', '主观题', '客观题状态', '主观题状态', '未批阅'],
bodyList: showList.value,
@ -244,8 +301,13 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
zgCount: widget.zgCount,
subject:widget.subject,
),
),
if(showList.isEmpty)
MyEmptyWidget(imgWidth: 100.r,imgHeight: 100.r,font: 10.sp,),
],
);
})
}),
],
),
);