Compare commits

..

No commits in common. "04a9c53699842276b64eead67d86da6428521650" and "f3cc6e00a6c80bfc3e0db844260413213cb20312" have entirely different histories.

90 changed files with 186 additions and 840 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 857 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 297 KiB

After

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 839 B

After

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 997 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 381 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 534 B

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -78,13 +78,8 @@ class Questions extends Object {
@JsonKey(name: 'answerNgStudents') @JsonKey(name: 'answerNgStudents')
List<Dtls>? answerNgStudents; List<Dtls>? answerNgStudents;
@JsonKey(name: 'overallTitles')
List<OverallTitles>? overallTitles;
Questions(this.id,this.templateId,this.questionNo,this.questionType,this.answer,this.score,this.questionPicture,this.subjectivePicture,this.knows,this.answerCount, 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.answerRate,this.okRate,this.priorityInfo,this.noAnswerStudents,this.answerOkStudents,this.answerNgStudents);
this.overallTitles);
factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson); factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson);
@ -122,6 +117,7 @@ class Knows extends Object {
} }
@JsonSerializable() @JsonSerializable()
class Students extends Object { class Students extends Object {
@ -170,9 +166,6 @@ class Students extends Object {
@JsonKey(name: 'allNotDone') @JsonKey(name: 'allNotDone')
bool? allNotDone; bool? allNotDone;
@JsonKey(name: 'isAllCorrect')
bool? isAllCorrect;
@JsonKey(name: 'queDtls') @JsonKey(name: 'queDtls')
List<Dtls>? queDtls; List<Dtls>? queDtls;
@ -185,7 +178,7 @@ class Students extends Object {
@JsonKey(name: 'useTime') @JsonKey(name: 'useTime')
int? useTime; int? useTime;
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);
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson); factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);
@ -244,19 +237,4 @@ class Dtls extends Object {
} }
@JsonSerializable()
class OverallTitles extends Object {
@JsonKey(name: 'title')
String title;
@JsonKey(name: 'count')
int count;
OverallTitles(this.title,this.count);
factory OverallTitles.fromJson(Map<String, dynamic> srcJson) => _$OverallTitlesFromJson(srcJson);
Map<String, dynamic> toJson() => _$OverallTitlesToJson(this);
}

View File

