Compare commits

..

No commits in common. "78c1fff88bd768bce538d2b996c8ffbd3af51ff1" and "276f69d8f15a8ebfe715e4a70c227ecb84871909" have entirely different histories.

7 changed files with 43 additions and 114 deletions

View File

@ -66,9 +66,6 @@ class Questions extends Object {
@JsonKey(name: 'okRate')
double? okRate;
@JsonKey(name: 'correctRate')
double? correctRate;
@JsonKey(name: 'priorityInfo')
List<Dtls>? priorityInfo;
@ -86,7 +83,7 @@ class Questions extends Object {
Questions(this.id,this.templateId,this.questionNo,this.questionType,this.answer,this.score,this.questionPicture,this.subjectivePicture,this.knows,this.answerCount,
this.answerRate,this.okRate,this.priorityInfo,this.noAnswerStudents,this.answerOkStudents,this.answerNgStudents,this.correctRate,
this.answerRate,this.okRate,this.priorityInfo,this.noAnswerStudents,this.answerOkStudents,this.answerNgStudents,
this.overallTitles);
factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson);

View File

@ -92,8 +92,6 @@ class Utils {
dataCount.kgtDtlCount = kgt.length;
dataCount.kgtAnswerRate = Utils.calcRate(dataCount.kgtAnswerCount!, dataCount.kgtDtlCount!);
dataCount.kgtOkRate = Utils.calcRate(dataCount.kgtOkCount!, dataCount.kgtDtlCount!);
dataCount.kgtCorrectRate = Utils.calcRate(dataCount.kgtOkCount!, dataCount.kgtAnswerCount!);
dataCount.kgtCount = data.questions.where((w) => w.questionType == 1).length;
List<Dtls> zgt = data.dtls.where((w) => w.questionType == 2).toList();
@ -102,8 +100,6 @@ class Utils {
dataCount.zgtDtlCount = zgt.length;
dataCount.zgtAnswerRate = Utils.calcRate(dataCount.zgtAnswerCount!, dataCount.zgtDtlCount!);
dataCount.zgtOkRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!);
dataCount.zgtCorrectRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtAnswerCount!);
dataCount.zgtCount = data.questions.where((w) => w.questionType == 2).length;
dataCount.studentCount = data.students.length;
dataCount.priorityStudents = data.students.where((w) => w.priorityAnnotate!).toList();
@ -214,7 +210,7 @@ class Utils {
-1 &&
w.state != 3;
}).toList();
que.correctRate = Utils.calcRate(okCount, que.answerCount!);
que.answerNgStudents = ques.where((w) {
w.studentName = data.students.firstWhere((s) => s.studentId == w.studentId).studentName;
return w.state == 2;

View File

@ -85,9 +85,7 @@ class _JobReportPageState extends State<JobReportPage> {
kgReport: state.kgReport,
zgReport: state.zgReport,
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0)),
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)),
//
Container(
margin: EdgeInsets.symmetric(horizontal: 10.r),

View File

@ -23,14 +23,12 @@ class CountData extends Object {
int? kgtDtlCount = 0;
double? kgtAnswerRate = 0;
double? kgtOkRate = 0;
double? kgtCorrectRate = 0;
int? kgtAnswerCount = 0;
int? kgtCount = 0;
int? zgtDtlCount = 0;
int? zgtOkCount = 0;
int? zgtAnswerCount = 0;
double? zgtAnswerRate = 0;
double? zgtCorrectRate = 0;
double? zgtOkRate = 0;
int? zgtCount = 0;
int? studentCount = 0;

View File

@ -256,9 +256,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
kgReport: state.kgReport,
zgReport: state.zgReport,
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
kgtCorrectRate: state.dataCount.kgtCorrectRate!.toStringAsFixed(0),
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0),
zgtCorrectRate: state.dataCount.zgtCorrectRate!.toStringAsFixed(0)),
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)),
],
),
));

View File