@ -4,7 +4,6 @@ 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/homework_details.dart'; import 'package:making_school_asignment_app/common/job/homework_details.dart';
import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_state.dart'; import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_state.dart';
import 'dart:math';
class Utils { class Utils {
Utils._internal(); Utils._internal();
@ -82,38 +81,49 @@ class Utils {
dataCount.kgtAnswerCount = kgt.where((w) => w.state != 0).length; dataCount.kgtAnswerCount = kgt.where((w) => w.state != 0).length;
dataCount.kgtOkCount = kgt.where((w) => w.state == 3).length; dataCount.kgtOkCount = kgt.where((w) => w.state == 3).length;
dataCount.kgtDtlCount = kgt.length; dataCount.kgtDtlCount = kgt.length;
dataCount.kgtAnswerRate = dataCount.kgtAnswerRate = Utils.calcRate(dataCount.kgtAnswerCount!, dataCount.kgtDtlCount!);
Utils.calcRate(dataCount.kgtAnswerCount!, dataCount.kgtDtlCount!); dataCount.kgtOkRate = Utils.calcRate(dataCount.kgtOkCount!, dataCount.kgtDtlCount!);
dataCount.kgtOkRate = dataCount.kgtCount = data.questions.where((w) => w.questionType == 1).length;
Utils.calcRate(dataCount.kgtOkCount!, dataCount.kgtDtlCount!);
dataCount.kgtCount =
data.questions.where((w) => w.questionType == 1).length;
List<Dtls> zgt = data.dtls.where((w) => w.questionType == 2).toList(); List<Dtls> zgt = data.dtls.where((w) => w.questionType == 2).toList();
dataCount.zgtAnswerCount = zgt.where((w) => w.state != 0).length; dataCount.zgtAnswerCount = zgt.where((w) => w.state != 0).length;
dataCount.zgtOkCount = zgt.where((w) => w.state == 3).length; dataCount.zgtOkCount = zgt.where((w) => w.state == 3).length;
dataCount.zgtDtlCount = zgt.length; dataCount.zgtDtlCount = zgt.length;
dataCount.zgtAnswerRate = dataCount.zgtAnswerRate = Utils.calcRate(dataCount.zgtAnswerCount!, dataCount.zgtDtlCount!);
Utils.calcRate(dataCount.zgtAnswerCount!, dataCount.zgtDtlCount!); dataCount.zgtOkRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!);
dataCount.zgtOkRate = dataCount.zgtCount = data.questions.where((w) => w.questionType == 2).length;
Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!);
dataCount.zgtCount =
data.questions.where((w) => w.questionType == 2).length;
dataCount.studentCount = data.students.length; dataCount.studentCount = data.students.length;
dataCount.priorityStudents = dataCount.priorityStudents = data.students.where((w) => w.priorityAnnotate!).toList();
data.students.where((w) => w.priorityAnnotate!).toList();
for (var que in data.questions) {
List<Dtls> ques = data.dtls.where((w) => w.templateId == que.templateId && w.questionNo == que.questionNo).toList();
que.answerCount = ques.where((w) => w.state != 0).length;
que.answerRate = Utils.calcRate(que.answerCount!, dataCount.studentCount!);
int okCount = ques.where((w) => w.state == 3).length;
que.okRate = Utils.calcRate(okCount, dataCount.studentCount!);
que.priorityInfo = ques.where((w) {
return dataCount.priorityStudents!.indexWhere((s) {
w.studentName = s.studentName;
return s.studentId == w.studentId;
}) >
-1 &&
w.state != 3;
}).toList();
// que.answerNgStudents = ques.where((w) {
dataCount.studentSubmitCount = w.studentName = data.students.firstWhere((s) => s.studentId == w.studentId).studentName;
data.students.where((s) => s.state != 0).length; return w.state == 2;
dataCount.studentSubmitStudents = }).toList();
data.students.where((s) => s.state != 0).toList();
// que.noAnswerStudents = ques.where((w) {
dataCount.noAnswerCount = return w.state == 0;
data.students.length - dataCount.studentSubmitCount!; }).toList();
dataCount.noAnswerStudents = que.answerOkStudents = ques.where((w) {
data.students.where((s) => s.state == 0).toList(); return w.state == 3;
}).toList();
}
dataCount.studentSubmitCount = data.students.where((s) => s.state != 0).length;
for (var stu in data.students) { for (var stu in data.students) {
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList(); stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
@ -128,17 +138,12 @@ class Utils {
stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length; stu.zgtErrorCount = stu.zgtStu!.where((w) => w.state == 2).length;
stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length; stu.zgtUnrated = stu.zgtStu!.where((w) => w.state == 1).length;
stu.zgtAnswerCount = stu.zgtStu!.where((w) => w.state != 0).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) { stu.allOk = data.dtls.where((w) {
if (stu.studentId == w.studentId) { if (stu.studentId == w.studentId) {
stu.useTime = w.useTime; stu.useTime = w.useTime;
} }
for (var que in data.questions) { for (var que in data.questions) {
if (w.templateId == que.templateId && if (w.templateId == que.templateId && w.questionNo == que.questionNo) {
w.questionNo == que.questionNo) {
w.answer = que.answer; w.answer = que.answer;
w.questionPicture = que.questionPicture; w.questionPicture = que.questionPicture;
} }
@ -146,25 +151,16 @@ class Utils {
return w.studentId == stu.studentId && w.state != 3; return w.studentId == stu.studentId && w.state != 3;
}).length ?? }).length ??
0; 0;
if ((stu.kgtStu!.length - stu.kgtAnswerCount!) + if ((stu.kgtStu!.length - stu.kgtAnswerCount!) + (stu.zgtStu!.length - stu.zgtAnswerCount!) == (stu.kgtStu!.length + stu.zgtStu!.length)) {
(stu.zgtStu!.length - stu.zgtAnswerCount!) ==
(stu.kgtStu!.length + stu.zgtStu!.length)) {
stu.allNotDone = true; stu.allNotDone = true;
} else { } else {
stu.allNotDone = false; stu.allNotDone = false;
} }
stu.noAnswerCount = data.dtls stu.noAnswerCount = data.dtls.where((w) => w.state == 0 && stu.studentId == w.studentId).length;
.where((w) => w.state == 0 && stu.studentId == w.studentId)
.length;
List<Questions> ques = data.questions; List<Questions> ques = data.questions;
stu.queDtls = data.dtls stu.queDtls = data.dtls
.where((w) => .where((w) => w.studentId == stu.studentId && ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1)
w.studentId == stu.studentId &&
ques.indexWhere((q) =>
w.templateId == q.templateId &&
w.questionNo == q.questionNo) >
-1)
.toList(); .toList();
int okCount = stu.queDtls!.where((w) => w.state == 3).length; int okCount = stu.queDtls!.where((w) => w.state == 3).length;
int ttlCount = stu.queDtls!.length; int ttlCount = stu.queDtls!.length;
@ -176,107 +172,10 @@ class Utils {
int num2 = b.state; int num2 = b.state;
return num2.compareTo(num1); return num2.compareTo(num1);
}); });
//
dataCount.allCorrect =
data.students.where((w) => w.isAllCorrect == true).length;
dataCount.allCorrectStudents =
data.students.where((w) => w.isAllCorrect == true).toList();
//
dataCount.levelOneCount =
data.students.where((s) => s.okRate! >= 85).length;
dataCount.levelOneStudents =
data.students.where((s) => s.okRate! >= 85).toList();
//
dataCount.levelTwoCount =
data.students.where((s) => s.okRate! < 85 && s.okRate! >= 55).length;
dataCount.levelTwoStudents =
data.students.where((s) => s.okRate! < 85 && s.okRate! >= 55).toList();
//
dataCount.levelThreeCount =
data.students.where((s) => s.okRate! < 55 && s.okRate! >= 25).length;
dataCount.levelThreeStudents =
data.students.where((s) => s.okRate! < 55 && s.okRate! >= 25).toList();
//
dataCount.levelFourCount =
data.students.where((s) => s.okRate! < 25).length;
dataCount.levelFourStudents =
data.students.where((s) => s.okRate! < 25).toList();
for (var que in data.questions) {
List<Dtls> ques = data.dtls
.where((w) =>
w.templateId == que.templateId && w.questionNo == que.questionNo)
.toList();
que.answerCount = ques.where((w) => w.state != 0).length;
que.answerRate =
Utils.calcRate(que.answerCount!, dataCount.studentCount!);
int okCount = ques.where((w) => w.state == 3).length;
que.okRate = Utils.calcRate(okCount, dataCount.studentCount!);
que.priorityInfo = ques.where((w) {
return dataCount.priorityStudents!.indexWhere((s) {
w.studentName = s.studentName;
return s.studentId == w.studentId;
}) >
-1 &&
w.state != 3;
}).toList();
que.answerNgStudents = ques.where((w) {
w.studentName = data.students
.firstWhere((s) => s.studentId == w.studentId)
.studentName;
return w.state == 2;
}).toList();
que.noAnswerStudents = ques.where((w) {
return w.state == 0;
}).toList();
que.answerOkStudents = ques.where((w) {
return w.state == 3;
}).toList();
//
int middleTime = 0;
if (ques.length % 2 == 0) {
int index = (ques.length / 2).ceil();
middleTime = ((ques[index].useTime +
ques[index - 1].useTime) /
2)
.ceil();
} else {
int index = ((ques.length + 1) / 2).ceil() ;
middleTime = ques[index - 1 ].useTime;
}
var excellent = ques.where((w) => w.state == 3 && w.useTime <= middleTime).length;
var good = ques.where((w) => w.state == 3 && w.useTime > middleTime).length;
var middle = ques.where((w) => w.state != 3 && w.useTime <= middleTime).length;
var differ = ques.where((w) => w.state != 3 && w.useTime > middleTime).length;
que.overallTitles = [OverallTitles('优秀',excellent),OverallTitles('良好',good),
OverallTitles('',middle),OverallTitles('',differ)];
}
for (var know in data.knows) { for (var know in data.knows) {
List<Questions> ques = data.questions List<Questions> ques = data.questions.where((w) => w.knows.indexWhere((k) => k.knowledgeId == know.knowledgeId) > -1).toList();
.where((w) => List<Dtls> queDtls = data.dtls.where((w) => ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1).toList();
w.knows.indexWhere((k) => k.knowledgeId == know.knowledgeId) > -1)
.toList();
List<Dtls> queDtls = data.dtls
.where((w) =>
ques.indexWhere((q) =>
w.templateId == q.templateId &&
w.questionNo == q.questionNo) >
-1)
.toList();
know.okCount = queDtls.where((w) => w.state == 3).length; know.okCount = queDtls.where((w) => w.state == 3).length;
know.ttlCount = queDtls.length; know.ttlCount = queDtls.length;
know.okRate = Utils.calcRate(know.okCount!, know.ttlCount!); know.okRate = Utils.calcRate(know.okCount!, know.ttlCount!);
@ -311,7 +210,6 @@ bool isPad([double mobilePhoneScale = 1.2]) {
return ScreenUtil().scaleWidth > mobilePhoneScale; return ScreenUtil().scaleWidth > mobilePhoneScale;
} }
void toUpState( void toUpState(Function(void Function()) setState, VoidCallback fn, bool mounted) {
Function(void Function()) setState, VoidCallback fn, bool mounted) {
if (mounted) setState(fn); if (mounted) setState(fn);
} }

View File

@ -45,8 +45,8 @@ class MyApp extends StatelessWidget {
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
theme: ThemeData( theme: ThemeData(
brightness: Brightness.light, brightness: Brightness.light,
primarySwatch: createMaterialColor(const Color.fromRGBO(76, 199, 147, 1)), primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
primaryColor: const Color.fromRGBO(76, 199, 147, 1), primaryColor: const Color.fromRGBO(46, 91, 255, 1),
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,), // textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
primaryTextTheme: TextTheme( primaryTextTheme: TextTheme(
bodyLarge: TextStyle(fontSize: 14.sp, color: Colors.black87), bodyLarge: TextStyle(fontSize: 14.sp, color: Colors.black87),
@ -54,7 +54,7 @@ class MyApp extends StatelessWidget {
useMaterial3: false, useMaterial3: false,
colorScheme: const ColorScheme.light( colorScheme: const ColorScheme.light(
// //
primary: Color.fromRGBO(76, 199, 147, 1), primary: Color.fromRGBO(46, 91, 255, 1),
)), )),
enableLog: true, enableLog: true,
logWriterCallback: (text, {bool isError = false}) { logWriterCallback: (text, {bool isError = false}) {

View File

@ -73,7 +73,7 @@ class MyBottomNavigationBar extends StatelessWidget {
Text( Text(
e['title'] as String, e['title'] as String,
style: TextStyle( style: TextStyle(
color: active == (e['id'] as int) ? const Color(0xFFE8E8E8) : const Color(0xFF767676), color: active == (e['id'] as int) ? const Color(0xFF6888FD) : const Color(0xFF767676),
fontSize: 11.sp, fontSize: 11.sp,
), ),
strutStyle: StrutStyle(fontSize: 16.sp), strutStyle: StrutStyle(fontSize: 16.sp),

View File

@ -1,8 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/const_text.dart';
import 'package:making_school_asignment_app/routes/app_pages.dart';
import 'package:package_info_plus/package_info_plus.dart'; import 'package:package_info_plus/package_info_plus.dart';
import 'package:making_school_asignment_app/page/global_widget/my_text.dart'; import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
// //
@ -72,7 +70,11 @@ class _OhterPageState extends State<OhterPage> {
children: [ children: [
InkWell( InkWell(
onTap: () { onTap: () {
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.PRIVACY_GREEMENT.name}); /* RouterManager.router.navigateTo(
context,
transition: TransitionType.fadeIn,
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
);*/
}, },
child: Container( child: Container(
padding: EdgeInsets.only(bottom: 4.h), padding: EdgeInsets.only(bottom: 4.h),

View File

@ -21,7 +21,7 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
super.onInit(); super.onInit();
state.preIndex = Get.arguments['tabIndex'] ?? 3; state.preIndex = Get.arguments['tabIndex'] ?? 3;
if(state.preIndex != 3){ if(state.preIndex != 3){
// readOverController = Get.find(); readOverController = Get.find();
} }
refreshController = EasyRefreshController(); refreshController = EasyRefreshController();
state.homeworkId.value = Get.arguments['id'] ?? ''; state.homeworkId.value = Get.arguments['id'] ?? '';

View File

@ -124,9 +124,9 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
Get.delete<AnnotateClassLogic>(); Get.delete<AnnotateClassLogic>();
super.dispose(); super.dispose();
if(state.preIndex != 3){ if(state.preIndex != 3){
// logic.readOverController.state.tabIndex.value = state.preIndex; logic.readOverController.state.tabIndex.value = state.preIndex;
}else{ }else{
// logic.homeController.getList(); logic.homeController.getList();
} }
} }

View File

@ -46,7 +46,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
height: 27.r, height: 27.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)), borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
), ),
child: const Center( child: const Center(
child: Text( child: Text(
@ -104,7 +104,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
const Spacer(), const Spacer(),
Text( Text(
'已交:${widget.item.commitStudentCount}', '已交:${widget.item.commitStudentCount}',
style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF4CC793)), style: TextStyle(fontSize: widget.font - 2.sp, color: const Color(0xFF6888FD)),
), ),
SizedBox( SizedBox(
width: 20.r, width: 20.r,
@ -230,21 +230,21 @@ class _AnnotateItemState extends State<AnnotateItem> {
), ),
ProgressBar( ProgressBar(
title: '客观题正确率:', title: '客观题正确率:',
color: const Color(0xFF4CC793), color: const Color(0xFFB8C7FF),
percent: widget.item.kgtCorrectRate / 100, percent: widget.item.kgtCorrectRate / 100,
marginEdg: EdgeInsets.zero, marginEdg: EdgeInsets.zero,
padingEdg: EdgeInsets.only(top: 8.h, left: 14.r, right: 14.r), padingEdg: EdgeInsets.only(top: 8.h, left: 14.r, right: 14.r),
fontSize: widget.font - 2.sp), fontSize: widget.font - 2.sp),
ProgressBar( ProgressBar(
title: '主观题正确率:', title: '主观题正确率:',
color: const Color(0xFF4CC793), color: const Color(0xFFB8C7FF),
percent: widget.item.zgtCorrectRate / 100, percent: widget.item.zgtCorrectRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 10.r), padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
marginEdg: EdgeInsets.only(top: 8.h), marginEdg: EdgeInsets.only(top: 8.h),
fontSize: widget.font - 2.sp), fontSize: widget.font - 2.sp),
ProgressBar( ProgressBar(
title: '总正确率:', title: '总正确率:',
color: const Color(0xFF4CC793), color: const Color(0xFFB8C7FF),
percent: widget.item.correctRate / 100, percent: widget.item.correctRate / 100,
padingEdg: EdgeInsets.symmetric(horizontal: 10.r), padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
marginEdg: EdgeInsets.only(top: 8.h), marginEdg: EdgeInsets.only(top: 8.h),

View File

@ -43,7 +43,7 @@ class CompletedAnnotateItem extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)), border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)),
), ),
child: quickText(taskItem.className, color: Color(0xFF4CC793), size: 12.sp), child: quickText(taskItem.className, color: Color.fromRGBO(104, 136, 253, 1), size: 12.sp),
), ),
Column( Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View File

@ -14,7 +14,7 @@ class ItemBtn extends StatelessWidget {
child: ElevatedButton( child: ElevatedButton(
style: ButtonStyle( style: ButtonStyle(
overlayColor:WidgetStateProperty.all( overlayColor:WidgetStateProperty.all(
const Color(0xFFE8E8E8)), const Color(0xFF6888FD)),
backgroundColor: backgroundColor:
WidgetStateProperty.all( WidgetStateProperty.all(
const Color(0xFFF4F4F4)), const Color(0xFFF4F4F4)),

View File

@ -59,7 +59,7 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
tabAlignment: TabAlignment.start, tabAlignment: TabAlignment.start,
indicator: const UnderlineTabIndicator( indicator: const UnderlineTabIndicator(
borderSide: BorderSide( borderSide: BorderSide(
color: const Color(0xFF4CC793), color: const Color.fromRGBO(104, 136, 253, 1),
), ),
), ),
@ -97,10 +97,10 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
TextStyle(fontSize: 14.sp, color: Color(0xFF666666)), TextStyle(fontSize: 14.sp, color: Color(0xFF666666)),
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF4CC793), color: Color(0xFF6888FD),
), ),
isScrollable: true, isScrollable: true,
labelColor: Color(0xFF4CC793), labelColor: Color(0xFF6888FD),
unselectedLabelColor: Color(0xFF666666), unselectedLabelColor: Color(0xFF666666),
indicatorSize: TabBarIndicatorSize.label, indicatorSize: TabBarIndicatorSize.label,
labelPadding: const EdgeInsets.all(0), labelPadding: const EdgeInsets.all(0),

View File

@ -63,7 +63,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
padding: EdgeInsets.only(left: 2.w), padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: color:
const Color(0xFF4CC793), const Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -195,7 +195,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
padding: EdgeInsets.only(left: 2.w), padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: color:
const Color(0xFF4CC793), const Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),

View File

@ -94,7 +94,7 @@ class _AnswerTrajectoryDetailPageState
fontSize: 10.sp, fontSize: 10.sp,
color: state.currentClass.value color: state.currentClass.value
.classId == item.classId .classId == item.classId
? Color(0xFF4CC793) ? Color(0xFF6888FD)
: Color(0xFF686868)), : Color(0xFF686868)),
), ),
), ),
@ -159,7 +159,7 @@ class _AnswerTrajectoryDetailPageState
item.studentName, item.studentName,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4CC793)), color: Color(0xFF6888FD)),
)), )),
Container( Container(
@ -208,7 +208,7 @@ class _AnswerTrajectoryDetailPageState
item.studentName, item.studentName,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4CC793)), color: Color(0xFF6888FD)),
)), )),
Container( Container(
height: 24.r, height: 24.r,

View File

@ -96,7 +96,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
item.name, item.name,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: const Color(0xFF4CC793)), color: const Color(0xFF6888FD)),
)), )),
state.page == 'answerTrajectory' state.page == 'answerTrajectory'
? Container( ? Container(
@ -121,7 +121,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
width: 70.r, width: 70.r,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color:
const Color(0xFF4CC793), const Color(0xFF6888FD),
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
@ -272,7 +272,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
item.name, item.name,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4CC793)), color: Color(0xFF6888FD)),
)), )),
state.page == 'answerTrajectory' state.page == 'answerTrajectory'
? Container( ? Container(
@ -296,7 +296,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
height: 24.r, height: 24.r,
width: 82.r, width: 82.r,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF4CC793), color: Color(0xFF6888FD),
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(

View File

@ -58,7 +58,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
height: 27.r, height: 27.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)), borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
), ),
child: const Center( child: const Center(
child: Text( child: Text(

View File

@ -8,7 +8,6 @@ import 'package:making_school_asignment_app/page/home_page/children/job_report/w
import 'package:making_school_asignment_app/page/global_widget/my_text.dart'; import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
import 'package:making_school_asignment_app/page/home_page/children/job_report/widget/knowledge_point.dart'; import 'package:making_school_asignment_app/page/home_page/children/job_report/widget/knowledge_point.dart';
import 'package:making_school_asignment_app/page/home_page/children/job_report/widget/personnel_data_overview.dart'; import 'package:making_school_asignment_app/page/home_page/children/job_report/widget/personnel_data_overview.dart';
import 'package:making_school_asignment_app/page/home_page/children/job_report/widget/top_count.dart';
import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart'; import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart';
import 'job_report_logic.dart'; import 'job_report_logic.dart';
@ -76,8 +75,8 @@ class _JobReportPageState extends State<JobReportPage> {
), ),
), ),
// //
TopCount( /* TopCount(
state.dataCount, state.classData == null ? '' : state.classData.value.className, state.homeworkId.value), data, classData == null ? '' : classData!.className, widget.id),*/
// //
KgtZgtTable( KgtZgtTable(
studentCount: state.dataCount.studentCount!, studentCount: state.dataCount.studentCount!,

View File

@ -1,257 +0,0 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:functional_widget_annotation/functional_widget_annotation.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/global_widget/show_student_list.dart';
import 'package:making_school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_state.dart';
class TopCount extends StatelessWidget {
final CountData data;
final String className;
final String jobId;
const TopCount(this.data, this.className, this.jobId, {Key? key}) : super(key: key);
void showStudentListDialog({required BuildContext context, required String title, required List<Students> students}) {
showDialog(
context: context,
builder: (BuildContext context) {
return ShowStudentList(
title: title,
studentList: students,
homeworkId: jobId,
);
},
);
/*showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
contentPadding: EdgeInsets.all(20.r),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.7,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Text(
className + title,
style: TextStyle(fontSize: 15.sp, color: Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
),
),
SizedBox(
height: 5.r,
),
SizedBox(
height: 15.r,
),
arr.length > 0
? Expanded(
child: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
AnswerOkStudents item = arr[index];
return InkWell(
onTap: () {
*//*RouterManager.router.navigateTo(
context,
RouterManager.quickCheckPersonalPath + '?jobId=$jobId&studentId=${item.id}',
transition: getTransition(),
);*//*
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 15.r),
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
child: Text(
item.name,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
),
),
);
},
itemCount: arr.length,
),
)
: const MyEmptyWidget()
],
),
),
);
});*/
}
@override
Widget build(BuildContext context) {
double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3;
double rightWidth = (MediaQuery.of(context).size.width - 40.r) * 0.3 / 2;
return Container(
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6.r)),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
InkWell(
onTap: () {
showStudentListDialog(context: context, title: '未提交作业学生', students: data.noAnswerStudents!);
},
child: leftContainer(context, count: data.noAnswerCount!, name: '未提交', nameColor: Color(0xFFD92F2F), bgColor: Color(0xFFEEEEEE)),
),
InkWell(
onTap: () {
showStudentListDialog(context: context, title: '已提交作业学生', students: data.studentSubmitStudents!);
},
child: leftContainer(context, count: data.studentSubmitCount!, name: '已提交', nameColor: Color(0xFF4CC793), bgColor: Color(0xFFF5F5F5)),
),
InkWell(
onTap: () {
showStudentListDialog(context: context, title: '全对作业学生', students: data.allCorrectStudents!);
},
child: leftContainer(context, count: data.allCorrect!, name: '全对', nameColor: Color(0xFFFF9800), bgColor: Color(0xFFEEEEEE)),
),
Container(
height: 92.r,
width: rightWidth,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: InkWell(
onTap: () {
showStudentListDialog(context: context, title: '优等作业学生', students: data.levelOneStudents!);
},
child: rightContainer(
count: data.levelOneCount!,
bgColor: Color(0xFF56FFB8),
nameColor: Color(0xFF009254),
name: '',
),
)),
Expanded(
child: InkWell(
onTap: () {
showStudentListDialog(context: context, title: '中等作业学生', students: data.levelThreeStudents!);
},
child:
rightContainer(count: data.levelThreeCount!, bgColor: Color(0xFFD3FF93), nameColor: Color(0xFF3F6605), name: ''),
)),
],
),
),
Container(
height: 92.r,
width: rightWidth,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: InkWell(
onTap: () {
showStudentListDialog(context: context, title: '良等作业学生', students: data.levelTwoStudents!);
},
child:
rightContainer(count: data.levelTwoCount!, bgColor: Color(0xFFFFC38C), nameColor: Color(0xFFD36500), name: ''),
)),
Expanded(
child: InkWell(
onTap: () {
showStudentListDialog(context: context, title: '差等作业学生', students: data.levelFourStudents!);
},
child:
rightContainer(count: data.levelFourCount!, bgColor: Color(0xFFFF9D94), nameColor: Color(0xFFD12616), name: ''),
)),
],
),
)
],
),
],
),
);
}
}
@swidget
Widget leftContainer(context, {required int count, required String name, required Color nameColor, required Color bgColor}) {
double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3;
return Container(
width: leftWidth,
height: 92.r,
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 6.r),
color: bgColor,
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox(
height: 5.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
count.toString(),
style: TextStyle(fontSize: 18.sp, color: Color(0xFF595959), fontWeight: FontWeight.w600),
),
Text(
'',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF595959), fontWeight: FontWeight.w600),
),
],
),
SizedBox(
height: 20.r,
),
Text(
name,
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w500),
)
],
),
);
}
@swidget
Widget rightContainer({required int count, required Color bgColor, required Color nameColor, required String name}) {
return Container(
color: bgColor,
child: Column(
children: [
SizedBox(
height: 5.r,
),
Row(
crossAxisAlignment: CrossAxisAlignment.end,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
count.toString(),
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w600),
),
Text(
'',
style: TextStyle(fontSize: 8.sp, color: nameColor, fontWeight: FontWeight.w600),
),
],
),
SizedBox(
height: 5.r,
),
Text(
name,
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w500),
)
],
),
);
}

View File

@ -88,7 +88,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
height: 30.r, height: 30.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(4.r), borderRadius: BorderRadius.circular(4.r),
color: Color(0xFF4CC793), color: Color(0xFF6888FD),
), ),
child: Center( child: Center(
child: Text( child: Text(
@ -200,20 +200,19 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
height: 22.r, height: 22.r,
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(0xFF4CC793)), border: Border.all(width: 1.r, color: Color(0xFF6888FD)),
), ),
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text( Text(
'${item.count}', '${item.count}',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
), ),
Image.asset( Image.asset(
'assets/images/job_data_right_icon.png', 'assets/images/right_icon_blue.png',
width: 10.r, width: 8.r,
height: 10.r, height: 8.r,
), ),
], ],
), ),

View File

@ -3,7 +3,6 @@ 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/config/request_config.dart';
import 'package:percent_indicator/percent_indicator.dart'; import 'package:percent_indicator/percent_indicator.dart';
import 'package:making_school_asignment_app/common/job/knowledge_report_detail.dart'; import 'package:making_school_asignment_app/common/job/knowledge_report_detail.dart';
import 'package:making_school_asignment_app/common/utils/toast_utils.dart'; import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
@ -39,7 +38,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
content: Container( content: Container(
width: MediaQuery.of(context).size.width, width: MediaQuery.of(context).size.width,
// height: MediaQuery.of(context).size.height, // height: MediaQuery.of(context).size.height,
child: Image.network(RequestConfig.imgUrl + imgUrl), child: Image.network(imgUrl),
), ),
); );
}, },
@ -191,7 +190,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
children: [ children: [
quickText('正确率', color: Color(0xFF4CC793), size: 10.sp), quickText('正确率', color: Color(0xFF4CC793), size: 10.sp),
Image.asset( Image.asset(
'assets/images/job_data_right_icon.png', 'assets/images/icon_back_green.png',
width: 8.r, width: 8.r,
height: 8.r, height: 8.r,
) )

View File

@ -33,20 +33,7 @@ class CountData extends Object {
int? zgtCount = 0; int? zgtCount = 0;
int? studentCount = 0; int? studentCount = 0;
List<Students>? priorityStudents = []; List<Students>? priorityStudents = [];
List<Students>? noAnswerStudents = [];
List<Students>? studentSubmitStudents = [];
List<Students>? allCorrectStudents = [];
List<Students>? levelOneStudents = [];
List<Students>? levelTwoStudents = [];
List<Students>? levelThreeStudents = [];
List<Students>? levelFourStudents = [];
int? studentSubmitCount = 0; int? studentSubmitCount = 0;
int? noAnswerCount = 0;
int? allCorrect = 0;
int? levelOneCount = 0;
int? levelTwoCount = 0;
int? levelThreeCount = 0;
int? levelFourCount = 0;
CountData({ CountData({
this.kgtOkCount, this.kgtOkCount,
this.kgtDtlCount, this.kgtDtlCount,
@ -63,19 +50,5 @@ class CountData extends Object {
this.zgtCount, this.zgtCount,
this.priorityStudents, this.priorityStudents,
this.studentSubmitCount, this.studentSubmitCount,
this.noAnswerCount,
this.allCorrect,
this.noAnswerStudents,
this.studentSubmitStudents,
this.allCorrectStudents,
this.levelOneCount,
this.levelOneStudents,
this.levelTwoCount,
this.levelTwoStudents,
this.levelThreeCount,
this.levelThreeStudents,
this.levelFourCount,
this.levelFourStudents,
}); });
} }

View File

@ -40,7 +40,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
height: MediaQuery.of(context).size.height, height: MediaQuery.of(context).size.height,
decoration: const BoxDecoration( decoration: const BoxDecoration(
gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [ gradient: LinearGradient(begin: Alignment.topCenter, end: Alignment.bottomCenter, colors: [
Color(0xFF4CC793), Color(0xFF6889FD),
Color(0xFFF5F5F5), Color(0xFFF5F5F5),
], stops: [ ], stops: [
0.09, 0.09,

View File

@ -61,7 +61,7 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
), ),
Text( Text(
'${widget.kgtOkRate}%', '${widget.kgtOkRate}%',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF4CC793), fontWeight: FontWeight.w600), style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
), ),
], ],
), ),
@ -106,7 +106,7 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
), ),
Text( Text(
'${widget.zgtOkRate}%', '${widget.zgtOkRate}%',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600), style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600),
), ),
], ],
), ),
@ -116,11 +116,11 @@ class _KgtZgtTableState extends State<KgtZgtTable> {
SizedBox( SizedBox(
height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r), height: widget.zgReport.length > 10 ? 300.r : widget.zgReport.length * 40.r + (Utils.isPad() == true ? 40.r : 65.r),
child: ReportTable( child: ReportTable(
headList: const ['', '作答率', '作答人数', '正确率', '查看原题', '优先批阅概况','作答效率'], headList: const ['', '作答率', '作答人数', '正确率', '查看原题', '优先批阅概况'],
bodyList: widget.zgReport, bodyList: widget.zgReport,
fixedCols: 1, fixedCols: 1,
fixedRows: 1, fixedRows: 1,
isZG: true, isKG: true,
jobId: widget.homeworkId, jobId: widget.homeworkId,
studentCount: widget.studentCount, studentCount: widget.studentCount,
), ),

View File

@ -58,7 +58,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Text(item.studentName!, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793), overflow: TextOverflow.ellipsis)), Text(item.studentName!, style: TextStyle(fontSize: 10.sp, color: const Color(0xFF6888FD), overflow: TextOverflow.ellipsis)),
SizedBox( SizedBox(
width: 5.r, width: 5.r,
), ),
@ -168,7 +168,7 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
DataCell(Center( DataCell(Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text('${item.zgtUnrated}', style: TextStyle(fontSize: 10.sp, color: const Color(0xFFE8E8E8))), child: Text('${item.zgtUnrated}', style: TextStyle(fontSize: 10.sp, color: const Color(0xFF6888FD))),
), ),
)), )),
], ],