@ -5,7 +5,6 @@ import 'package:making_school_asignment_app/common/job/homework_details.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/home_page/children/quick_data_check/widget/report_table.dart';
import 'package:making_school_asignment_app/page/home_page/widget/progress_bar.dart';
class KgtZgtTable extends StatefulWidget {
final int studentCount;
@ -14,8 +13,6 @@ class KgtZgtTable extends StatefulWidget {
final List<Questions> zgReport;
final String kgtOkRate;
final String zgtOkRate;
final String kgtCorrectRate;
final String zgtCorrectRate;
const KgtZgtTable(
{Key? key,
@ -24,9 +21,7 @@ class KgtZgtTable extends StatefulWidget {
required this.kgReport,
required this.zgReport,
required this.kgtOkRate,
required this.kgtCorrectRate,
required this.zgtOkRate,
required this.zgtCorrectRate,})
required this.zgtOkRate})
: super(key: key);
@override
@ -52,39 +47,31 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
borderRadius: BorderRadius.all(Radius.circular(6.r)),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'客观题',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
),
SizedBox(
height: 20.r,
width: 10.r,
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
percent: double.parse(widget.kgtCorrectRate) / 100,
title: '作答正确率:',
padingEdg: EdgeInsets.only(left: 5.w, right: 10.w),
fontSize: 10.sp,
lineHeight: 10.h,
marginEdg: EdgeInsets.only(top: 5.h),
Text(
'${widget.kgtOkRate}%',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF4CC793), fontWeight: FontWeight.w600),
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
percent: double.parse(widget.kgtOkRate) / 100,
title: '全班正确率:',
padingEdg: EdgeInsets.only(left: 5.w, right: 10.w),
fontSize: 10.sp,
lineHeight: 10.h,
marginEdg: EdgeInsets.only(top: 5.h),
],
),
SizedBox(
height: 10.r,
height: 6.r,
),
SizedBox(
height: widget.kgReport.length > 10 ? 300.r : widget.kgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
child: ReportTable(
headList: const ['', '作答率', '作答人数', '作答正确率', '全班正确率','标准答案', '优先批阅概况'],
headList: const ['', '作答率', '作答人数', '正确率', '标准答案', '优先批阅概况'],
bodyList: widget.kgReport,
fixedCols: 1,
fixedRows: 1,
@ -105,39 +92,31 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
borderRadius: BorderRadius.all(Radius.circular(6.r)),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'主观题',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
),
SizedBox(
height: 20.r,
width: 6.r,
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
percent: double.parse(widget.zgtCorrectRate) / 100,
title: '作答正确率:',
padingEdg: EdgeInsets.only(left: 5.w, right: 10.w),
fontSize: 10.sp,
lineHeight: 10.h,
marginEdg: EdgeInsets.only(top: 5.h),
Text(
'${widget.zgtOkRate}%',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600),
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
percent: double.parse(widget.zgtOkRate) / 100,
title: '全班正确率:',
padingEdg: EdgeInsets.only(left: 5.w, right: 10.w),
fontSize: 10.sp,
lineHeight: 10.h,
marginEdg: EdgeInsets.only(top: 5.h),
],
),
SizedBox(
height:10.r,
height: 10.r,
),
SizedBox(
height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
child: ReportTable(
headList: const ['', '作答率', '作答人数', '作答正确率', '全班正确率', '查看原题', '优先批阅概况','作答效率'],
headList: const ['', '作答率', '作答人数', '正确率', '查看原题', '优先批阅概况','作答效率'],
bodyList: widget.zgReport,
fixedCols: 1,
fixedRows: 1,

View File

@ -420,7 +420,7 @@ class _ReportTableState extends State<ReportTable> {
var item = widget.bodyList[index];
return DataRow2.byIndex(
index: index,
color: color != null ? WidgetStateProperty.all(color) : null,
color: color != null ? MaterialStateProperty.all(color) : null,
cells: [
DataCell(Center(
child: Padding(
@ -467,14 +467,6 @@ class _ReportTableState extends State<ReportTable> {
),
),
)),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text('${item.correctRate.toStringAsFixed(0)}%',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
),
)),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
@ -598,36 +590,7 @@ class _ReportTableState extends State<ReportTable> {
columns: List.generate(widget.headList.length, (index) {
var item = widget.headList[index];
return DataColumn2(
label: index == 3 ?
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(item,
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
SizedBox(width: 2.r,),
const Tooltip(
message: '答对人数/作答人数',
triggerMode: TooltipTriggerMode.tap,
preferBelow:false,
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
],
):
index == 4 ?Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(item,
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
SizedBox(width: 2.r,),
const Tooltip(
message: '答对人数/总人数',
triggerMode: TooltipTriggerMode.tap,
preferBelow:false,
child: Icon(Icons.info_outline_rounded,color: Colors.grey,)),
],
):
Center(
label: Center(
child: Text(item,
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
),