View File

@ -1,7 +1,5 @@
import 'package:data_table_2/data_table_2.dart'; import 'package:data_table_2/data_table_2.dart';
import 'package:fl_chart/fl_chart.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_echart/flutter_echart.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/annotated_class.dart'; import 'package:making_school_asignment_app/common/job/annotated_class.dart';
@ -17,7 +15,7 @@ class ReportTable extends StatefulWidget {
final List bodyList; final List bodyList;
final int? fixedRows; final int? fixedRows;
final int? fixedCols; final int? fixedCols;
final bool? isZG; final bool? isKG;
final String jobId; final String jobId;
final int studentCount; final int studentCount;
@ -29,7 +27,7 @@ class ReportTable extends StatefulWidget {
required this.studentCount, required this.studentCount,
this.fixedCols = 0, this.fixedCols = 0,
this.fixedRows = 0, this.fixedRows = 0,
this.isZG = false, this.isKG = false,
}) : super(key: key); }) : super(key: key);
@override @override
@ -40,128 +38,15 @@ class _ReportTableState extends State<ReportTable> {
final ScrollController _controller = ScrollController(); final ScrollController _controller = ScrollController();
int? _sortColumnIndex; int? _sortColumnIndex;
final bool _sortAscending = true; final bool _sortAscending = true;
List colorMap = const [
Color.fromRGBO(0, 179, 134, 1),
Color.fromRGBO(1, 193, 254, 1),
Color.fromRGBO(239, 135, 20, 1),
Color.fromRGBO(219, 0, 0, 1),
Color.fromRGBO(211, 211, 211, 1),
];
void showAnswerEfficiency(overallTitles) { void showPeopleListDialog({required BuildContext context, required String title, required String questionNo, required List arr, List? dcList}) {
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
contentPadding: EdgeInsets.all(20.r),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.5,
height: MediaQuery.of(context).size.height * 0.4,
child: Column(
children: [
Text(
'作答效率',
style: TextStyle(
fontSize: 15.sp,
color: const Color(0xFF3C3C3C),
fontWeight: FontWeight.w500),
),
Padding(
padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 10.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
mapIcon(const Color(0xFF4CC793)),
SizedBox(width: 5.r,),
mapTxt(''),
const Spacer(),
mapIcon(const Color(0xFF01C1FE)),
SizedBox(width: 5.r,),
mapTxt(''),
const Spacer(),
mapIcon(const Color(0xFFEF8714)),
SizedBox(width: 5.r,),
mapTxt(''),
const Spacer(),
mapIcon(const Color(0xFFDB0000)),
SizedBox(width: 5.r,),
mapTxt(''),
],
),
),
Expanded(
child:
PieChart(
PieChartData(
borderData: FlBorderData(show: true),
sectionsSpace: 0,
centerSpaceRadius: 0,
sections: List.generate(overallTitles.length,(index) {
var e = overallTitles[index];
return PieChartSectionData(
color: colorMap[index],
value: e.count / widget.studentCount * 100,
radius: 110,
// title: e.title + (Utils.doubleToStringAsFixed(e.count / widget.studentCount * 100) + '%'),
title: e.title + e.count.toString(),
titleStyle: TextStyle(fontSize: 12.sp, color: Color(0xFFFFFFFF)),
);
}),
),
),
/*PieChatWidget(
dataList: List.generate(overallTitles.length, (index) {
var e = overallTitles[index];
return EChartPieBean(
title: e.title,
number: e.count,
color: colorMap[index]);
}),
//
isBackground: false,
//线
isLineText: true,
//
bgColor: Colors.white,
//
isFrontgText: false,
//
initSelect: 1,
//
openType: OpenType.ANI,
//
loopType: LoopType.DOWN_LOOP,
//
clickCallBack: (int value) {
print("当前点击显示 $value");
},
),*/
),
],
),
),
);
});
}
void showPeopleListDialog(
{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,
@ -171,10 +56,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(
@ -183,19 +65,16 @@ class _ReportTableState extends State<ReportTable> {
Row( Row(
children: [ children: [
Text( Text(
widget.isZG == true ? '主观题' : '客观题', widget.isKG == true ? '主观题' : '客观题',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: const Color(0xFF436CFF)),
fontSize: 14.sp, color: const Color(0xFF4CC793)),
), ),
Text( Text(
'', '',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: const Color(0xFF436CFF)),
fontSize: 14.sp, color: const Color(0xFF4CC793)),
), ),
Text( Text(
'$questionNo题', '$questionNo题',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: Color(0xFF436CFF)),
fontSize: 14.sp, color: Color(0xFF4CC793)),
), ),
], ],
), ),
@ -210,27 +89,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)),
))), ))),
], ],
) )
@ -238,8 +111,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(
@ -253,60 +125,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)),
)))), )))),
], ],
), ),
@ -327,16 +180,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)),
), ),
), ),
); );
@ -354,65 +202,47 @@ 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});
arguments: {'studentId': id, 'homeworkId': widget.jobId});
} }
} }
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':
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]) {
@ -425,28 +255,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(
@ -454,9 +274,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: const Color(0xFF4CC793))),
style: TextStyle(
fontSize: 10.sp, color: const Color(0xFF4CC793))),
Image.asset( Image.asset(
'assets/images/green_right_icon.png', 'assets/images/green_right_icon.png',
width: 12.r, width: 12.r,
@ -470,43 +288,32 @@ 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.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(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: widget.isZG == true child: widget.isKG == true
? InkWell( ? InkWell(
onTap: () { onTap: () {
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:
style: TextStyle( Text('原题', style: TextStyle(fontSize: 10.sp, color: widget.isKG == true ? const Color(0xFFFF8A00) : const Color(0xFF4CC793))),
fontSize: 10.sp,
color: widget.isZG == true
? const Color(0xFFFF8A00)
: const Color(0xFF4CC793))),
) )
: Text(item.answer, : Text(item.answer,
style: TextStyle( style: TextStyle(fontSize: 10.sp, color: widget.isKG == true ? const Color(0xFFFF8A00) : const Color(0xFF4CC793))),
fontSize: 10.sp,
color: widget.isZG == true
? const Color(0xFFFF8A00)
: const Color(0xFF4CC793))),
), ),
)), )),
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(
@ -514,9 +321,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: const Color(0xFF6888FD))),
style: TextStyle(
fontSize: 10.sp, color: const Color(0xFF4CC793))),
Image.asset( Image.asset(
'assets/images/job_data_right_icon.png', 'assets/images/job_data_right_icon.png',
width: 10.r, width: 10.r,
@ -527,30 +332,6 @@ class _ReportTableState extends State<ReportTable> {
), ),
), ),
)), )),
if (widget.isZG == true)
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: widget.isZG == true
? InkWell(
onTap: () {
showAnswerEfficiency(item.overallTitles);
},
child: Text('查看',
style: TextStyle(
fontSize: 10.sp,
color: widget.isZG == true
? const Color(0xFFFF8A00)
: const Color(0xFF4CC793))),
)
: Text(item.answer,
style: TextStyle(
fontSize: 10.sp,
color: widget.isZG == true
? const Color(0xFFFF8A00)
: const Color(0xFF4CC793))),
),
)),
], ],
); );
} }
@ -566,14 +347,10 @@ 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(
width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) =>
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)), headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6), fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400], fixedCornerColor: Colors.grey[400],
@ -591,8 +368,7 @@ class _ReportTableState extends State<ReportTable> {
var item = widget.headList[index]; var item = widget.headList[index];
return DataColumn2( return DataColumn2(
label: Center( label: Center(
child: Text(item, child: Text(item, style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
), ),
// size: ColumnSize.S, // size: ColumnSize.S,
fixedWidth: index == 0 fixedWidth: index == 0
@ -600,26 +376,10 @@ 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, Color(0xFFF5F5F5))));
(index) => _getRow(index, Color(0xFFF5F5F5))));
} }
} }
Widget mapIcon(Color bgColor){
return Container(
width: 12.r,
height: 12.r,
decoration: BoxDecoration(
color: bgColor,
borderRadius: BorderRadius.all(Radius.circular(6.r)),
),
);
}
Widget mapTxt(String title){
return Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF525252),fontWeight: FontWeight.w400),);
}

View File

@ -95,7 +95,7 @@ class _ReadOverPageState extends State<ReadOverPage> {
), ),
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: const Color(0xFF4CC793), color: const Color.fromRGBO(104, 136, 253, 1),
), ),
// labelColor: const Color.fromRGBO(45, 56, 76, 1), // labelColor: const Color.fromRGBO(45, 56, 76, 1),
indicator: const UnderlineTabIndicator( indicator: const UnderlineTabIndicator(

View File

@ -298,7 +298,7 @@ Widget $reviewedItem({
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w), padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: type == 1 ? const Color(0xFF4CC793) : const Color.fromRGBO(255, 175, 56, 1), color: type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -381,8 +381,7 @@ Widget $reviewedItem({
if (!jobTaskItem.isFixed!) if (!jobTaskItem.isFixed!)
Expanded( Expanded(
flex: 1, flex: 1,
child: GestureDetector( child: InkWell(
behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
if (!jobTaskItem.isFixed!) { if (!jobTaskItem.isFixed!) {
EasyLoading.show(status: 'loading...'); EasyLoading.show(status: 'loading...');
@ -400,8 +399,7 @@ Widget $reviewedItem({
), ),
Expanded( Expanded(
flex: 1, flex: 1,
child: GestureDetector( child: InkWell(
behavior: HitTestBehavior.opaque,
onTap: () { onTap: () {
Get.toNamed(Routes.jobReportPage, Get.toNamed(Routes.jobReportPage,
arguments: {'title': jobTaskItem.name, 'homeworkId': jobTaskItem.id, 'grade': jobTaskItem.grade}); arguments: {'title': jobTaskItem.name, 'homeworkId': jobTaskItem.id, 'grade': jobTaskItem.grade});

View File

@ -64,7 +64,7 @@ class _TaskListItemState extends State<TaskListItem> {
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFF4CC793), color: const Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -73,7 +73,7 @@ class _TaskListItemState extends State<TaskListItem> {
), ),
), ),
margin: EdgeInsets.only(right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText( widget.jobTaskItem.assessType == 0?'作业':'考试', color: Colors.white, size: 10.sp), child: quickText('作业', color: Colors.white, size: 10.sp),
), ),
Expanded( Expanded(
child: quickText( child: quickText(
@ -199,7 +199,7 @@ class _TaskListItemState extends State<TaskListItem> {
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: widget.type == 1 ? const Color(0xFF4CC793) : const Color.fromRGBO(255, 175, 56, 1), color: widget.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -208,7 +208,7 @@ class _TaskListItemState extends State<TaskListItem> {
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(top:3.h,right: 4.w),
child: quickText(widget.jobTaskItem.assessType == 0?'作业':'考试', color: Colors.white, size: 10.sp), child: quickText(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
), ),
Expanded( Expanded(
child: quickText( child: quickText(

View File

@ -133,7 +133,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
'${state.studentInfo.value.kgtCorrectRate}%', '${state.studentInfo.value.kgtCorrectRate}%',
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
); );
}), }),
@ -200,7 +200,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
'${state.studentInfo.value.zgtCorrectRate}%', '${state.studentInfo.value.zgtCorrectRate}%',
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
); );
}), }),

View File

@ -50,7 +50,7 @@ class _StudentKgTableState extends State<StudentKgTable> {
child: Center( child: Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))), child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
), ),
), ),
), ),

View File

@ -47,7 +47,7 @@ class _StudentZgTableState extends State<StudentZgTable> {
child: Center( child: Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))), child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
), ),
), ),
)), )),

View File

@ -76,7 +76,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: state.isJob.value color: state.isJob.value
? Color(0xFF4CC793) ? Color(0xFF7491FD)
: Color(0xFF505E6E)), : Color(0xFF505E6E)),
)); ));
}), }),
@ -104,7 +104,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
style: TextStyle( style: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: !state.isJob.value color: !state.isJob.value
? Color(0xFF4CC793) ? Color(0xFF7491FD)
: Color(0xFF505E6E)), : Color(0xFF505E6E)),
); );
})), })),
@ -128,24 +128,24 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
'总览:', '总览:',
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4CC793), color: Color(0xFF7491FD),
fontWeight: FontWeight.w600), fontWeight: FontWeight.w600),
), ),
ProgressBar( ProgressBar(
title: '客观题正确率:', title: '客观题正确率:',
color: Color.fromRGBO(76, 199, 147, 0.36), color: Color(0xFFB8C7FF),
percent: state.studentData.value.kgtCorrectRate / 100, percent: state.studentData.value.kgtCorrectRate / 100,
padingEdg: EdgeInsets.zero, padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)), marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar( ProgressBar(
title: '主观题正确率:', title: '主观题正确率:',
color: Color.fromRGBO(76, 199, 147, 0.36), color: Color(0xFFB8C7FF),
percent: state.studentData.value.zgtCorrectRate / 100, percent: state.studentData.value.zgtCorrectRate / 100,
padingEdg: EdgeInsets.zero, padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)), marginEdg: EdgeInsets.only(top: 8.h)),
ProgressBar( ProgressBar(
title: '总正确率:', title: '总正确率:',
color: Color.fromRGBO(76, 199, 147, 0.36), color: Color(0xFFB8C7FF),
percent: state.studentData.value.correctRate / 100, percent: state.studentData.value.correctRate / 100,
padingEdg: EdgeInsets.zero, padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)), marginEdg: EdgeInsets.only(top: 8.h)),

View File

@ -33,10 +33,10 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: const Color(0xFF4CC793), color: const Color.fromRGBO(116, 145, 253, 1),
), ),
isScrollable: true, isScrollable: true,
labelColor: const Color(0xFF4CC793), labelColor: const Color(0xFF7491FD),
unselectedLabelColor: const Color(0xFF505E6E), unselectedLabelColor: const Color(0xFF505E6E),
padding: EdgeInsets.symmetric(horizontal: 14.r), padding: EdgeInsets.symmetric(horizontal: 14.r),
// indicatorSize: TabBarIndicatorSize.label, // // indicatorSize: TabBarIndicatorSize.label, //
@ -44,7 +44,7 @@ class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
indicator: UnderlineTabIndicator( indicator: UnderlineTabIndicator(
borderSide: BorderSide( borderSide: BorderSide(
width: 2.r, width: 2.r,
color:const Color(0xFF4CC793) color:const Color(0xFF7491FD)
), ),
), ),
tabs: <Widget>[ tabs: <Widget>[

View File

@ -159,7 +159,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w), padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: state.type == 1 ? const Color(0xFF4CC793) : const Color.fromRGBO(255, 175, 56, 1), color: state.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -221,7 +221,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
lineHeight: 8.h, lineHeight: 8.h,
animationDuration: 2500, animationDuration: 2500,
percent: item.annotateRate == null ? 0 : item.annotateRate! / 100, percent: item.annotateRate == null ? 0 : item.annotateRate! / 100,
progressColor: const Color(0xFF4CC793), progressColor: const Color(0xFF6888FD),
backgroundColor: const Color(0xFFE8E8E8), backgroundColor: const Color(0xFFE8E8E8),
barRadius: Radius.circular(10.r), barRadius: Radius.circular(10.r),
), ),

View File

@ -45,7 +45,7 @@ class StudentGroupList extends StatelessWidget {
padding: EdgeInsets.only(right: 8.r), padding: EdgeInsets.only(right: 8.r),
child: Text( child: Text(
'${EnumUtils.formatGrade(item.grade)}${item.className}', '${EnumUtils.formatGrade(item.grade)}${item.className}',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)), style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
), ),
), ),
const Spacer(), const Spacer(),
@ -68,7 +68,7 @@ class StudentGroupList extends StatelessWidget {
width: 55.r, width: 55.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)), borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
), ),
child: Center( child: Center(
child: Text( child: Text(
@ -105,7 +105,7 @@ class StudentGroupList extends StatelessWidget {
padding: EdgeInsets.only(right: 8.r), padding: EdgeInsets.only(right: 8.r),
child: Text( child: Text(
'${EnumUtils.formatGrade(item.grade)}${item.className}', '${EnumUtils.formatGrade(item.grade)}${item.className}',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF4CC793)), style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD)),
), ),
), ),
const Spacer(), const Spacer(),
@ -128,7 +128,7 @@ class StudentGroupList extends StatelessWidget {
width: 55.r, width: 55.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)), borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF4CC793), color: const Color(0xFF6888FD),
), ),
child: Center( child: Center(
child: Text( child: Text(

View File

@ -83,7 +83,7 @@ class _LoginPageState extends State<LoginPage> {
padding: EdgeInsets.symmetric(horizontal: 20.r), padding: EdgeInsets.symmetric(horizontal: 20.r),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)), border: Border.all(width: 1.w, color: const Color(0xFFAECBFF)),
borderRadius: BorderRadius.all(Radius.circular(17.w)), borderRadius: BorderRadius.all(Radius.circular(17.w)),
), ),
child: Center( child: Center(
@ -132,7 +132,7 @@ class _LoginPageState extends State<LoginPage> {
padding: EdgeInsets.symmetric(horizontal: 20.r), padding: EdgeInsets.symmetric(horizontal: 20.r),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.transparent, color: Colors.transparent,
border: Border.all(width: 1.w, color: const Color(0xFFFFFFFF)), border: Border.all(width: 1.w, color: const Color(0xFFAECBFF)),
borderRadius: BorderRadius.all(Radius.circular(17.w)), borderRadius: BorderRadius.all(Radius.circular(17.w)),
), ),
child: TextField( child: TextField(
@ -228,10 +228,10 @@ class _LoginPageState extends State<LoginPage> {
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 10.h), margin: EdgeInsets.symmetric(vertical: 10.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: state.canLogin.value ? const Color(0xFF4CC793) : const Color(0xFFdddddd), color: state.canLogin.value ? const Color.fromRGBO(107, 104, 252, 1) : const Color(0xFFdddddd),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: const Color.fromRGBO(76, 199, 147, 0.5), color: const Color.fromRGBO(46, 91, 255, 0.5),
offset: Offset(6.w, 10.h), //y轴偏移量 offset: Offset(6.w, 10.h), //y轴偏移量
blurRadius: 14, // blurRadius: 14, //
spreadRadius: 0.5, // spreadRadius: 0.5, //

View File

@ -79,7 +79,7 @@ class _WorkPageState extends State<WorkPage> with AutomaticKeepAliveClientMixin
), ),
labelStyle: TextStyle( labelStyle: TextStyle(
fontSize: 14.sp, fontSize: 14.sp,
color: const Color(0xFF4CC793), color: const Color.fromRGBO(104, 136, 253, 1),
), ),
// labelColor: const Color.fromRGBO(45, 56, 76, 1), // labelColor: const Color.fromRGBO(45, 56, 76, 1),
indicator: const BoxDecoration(), indicator: const BoxDecoration(),

View File

@ -85,9 +85,6 @@ dependencies:
event_bus: ^2.0.0 event_bus: ^2.0.0
path_provider: ^2.1.3 path_provider: ^2.1.3
uuid: ^3.0.7 uuid: ^3.0.7
flutter_echarts: ^2.4.0
# 饼图
flutter_echart: ^2.0.0
dev_dependencies: dev_dependencies:
flutter_test: flutter_test: