Compare commits
No commits in common. "aef50dd53beafa06904d2d734468c7ff57285cbf" and "4cf916e38741154b9dc2446d51734835c1fa730b" have entirely different histories.
aef50dd53b
...
4cf916e387
|
|
@ -1,16 +1,11 @@
|
||||||
import 'package:dio/dio.dart' hide Headers;
|
import 'package:dio/dio.dart' hide Headers;
|
||||||
import 'package:retrofit/retrofit.dart';
|
import 'package:retrofit/retrofit.dart';
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/class_item.dart';
|
import 'package:school_asignment_app/common/job/class_item.dart';
|
||||||
import 'package:school_asignment_app/common/job/common/app_version_model.dart';
|
import 'package:school_asignment_app/common/job/common/app_version_model.dart';
|
||||||
import 'package:school_asignment_app/common/job/common/base_app_version.dart';
|
import 'package:school_asignment_app/common/job/common/base_app_version.dart';
|
||||||
import 'package:school_asignment_app/common/job/common/base_page_data.dart';
|
import 'package:school_asignment_app/common/job/common/base_page_data.dart';
|
||||||
import 'package:school_asignment_app/common/job/enum_subject.dart';
|
import 'package:school_asignment_app/common/job/enum_subject.dart';
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history_params.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_item.dart';
|
import 'package:school_asignment_app/common/job/student_item.dart';
|
||||||
import 'package:school_asignment_app/common/job/student_personal_info.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/user_info_detail.dart';
|
import 'package:school_asignment_app/common/job/user_info_detail.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student.dart';
|
import 'package:school_asignment_app/common/job/work_student.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student_params.dart';
|
import 'package:school_asignment_app/common/job/work_student_params.dart';
|
||||||
|
|
@ -40,42 +35,13 @@ abstract class RetrofitClient {
|
||||||
|
|
||||||
//获取科目,年级
|
//获取科目,年级
|
||||||
@GET("/api/app/Common/GetEnumInfos")
|
@GET("/api/app/Common/GetEnumInfos")
|
||||||
Future<Map<String, List<EnumSubject>>> getEnumSubjectList(@Query('enumNames') List enumNames);
|
Future<Map<String, List<EnumSubject>>> getEnumSubjectList(@Query('enumNames') String enumNames);
|
||||||
|
|
||||||
//学生班级
|
//学生班级
|
||||||
@GET("/api/rbac/SchoolUser/GetTeacherClassSubject")
|
@GET("/api/rbac/Class/GetTeacherClasses")
|
||||||
Future<List<ClassItem>> getStudentClass();
|
Future<List<ClassItem>> getStudentClass();
|
||||||
|
|
||||||
//获取优先批阅状态学生列表
|
//班级学生列表
|
||||||
@GET("/api/rbac/Student/GetPriorityAnnotateStudents")
|
@GET("/api/rbac/Class/GetClassStudents")
|
||||||
Future<List<StudentItem>> getStudentList(@Query('ClassId') String classId,@Query('Subject') int subject );
|
Future<StudentItem> getStudentList(@Query('ClassId') String classId);
|
||||||
|
|
||||||
//待批阅列表
|
|
||||||
@GET("/api/hms/Annotate/GetUnAnnotateList")
|
|
||||||
Future<WorkStudent> getUnAnnotateList(@Queries() WorkStudentParams params);
|
|
||||||
|
|
||||||
//已批阅列表
|
|
||||||
@GET("/api/hms/Annotate/GetAnnotatedList")
|
|
||||||
Future<WorkStudent> getAnnotatedList(@Queries() WorkStudentParams params);
|
|
||||||
|
|
||||||
//获取批阅班级
|
|
||||||
@GET("/api/hms/Annotate/Get")
|
|
||||||
Future<List<AnnotatedClass>> getAnnotatedClassList(@Query('homeworkId') String homeworkId);
|
|
||||||
|
|
||||||
//作业明细
|
|
||||||
@GET("/api/hms/HmsReport/GetHomeworkDtls")
|
|
||||||
Future<HomeworkDetails> getHomeworkDetails(@Query('homeworkId') String homeworkId,@Query('classId') String classId);
|
|
||||||
|
|
||||||
//学生历史作业
|
|
||||||
@GET("/api/hms/HmsReport/GetStudentHistory")
|
|
||||||
Future<StudentHistory> getStudentHistory(@Queries() StudentHistoryParams params);
|
|
||||||
|
|
||||||
//修改学生优先批阅状态
|
|
||||||
@POST("/api/rbac/Student/PriorityAnnotateStudent")
|
|
||||||
Future getAnnotateStudent(@Field() String classId, @Field() int studentId,@Field() bool priorityAnnotate,@Field() int subject);
|
|
||||||
|
|
||||||
//学生作业信息
|
|
||||||
@GET("/api/hms/HmsReport/GetStudentHomework")
|
|
||||||
Future<StudentPersonalInfo> getStudentHomework(@Query('HomeworkId') String homeworkId,@Query('StudentId') int studentId);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ import 'package:school_asignment_app/common/job/common/base_page.dart';
|
||||||
class RequestConfig {
|
class RequestConfig {
|
||||||
static const _devBaseUrl = "http://192.168.2.119:1091"; // 开发
|
static const _devBaseUrl = "http://192.168.2.119:1091"; // 开发
|
||||||
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; // 生产
|
static const _proBaseUrl = "https://dpc-teacher-api.23544.com"; // 生产
|
||||||
static const imgUrl = 'https://dpcjob.oss-cn-beijing.aliyuncs.com/';
|
|
||||||
|
|
||||||
static RequestConfig? _instance;
|
static RequestConfig? _instance;
|
||||||
String baseUrl;
|
String baseUrl;
|
||||||
|
|
|
||||||
|
|
@ -1,149 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'annotated_class.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class AnnotatedClass extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'schoolName')
|
|
||||||
String schoolName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'grade')
|
|
||||||
int grade;
|
|
||||||
|
|
||||||
@JsonKey(name: 'classId')
|
|
||||||
String classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'className')
|
|
||||||
String className;
|
|
||||||
|
|
||||||
@JsonKey(name: 'finishTime')
|
|
||||||
String? finishTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionCount')
|
|
||||||
int questionCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerCount')
|
|
||||||
int answerCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerRate')
|
|
||||||
int answerRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'unAnnotateCount')
|
|
||||||
int unAnnotateCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'annotateRate')
|
|
||||||
int annotateRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'students')
|
|
||||||
List<AnnotatedStudents> students;
|
|
||||||
|
|
||||||
@JsonKey(name: 'homeworkFavs')
|
|
||||||
List<HomeworkFavs> homeworkFavs;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtCorrectRate')
|
|
||||||
int kgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtCorrectRate')
|
|
||||||
int zgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'commitStudentCount')
|
|
||||||
int? commitStudentCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'noCommitStudentCount')
|
|
||||||
int? noCommitStudentCount;
|
|
||||||
|
|
||||||
AnnotatedClass(this.schoolName,this.grade,this.classId,this.className,this.finishTime,this.questionCount,this.answerCount,this.answerRate,this.unAnnotateCount,this.annotateRate,this.students,this.homeworkFavs,this.kgtCorrectRate,this.zgtCorrectRate,this.correctRate,this.commitStudentCount,this.noCommitStudentCount);
|
|
||||||
|
|
||||||
factory AnnotatedClass.fromJson(Map<String, dynamic> srcJson) => _$AnnotatedClassFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AnnotatedClassToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class AnnotatedStudents extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String? id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isDeleted')
|
|
||||||
bool isDeleted;
|
|
||||||
|
|
||||||
@JsonKey(name: 'homeworkId')
|
|
||||||
String? homeworkId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'classId')
|
|
||||||
String classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
AnnotatedStudents(this.id,this.isDeleted,this.homeworkId,this.classId,this.studentId,this.studentName,this.state,);
|
|
||||||
|
|
||||||
factory AnnotatedStudents.fromJson(Map<String, dynamic> srcJson) => _$AnnotatedStudentsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$AnnotatedStudentsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class HomeworkFavs extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'homeworkId')
|
|
||||||
String homeworkId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'homeworkName')
|
|
||||||
String homeworkName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'grade')
|
|
||||||
int grade;
|
|
||||||
|
|
||||||
@JsonKey(name: 'subject')
|
|
||||||
int subject;
|
|
||||||
|
|
||||||
@JsonKey(name: 'classId')
|
|
||||||
String classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'className')
|
|
||||||
String className;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
String templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'subjectiveAnswer')
|
|
||||||
String subjectiveAnswer;
|
|
||||||
|
|
||||||
HomeworkFavs(this.id,this.homeworkId,this.homeworkName,this.grade,this.subject,this.classId,this.className,this.studentId,this.studentName,this.templateId,this.questionNo,this.subjectiveAnswer,);
|
|
||||||
|
|
||||||
factory HomeworkFavs.fromJson(Map<String, dynamic> srcJson) => _$HomeworkFavsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$HomeworkFavsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -18,13 +18,10 @@ class ClassItem extends Object {
|
||||||
@JsonKey(name: 'className')
|
@JsonKey(name: 'className')
|
||||||
String className;
|
String className;
|
||||||
|
|
||||||
@JsonKey(name: 'classId')
|
|
||||||
String classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'subject')
|
@JsonKey(name: 'subject')
|
||||||
int? subject;
|
int? subject;
|
||||||
|
|
||||||
ClassItem(this.id,this.schoolName,this.grade,this.className,this.subject,this.classId);
|
ClassItem(this.id,this.schoolName,this.grade,this.className,this.subject,);
|
||||||
|
|
||||||
factory ClassItem.fromJson(Map<String, dynamic> srcJson) => _$ClassItemFromJson(srcJson);
|
factory ClassItem.fromJson(Map<String, dynamic> srcJson) => _$ClassItemFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,240 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'homework_details.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class HomeworkDetails extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'questions')
|
|
||||||
List<Questions> questions;
|
|
||||||
|
|
||||||
@JsonKey(name: 'knows')
|
|
||||||
List<Knows> knows;
|
|
||||||
|
|
||||||
@JsonKey(name: 'students')
|
|
||||||
List<Students> students;
|
|
||||||
|
|
||||||
@JsonKey(name: 'dtls')
|
|
||||||
List<Dtls> dtls;
|
|
||||||
|
|
||||||
HomeworkDetails(this.questions,this.knows,this.students,this.dtls);
|
|
||||||
|
|
||||||
factory HomeworkDetails.fromJson(Map<String, dynamic> srcJson) => _$HomeworkDetailsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$HomeworkDetailsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Questions extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
int templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionType')
|
|
||||||
int questionType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answer')
|
|
||||||
String? answer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'score')
|
|
||||||
int? score;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionPicture')
|
|
||||||
String? questionPicture;
|
|
||||||
|
|
||||||
@JsonKey(name: 'subjectivePicture')
|
|
||||||
String? subjectivePicture;
|
|
||||||
|
|
||||||
@JsonKey(name: 'knows')
|
|
||||||
List<Knows> knows;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerCount')
|
|
||||||
int? answerCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerRate')
|
|
||||||
double? answerRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'okRate')
|
|
||||||
double? okRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'priorityInfo')
|
|
||||||
List<Dtls>? priorityInfo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'noAnswerStudents')
|
|
||||||
List<Dtls>? noAnswerStudents;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerOkStudents')
|
|
||||||
List<Dtls>? answerOkStudents;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answerNgStudents')
|
|
||||||
List<Dtls>? answerNgStudents;
|
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$QuestionsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Knows extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'knowledgeId')
|
|
||||||
int knowledgeId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'knowledgeName')
|
|
||||||
String knowledgeName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'okCount')
|
|
||||||
int? okCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'ttlCount')
|
|
||||||
int? ttlCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'okRate')
|
|
||||||
double? okRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'queDtls')
|
|
||||||
List<Dtls>? queDtls;
|
|
||||||
|
|
||||||
Knows(this.knowledgeId,this.knowledgeName,this.okCount,this.ttlCount,this.okRate,this.queDtls);
|
|
||||||
|
|
||||||
factory Knows.fromJson(Map<String, dynamic> srcJson) => _$KnowsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KnowsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Students extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
@JsonKey(name: 'priorityAnnotate')
|
|
||||||
bool priorityAnnotate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtStu')
|
|
||||||
List<Dtls>? kgtStu;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtOkCount')
|
|
||||||
int? kgtOkCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtErrorCount')
|
|
||||||
int? kgtErrorCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtAnswerCount')
|
|
||||||
int? kgtAnswerCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtStu')
|
|
||||||
List<Dtls>? zgtStu;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtOkCount')
|
|
||||||
int? zgtOkCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtErrorCount')
|
|
||||||
int? zgtErrorCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtAnswerCount')
|
|
||||||
int? zgtAnswerCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtUnrated')
|
|
||||||
int? zgtUnrated;
|
|
||||||
|
|
||||||
@JsonKey(name: 'allOk')
|
|
||||||
int? allOk;
|
|
||||||
|
|
||||||
@JsonKey(name: 'allNotDone')
|
|
||||||
bool? allNotDone;
|
|
||||||
|
|
||||||
@JsonKey(name: 'queDtls')
|
|
||||||
List<Dtls>? queDtls;
|
|
||||||
|
|
||||||
@JsonKey(name: 'okRate')
|
|
||||||
double? okRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'noAnswerCount')
|
|
||||||
int? noAnswerCount;
|
|
||||||
|
|
||||||
@JsonKey(name: '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);
|
|
||||||
|
|
||||||
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Dtls extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'classId')
|
|
||||||
String? classId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String? studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
int? templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionType')
|
|
||||||
int questionType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentAnswer')
|
|
||||||
String? studentAnswer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
@JsonKey(name: 'useTime')
|
|
||||||
int useTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'annotatePicture')
|
|
||||||
String? annotatePicture;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answer')
|
|
||||||
String? answer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionPicture')
|
|
||||||
String? questionPicture;
|
|
||||||
|
|
||||||
Dtls(this.id,this.classId,this.studentId,this.templateId,this.questionNo,this.questionType,this.studentAnswer,this.state,this.useTime,this.annotatePicture,this.studentName,this.answer,this.questionPicture);
|
|
||||||
|
|
||||||
factory Dtls.fromJson(Map<String, dynamic> srcJson) => _$DtlsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$DtlsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'student_history.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class StudentHistory extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtCorrectRate')
|
|
||||||
int kgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtCorrectRate')
|
|
||||||
int zgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'items')
|
|
||||||
Items items;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
StudentHistory(this.kgtCorrectRate,this.zgtCorrectRate,this.items,this.correctRate);
|
|
||||||
|
|
||||||
factory StudentHistory.fromJson(Map<String, dynamic> srcJson) => _$StudentHistoryFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentHistoryToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Items extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'items')
|
|
||||||
List<StudentItems> items;
|
|
||||||
|
|
||||||
@JsonKey(name: 'totalCount')
|
|
||||||
int totalCount;
|
|
||||||
|
|
||||||
Items(this.items,this.totalCount,);
|
|
||||||
|
|
||||||
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ItemsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class StudentItems extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'assessType')
|
|
||||||
int assessType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'name')
|
|
||||||
String name;
|
|
||||||
|
|
||||||
@JsonKey(name: 'grade')
|
|
||||||
int grade;
|
|
||||||
|
|
||||||
@JsonKey(name: 'subject')
|
|
||||||
int subject;
|
|
||||||
|
|
||||||
@JsonKey(name: 'publishTime')
|
|
||||||
String publishTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtCorrectRate')
|
|
||||||
int kgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtList')
|
|
||||||
List<KgtList> kgtList;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtCorrectRate')
|
|
||||||
int zgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtList')
|
|
||||||
List<ZgtList> zgtList;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
//全部未做
|
|
||||||
@JsonKey(name: 'allNotDone')
|
|
||||||
bool allNotDone;
|
|
||||||
|
|
||||||
StudentItems(this.id,this.assessType,this.name,this.grade,this.subject,this.publishTime,this.state,this.kgtCorrectRate,this.kgtList,this.zgtCorrectRate,this.zgtList,this.correctRate,
|
|
||||||
[this.allNotDone = false]);
|
|
||||||
|
|
||||||
factory StudentItems.fromJson(Map<String, dynamic> srcJson) => _$StudentItemsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentItemsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class KgtList extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionType')
|
|
||||||
int questionType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
@JsonKey(name: 'useTime')
|
|
||||||
int? useTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'picture')
|
|
||||||
String? picture;
|
|
||||||
|
|
||||||
KgtList(this.id,this.questionNo,this.questionType,this.state,this.useTime,this.picture,);
|
|
||||||
|
|
||||||
factory KgtList.fromJson(Map<String, dynamic> srcJson) => _$KgtListFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KgtListToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ZgtList extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
String id;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionType')
|
|
||||||
int questionType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
|
||||||
int state;
|
|
||||||
|
|
||||||
@JsonKey(name: 'useTime')
|
|
||||||
int? useTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'picture')
|
|
||||||
String? picture;
|
|
||||||
|
|
||||||
ZgtList(this.id,this.questionNo,this.questionType,this.state,this.useTime,this.picture,);
|
|
||||||
|
|
||||||
factory ZgtList.fromJson(Map<String, dynamic> srcJson) => _$ZgtListFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ZgtListToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'student_history_params.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class StudentHistoryParams extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'Subject')
|
|
||||||
int? subject;
|
|
||||||
|
|
||||||
@JsonKey(name: 'StudentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'DateStart')
|
|
||||||
String dateStart;
|
|
||||||
|
|
||||||
@JsonKey(name: 'DateEnd')
|
|
||||||
String? dateEnd;
|
|
||||||
|
|
||||||
@JsonKey(name: 'AssessType')
|
|
||||||
int assessType;
|
|
||||||
|
|
||||||
@JsonKey(name: 'PageNumber')
|
|
||||||
int pageNumber;
|
|
||||||
|
|
||||||
@JsonKey(name: 'PageSize')
|
|
||||||
int pageSize;
|
|
||||||
|
|
||||||
StudentHistoryParams({this.subject,this.studentId = -1,this.dateStart = '',this.dateEnd,this.assessType = 0,this.pageNumber = 1,this.pageSize = 10});
|
|
||||||
|
|
||||||
factory StudentHistoryParams.fromJson(Map<String, dynamic> srcJson) => _$StudentHistoryParamsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentHistoryParamsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6,19 +6,13 @@ part 'student_item.g.dart';
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class StudentItem extends Object {
|
class StudentItem extends Object {
|
||||||
|
|
||||||
@JsonKey(name: 'name')
|
@JsonKey(name: 'items')
|
||||||
String name;
|
List<Items> items;
|
||||||
|
|
||||||
@JsonKey(name: 'isActive')
|
@JsonKey(name: 'totalCount')
|
||||||
bool isActive;
|
int totalCount;
|
||||||
|
|
||||||
@JsonKey(name: 'priorityAnnotate')
|
StudentItem(this.items,this.totalCount,);
|
||||||
bool priorityAnnotate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'id')
|
|
||||||
int id;
|
|
||||||
|
|
||||||
StudentItem(this.name,this.isActive,this.priorityAnnotate,this.id,);
|
|
||||||
|
|
||||||
factory StudentItem.fromJson(Map<String, dynamic> srcJson) => _$StudentItemFromJson(srcJson);
|
factory StudentItem.fromJson(Map<String, dynamic> srcJson) => _$StudentItemFromJson(srcJson);
|
||||||
|
|
||||||
|
|
@ -27,3 +21,84 @@ class StudentItem extends Object {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class Items extends Object {
|
||||||
|
|
||||||
|
@JsonKey(name: 'id')
|
||||||
|
String id;
|
||||||
|
|
||||||
|
@JsonKey(name: 'studentCode')
|
||||||
|
String studentCode;
|
||||||
|
|
||||||
|
@JsonKey(name: 'name')
|
||||||
|
String name;
|
||||||
|
|
||||||
|
@JsonKey(name: 'gender')
|
||||||
|
int gender;
|
||||||
|
|
||||||
|
@JsonKey(name: 'guardianPhone')
|
||||||
|
String? guardianPhone;
|
||||||
|
|
||||||
|
@JsonKey(name: 'idCard')
|
||||||
|
String? idCard;
|
||||||
|
|
||||||
|
@JsonKey(name: 'penSerial')
|
||||||
|
String penSerial;
|
||||||
|
|
||||||
|
@JsonKey(name: 'isActive')
|
||||||
|
bool isActive;
|
||||||
|
|
||||||
|
@JsonKey(name: 'classStudentId')
|
||||||
|
String classStudentId;
|
||||||
|
|
||||||
|
@JsonKey(name: 'grade')
|
||||||
|
int grade;
|
||||||
|
|
||||||
|
@JsonKey(name: 'classId')
|
||||||
|
String classId;
|
||||||
|
|
||||||
|
@JsonKey(name: 'className')
|
||||||
|
String className;
|
||||||
|
|
||||||
|
@JsonKey(name: 'evaluationLevel')
|
||||||
|
int evaluationLevel;
|
||||||
|
|
||||||
|
@JsonKey(name: 'subjectStatus')
|
||||||
|
List<SubjectStatus> subjectStatus;
|
||||||
|
|
||||||
|
@JsonKey(name: 'creatorName')
|
||||||
|
String creatorName;
|
||||||
|
|
||||||
|
@JsonKey(name: 'creationTime')
|
||||||
|
String creationTime;
|
||||||
|
|
||||||
|
Items(this.id,this.studentCode,this.name,this.gender,this.guardianPhone,this.idCard,this.penSerial,this.isActive,this.classStudentId,this.grade,this.classId,this.className,this.evaluationLevel,this.subjectStatus,this.creatorName,this.creationTime,);
|
||||||
|
|
||||||
|
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$ItemsToJson(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class SubjectStatus extends Object {
|
||||||
|
|
||||||
|
@JsonKey(name: 'subject')
|
||||||
|
int subject;
|
||||||
|
|
||||||
|
@JsonKey(name: 'evaluationLevel')
|
||||||
|
int evaluationLevel;
|
||||||
|
|
||||||
|
@JsonKey(name: 'priorityAnnotate')
|
||||||
|
bool priorityAnnotate;
|
||||||
|
|
||||||
|
SubjectStatus(this.subject,this.evaluationLevel,this.priorityAnnotate,);
|
||||||
|
|
||||||
|
factory SubjectStatus.fromJson(Map<String, dynamic> srcJson) => _$SubjectStatusFromJson(srcJson);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$SubjectStatusToJson(this);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,104 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'student_personal_info.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class StudentPersonalInfo extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtCorrectRate')
|
|
||||||
int kgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgtList')
|
|
||||||
List<KgtList> kgtList;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtCorrectRate')
|
|
||||||
int zgtCorrectRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgtList')
|
|
||||||
List<ZgtList> zgtList;
|
|
||||||
|
|
||||||
StudentPersonalInfo(this.studentId,this.studentName,this.correctRate,this.kgtCorrectRate,this.kgtList,this.zgtCorrectRate,this.zgtList,);
|
|
||||||
|
|
||||||
factory StudentPersonalInfo.fromJson(Map<String, dynamic> srcJson) => _$StudentPersonalInfoFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentPersonalInfoToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class KgtList extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
int templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answer')
|
|
||||||
String? answer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentAnswer')
|
|
||||||
String? studentAnswer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'useTime')
|
|
||||||
int useTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isCorrect')
|
|
||||||
bool? isCorrect;
|
|
||||||
|
|
||||||
@JsonKey(name: 'picture')
|
|
||||||
String? picture;
|
|
||||||
|
|
||||||
KgtList(this.templateId,this.questionNo,this.answer,this.studentAnswer,this.useTime,this.isCorrect,this.picture,);
|
|
||||||
|
|
||||||
factory KgtList.fromJson(Map<String, dynamic> srcJson) => _$KgtListFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KgtListToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class ZgtList extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'templateId')
|
|
||||||
int templateId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
int questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'answer')
|
|
||||||
String? answer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentAnswer')
|
|
||||||
String? studentAnswer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'useTime')
|
|
||||||
int useTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isCorrect')
|
|
||||||
bool? isCorrect;
|
|
||||||
|
|
||||||
@JsonKey(name: 'picture')
|
|
||||||
String? picture;
|
|
||||||
|
|
||||||
ZgtList(this.templateId,this.questionNo,this.answer,this.studentAnswer,this.useTime,this.isCorrect,this.picture,);
|
|
||||||
|
|
||||||
factory ZgtList.fromJson(Map<String, dynamic> srcJson) => _$ZgtListFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$ZgtListToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -43,34 +43,28 @@ class Items extends Object {
|
||||||
String publishTime;
|
String publishTime;
|
||||||
|
|
||||||
@JsonKey(name: 'state')
|
@JsonKey(name: 'state')
|
||||||
int? state;
|
int state;
|
||||||
|
|
||||||
@JsonKey(name: 'collectRate')
|
@JsonKey(name: 'collectRate')
|
||||||
int? collectRate;
|
int? collectRate;
|
||||||
|
|
||||||
@JsonKey(name: 'questionCount')
|
|
||||||
int? questionCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'annotateCount')
|
|
||||||
int? annotateCount;
|
|
||||||
|
|
||||||
@JsonKey(name: 'annotateRate')
|
@JsonKey(name: 'annotateRate')
|
||||||
double? annotateRate;
|
double annotateRate;
|
||||||
|
|
||||||
@JsonKey(name: 'classes')
|
@JsonKey(name: 'classes')
|
||||||
List<Classes>? classes;
|
List<Classes> classes;
|
||||||
|
|
||||||
@JsonKey(name: 'creatorName')
|
@JsonKey(name: 'creatorName')
|
||||||
String? creatorName;
|
String creatorName;
|
||||||
|
|
||||||
@JsonKey(name: 'creationTime')
|
@JsonKey(name: 'creationTime')
|
||||||
String? creationTime;
|
String creationTime;
|
||||||
|
|
||||||
@JsonKey(name: 'classCount')
|
@JsonKey(name: 'classCount')
|
||||||
int? classCount;
|
int? classCount;
|
||||||
|
|
||||||
|
|
||||||
Items(this.id,this.assessType,this.name,this.grade,this.subject,this.publishTime,this.state,this.collectRate,this.questionCount,this.annotateCount,this.annotateRate,this.classes,this.creatorName,this.creationTime,this.classCount);
|
Items(this.id,this.assessType,this.name,this.grade,this.subject,this.publishTime,this.state,this.collectRate,this.annotateRate,this.classes,this.creatorName,this.creationTime,this.classCount);
|
||||||
|
|
||||||
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);
|
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,11 +21,11 @@ class WorkStudentParams extends Object {
|
||||||
@JsonKey(name: 'State')
|
@JsonKey(name: 'State')
|
||||||
int? state;
|
int? state;
|
||||||
|
|
||||||
@JsonKey(name: 'StartDate')
|
@JsonKey(name: 'PublishTimeStart')
|
||||||
String? startDate;
|
String? publishTimeStart;
|
||||||
|
|
||||||
@JsonKey(name: 'EndDate')
|
@JsonKey(name: 'PublishTimeEnd')
|
||||||
String? endDate;
|
String? publishTimeEnd;
|
||||||
|
|
||||||
@JsonKey(name: 'CreatorId')
|
@JsonKey(name: 'CreatorId')
|
||||||
String? creatorId;
|
String? creatorId;
|
||||||
|
|
@ -39,7 +39,7 @@ class WorkStudentParams extends Object {
|
||||||
@JsonKey(name: 'Sorting')
|
@JsonKey(name: 'Sorting')
|
||||||
String? sorting;
|
String? sorting;
|
||||||
|
|
||||||
WorkStudentParams({this.assessType = 0,this.name,this.grade,this.subject,this.state,this.startDate,this.endDate,this.creatorId,this.pageNumber = 1,this.pageSize = 10,this.sorting,});
|
WorkStudentParams({this.assessType = 0,this.name,this.grade,this.subject,this.state,this.publishTimeStart,this.publishTimeEnd,this.creatorId,this.pageNumber = 1,this.pageSize = 10,this.sorting,});
|
||||||
|
|
||||||
factory WorkStudentParams.fromJson(Map<String, dynamic> srcJson) => _$WorkStudentParamsFromJson(srcJson);
|
factory WorkStudentParams.fromJson(Map<String, dynamic> srcJson) => _$WorkStudentParamsFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,7 @@ class UserStore extends GetxController with RequestToolMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
void getEnum() async{
|
void getEnum() async{
|
||||||
|
await getSubjectList();
|
||||||
await getGradeList();
|
await getGradeList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,16 +99,14 @@ class UserStore extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
//获取科目
|
//获取科目
|
||||||
getSubjectList() async {
|
getSubjectList() async {
|
||||||
// var res = await getClient().getEnumSubjectList();
|
var res = await getClient().getEnumSubjectList('EnumSubject');
|
||||||
|
subjectList.value = res['EnumSubject']!;
|
||||||
}
|
}
|
||||||
|
|
||||||
//获取年级
|
//获取年级
|
||||||
getGradeList() async {
|
getGradeList() async {
|
||||||
|
var res = await getClient().getEnumSubjectList('EnumGrade');
|
||||||
var res = await getClient().getEnumSubjectList(['EnumGrade','EnumSubject']);
|
|
||||||
gradeList.value = res['EnumGrade']!;
|
gradeList.value = res['EnumGrade']!;
|
||||||
subjectList.value = res['EnumSubject']!;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import 'package:school_asignment_app/common/store/user_store.dart';
|
||||||
|
|
||||||
class EnumUtils{
|
class EnumUtils{
|
||||||
static String formatSubject(int id) {
|
static String formatSubject(int id) {
|
||||||
if (UserStore.to.subjectList.isEmpty || id == null) {
|
if (UserStore.to.subjectList.isEmpty) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
EnumSubject item = UserStore.to.subjectList.firstWhere((element) => element.id == id);
|
EnumSubject item = UserStore.to.subjectList.firstWhere((element) => element.id == id);
|
||||||
|
|
@ -11,7 +11,7 @@ class EnumUtils{
|
||||||
}
|
}
|
||||||
|
|
||||||
static String formatGrade(int id) {
|
static String formatGrade(int id) {
|
||||||
if (UserStore.to.gradeList.isEmpty || id == null) {
|
if (UserStore.to.gradeList.isEmpty) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
EnumSubject item = UserStore.to.gradeList.firstWhere((element) => element.id == id);
|
EnumSubject item = UserStore.to.gradeList.firstWhere((element) => element.id == id);
|
||||||
|
|
|
||||||
|
|
@ -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:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_state.dart';
|
|
||||||
|
|
||||||
class Utils{
|
class Utils{
|
||||||
Utils._internal();
|
Utils._internal();
|
||||||
|
|
@ -38,168 +36,4 @@ class Utils{
|
||||||
return defaultVal ?? '';
|
return defaultVal ?? '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 去除小数点
|
|
||||||
static String doubleToStringAsFixed(double val, {int fractionDigits = 2}) {
|
|
||||||
return val.toStringAsFixed(fractionDigits).replaceAll(RegExp(r'\.0*$'), '');
|
|
||||||
}
|
|
||||||
|
|
||||||
static calcRate (int divisor, int dividend) {
|
|
||||||
if(dividend != 0){
|
|
||||||
return ((100 * divisor) / dividend);
|
|
||||||
// return ((100 * divisor) / dividend).toStringAsFixed(0);
|
|
||||||
}else{
|
|
||||||
return 0.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 秒转时分秒
|
|
||||||
static String second2HMS(int sec, {bool isEasy = false}) {
|
|
||||||
String hms = "0";
|
|
||||||
if (!isEasy) hms = "0秒";
|
|
||||||
if (sec > 0) {
|
|
||||||
int h = sec ~/ 3600;
|
|
||||||
int m = (sec % 3600) ~/ 60;
|
|
||||||
int s = sec % 60;
|
|
||||||
if(h>0){
|
|
||||||
hms = "$h时$m分$s秒";
|
|
||||||
}else{
|
|
||||||
if(m>0){
|
|
||||||
hms = "$m分$s秒";
|
|
||||||
}else{
|
|
||||||
hms = "$s秒";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return hms;
|
|
||||||
}
|
|
||||||
|
|
||||||
static getHomeworkData(HomeworkDetails data){
|
|
||||||
|
|
||||||
CountData dataCount = CountData();
|
|
||||||
List<Dtls> kgt = data.dtls.where((w) => w.questionType == 1).toList();
|
|
||||||
dataCount.kgtAnswerCount = kgt.where((w) => w.state != 0).length;
|
|
||||||
dataCount.kgtOkCount = kgt.where((w) => w.state == 3).length;
|
|
||||||
dataCount.kgtDtlCount = kgt.length;
|
|
||||||
dataCount.kgtAnswerRate = Utils.calcRate(dataCount.kgtAnswerCount!, dataCount.kgtDtlCount!);
|
|
||||||
dataCount.kgtOkRate = 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();
|
|
||||||
dataCount.zgtAnswerCount = zgt.where((w) => w.state != 0).length;
|
|
||||||
dataCount.zgtOkCount = zgt.where((w) => w.state == 3).length;
|
|
||||||
dataCount.zgtDtlCount = zgt.length;
|
|
||||||
dataCount.zgtAnswerRate = Utils.calcRate(dataCount.zgtAnswerCount!, dataCount.zgtDtlCount!);
|
|
||||||
dataCount.zgtOkRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!);
|
|
||||||
dataCount.zgtCount = data.questions.where((w) => w.questionType == 2).length;
|
|
||||||
dataCount.studentCount = data.students.length;
|
|
||||||
dataCount.priorityStudents = 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) {
|
|
||||||
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();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
dataCount.studentSubmitCount = data.students.where((s) => s.state != 0).length;
|
|
||||||
|
|
||||||
for(var stu in data.students){
|
|
||||||
stu.kgtStu = kgt.where((w) => w.studentId == stu.studentId).toList();
|
|
||||||
stu.kgtStu!.sort((a, b) => a.questionNo.compareTo(b.questionNo));
|
|
||||||
stu.kgtOkCount = stu.kgtStu!.where((w) => w.state == 3).length;
|
|
||||||
stu.kgtErrorCount = stu.kgtStu!.where((w) => w.state == 2).length;
|
|
||||||
stu.kgtAnswerCount = stu.kgtStu!.where((w) => w.state != 0).length;
|
|
||||||
|
|
||||||
stu.zgtStu = zgt.where((w) => w.studentId == stu.studentId).toList();
|
|
||||||
stu.zgtStu!.sort((a, b) => a.questionNo.compareTo(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.allOk = data.dtls.where((w) {
|
|
||||||
if(stu.studentId == w.studentId){
|
|
||||||
stu.useTime = w.useTime;
|
|
||||||
}
|
|
||||||
for(var que in data.questions){
|
|
||||||
if(w.templateId == que.templateId && w.questionNo == que.questionNo){
|
|
||||||
w.answer = que.answer;
|
|
||||||
w.questionPicture = que.questionPicture;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return w.studentId == stu.studentId && w.state != 3;
|
|
||||||
} ).length??0;
|
|
||||||
if( (stu.kgtStu!.length - stu.kgtAnswerCount!) + (stu.zgtStu!.length-stu.zgtAnswerCount!) == (stu.kgtStu!.length + stu.zgtStu!.length)){
|
|
||||||
stu.allNotDone = true;
|
|
||||||
}else{
|
|
||||||
stu.allNotDone = false;
|
|
||||||
}
|
|
||||||
stu.noAnswerCount = data.dtls.where((w) => w.state == 0 && stu.studentId == w.studentId).length;
|
|
||||||
|
|
||||||
List<Questions> ques = data.questions;
|
|
||||||
stu.queDtls =data.dtls.where((w) => w.studentId == stu.studentId && ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1).toList();
|
|
||||||
int okCount = stu.queDtls!.where((w) => w.state == 3).length;
|
|
||||||
int ttlCount = stu.queDtls!.length;
|
|
||||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
data.students.sort((a, b) {
|
|
||||||
int num1 = a.state;
|
|
||||||
int num2 = b.state;
|
|
||||||
return num2.compareTo(num1);
|
|
||||||
});
|
|
||||||
|
|
||||||
for(var know in data.knows){
|
|
||||||
List<Questions> ques = data.questions.where((w) => 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.ttlCount = queDtls.length;
|
|
||||||
know.okRate = Utils.calcRate(know.okCount!, know.ttlCount!);
|
|
||||||
}
|
|
||||||
|
|
||||||
return dataCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
static DateTime getWeekStartDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
int dayOfWeek = now.weekday; // 获取今天是周几(1代表周一,7代表周日)
|
|
||||||
int diff = dayOfWeek - 1; // 计算今天距离周一的天数差
|
|
||||||
if (diff < 0) {
|
|
||||||
diff += 7; // 如果是周日,则需要加上一周的天数
|
|
||||||
}
|
|
||||||
return now.subtract(Duration(days: diff)); // 减去天数差,得到本周一的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
static DateTime getWeekEndDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
int dayOfWeek = now.weekday; // 获取今天是周几
|
|
||||||
int diff = 7 - dayOfWeek; // 计算今天距离周日的天数差
|
|
||||||
if (diff == 0) {
|
|
||||||
diff = 7; // 如果是周日,则加上一周的天数
|
|
||||||
}
|
|
||||||
return now.add(Duration(days: diff)); // 加上天数差减一,得到本周日的时间
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.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:school_asignment_app/common/config/app_config.dart';
|
import 'package:school_asignment_app/common/config/app_config.dart';
|
||||||
|
|
@ -34,8 +33,6 @@ class MyApp extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return ScreenUtilInit(
|
return ScreenUtilInit(
|
||||||
designSize: const Size(AppConfig.UI_WIDTH, AppConfig.UI_HEIGHT),
|
designSize: const Size(AppConfig.UI_WIDTH, AppConfig.UI_HEIGHT),
|
||||||
minTextAdapt: true,
|
|
||||||
splitScreenMode: true,
|
|
||||||
builder: (BuildContext context, Widget? child) => GetMaterialApp(
|
builder: (BuildContext context, Widget? child) => GetMaterialApp(
|
||||||
title: '作业',
|
title: '作业',
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
|
|
@ -52,27 +49,11 @@ class MyApp extends StatelessWidget {
|
||||||
logWriterCallback: (text, {bool isError = false}) {
|
logWriterCallback: (text, {bool isError = false}) {
|
||||||
// isError ? LoggerUtils.e(text) : LoggerUtils.i(text);
|
// isError ? LoggerUtils.e(text) : LoggerUtils.i(text);
|
||||||
},
|
},
|
||||||
// 这里是国际化支持,确保添加flutter_localizations依赖
|
|
||||||
supportedLocales: const [
|
|
||||||
Locale('zh', 'CN'), // 中文简体
|
|
||||||
// 其他支持的locale可以在这里添加
|
|
||||||
],
|
|
||||||
localizationsDelegates: const [
|
|
||||||
// ...其他delegates
|
|
||||||
GlobalMaterialLocalizations.delegate,
|
|
||||||
GlobalWidgetsLocalizations.delegate,
|
|
||||||
GlobalCupertinoLocalizations.delegate, // 如果你使用了Cupertino风格的组件
|
|
||||||
// ...添加其他必要的delegates
|
|
||||||
],
|
|
||||||
localeResolutionCallback: (locale, supportedLocales) {
|
|
||||||
// 在这里可以实现自定义的locale解析逻辑
|
|
||||||
// 如果需要,返回你想要的Locale对象
|
|
||||||
return locale;
|
|
||||||
},
|
|
||||||
//默认专场动画
|
//默认专场动画
|
||||||
defaultTransition: Transition.fade,
|
defaultTransition: Transition.fade,
|
||||||
//初始化路由页面
|
//初始化路由页面
|
||||||
initialRoute: Routes.startPage,
|
initialRoute: Routes.startPage,
|
||||||
|
|
||||||
/// 路由表
|
/// 路由表
|
||||||
getPages: AppPages.pages,
|
getPages: AppPages.pages,
|
||||||
builder: EasyLoading.init(
|
builder: EasyLoading.init(
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,12 @@ class MyEmptyWidget extends StatelessWidget {
|
||||||
final EdgeInsets? padding;
|
final EdgeInsets? padding;
|
||||||
final double? imgWidth;
|
final double? imgWidth;
|
||||||
final double? imgHeight;
|
final double? imgHeight;
|
||||||
final double? font;
|
|
||||||
const MyEmptyWidget(
|
const MyEmptyWidget(
|
||||||
{this.imgWidth,
|
{this.imgWidth,
|
||||||
this.imgHeight,
|
this.imgHeight,
|
||||||
this.textVal,
|
this.textVal,
|
||||||
this.padding,
|
this.padding,
|
||||||
this.imgAssetPath,
|
this.imgAssetPath,
|
||||||
this.font,
|
|
||||||
this.alignment = Alignment.center,
|
this.alignment = Alignment.center,
|
||||||
Key? key})
|
Key? key})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
@ -52,7 +50,7 @@ class MyEmptyWidget extends StatelessWidget {
|
||||||
padding: EdgeInsets.only(top: 5.h),
|
padding: EdgeInsets.only(top: 5.h),
|
||||||
child: Text(
|
child: Text(
|
||||||
textVal ?? defText,
|
textVal ?? defText,
|
||||||
style: TextStyle(fontSize: font ?? 12.sp, color: const Color(0xB2898B8D)),
|
style: TextStyle(fontSize: 12.sp, color: const Color(0xB2898B8D)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/config/request_config.dart';
|
|
||||||
|
|
||||||
class ImageDialog{
|
|
||||||
static void showImgDialog(BuildContext context,String imgUrl) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: Container(
|
|
||||||
width: MediaQuery.of(context).size.width - 48.r,
|
|
||||||
// height: MediaQuery.of(context).size.height * 0.4,
|
|
||||||
color: Colors.white,
|
|
||||||
// child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
|
|
||||||
child: Image.network(RequestConfig.imgUrl+imgUrl)),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'annotate_class_logic.dart';
|
|
||||||
|
|
||||||
class AnnotateClassBinding extends Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut(() => AnnotateClassLogic());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
|
||||||
|
|
||||||
import 'annotate_class_state.dart';
|
|
||||||
|
|
||||||
class AnnotateClassLogic extends GetxController with RequestToolMixin{
|
|
||||||
final AnnotateClassState state = AnnotateClassState();
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit(){
|
|
||||||
super.onInit();
|
|
||||||
state.homeworkId.value = Get.arguments['id']??'';
|
|
||||||
state.name.value = Get.arguments['name']??'';
|
|
||||||
state.grade = Get.arguments['grade'];
|
|
||||||
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getList() async{
|
|
||||||
List<AnnotatedClass> data = await getClient(). getAnnotatedClassList(state.homeworkId.value);
|
|
||||||
state.classList.value = data;
|
|
||||||
|
|
||||||
for (var element in state.classList.value) {
|
|
||||||
int commitStudentCount = 0;
|
|
||||||
int noCommitStudentCount = 0;
|
|
||||||
for (var student in element.students) {
|
|
||||||
if(student.state == 0){
|
|
||||||
noCommitStudentCount ++;
|
|
||||||
}else{
|
|
||||||
commitStudentCount ++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
element.commitStudentCount = commitStudentCount;
|
|
||||||
element.noCommitStudentCount = noCommitStudentCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
|
|
||||||
class AnnotateClassState {
|
|
||||||
AnnotateClassState() {
|
|
||||||
///Initialize variables
|
|
||||||
}
|
|
||||||
|
|
||||||
late RxString name = ''.obs;
|
|
||||||
late RxList<AnnotatedClass> classList = RxList();
|
|
||||||
late RxString homeworkId = ''.obs;
|
|
||||||
late int grade;
|
|
||||||
}
|
|
||||||
|
|
@ -1,76 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/annotate_item.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
import 'annotate_class_logic.dart';
|
|
||||||
|
|
||||||
class AnnotateClassPage extends StatefulWidget {
|
|
||||||
const AnnotateClassPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<AnnotateClassPage> createState() => _AnnotateClassPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|
||||||
final logic = Get.find<AnnotateClassLogic>();
|
|
||||||
final state = Get.find<AnnotateClassLogic>().state;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Obx(() {
|
|
||||||
return Text(state.name.value,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
|
||||||
}),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: const [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
|
||||||
child: Obx(() {
|
|
||||||
return
|
|
||||||
Utils.isPad()?MasonryGridView.count(
|
|
||||||
crossAxisCount: 2, //几列
|
|
||||||
mainAxisSpacing: 4.w, // 间距
|
|
||||||
crossAxisSpacing: 4.h, // 纵向间距?
|
|
||||||
itemCount: state.classList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
AnnotatedClass item = state.classList[index];
|
|
||||||
return AnnotateItem(item: item,font: 8.sp,state: state,name: state.name.value,);
|
|
||||||
},
|
|
||||||
):
|
|
||||||
ListView.builder(
|
|
||||||
itemCount: state.classList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
AnnotatedClass item = state.classList[index];
|
|
||||||
return AnnotateItem(item: item,font: 12.sp,state: state,name: state.name.value,);
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
Get.delete<AnnotateClassLogic>();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,237 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_state.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/item_btn.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
|
|
||||||
class AnnotateItem extends StatefulWidget {
|
|
||||||
final AnnotatedClass item;
|
|
||||||
final double font;
|
|
||||||
final AnnotateClassState state;
|
|
||||||
final String name;
|
|
||||||
const AnnotateItem({Key? key, required this.item,required this.font,required this.state,required this.name}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<AnnotateItem> createState() => _AnnotateItemState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AnnotateItemState extends State<AnnotateItem> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.only(top: 10.r),
|
|
||||||
margin: EdgeInsets.only(bottom: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadiusDirectional.circular(4.r),
|
|
||||||
boxShadow: const [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.15), blurRadius: 10)],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${EnumUtils.formatGrade(widget.item.grade)}${widget.item.className}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: widget.font,
|
|
||||||
color: const Color(0xFF000000)),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
Text(
|
|
||||||
'已交:${widget.item.commitStudentCount}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: widget.font - 2.sp,
|
|
||||||
color: const Color(0xFF6888FD)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 20.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'未交:${widget.item.noCommitStudentCount}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: widget.font - 2.sp,
|
|
||||||
color: const Color(0xFFFF5656)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children:
|
|
||||||
widget.item.finishTime != null ?
|
|
||||||
[
|
|
||||||
Expanded(
|
|
||||||
flex:4,
|
|
||||||
child:ItemBtn(title: "收藏夹",font: widget.font - 2.sp,
|
|
||||||
clickFunction: (){
|
|
||||||
|
|
||||||
},),
|
|
||||||
),
|
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
|
||||||
const Expanded(flex: 4, child: SizedBox()),
|
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
|
||||||
const Expanded(flex: 4, child: SizedBox()),
|
|
||||||
|
|
||||||
]:[
|
|
||||||
Expanded(
|
|
||||||
flex: 4,
|
|
||||||
child: ItemBtn(title: "一键批阅",font: widget.font - 2.sp,
|
|
||||||
clickFunction: (){
|
|
||||||
|
|
||||||
},),
|
|
||||||
),
|
|
||||||
const Expanded(flex: 1,child: Text(''),),
|
|
||||||
Expanded(
|
|
||||||
flex:4,
|
|
||||||
child: ItemBtn(title: "数据快查",font: widget.font - 2.sp,clickFunction: (){
|
|
||||||
Get.toNamed(Routes.quickDataCheckPage,arguments: {'homeworkId':widget.state.homeworkId.value,'classId':widget.item.classId,'grade':widget.state.grade,'className':widget.item.className
|
|
||||||
});
|
|
||||||
},),
|
|
||||||
),
|
|
||||||
const Expanded(flex: 1,child: Text(''),),
|
|
||||||
Expanded(
|
|
||||||
flex:4,
|
|
||||||
child: ItemBtn(title: "收藏夹",font: widget.font - 2.sp,
|
|
||||||
clickFunction: (){
|
|
||||||
|
|
||||||
},),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 14.r),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 8.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
|
|
||||||
percent: widget.item.annotateRate / 100,
|
|
||||||
linearGradient: LinearGradient(
|
|
||||||
tileMode: TileMode.mirror,
|
|
||||||
stops: const [0.0, 1.0],
|
|
||||||
colors: widget.item.annotateRate / 100 != 1
|
|
||||||
? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor]
|
|
||||||
: [
|
|
||||||
const Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1),
|
|
||||||
const Color.fromRGBO(144, 224, 190, 1),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
|
||||||
// progressColor: Theme.of(context).primaryColor,
|
|
||||||
backgroundColor: const Color.fromRGBO(232, 232, 232, 1),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 7.w),
|
|
||||||
quickText('${widget.item.annotateRate}%',
|
|
||||||
size: widget.font - 2.sp, color: const Color.fromRGBO(70, 70, 70, 1))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
ProgressBar(
|
|
||||||
title: '客观题正确率:',
|
|
||||||
color: const Color(0xFFB8C7FF),
|
|
||||||
percent: widget.item.kgtCorrectRate / 100,
|
|
||||||
marginEdg: EdgeInsets.zero,
|
|
||||||
padingEdg: EdgeInsets.only(top: 8.h,left: 14.r,right: 14.r),
|
|
||||||
fontSize:widget.font - 2.sp),
|
|
||||||
ProgressBar(
|
|
||||||
title: '主观题正确率:',
|
|
||||||
color: const Color(0xFFB8C7FF),
|
|
||||||
percent: widget.item.zgtCorrectRate / 100,
|
|
||||||
padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
fontSize:widget.font - 2.sp),
|
|
||||||
ProgressBar(
|
|
||||||
title: '总正确率:',
|
|
||||||
color: const Color(0xFFB8C7FF),
|
|
||||||
percent: widget.item.correctRate / 100,
|
|
||||||
padingEdg: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
fontSize:widget.font - 2.sp),
|
|
||||||
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(4.r), bottomRight: Radius.circular(4.r)),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: const [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(0, 0, 0, 0.15),
|
|
||||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
|
||||||
blurRadius: 4, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children:
|
|
||||||
widget.item.finishTime != null ?
|
|
||||||
[
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('数据快查', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]
|
|
||||||
:
|
|
||||||
[
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('结束批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
|
|
||||||
class ItemBtn extends StatelessWidget {
|
|
||||||
final String title;
|
|
||||||
final double font;
|
|
||||||
final Function? clickFunction;
|
|
||||||
const ItemBtn({Key? key,required this.title,required this.font,this.clickFunction}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return SizedBox(
|
|
||||||
height:20.r,
|
|
||||||
child: ElevatedButton(
|
|
||||||
style: ButtonStyle(
|
|
||||||
overlayColor:MaterialStateProperty.all(
|
|
||||||
const Color(0xFF6888FD)),
|
|
||||||
backgroundColor:
|
|
||||||
MaterialStateProperty.all(
|
|
||||||
const Color(0xFFF4F4F4)),
|
|
||||||
// foregroundColor: MaterialStateProperty.all(Colors.red.shade200),//文字颜色
|
|
||||||
shape: MaterialStateProperty.all(
|
|
||||||
RoundedRectangleBorder(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(22), //设置圆角
|
|
||||||
)),
|
|
||||||
padding: MaterialStateProperty.all(
|
|
||||||
EdgeInsets.zero,
|
|
||||||
)),
|
|
||||||
onPressed: () {
|
|
||||||
clickFunction!();
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: font,
|
|
||||||
color: const Color(0xFF666666)),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -16,7 +16,6 @@ class ClassStudentLogic extends GetxController with RequestToolMixin{
|
||||||
super.onInit();
|
super.onInit();
|
||||||
state.title.value = Get.arguments['title']??'';
|
state.title.value = Get.arguments['title']??'';
|
||||||
state.classId = Get.arguments['classId']??'';
|
state.classId = Get.arguments['classId']??'';
|
||||||
state.subject = Get.arguments['subject']??-1;
|
|
||||||
state.page = Get.arguments['page']??'';
|
state.page = Get.arguments['page']??'';
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
|
|
@ -24,22 +23,12 @@ class ClassStudentLogic extends GetxController with RequestToolMixin{
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async{
|
void getList() async{
|
||||||
List<StudentItem> res = await getClient().getStudentList(state.classId,state.subject);
|
StudentItem res = await getClient().getStudentList(state.classId);
|
||||||
state.studentList.value = res;
|
state.studentList.value = res.items;
|
||||||
state.studentList.sort((a, b) => a.priorityAnnotate?-1:1);
|
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void setJobReadLevel(studentId,priorityAnnotate) async{
|
|
||||||
if(state.isClicking){
|
|
||||||
state.isClicking = false;
|
|
||||||
await getClient().getAnnotateStudent(state.classId,studentId,priorityAnnotate,state.subject);
|
|
||||||
state.isClicking = true;
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,6 @@ class ClassStudentState {
|
||||||
|
|
||||||
late RxString title = ''.obs;
|
late RxString title = ''.obs;
|
||||||
late final String classId;
|
late final String classId;
|
||||||
late final int subject;
|
late RxList<Items> studentList = RxList();
|
||||||
late RxList<StudentItem> studentList = RxList();
|
|
||||||
late String page = '';
|
late String page = '';
|
||||||
late bool isClicking = true;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
@ -7,7 +6,6 @@ import 'package:school_asignment_app/common/job/student_item.dart';
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
import 'package:school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
|
|
||||||
import 'class_student_logic.dart';
|
import 'class_student_logic.dart';
|
||||||
|
|
||||||
|
|
@ -45,11 +43,17 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 10.r,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||||
child: Obx(() {
|
child: EasyRefresh(
|
||||||
return EasyRefresh(
|
firstRefresh: true,
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
taskIndependence: true,
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
header: MaterialHeader(),
|
header: MaterialHeader(),
|
||||||
|
|
@ -57,7 +61,8 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
onRefresh: () async {
|
onRefresh: () async {
|
||||||
logic.getList();
|
logic.getList();
|
||||||
},
|
},
|
||||||
child: state.studentList.isNotEmpty
|
child: Obx((){
|
||||||
|
return state.studentList.isNotEmpty
|
||||||
? Utils.isPad()
|
? Utils.isPad()
|
||||||
? GridView(
|
? GridView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
|
|
@ -69,12 +74,11 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
childAspectRatio: 556 / 112,
|
childAspectRatio: 556 / 112,
|
||||||
),
|
),
|
||||||
children: List.generate(state.studentList.length, (index) {
|
children: List.generate(state.studentList.length, (index) {
|
||||||
StudentItem item = state.studentList[index];
|
Items item = state.studentList[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
// RouterManager.router.navigateTo(context,
|
// RouterManager.router.navigateTo(context,
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,arguments: {'studentName':item.name,'studentId':item.id});
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
|
|
@ -99,33 +103,29 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(width: 1.r,color: const Color(0xFFFFA41E)),
|
||||||
width: 1.r, color: const Color(0xFFFFA41E)),
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
),
|
||||||
child: Center(child: Text('详情', style: TextStyle(
|
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
||||||
fontSize: 10.r, color: Color(0xFFFFA41E))),
|
|
||||||
)):state.page == 'history'?Container(
|
)):state.page == 'history'?Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: const Color(0xFF6888FD),
|
color: const Color(0xFF6888FD),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||||
Radius.circular(20.r))
|
|
||||||
),
|
),
|
||||||
child: Center(child: Text('历史作业', style: TextStyle(
|
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||||
fontSize: 10.r, color: Colors.white),)),
|
|
||||||
):
|
):
|
||||||
item.priorityAnnotate
|
item.evaluationLevel == 1
|
||||||
?
|
?
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.setJobReadLevel(
|
/* isClicking = true;
|
||||||
item.id, false);
|
setJobReadLevel(
|
||||||
|
item.studentGroupDetailId, 0);
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');*/
|
||||||
},
|
},
|
||||||
child:Container(
|
child:Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
|
|
@ -140,13 +140,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
padding: EdgeInsets.only(left: 3.r),
|
||||||
child: Image.asset(
|
child: Image.asset('assets/images/youx_icon_active.png',width: 14.r,height: 14.r,),
|
||||||
'assets/images/youx_icon_active.png',
|
|
||||||
width: 14.r, height: 14.r,),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
||||||
top: 2.r, left: 4.r),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -160,10 +157,11 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
)
|
)
|
||||||
:InkWell(
|
:InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.setJobReadLevel(
|
/* isClicking = true;
|
||||||
item.id, true);
|
setJobReadLevel(
|
||||||
|
item.studentGroupDetailId, 1);
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');*/
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
|
|
@ -178,13 +176,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
padding: EdgeInsets.only(left: 3.r),
|
||||||
child: Image.asset(
|
child: Image.asset('assets/images/youx_icon_default.png',width: 14.r,height: 14.r,),
|
||||||
'assets/images/youx_icon_default.png',
|
|
||||||
width: 14.r, height: 14.r,),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
||||||
top: 2.r, left: 4.r),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -204,12 +199,11 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
StudentItem item = state.studentList[index];
|
Items item = state.studentList[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
// RouterManager.router.navigateTo(context,
|
// RouterManager.router.navigateTo(context,
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,arguments: {'studentName':item.name,'studentId':item.id});
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
|
|
@ -235,32 +229,28 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
width: 72.r,
|
width: 72.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
||||||
width: 1.r, color: Color(0xFFFFA41E)),
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
),
|
||||||
child: Center(child: Text('详情', style: TextStyle(
|
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
||||||
fontSize: 10.r, color: Color(0xFFFFA41E))),
|
|
||||||
)):state.page == 'history'?Container(
|
)):state.page == 'history'?Container(
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
width: 82.r,
|
width: 82.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF6888FD),
|
color: Color(0xFF6888FD),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||||
Radius.circular(20.r))
|
|
||||||
),
|
),
|
||||||
child: Center(child: Text('历史作业', style: TextStyle(
|
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||||
fontSize: 10.r, color: Colors.white),)),
|
|
||||||
):
|
):
|
||||||
item.priorityAnnotate
|
item.evaluationLevel == 1
|
||||||
? InkWell(
|
? InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.setJobReadLevel(
|
/*isClicking = true;
|
||||||
item.id, false);
|
setJobReadLevel(
|
||||||
|
item.studentGroupDetailId, 0);
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');*/
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
|
|
@ -275,13 +265,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
padding: EdgeInsets.only(left: 3.r),
|
||||||
child: Image.asset(
|
child: Image.asset('assets/images/youx_icon_active.png',width: 14.r,height: 14.r,),
|
||||||
'assets/images/youx_icon_active.png',
|
|
||||||
width: 14.r, height: 14.r,),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
||||||
top: 2.r, left: 4.r),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -295,10 +282,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
)
|
)
|
||||||
: InkWell(
|
: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
logic.setJobReadLevel(
|
/* setJobReadLevel(
|
||||||
item.id, true);
|
item.studentGroupDetailId, 1);
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');*/
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
|
|
@ -313,13 +300,10 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
padding: EdgeInsets.only(left: 3.r),
|
||||||
child: Image.asset(
|
child: Image.asset('assets/images/youx_icon_default.png',width: 14.r,height: 14.r,),
|
||||||
'assets/images/youx_icon_default.png',
|
|
||||||
width: 14.r, height: 14.r,),
|
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
||||||
top: 2.r, left: 4.r),
|
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
@ -338,10 +322,13 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
},
|
},
|
||||||
itemCount: state.studentList.length,
|
itemCount: state.studentList.length,
|
||||||
)
|
)
|
||||||
: const MyEmptyWidget(),
|
: const MyEmptyWidget();
|
||||||
);
|
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'job_report_logic.dart';
|
|
||||||
|
|
||||||
class JobReportBinding extends Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut(() => JobReportLogic());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
|
|
||||||
import 'job_report_state.dart';
|
|
||||||
|
|
||||||
class JobReportLogic extends GetxController with RequestToolMixin {
|
|
||||||
final JobReportState state = JobReportState();
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit(){
|
|
||||||
super.onInit();
|
|
||||||
state.title.value = Get.arguments['title']??'';
|
|
||||||
state.homeworkId.value = Get.arguments['homeworkId']??'';
|
|
||||||
state.classId.value = Get.arguments['classId']??'';
|
|
||||||
state.className.value = Get.arguments['className']??'';
|
|
||||||
state.grade = Get.arguments['grade']??'';
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getClass();
|
|
||||||
}
|
|
||||||
void getClass() async{
|
|
||||||
List<AnnotatedClass> data = await getClient(). getAnnotatedClassList(state.homeworkId.value);
|
|
||||||
state.involveClasses.value = data;
|
|
||||||
|
|
||||||
state.involveClasses.value = [state.classData.value, ...(data ?? [])];
|
|
||||||
for (var element in state.involveClasses) {
|
|
||||||
if (element.className == state.className.value && element.grade == state.grade ) {
|
|
||||||
state.classData.value = element;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
getWorkData();
|
|
||||||
}
|
|
||||||
void getWorkData() async{
|
|
||||||
HomeworkDetails data = await getClient(). getHomeworkDetails(state.homeworkId.value,state.classData.value.classId != '-1' ? state.classData.value.classId : '');
|
|
||||||
state.dataCount = Utils.getHomeworkData(data);
|
|
||||||
state.homeData = data;
|
|
||||||
state.kgReport.value = data.questions.where((w)=>w.questionType == 1).toList();
|
|
||||||
state.zgReport.value = data.questions.where((w)=>w.questionType == 2).toList();
|
|
||||||
state.studentList.value = [...data.students];
|
|
||||||
state.knowsList.value = data.knows;
|
|
||||||
state.hasData.value = true;
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
|
|
||||||
state.studentList.sort((a, b) {
|
|
||||||
int num1 = a.kgtOkCount!+a.zgtOkCount!;
|
|
||||||
int num2 = b.kgtOkCount!+b.zgtOkCount!;
|
|
||||||
return num2.compareTo(num1);
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_state.dart';
|
|
||||||
|
|
||||||
class JobReportState {
|
|
||||||
JobReportState() {
|
|
||||||
///Initialize variables
|
|
||||||
}
|
|
||||||
|
|
||||||
late RxString title = ''.obs;
|
|
||||||
late RxString homeworkId = ''.obs;
|
|
||||||
late RxString classId = ''.obs;
|
|
||||||
late RxString className = ''.obs;
|
|
||||||
late int grade;
|
|
||||||
late CountData dataCount = CountData();
|
|
||||||
late RxBool hasData = false.obs;
|
|
||||||
late RxList<Questions> kgReport = RxList();
|
|
||||||
late RxList<Questions> zgReport = RxList();
|
|
||||||
late RxList<Students> studentList = RxList();
|
|
||||||
late RxList<Knows> knowsList = RxList();
|
|
||||||
late HomeworkDetails homeData;
|
|
||||||
late RxList<AnnotatedClass> involveClasses = RxList();
|
|
||||||
late AnnotatedClass defaultClass = AnnotatedClass('',-1,'-1','','',-1,-1,-1,-1,-1,[],[],-1,-1,-1,-1,-1);
|
|
||||||
late Rx<AnnotatedClass> classData = defaultClass.obs;
|
|
||||||
}
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/job_report/widget/dropdown_selection.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/job_report/widget/knowledge_point.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/job_report/widget/personnel_data_overview.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart';
|
|
||||||
|
|
||||||
import 'job_report_logic.dart';
|
|
||||||
|
|
||||||
class JobReportPage extends StatefulWidget {
|
|
||||||
const JobReportPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<JobReportPage> createState() => _JobReportPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _JobReportPageState extends State<JobReportPage> {
|
|
||||||
final logic = Get.find<JobReportLogic>();
|
|
||||||
final state = Get
|
|
||||||
.find<JobReportLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
centerTitle: true,
|
|
||||||
title: Center(
|
|
||||||
child: Obx(() {
|
|
||||||
return quickText(
|
|
||||||
'${state.title.value}作业报告',
|
|
||||||
size: 14.sp,
|
|
||||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
leading: IconButton(
|
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: const [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: Obx(() {
|
|
||||||
if (state.hasData.value) {
|
|
||||||
return SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
// 下拉框
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Obx(() {
|
|
||||||
return DropdownSelection(involveClasses: state
|
|
||||||
.involveClasses.value,
|
|
||||||
classData: state.classData.value,
|
|
||||||
call: (AnnotatedClass item) {
|
|
||||||
state.classData.value = item;
|
|
||||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
|
||||||
logic.getWorkData();
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
// Expanded(child: Text('')),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
//完成率、正确率
|
|
||||||
/* TopCount(
|
|
||||||
data, classData == null ? '' : classData!.className, widget.id),*/
|
|
||||||
//客观题、主观题
|
|
||||||
KgtZgtTable(studentCount: state.dataCount.studentCount!,
|
|
||||||
homeworkId: state.homeworkId.value,
|
|
||||||
kgReport: state.kgReport,
|
|
||||||
zgReport: state.zgReport,
|
|
||||||
kgtOkRate: state.dataCount.kgtOkRate!
|
|
||||||
.toStringAsFixed(0),
|
|
||||||
zgtOkRate: state.dataCount.zgtOkRate!
|
|
||||||
.toStringAsFixed(0)),
|
|
||||||
// 掌握知识点的情况
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
child: KnowledgePoint(
|
|
||||||
knowsList:state.knowsList,data:state.homeData,className: state.className.value,)),
|
|
||||||
// 掌握知识点的情况
|
|
||||||
/* Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
child: $OverallPerformance(data.studentCount, data.overallTitles)),
|
|
||||||
// 单位时间答题情况
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
child: $UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos)),*/
|
|
||||||
// 人员数据概况
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
child: PersonnelDataOverview(studentList:state.studentList.value)),
|
|
||||||
|
|
||||||
SizedBox(height: 30.r,),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.height / 2 - 200.r),
|
|
||||||
child: const MyEmptyWidget()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
Get.delete<JobReportLogic>();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
|
|
||||||
class DropdownSelection extends StatefulWidget {
|
|
||||||
final List<AnnotatedClass>? involveClasses;
|
|
||||||
final AnnotatedClass? classData;
|
|
||||||
final Function(AnnotatedClass) call;
|
|
||||||
const DropdownSelection({Key? key,required this.involveClasses,required this.classData,required this.call}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<DropdownSelection> createState() => _DropdownSelectionState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _DropdownSelectionState extends State<DropdownSelection> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
// width: 200.r,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Color(0xFFF5F5F5),
|
|
||||||
borderRadius: BorderRadius.vertical(
|
|
||||||
top: Radius.elliptical(10, 10),
|
|
||||||
bottom: Radius.elliptical(10, 10),
|
|
||||||
)),
|
|
||||||
child: DropdownButton(
|
|
||||||
value: widget.classData?.classId ?? '-1',
|
|
||||||
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
|
|
||||||
underline: Container(),
|
|
||||||
// isExpanded:true,
|
|
||||||
items: widget.involveClasses?.map((e) {
|
|
||||||
return DropdownMenuItem(
|
|
||||||
value: e.classId!,
|
|
||||||
child: quickText(
|
|
||||||
e.classId == '-1'
|
|
||||||
? '全部'
|
|
||||||
:
|
|
||||||
' ${EnumUtils.formatGrade(e.grade)}${e.className}', size: 12.sp, color: Colors.black),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
onChanged: (value) {
|
|
||||||
if (value == null) return;
|
|
||||||
widget.call(widget.involveClasses!.firstWhere((element) => element.classId == value));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,291 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:percent_indicator/linear_percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
|
|
||||||
class KnowledgePoint extends StatefulWidget {
|
|
||||||
final RxList<Knows> knowsList;
|
|
||||||
final HomeworkDetails data;
|
|
||||||
final String className;
|
|
||||||
KnowledgePoint({Key? key,required this.knowsList,required this.data,required this.className}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<KnowledgePoint> createState() => _KnowledgePointState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _KnowledgePointState extends State<KnowledgePoint> {
|
|
||||||
|
|
||||||
void showPeopleListDialog(
|
|
||||||
{required BuildContext context,
|
|
||||||
required String title,
|
|
||||||
required List<Students> arr,}) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
|
||||||
backgroundColor:const Color(0xFFFFFFFF),
|
|
||||||
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(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'姓名',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'班级',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'掌握度',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'掌握情况',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.r,
|
|
||||||
),
|
|
||||||
|
|
||||||
arr.isNotEmpty? Expanded(
|
|
||||||
child: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
var item = arr[index];
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
|
||||||
color: const Color(0xFFF0F0F0),
|
|
||||||
margin:EdgeInsets.only(bottom: 2.r),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
/* goQuickCheckPersonalPath(
|
|
||||||
item['noAnswerStudents'].id);*/
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item.studentName!,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF323232)),
|
|
||||||
)))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
widget.className,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 2,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'${item.okRate!.toStringAsFixed(0)}%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
))),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
spacing: 5,
|
|
||||||
runSpacing: 3,
|
|
||||||
children: List.generate(item.queDtls!.length, (index) {
|
|
||||||
Dtls kgInfo = item.queDtls![index];
|
|
||||||
return Container(
|
|
||||||
width: 14.r,
|
|
||||||
height: 14.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: kgInfo.state == 0
|
|
||||||
? const Color(0xFFD3D3D3)
|
|
||||||
: kgInfo.state == 1?Colors.white:kgInfo.state == 2
|
|
||||||
? const Color(0xFFFF7474)
|
|
||||||
: const Color(0xFF4CC793),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
kgInfo.questionNo.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.sp,
|
|
||||||
color: kgInfo.state == 1
|
|
||||||
? Color(0xFF525252)
|
|
||||||
: Colors.white),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: arr.length,
|
|
||||||
),
|
|
||||||
): const MyEmptyWidget()
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.only(top: 10.h),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
|
||||||
constraints: BoxConstraints(maxHeight: 320.h),
|
|
||||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 24.h),
|
|
||||||
child: quickText('知识点掌握情况', color: const Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: ListView(children: widget.knowsList.value.map((item) {
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 15.h, left: 15.r, right: 15.r),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 10,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
quickText(item.knowledgeName,
|
|
||||||
size: 12.sp, color: const Color.fromRGBO(152, 152, 152, 1)),
|
|
||||||
quickText('${item.okRate!.toStringAsFixed(0)}%',
|
|
||||||
size: 12.sp, color: const Color.fromRGBO(64, 64, 64, 1)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.w),
|
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 3.h),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 10,
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 10.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: item.okRate! / 100,
|
|
||||||
progressColor: Theme.of(context).primaryColor,
|
|
||||||
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
)),
|
|
||||||
SizedBox(width: 10.w),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
List<Questions> ques = widget.data.questions.where((w) => w.knows.indexWhere((k) => k.knowledgeId == item.knowledgeId) > -1).toList();
|
|
||||||
List<Students> array2 = [...widget.data.students];
|
|
||||||
for(var stu in array2){
|
|
||||||
stu.queDtls = widget.data.dtls.where((w) => w.studentId == stu.studentId && ques.indexWhere((q) => w.templateId == q.templateId && w.questionNo == q.questionNo) > -1).toList();
|
|
||||||
int okCount = stu.queDtls!.where((w) => w.state == 3).length;
|
|
||||||
int ttlCount = stu.queDtls!.length;
|
|
||||||
stu.okRate = Utils.calcRate(okCount, ttlCount);
|
|
||||||
stu.queDtls!.sort((a, b) {
|
|
||||||
int num1 = a.questionNo;
|
|
||||||
int num2 = b.questionNo;
|
|
||||||
return num1.compareTo(num2);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
showPeopleListDialog(
|
|
||||||
context: context,
|
|
||||||
title: item.knowledgeName,
|
|
||||||
arr: array2,);
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
quickText('查看', size: 12.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
|
||||||
Icon(Icons.arrow_forward_ios, size: 11.sp, color: const Color.fromRGBO(239, 135, 20, 1)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}).toList()),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
|
|
||||||
class PersonnelDataOverview extends StatefulWidget {
|
|
||||||
final List<Students> studentList;
|
|
||||||
const PersonnelDataOverview({Key? key,required this.studentList}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<PersonnelDataOverview> createState() => _PersonnelDataOverviewState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _PersonnelDataOverviewState extends State<PersonnelDataOverview> {
|
|
||||||
|
|
||||||
List<String> names = [];
|
|
||||||
List<String> useTimes = [];
|
|
||||||
List<String> correctRates = [];
|
|
||||||
List<String> noAnswerCounts = [];
|
|
||||||
List<String> rankings = [];
|
|
||||||
Map<String, List<dynamic>> mapData = {};
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState(){
|
|
||||||
super.initState();
|
|
||||||
|
|
||||||
|
|
||||||
for (var i = 0;i<widget.studentList.length;i++) {
|
|
||||||
var student = widget.studentList[i];
|
|
||||||
TimeUnits timeUnits = convertMilliseconds(student.useTime!);
|
|
||||||
String timeerStr = '';
|
|
||||||
if (timeUnits.hours > 0) timeerStr = timeUnits.hours.toString() + ':';
|
|
||||||
if (timeUnits.minutes > 0) timeerStr += timeUnits.minutes.toString() + ':';
|
|
||||||
timeerStr += timeUnits.seconds.toString();
|
|
||||||
|
|
||||||
names.add(student.studentName);
|
|
||||||
useTimes.add(timeerStr);
|
|
||||||
correctRates.add(student.okRate!.toStringAsFixed(0) + '%');
|
|
||||||
noAnswerCounts.add(student.noAnswerCount.toString());
|
|
||||||
rankings.add('${i + 1}名');
|
|
||||||
}
|
|
||||||
mapData = {
|
|
||||||
'姓名': names,
|
|
||||||
'答题时长': useTimes,
|
|
||||||
'正确率': correctRates,
|
|
||||||
'未答题数': noAnswerCounts,
|
|
||||||
'班级排名': rankings,
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
width: double.infinity,
|
|
||||||
// height: isPad() ? 290.h : 264.h,
|
|
||||||
margin: EdgeInsets.only(top: 20.h),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
|
||||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 20.h),
|
|
||||||
child: quickText('人员数据概况', color: Color.fromRGBO(92, 92, 92, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
|
||||||
),
|
|
||||||
Scrollbar(
|
|
||||||
thickness: 8.w,
|
|
||||||
thumbVisibility: true,
|
|
||||||
trackVisibility: true,
|
|
||||||
radius: Radius.circular(10.r),
|
|
||||||
controller: ScrollController(),//滑动条使用的控制器
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
primary: true,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
...mapData.entries.map((entrie) {
|
|
||||||
bool isTransparentChinese = ['答题时长', '正确率', '未答题数'].contains(entrie.key); // 透明中文
|
|
||||||
|
|
||||||
return Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 94.r,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
color: const Color.fromRGBO(230, 230, 230, 1),
|
|
||||||
margin: EdgeInsets.only(bottom: 1.h, right: 1.w),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
|
|
||||||
child: quickText(entrie.key, color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp, maxLines: 2),
|
|
||||||
),
|
|
||||||
...entrie.value.map((e) {
|
|
||||||
bool isTransparentChineseNew = isTransparentChinese && (e?.length ?? 0) == 0;
|
|
||||||
return Container(
|
|
||||||
width: 100.r,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
margin: EdgeInsets.only(bottom: 1.h, right: 1.w),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
|
|
||||||
color: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
child: isTransparentChineseNew
|
|
||||||
? quickText('透明', color: Colors.transparent, size: 12.sp)
|
|
||||||
:RegExp(r'^\d+$').hasMatch(e) || e.contains('%')
|
|
||||||
? Row(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
quickText(e, color: Color.fromRGBO(82, 82, 82, 1), size: 12.sp, maxLines: 2),
|
|
||||||
quickText('透', color: Colors.transparent, size: 12.sp),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: quickText(e, color: Color.fromRGBO(82, 82, 82, 1), size: 12.sp, maxLines: 2),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 定义一个类来保存转换后的时间单位
|
|
||||||
class TimeUnits {
|
|
||||||
int hours;
|
|
||||||
int minutes;
|
|
||||||
int seconds;
|
|
||||||
|
|
||||||
TimeUnits(this.hours, this.minutes, this.seconds);
|
|
||||||
}
|
|
||||||
// 毫秒转小时、分钟、秒的函数
|
|
||||||
TimeUnits convertMilliseconds(int totalSeconds) {
|
|
||||||
int hours = totalSeconds ~/ 3600; // 整除得到小时数
|
|
||||||
int remainingSeconds = totalSeconds % 3600; // 求余得到剩余的秒数
|
|
||||||
int minutes = remainingSeconds ~/ 60; // 整除得到分钟数
|
|
||||||
int seconds = remainingSeconds % 60; // 求余得到秒数
|
|
||||||
|
|
||||||
return TimeUnits(hours, minutes, seconds);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'quick_data_check_logic.dart';
|
|
||||||
|
|
||||||
class QuickDataCheckBinding extends Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut(() => QuickDataCheckLogic());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
|
|
||||||
import 'quick_data_check_state.dart';
|
|
||||||
|
|
||||||
class QuickDataCheckLogic extends GetxController with RequestToolMixin{
|
|
||||||
final QuickDataCheckState state = QuickDataCheckState();
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit(){
|
|
||||||
super.onInit();
|
|
||||||
state.homeworkId.value = Get.arguments['homeworkId']??'';
|
|
||||||
state.classId.value = Get.arguments['classId']??'';
|
|
||||||
state.className.value = Get.arguments['className']??'';
|
|
||||||
state.grade = Get.arguments['grade'];
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getWorkData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getWorkData() async{
|
|
||||||
HomeworkDetails data = await getClient(). getHomeworkDetails(state.homeworkId.value,state.classId.value);
|
|
||||||
state.dataCount = Utils.getHomeworkData(data);
|
|
||||||
state.homeData = data;
|
|
||||||
state.kgReport.value = data.questions.where((w)=>w.questionType == 1).toList();
|
|
||||||
state.zgReport.value = data.questions.where((w)=>w.questionType == 2).toList();
|
|
||||||
state.studentList.value = data.students;
|
|
||||||
state.hasData.value = true;
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
|
|
||||||
class QuickDataCheckState {
|
|
||||||
QuickDataCheckState() {
|
|
||||||
///Initialize variables
|
|
||||||
}
|
|
||||||
|
|
||||||
late RxString homeworkId = ''.obs;
|
|
||||||
late RxString classId = ''.obs;
|
|
||||||
late RxString className = ''.obs;
|
|
||||||
late int grade;
|
|
||||||
late CountData dataCount = CountData();
|
|
||||||
late RxBool hasData = false.obs;
|
|
||||||
late RxList<Questions> kgReport = RxList();
|
|
||||||
late RxList<Questions> zgReport = RxList();
|
|
||||||
late RxList<Students> studentList = RxList();
|
|
||||||
late HomeworkDetails homeData;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CountData extends Object {
|
|
||||||
int? kgtOkCount = 0;
|
|
||||||
int? kgtDtlCount = 0;
|
|
||||||
double? kgtAnswerRate = 0;
|
|
||||||
double? kgtOkRate = 0;
|
|
||||||
int? kgtAnswerCount = 0;
|
|
||||||
int? kgtCount = 0;
|
|
||||||
int? zgtDtlCount = 0;
|
|
||||||
int? zgtOkCount = 0;
|
|
||||||
int? zgtAnswerCount = 0;
|
|
||||||
double? zgtAnswerRate = 0;
|
|
||||||
double? zgtOkRate = 0;
|
|
||||||
int? zgtCount = 0;
|
|
||||||
int? studentCount = 0;
|
|
||||||
List<Students>? priorityStudents = [];
|
|
||||||
int? studentSubmitCount = 0;
|
|
||||||
CountData({this.kgtOkCount, this.kgtDtlCount,this.kgtAnswerRate,this.kgtAnswerCount,this.kgtOkRate,this.studentCount,
|
|
||||||
this.kgtCount,this.zgtAnswerCount,this.zgtOkCount,this.zgtDtlCount,this.zgtAnswerRate,this.zgtOkRate,this.zgtCount,this.priorityStudents,
|
|
||||||
this.studentSubmitCount,});
|
|
||||||
}
|
|
||||||
|
|
@ -1,360 +0,0 @@
|
||||||
import 'package:fl_chart/fl_chart.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:get_storage/get_storage.dart';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/kgt_zgt_table.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/quick_data_check_bottom.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/report_table.dart';
|
|
||||||
|
|
||||||
import 'quick_data_check_logic.dart';
|
|
||||||
|
|
||||||
class QuickDataCheckPage extends StatefulWidget {
|
|
||||||
const QuickDataCheckPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
|
|
||||||
final logic = Get.find<QuickDataCheckLogic>();
|
|
||||||
final state = Get
|
|
||||||
.find<QuickDataCheckLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return AnnotatedRegion(
|
|
||||||
value: const SystemUiOverlayStyle(
|
|
||||||
statusBarColor: Colors.transparent,
|
|
||||||
systemNavigationBarIconBrightness: Brightness.light,
|
|
||||||
statusBarIconBrightness: Brightness.light,
|
|
||||||
statusBarBrightness: Brightness.dark,
|
|
||||||
),
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(top: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.padding
|
|
||||||
.top),
|
|
||||||
height: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.height,
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
gradient: LinearGradient(
|
|
||||||
begin: Alignment.topCenter,
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
Color(0xFF6889FD),
|
|
||||||
Color(0xFFF5F5F5),
|
|
||||||
],
|
|
||||||
stops: [
|
|
||||||
0.09,
|
|
||||||
0.3
|
|
||||||
])),
|
|
||||||
child:
|
|
||||||
|
|
||||||
Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.only(right: 8.r),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'数据快查',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: Colors.white),
|
|
||||||
)),
|
|
||||||
)),
|
|
||||||
const ReturnToHomepage(bgColor: Colors.white,),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.r),
|
|
||||||
Obx(() {
|
|
||||||
if (state.hasData.value) {
|
|
||||||
return Expanded(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 14.r, top: 2.r),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/job_report_class_icon.png',
|
|
||||||
width: 22.r,
|
|
||||||
height: 22.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return Text(
|
|
||||||
'${EnumUtils.formatGrade(
|
|
||||||
state.grade)}${state.className.value}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.r, color: Colors.white),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 15.r, horizontal: 15.r),
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
vertical: 10.r, horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(6.r))),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 2.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 12.r,
|
|
||||||
height: 12.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xFF4CC793),
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(7.r))),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'已提交',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF333333)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 35.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 12.r,
|
|
||||||
height: 12.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color(0xFF6888FD),
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(7.r))),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'未提交',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: const Color(0xFF333333)),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 2.r,
|
|
||||||
),
|
|
||||||
//环形图
|
|
||||||
SizedBox(
|
|
||||||
height: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width * 0.3,
|
|
||||||
child: PieChart(
|
|
||||||
PieChartData(
|
|
||||||
borderData: FlBorderData(show: false),
|
|
||||||
sectionsSpace: 0,
|
|
||||||
centerSpaceRadius:
|
|
||||||
MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width * 0.06,
|
|
||||||
sections: [
|
|
||||||
PieChartSectionData(
|
|
||||||
color: const Color(0xFF4CC793),
|
|
||||||
value: state.dataCount
|
|
||||||
.studentSubmitCount! /
|
|
||||||
state.dataCount.studentCount! *
|
|
||||||
100,
|
|
||||||
radius:
|
|
||||||
MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width *
|
|
||||||
0.07 +
|
|
||||||
5,
|
|
||||||
title: '${state.dataCount
|
|
||||||
.studentSubmitCount}人',
|
|
||||||
titleStyle: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
PieChartSectionData(
|
|
||||||
color: const Color(0xFF6888FD),
|
|
||||||
value: (state.dataCount
|
|
||||||
.studentCount! - state.dataCount
|
|
||||||
.studentSubmitCount!) /
|
|
||||||
state.dataCount.studentCount! *
|
|
||||||
100,
|
|
||||||
radius:
|
|
||||||
MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width *
|
|
||||||
0.07,
|
|
||||||
title: '${state.dataCount
|
|
||||||
.studentCount! - state.dataCount
|
|
||||||
.studentSubmitCount!}人',
|
|
||||||
titleStyle: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
// 客观进度条
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'客观题答题进度',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: const Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${state.dataCount.kgtAnswerRate!
|
|
||||||
.toStringAsFixed(0)}%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: const Color(0xFF333333)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 6.r),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 10,
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 9.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: state.dataCount
|
|
||||||
.kgtAnswerRate! / 100,
|
|
||||||
progressColor: const Color(
|
|
||||||
0xFFFF7F22),
|
|
||||||
backgroundColor: const Color(
|
|
||||||
0xFFEAEAEA),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 20.r),
|
|
||||||
// 主观进度条
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'主观题答题进度',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: const Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${state.dataCount.zgtAnswerRate!
|
|
||||||
.toStringAsFixed(0)}%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: const Color(0xFF333333)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 6.r),
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 10,
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 9.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: state.dataCount
|
|
||||||
.zgtAnswerRate! / 100,
|
|
||||||
progressColor: const Color(
|
|
||||||
0xFFFF7F22),
|
|
||||||
backgroundColor: const Color(
|
|
||||||
0xFFEAEAEA),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
QuickDataCheckBottom(jobData: state.studentList.value,
|
|
||||||
jobId: state.homeworkId.value,
|
|
||||||
kgCount: state.dataCount.kgtDtlCount!,
|
|
||||||
zgCount: state.dataCount.zgtDtlCount!,),
|
|
||||||
//客观题、主观题
|
|
||||||
KgtZgtTable(studentCount:state.dataCount.studentCount!,homeworkId:state.homeworkId.value,kgReport: state.kgReport,zgReport: state.zgReport,kgtOkRate:state.dataCount.kgtOkRate!
|
|
||||||
.toStringAsFixed(0),zgtOkRate:state.dataCount.zgtOkRate!
|
|
||||||
.toStringAsFixed(0)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
));
|
|
||||||
} else {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.height / 2 - 200.r),
|
|
||||||
child: const MyEmptyWidget()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
Get.delete<QuickDataCheckLogic>();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,155 +0,0 @@
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/report_table.dart';
|
|
||||||
|
|
||||||
class KgtZgtTable extends StatefulWidget {
|
|
||||||
final int studentCount;
|
|
||||||
final String homeworkId;
|
|
||||||
final List<Questions> kgReport;
|
|
||||||
final List<Questions> zgReport;
|
|
||||||
final String kgtOkRate;
|
|
||||||
final String zgtOkRate;
|
|
||||||
|
|
||||||
const KgtZgtTable(
|
|
||||||
{Key? key,
|
|
||||||
required this.studentCount,
|
|
||||||
required this.homeworkId,
|
|
||||||
required this.kgReport,
|
|
||||||
required this.zgReport,
|
|
||||||
required this.kgtOkRate,
|
|
||||||
required this.zgtOkRate})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<KgtZgtTable> createState() => _KgtZgtTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _KgtZgtTableState extends State<KgtZgtTable> {
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Column(
|
|
||||||
children: [
|
|
||||||
//客观题
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'客观题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF5C5C5C),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${widget.kgtOkRate}%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
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 ['题', '作答率', '作答人数', '正确率', '标准答案', '优先批阅概况'],
|
|
||||||
bodyList: widget.kgReport,
|
|
||||||
fixedCols: 1,
|
|
||||||
fixedRows: 1,
|
|
||||||
jobId: widget.homeworkId,
|
|
||||||
studentCount: widget.studentCount,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if(widget.kgReport.isEmpty)
|
|
||||||
MyEmptyWidget(imgWidth:100.r,imgHeight: 100.r,font:8.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
//主观题
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.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,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'主观题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF5C5C5C),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 6.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${widget.zgtOkRate}%',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF6888FD),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
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 ['题', '作答率', '作答人数', '正确率', '查看原题', '优先批阅概况'],
|
|
||||||
bodyList: widget.zgReport,
|
|
||||||
fixedCols: 1,
|
|
||||||
fixedRows: 1,
|
|
||||||
isKG: true,
|
|
||||||
jobId: widget.homeworkId,
|
|
||||||
studentCount: widget.studentCount,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if(widget.zgReport.isEmpty)
|
|
||||||
MyEmptyWidget(imgWidth:100.r,imgHeight: 100.r,font:8.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,258 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/widget/quick_student_data_table.dart';
|
|
||||||
|
|
||||||
class QuickDataCheckBottom extends StatefulWidget {
|
|
||||||
final String jobId;
|
|
||||||
final int kgCount;
|
|
||||||
final int zgCount;
|
|
||||||
final List<Students>? jobData;
|
|
||||||
|
|
||||||
const QuickDataCheckBottom(
|
|
||||||
{Key? key, required this.jobId, required this.jobData, required this.kgCount, required this.zgCount})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<QuickDataCheckBottom> createState() => _QuickDataCheckBottomState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
|
|
||||||
RxList<Students> showList = RxList();
|
|
||||||
RxList<Students> followList = RxList();
|
|
||||||
RxBool sortType = true.obs;
|
|
||||||
RxBool sortLevel = false.obs;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
showList.value = widget.jobData!;
|
|
||||||
for (var e in widget.jobData!) {
|
|
||||||
if(e.priorityAnnotate){
|
|
||||||
followList.add(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
sortType.value = !sortType.value;
|
|
||||||
sortLevel.value = false;
|
|
||||||
if (widget.jobData == null) return;
|
|
||||||
if (!sortType.value) {
|
|
||||||
showList.sort((a, b) {
|
|
||||||
return a.state.compareTo(b.state);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
showList.sort((a, b) {
|
|
||||||
return b.state.compareTo(a.state);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
child: Obx(() {
|
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
if (!sortType.value)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/no_check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
if (sortType.value)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
sortType.value ? '已提交排序' : '未提交排序',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF707070)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 20.r,
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (widget.jobData!.isEmpty) return;
|
|
||||||
if (!sortLevel.value) {
|
|
||||||
showList.value = followList.value;
|
|
||||||
} else {
|
|
||||||
widget.jobData!.sort((a, b) {
|
|
||||||
int num1 = a.state;
|
|
||||||
int num2 = b.state;
|
|
||||||
return num2.compareTo(num1);
|
|
||||||
});
|
|
||||||
showList.value = widget.jobData!;
|
|
||||||
}
|
|
||||||
sortLevel.value = !sortLevel.value;
|
|
||||||
sortType.value = false;
|
|
||||||
},
|
|
||||||
child: Obx(() {
|
|
||||||
return Row(
|
|
||||||
children: [
|
|
||||||
if (!sortLevel.value)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/no_check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
if (sortLevel.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(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'注:',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 8.sp, color: const Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
color: const Color(0xFF4CC793),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'正确',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
color: const Color(0xFFFF7474),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'错误',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: const Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
color: Colors.white,
|
|
||||||
// border: Border.all(width: 1.r,color: Colors.grey),
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey,
|
|
||||||
offset: Offset(1.w, 1.h), //阴影y轴偏移量
|
|
||||||
blurRadius: 4, //阴影模糊程度
|
|
||||||
spreadRadius: 0.1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'已作答未批阅',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: const Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
color: const Color(0xFFD3D3D3),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'未做',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.sp, color: const Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return SizedBox(
|
|
||||||
height: showList.value.length > 5 ? 350.r : showList.value
|
|
||||||
.length * 50.r + 40.r,
|
|
||||||
child: QuickStudentDataTable(
|
|
||||||
headList: ['学生姓名', '客观题', '主观题', '客观题状态', '主观题状态', '未批阅'],
|
|
||||||
bodyList: showList.value,
|
|
||||||
jobId: widget.jobId,
|
|
||||||
fixedRows: 1,
|
|
||||||
fixedCols: 0,
|
|
||||||
// hasUnrated: widget.jobData!.hasUnrated,
|
|
||||||
hasUnrated: false,
|
|
||||||
kgCount: widget.kgCount,
|
|
||||||
zgCount: widget.zgCount,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,275 +0,0 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
|
|
||||||
class QuickStudentDataTable extends StatefulWidget {
|
|
||||||
final List headList;
|
|
||||||
final List bodyList;
|
|
||||||
final int? fixedRows;
|
|
||||||
final int? fixedCols;
|
|
||||||
final String jobId;
|
|
||||||
final bool hasUnrated;
|
|
||||||
final int kgCount;
|
|
||||||
final int zgCount;
|
|
||||||
|
|
||||||
const QuickStudentDataTable({
|
|
||||||
Key? key,
|
|
||||||
required this.headList,
|
|
||||||
required this.bodyList,
|
|
||||||
required this.jobId,
|
|
||||||
required this.hasUnrated,
|
|
||||||
required this.kgCount,
|
|
||||||
required this.zgCount,
|
|
||||||
this.fixedCols = 0,
|
|
||||||
this.fixedRows = 0,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<QuickStudentDataTable> createState() => _QuickStudentDataTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|
||||||
final ScrollController _controller = ScrollController();
|
|
||||||
int? _sortColumnIndex;
|
|
||||||
final bool _sortAscending = true;
|
|
||||||
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
|
||||||
assert(index >= 0);
|
|
||||||
Students item = widget.bodyList[index];
|
|
||||||
return DataRow2.byIndex(
|
|
||||||
index: index,
|
|
||||||
color: color != null
|
|
||||||
? item.allNotDone!
|
|
||||||
? MaterialStateProperty.all(Color(0xFFFFD79C))
|
|
||||||
: MaterialStateProperty.all(color)
|
|
||||||
: null,
|
|
||||||
cells: [
|
|
||||||
DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
/*RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
RouterManager.quickCheckPersonalPath +
|
|
||||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);*/
|
|
||||||
Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':item.studentId,'homeworkId':widget.jobId});
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(item.studentName!,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF6888FD),overflow: TextOverflow.ellipsis)),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/job_data_right_icon.png',
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${item.kgtOkCount}',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793))),
|
|
||||||
Text(
|
|
||||||
'/',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
Text(
|
|
||||||
'${item.kgtErrorCount}',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFFFF7474))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${item.zgtOkCount}',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793))),
|
|
||||||
Text(
|
|
||||||
'/',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
Text(
|
|
||||||
'${item.zgtErrorCount}',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFFFF7474))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
spacing: 2,
|
|
||||||
runSpacing: 3,
|
|
||||||
children: List.generate(item.kgtStu!.length, (index) {
|
|
||||||
Dtls kgInfo = item.kgtStu![index];
|
|
||||||
return Container(
|
|
||||||
width: 14.r,
|
|
||||||
height: 14.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: kgInfo.state == 0
|
|
||||||
? const Color(0xFFD3D3D3)
|
|
||||||
: kgInfo.state == 1?Colors.white:kgInfo.state == 2
|
|
||||||
? const Color(0xFFFF7474)
|
|
||||||
: const Color(0xFF4CC793),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
kgInfo.questionNo.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.sp,
|
|
||||||
color: kgInfo.state == 1
|
|
||||||
? Color(0xFF525252)
|
|
||||||
: Colors.white),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
spacing: 2,
|
|
||||||
runSpacing: 3,
|
|
||||||
children: List.generate(item.zgtStu!.length, (index) {
|
|
||||||
Dtls kgInfo = item.zgtStu![index];
|
|
||||||
return Container(
|
|
||||||
width: 14.r,
|
|
||||||
height: 14.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: kgInfo.state == 0
|
|
||||||
? const Color(0xFFD3D3D3)
|
|
||||||
: kgInfo.state == 1?Colors.white:kgInfo.state == 2
|
|
||||||
? const Color(0xFFFF7474)
|
|
||||||
: const Color(0xFF4CC793),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
kgInfo.questionNo.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.sp,
|
|
||||||
color: kgInfo.state == 1
|
|
||||||
? Color(0xFF525252)
|
|
||||||
: Colors.white),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if(widget.hasUnrated)
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text('${item.zgtUnrated}',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF6888FD))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
if(!widget.hasUnrated){
|
|
||||||
widget.headList.removeLast();
|
|
||||||
}
|
|
||||||
return DataTable2(
|
|
||||||
dividerThickness: 0,
|
|
||||||
scrollController: _controller,
|
|
||||||
columnSpacing: 0,
|
|
||||||
horizontalMargin: 0,
|
|
||||||
bottomMargin: 0,
|
|
||||||
dataRowHeight: 50.r,
|
|
||||||
border: const TableBorder(
|
|
||||||
horizontalInside: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
bottom: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
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)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
|
||||||
minWidth: MediaQuery.of(context).size.width,
|
|
||||||
fixedTopRows: widget.fixedRows!,
|
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
|
||||||
sortColumnIndex: _sortColumnIndex,
|
|
||||||
sortAscending: _sortAscending,
|
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
|
||||||
var item = widget.headList[index];
|
|
||||||
return index == 1?DataColumn2(
|
|
||||||
label: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(item,
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
Text('(${widget.kgCount})',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF505767))),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
|
||||||
):index == 2?DataColumn2(
|
|
||||||
label: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(item,
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
Text('(${widget.zgCount})',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF505767))),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
|
||||||
):DataColumn2(
|
|
||||||
label: Center(
|
|
||||||
child: Text(item,
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
|
||||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,464 +0,0 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/annotated_class.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/toast_utils.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/imgDialog.dart';
|
|
||||||
|
|
||||||
|
|
||||||
class ReportTable extends StatefulWidget {
|
|
||||||
final List headList;
|
|
||||||
final List bodyList;
|
|
||||||
final int? fixedRows;
|
|
||||||
final int? fixedCols;
|
|
||||||
final bool? isKG;
|
|
||||||
final String jobId;
|
|
||||||
final int studentCount;
|
|
||||||
|
|
||||||
const ReportTable({
|
|
||||||
Key? key,
|
|
||||||
required this.headList,
|
|
||||||
required this.bodyList,
|
|
||||||
required this.jobId,
|
|
||||||
required this.studentCount,
|
|
||||||
this.fixedCols = 0,
|
|
||||||
this.fixedRows = 0,
|
|
||||||
this.isKG = false,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<ReportTable> createState() => _ReportTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ReportTableState extends State<ReportTable> {
|
|
||||||
final ScrollController _controller = ScrollController();
|
|
||||||
int? _sortColumnIndex;
|
|
||||||
final bool _sortAscending = true;
|
|
||||||
|
|
||||||
void showPeopleListDialog(
|
|
||||||
{required BuildContext context,
|
|
||||||
required String title,
|
|
||||||
required String questionNo,
|
|
||||||
required List arr,
|
|
||||||
List? dcList}) {
|
|
||||||
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(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15.sp,
|
|
||||||
color: const Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
widget.isKG == true ? '主观题' : '客观题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: const Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'―',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: const Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'第$questionNo题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 15.r,
|
|
||||||
),
|
|
||||||
dcList != null
|
|
||||||
? Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'未作答人',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'答对人数',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'答错人',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6A6A6A)),
|
|
||||||
))),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Padding(
|
|
||||||
padding: EdgeInsets.only(left: 15.r),
|
|
||||||
child: Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp, color: Color(0xFF6A6A6A)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.r,
|
|
||||||
),
|
|
||||||
if (dcList != null)
|
|
||||||
Expanded(
|
|
||||||
child: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
var item = arr[index];
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
|
||||||
color:
|
|
||||||
index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goQuickCheckPersonalPath(
|
|
||||||
item['noAnswerStudents'].id);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item['noAnswerStudents']?.studentName??'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goQuickCheckPersonalPath(
|
|
||||||
item['answerOkStudents'].id);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item['answerOkStudents']?.studentName??'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goQuickCheckPersonalPath(
|
|
||||||
item['answerNgStudents'].id);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item['answerNgStudents']?.studentName??'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
)))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: arr.length,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
else
|
|
||||||
arr.isNotEmpty
|
|
||||||
? Expanded(
|
|
||||||
child: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
Dtls item = arr[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goQuickCheckPersonalPath(item.id);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 5.r, horizontal: 15.r),
|
|
||||||
color: index.isOdd
|
|
||||||
? Colors.white
|
|
||||||
: Color(0xFFF0F0F0),
|
|
||||||
child: Text(
|
|
||||||
item.studentName!??'--',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF323232)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: arr.length,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: const MyEmptyWidget()
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void goQuickCheckPersonalPath(id) {
|
|
||||||
if (id) {
|
|
||||||
/*RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
RouterManager.quickCheckPersonalPath +
|
|
||||||
'?jobId=${widget.jobId}&studentId=$id',
|
|
||||||
transition: getTransition(),
|
|
||||||
);*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void zdHandle(BuildContext context, String title, String questionNo,
|
|
||||||
List noAnswerStudents, List answerNgStudents, List answerOkStudents) {
|
|
||||||
List list = [];
|
|
||||||
// Questions student = Questions('','',-1,-1,'',-1,'','',[],-1,-1,[] as double?);
|
|
||||||
if (noAnswerStudents.length > answerNgStudents.length &&
|
|
||||||
noAnswerStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < noAnswerStudents.length; i++) {
|
|
||||||
var obj = {
|
|
||||||
'noAnswerStudents': noAnswerStudents[i],
|
|
||||||
'answerNgStudents':
|
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
|
||||||
'answerOkStudents':
|
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
} else if (answerNgStudents.length > noAnswerStudents.length &&
|
|
||||||
answerNgStudents.length > answerOkStudents.length) {
|
|
||||||
for (int i = 0; i < answerNgStudents.length; i++) {
|
|
||||||
var obj = {
|
|
||||||
'noAnswerStudents':
|
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
|
||||||
'answerNgStudents': answerNgStudents[i],
|
|
||||||
'answerOkStudents':
|
|
||||||
answerOkStudents.length > i ? answerOkStudents[i] : null
|
|
||||||
};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
} else if (answerOkStudents.length > noAnswerStudents.length &&
|
|
||||||
answerOkStudents.length > answerNgStudents.length) {
|
|
||||||
for (int i = 0; i < answerOkStudents.length; i++) {
|
|
||||||
var obj = {
|
|
||||||
'noAnswerStudents':
|
|
||||||
noAnswerStudents.length > i ? noAnswerStudents[i] : null,
|
|
||||||
'answerNgStudents':
|
|
||||||
answerNgStudents.length > i ? answerNgStudents[i] : null,
|
|
||||||
'answerOkStudents': answerOkStudents[i]
|
|
||||||
};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
showPeopleListDialog(
|
|
||||||
context: context,
|
|
||||||
title: title,
|
|
||||||
questionNo: questionNo,
|
|
||||||
arr: list,
|
|
||||||
dcList: []);
|
|
||||||
}
|
|
||||||
|
|
||||||
void dcHandle(
|
|
||||||
BuildContext context, String title, String questionNo, List arr) {
|
|
||||||
showPeopleListDialog(
|
|
||||||
context: context, title: title, questionNo: questionNo, arr: arr);
|
|
||||||
}
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
|
||||||
assert(index >= 0);
|
|
||||||
var item = widget.bodyList[index];
|
|
||||||
return DataRow2.byIndex(
|
|
||||||
index: index,
|
|
||||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
|
||||||
cells: [
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.questionNo.toString(),
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text('${item.answerRate.toStringAsFixed(0)}%',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF525252))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
zdHandle(context, '作答人数', item.questionNo.toString(), item.noAnswerStudents,
|
|
||||||
item.answerNgStudents, item.answerOkStudents);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text('${item.answerCount}/${widget.studentCount}',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793))),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/green_right_icon.png',
|
|
||||||
width: 12.r,
|
|
||||||
height: 12.r,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text('${item.okRate.toStringAsFixed(0)}%',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: widget.isKG == true
|
|
||||||
? InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (item.questionPicture == null) {
|
|
||||||
ToastUtils.showInfo('当前试题没有原题');
|
|
||||||
}else{
|
|
||||||
ImageDialog.showImgDialog(context,item.questionPicture);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Text('原题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isKG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: const Color(0xFF4CC793))),
|
|
||||||
)
|
|
||||||
: Text(item.answer,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: widget.isKG == true
|
|
||||||
? const Color(0xFFFF8A00)
|
|
||||||
: const Color(0xFF4CC793))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
// List<String> parts = item.priorityGeneral.split('人');
|
|
||||||
dcHandle(context, '优先批阅答错人', item.questionNo.toString(),
|
|
||||||
item.priorityInfo);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text('${item.priorityInfo.length}人答错',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 10.sp, color: const Color(0xFF6888FD))),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/job_data_right_icon.png',
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
bool isPadFlag = Utils.isPad();
|
|
||||||
return DataTable2(
|
|
||||||
dividerThickness: 0,
|
|
||||||
scrollController: _controller,
|
|
||||||
columnSpacing: 0,
|
|
||||||
horizontalMargin: 0,
|
|
||||||
dataRowHeight: 40.r,
|
|
||||||
bottomMargin: 0,
|
|
||||||
border: const TableBorder(
|
|
||||||
horizontalInside: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
bottom: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
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)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
|
||||||
minWidth: widget.headList.length > 6
|
|
||||||
? 80.r * widget.headList.length
|
|
||||||
: isPadFlag
|
|
||||||
? MediaQuery.of(context).size.width
|
|
||||||
: 85.r * widget.headList.length,
|
|
||||||
fixedTopRows: widget.fixedRows!,
|
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
|
||||||
sortColumnIndex: _sortColumnIndex,
|
|
||||||
sortAscending: _sortAscending,
|
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
|
||||||
var item = widget.headList[index];
|
|
||||||
return DataColumn2(
|
|
||||||
label: Center(
|
|
||||||
child: Text(item,
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: index == 0
|
|
||||||
? 40.r
|
|
||||||
: widget.headList.length > 6
|
|
||||||
? 80.r
|
|
||||||
: isPadFlag
|
|
||||||
? (MediaQuery.of(context).size.width - 8.r) /
|
|
||||||
widget.headList.length
|
|
||||||
: 85.r,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
|
||||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,20 +12,10 @@ import 'read_over_state.dart';
|
||||||
class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin{
|
class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin{
|
||||||
final ReadOverState state = ReadOverState();
|
final ReadOverState state = ReadOverState();
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
late TabController tabController2;
|
|
||||||
/* 待阅卷 */
|
/* 待阅卷 */
|
||||||
late final EasyRefreshController refreshController1;
|
late final EasyRefreshController refreshController1;
|
||||||
late final EasyRefreshController refreshController2;
|
late final EasyRefreshController refreshController2;
|
||||||
|
|
||||||
WorkStudentParams params = WorkStudentParams(
|
|
||||||
assessType: 0,
|
|
||||||
pageSize: 10,
|
|
||||||
);
|
|
||||||
WorkStudentParams params2 = WorkStudentParams(
|
|
||||||
assessType: 0,
|
|
||||||
pageSize: 10,
|
|
||||||
);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
@ -35,25 +25,21 @@ class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProvi
|
||||||
length: 2,
|
length: 2,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
tabController2 = TabController(length: 4, vsync: this);
|
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
//待批阅列表
|
|
||||||
void getList() async {
|
|
||||||
WorkStudent data = WorkStudent([], 0);
|
|
||||||
if(state.tabIndex.value == 0){
|
|
||||||
params.pageNumber = state.page;
|
|
||||||
data = await getClient().getUnAnnotateList(params);
|
|
||||||
}else{
|
|
||||||
params2.pageNumber = state.page;
|
|
||||||
data = await getClient().getAnnotatedList(params2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
void getList() async {
|
||||||
|
WorkStudentParams params = WorkStudentParams(
|
||||||
|
assessType: state.tabIndex.value,
|
||||||
|
);
|
||||||
|
WorkStudent data = await getClient().getWorkList(params);
|
||||||
state.workList.value = data.items;
|
state.workList.value = data.items;
|
||||||
refreshController1.finishRefresh();
|
refreshController1.finishRefresh();
|
||||||
refreshController2.finishRefresh();
|
refreshController2.finishRefresh();
|
||||||
print('state.workList.length=${state.workList.length}');
|
print('state.workList.length=');
|
||||||
|
print(state.workList.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 刷新方法
|
/// 刷新方法
|
||||||
Future<void> onMyRefresh(EasyRefreshController controller, int tab) async {
|
Future<void> onMyRefresh(EasyRefreshController controller, int tab) async {
|
||||||
/* params.page = RequestConfig.basePage.page;
|
/* params.page = RequestConfig.basePage.page;
|
||||||
|
|
@ -141,7 +127,6 @@ class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProvi
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
tabController.dispose();
|
tabController.dispose();
|
||||||
tabController2.dispose();
|
|
||||||
refreshController1.dispose();
|
refreshController1.dispose();
|
||||||
refreshController2.dispose();
|
refreshController2.dispose();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,4 @@ class ReadOverState {
|
||||||
late RxList<Items> workList = RxList();
|
late RxList<Items> workList = RxList();
|
||||||
late RxInt tabIndex = 0.obs;
|
late RxInt tabIndex = 0.obs;
|
||||||
late bool completedToRefresh = true;
|
late bool completedToRefresh = true;
|
||||||
late RxString customTimeStr = '自定义'.obs;
|
|
||||||
late int page = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,6 @@ import 'package:school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/read_over/widget/task_list_item.dart';
|
import 'package:school_asignment_app/page/home_page/children/read_over/widget/task_list_item.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
import 'read_over_logic.dart';
|
import 'read_over_logic.dart';
|
||||||
|
|
||||||
|
|
@ -25,9 +22,7 @@ class ReadOverPage extends StatefulWidget {
|
||||||
|
|
||||||
class _ReadOverPageState extends State<ReadOverPage> {
|
class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
final logic = Get.find<ReadOverLogic>();
|
final logic = Get.find<ReadOverLogic>();
|
||||||
final state = Get
|
final state = Get.find<ReadOverLogic>().state;
|
||||||
.find<ReadOverLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
@ -48,10 +43,7 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Container(
|
Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
margin: EdgeInsets.only(top: MediaQuery
|
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||||
.of(context)
|
|
||||||
.padding
|
|
||||||
.top),
|
|
||||||
padding: EdgeInsets.only(bottom: 9.h, top: 4.h),
|
padding: EdgeInsets.only(bottom: 9.h, top: 4.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
@ -114,23 +106,14 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
width: 140.w,
|
width: 140.w,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: state.tabIndex.value == 0
|
color: state.tabIndex.value == 0 ? const Color.fromRGBO(255, 255, 255, 1) : null,
|
||||||
? const Color.fromRGBO(
|
borderRadius: BorderRadius.all(Radius.circular(8.r)),
|
||||||
255, 255, 255, 1)
|
|
||||||
: null,
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(8.r)),
|
|
||||||
),
|
),
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'待批阅',
|
'待批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: state.tabIndex.value == 0 ? Theme
|
color: state.tabIndex.value == 0 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
||||||
.of(context)
|
fontWeight: state.tabIndex.value == 0 ? FontWeight.bold : null,
|
||||||
.primaryColor : const Color.fromRGBO(
|
|
||||||
80, 94, 110, 1),
|
|
||||||
fontWeight: state.tabIndex.value == 0
|
|
||||||
? FontWeight.bold
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -143,23 +126,14 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
width: 140.w,
|
width: 140.w,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: state.tabIndex.value == 1
|
color: state.tabIndex.value == 1 ? const Color.fromRGBO(255, 255, 255, 1) : null,
|
||||||
? const Color.fromRGBO(
|
borderRadius: BorderRadius.all(Radius.circular(8.r)),
|
||||||
255, 255, 255, 1)
|
|
||||||
: null,
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(8.r)),
|
|
||||||
),
|
),
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'已批阅',
|
'已批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: state.tabIndex.value == 1 ? Theme
|
color: state.tabIndex.value == 1 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
||||||
.of(context)
|
fontWeight: state.tabIndex.value == 1 ? FontWeight.bold : null,
|
||||||
.primaryColor : const Color.fromRGBO(
|
|
||||||
80, 94, 110, 1),
|
|
||||||
fontWeight: state.tabIndex.value == 1
|
|
||||||
? FontWeight.bold
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -177,67 +151,41 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
context, RouterManager.jobStudentGroupPath,
|
context, RouterManager.jobStudentGroupPath,
|
||||||
transition: getTransition());*/
|
transition: getTransition());*/
|
||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(const IconData(0xe63e, fontFamily: "AlibabaIcon"), color: const Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||||
const IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
|
||||||
color: const Color.fromRGBO(44, 48, 63, 1),
|
|
||||||
size: 24.sp),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Obx(() {
|
/* if (state.tabIndex.value == 1)
|
||||||
return state.tabIndex.value == 1?
|
$CompletedJobConditionFilter(
|
||||||
JobConditionFilter(
|
controller: _tabController2,
|
||||||
customTimeStr: state.customTimeStr.value,
|
jobType: params2.markingType ?? 1,
|
||||||
controller: logic.tabController2,
|
customTime: _tabController2.index != 3 ||
|
||||||
hasAll:true,
|
(params2.startTime == null && params2.endTime == null)
|
||||||
jobType: 1,
|
|
||||||
customTime: logic.tabController2.index != 3 ||
|
|
||||||
(logic.params2.startDate == null && logic.params2.endDate == null)
|
|
||||||
? null
|
? null
|
||||||
: PickerDateRange(
|
: PickerDateRange(
|
||||||
logic.params2.startDate == null ? null : DateTime.parse(
|
params2.startTime == null ? null : DateTime.parse(
|
||||||
logic.params2.startDate!),
|
params2.startTime!),
|
||||||
logic.params2.endDate == null ? null : DateTime.parse(logic.params2.endDate!),
|
params2.endTime == null ? null : DateTime.parse(params2
|
||||||
|
.endTime!),
|
||||||
),
|
),
|
||||||
|
onJobTypeTap: (int jobTypeVal) {
|
||||||
|
params2.markingType = jobTypeVal;
|
||||||
|
_refreshController2.callRefresh();
|
||||||
|
},
|
||||||
onTimeFilter: (String? startTime, String? endTime) {
|
onTimeFilter: (String? startTime, String? endTime) {
|
||||||
if (startTime == null && endTime == null &&
|
if (startTime == null && endTime == null &&
|
||||||
logic.tabController2.index == 3) {
|
_tabController2.index == 3) {
|
||||||
logic.tabController2.animateTo(0);
|
_tabController2.animateTo(0);
|
||||||
}
|
}
|
||||||
logic.params2.endDate = endTime;
|
params2.endTime = endTime;
|
||||||
logic.params2.startDate = startTime;
|
params2.startTime = startTime;
|
||||||
state.page = 1;
|
_refreshController2.callRefresh();
|
||||||
logic.getList();
|
|
||||||
// logic.refreshController2.callRefresh();
|
|
||||||
},
|
},
|
||||||
refreshTime: (value) {
|
),*/
|
||||||
if (value != null && value.startDate != null) {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
value.startDate?.toString().substring(0, 10) ?? '';
|
|
||||||
|
|
||||||
if (value.endDate != null) {
|
|
||||||
if (!Utils.isPad() &&
|
|
||||||
value.startDate!.year == value.endDate!.year) {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
'${value.startDate.toString().substring(5, 10)}~${value
|
|
||||||
.endDate.toString().substring(5, 10)}';
|
|
||||||
} else {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
'${state.customTimeStr.value}~${value.endDate
|
|
||||||
?.toString()
|
|
||||||
.substring(
|
|
||||||
0, 10)}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
):Container();
|
|
||||||
}),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Obx(() {
|
child: IndexedStack(
|
||||||
return IndexedStack(
|
|
||||||
index: state.tabIndex.value,
|
index: state.tabIndex.value,
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
$easyRefresh(
|
$easyRefresh(
|
||||||
|
|
@ -257,8 +205,7 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
onRefresh: logic.onMyRefresh,
|
onRefresh: logic.onMyRefresh,
|
||||||
logic: logic),
|
logic: logic),
|
||||||
],
|
],
|
||||||
);
|
)),
|
||||||
})),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
@ -281,10 +228,8 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
@swidget
|
@swidget
|
||||||
Widget $easyRefresh({
|
Widget $easyRefresh({
|
||||||
required EasyRefreshController controller,
|
required EasyRefreshController controller,
|
||||||
required Future<
|
required Future<void> Function(EasyRefreshController controller, int tab) onRefresh,
|
||||||
void> Function(EasyRefreshController controller, int tab) onRefresh,
|
required Future<void> Function(EasyRefreshController controller, int tab) onLoad,
|
||||||
required Future<
|
|
||||||
void> Function(EasyRefreshController controller, int tab) onLoad,
|
|
||||||
required List<Items> data,
|
required List<Items> data,
|
||||||
required int tab,
|
required int tab,
|
||||||
required int type,
|
required int type,
|
||||||
|
|
@ -304,8 +249,7 @@ Widget $easyRefresh({
|
||||||
footer: TaurusFooter(),
|
footer: TaurusFooter(),
|
||||||
child: completed && isPadFlag
|
child: completed && isPadFlag
|
||||||
? GridView(
|
? GridView(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||||
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
|
|
@ -315,13 +259,11 @@ Widget $easyRefresh({
|
||||||
children: List.generate(data.length, (index) {
|
children: List.generate(data.length, (index) {
|
||||||
Items item = data[index];
|
Items item = data[index];
|
||||||
String subjectName = EnumUtils.formatSubject(item.subject);
|
String subjectName = EnumUtils.formatSubject(item.subject);
|
||||||
return $reviewedItem(
|
return $reviewedItem(jobTaskItem: item, type: type, subjectName: subjectName);
|
||||||
jobTaskItem: item, type: type, subjectName: subjectName);
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||||
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
Items item = data[index];
|
Items item = data[index];
|
||||||
return TaskListItem(
|
return TaskListItem(
|
||||||
|
|
@ -329,6 +271,11 @@ Widget $easyRefresh({
|
||||||
jobTaskItem: item,
|
jobTaskItem: item,
|
||||||
type: type,
|
type: type,
|
||||||
);
|
);
|
||||||
|
/*HomeworkTasksViewItem(
|
||||||
|
completed: completed,
|
||||||
|
jobTaskItem: data[index],
|
||||||
|
call: () => controller.callRefresh(),
|
||||||
|
);*/
|
||||||
},
|
},
|
||||||
itemCount: data.length,
|
itemCount: data.length,
|
||||||
),
|
),
|
||||||
|
|
@ -339,8 +286,7 @@ Widget $easyRefresh({
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget $reviewedItem(
|
Widget $reviewedItem({required Items jobTaskItem, required int type, required String subjectName}) {
|
||||||
{required Items jobTaskItem, required int type, required String subjectName}) {
|
|
||||||
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
|
|
@ -348,7 +294,6 @@ Widget $reviewedItem(
|
||||||
/* String url =
|
/* String url =
|
||||||
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
|
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
|
||||||
RouterManager.router.navigateTo(context, url, transition: getTransition());*/
|
RouterManager.router.navigateTo(context, url, transition: getTransition());*/
|
||||||
Get.toNamed(Routes.annotateClassPage,arguments: {'id':jobTaskItem.id,'name':jobTaskItem.name,'grade':jobTaskItem.grade});
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(top: 10.h),
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
|
|
@ -379,9 +324,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
|
color: type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 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),
|
||||||
|
|
@ -390,13 +333,10 @@ Widget $reviewedItem(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
margin: EdgeInsets.only(right: 4.w),
|
||||||
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white,
|
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
|
||||||
size: 10.sp),
|
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: quickText(jobTaskItem.name, size: 14.sp,
|
child: quickText(jobTaskItem.name, size: 14.sp, color: const Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
|
||||||
color: const Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
maxLines: 2),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -408,15 +348,12 @@ Widget $reviewedItem(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText(
|
quickText(
|
||||||
DateTime.parse(jobTaskItem.publishTime).toString().substring(
|
jobTaskItem.publishTime.substring(0, 10),
|
||||||
0, 10),
|
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 10.sp,
|
size: 10.sp,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: const Color.fromRGBO(76, 199, 147, 1),
|
quickText(' / ', color: const Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||||
size: 10.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
quickText(
|
quickText(
|
||||||
'参与班级:',
|
'参与班级:',
|
||||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
|
|
@ -427,9 +364,7 @@ Widget $reviewedItem(
|
||||||
color: const Color.fromRGBO(76, 199, 147, 1),
|
color: const Color.fromRGBO(76, 199, 147, 1),
|
||||||
size: 10.sp,
|
size: 10.sp,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: const Color.fromRGBO(116, 145, 253, 1),
|
quickText(' / ', color: const Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||||
size: 10.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
quickText(
|
quickText(
|
||||||
'科目:$subjectName',
|
'科目:$subjectName',
|
||||||
color: const Color.fromRGBO(116, 145, 253, 1),
|
color: const Color.fromRGBO(116, 145, 253, 1),
|
||||||
|
|
@ -448,15 +383,17 @@ Widget $reviewedItem(
|
||||||
),*/
|
),*/
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.jobReportPage,arguments: {'title':jobTaskItem.name,'homeworkId':jobTaskItem.id,'grade':jobTaskItem.grade});
|
/* RouterManager.router.navigateTo(
|
||||||
|
context,
|
||||||
|
RouterManager.jobReportPagePath +
|
||||||
|
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||||
|
transition: getTransition(),
|
||||||
|
);*/
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
bottomLeft: Radius.circular(6.r),
|
|
||||||
bottomRight: Radius.circular(6.r)),
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
boxShadow: const [
|
boxShadow: const [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
|
|
@ -471,9 +408,7 @@ Widget $reviewedItem(
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: quickText(
|
child: quickText('查看报告', color: const Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
|
||||||
'查看报告', color: const Color.fromRGBO(118, 118, 118, 1),
|
|
||||||
size: 11.sp),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,10 @@
|
||||||
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:percent_indicator/percent_indicator.dart';
|
import 'package:percent_indicator/percent_indicator.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student.dart';
|
import 'package:school_asignment_app/common/job/work_student.dart';
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
import 'package:school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
|
|
||||||
class TaskListItem extends StatefulWidget {
|
class TaskListItem extends StatefulWidget {
|
||||||
final bool completed;
|
final bool completed;
|
||||||
|
|
@ -91,7 +89,8 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0,10),
|
quickText(
|
||||||
|
widget.jobTaskItem.publishTime.substring(0, 10),
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 12.sp,
|
size: 12.sp,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
|
|
@ -154,7 +153,11 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
:
|
:
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Get.toNamed(Routes.annotateClassPage,arguments: {'id':widget.jobTaskItem.id,'name':widget.jobTaskItem.name,'grade':widget.jobTaskItem.grade});
|
/*String url =
|
||||||
|
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}';
|
||||||
|
RouterManager.router.navigateTo(context, url, transition: getTransition()).then((value) {
|
||||||
|
if (value != null && value == true) call();
|
||||||
|
});*/
|
||||||
},
|
},
|
||||||
child: Stack(
|
child: Stack(
|
||||||
alignment: const FractionalOffset(0.95, 0),
|
alignment: const FractionalOffset(0.95, 0),
|
||||||
|
|
@ -241,7 +244,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
),
|
),
|
||||||
quickText(' / ',
|
quickText(' / ',
|
||||||
color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||||
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0,10),
|
quickText(widget.jobTaskItem.publishTime.substring(0, 16),
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
|
color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -259,7 +262,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
radius: 40.r,
|
radius: 40.r,
|
||||||
lineWidth: 10.r,
|
lineWidth: 10.r,
|
||||||
animation: true,
|
animation: true,
|
||||||
percent: widget.jobTaskItem.annotateRate==null?0:widget.jobTaskItem.annotateRate! / 100,
|
percent: widget.jobTaskItem.annotateRate / 100,
|
||||||
center: Text.rich(TextSpan(children: [
|
center: Text.rich(TextSpan(children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: Utils.getDoubleRemoveZero(widget.jobTaskItem.annotateRate, '0'),
|
text: Utils.getDoubleRemoveZero(widget.jobTaskItem.annotateRate, '0'),
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ class StudentHistoryWorkLogic extends GetxController with RequestToolMixin {
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void goNextPage(String id,String title,int subject) {
|
void goNextPage(String id,String title) {
|
||||||
Get.toNamed(Routes.classStudentPage,arguments: {'title':title,'classId':id,'page':nextPage,'subject':subject});
|
Get.toNamed(Routes.classStudentPage,arguments: {'title':title,'classId':id,'page':nextPage});
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text(
|
title: Text(
|
||||||
'我的班级 ',
|
'我的学生分组',
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'student_personal_logic.dart';
|
|
||||||
|
|
||||||
class StudentPersonalBinding extends Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut(() => StudentPersonalLogic());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_personal_info.dart';
|
|
||||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
|
||||||
|
|
||||||
import 'student_personal_state.dart';
|
|
||||||
|
|
||||||
class StudentPersonalLogic extends GetxController with RequestToolMixin{
|
|
||||||
final StudentPersonalState state = StudentPersonalState();
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit(){
|
|
||||||
super.onInit();
|
|
||||||
state.studentId = Get.arguments['studentId'];
|
|
||||||
state.homeworkId = Get.arguments['homeworkId'];
|
|
||||||
getInfo();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getInfo() async{
|
|
||||||
StudentPersonalInfo data = await getClient().getStudentHomework(state.homeworkId,state.studentId);
|
|
||||||
state.studentInfo.value = data;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_personal_info.dart';
|
|
||||||
|
|
||||||
class StudentPersonalState {
|
|
||||||
StudentPersonalState() {
|
|
||||||
///Initialize variables
|
|
||||||
}
|
|
||||||
late Rx<StudentPersonalInfo> studentInfo = Rx(StudentPersonalInfo(0,'',0,0,[],0,[]));
|
|
||||||
late int studentId;
|
|
||||||
late String homeworkId;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,232 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_personal/widget/student_kg_table.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_personal/widget/student_zg_table.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
|
|
||||||
import 'student_personal_logic.dart';
|
|
||||||
|
|
||||||
class StudentPersonalPage extends StatefulWidget {
|
|
||||||
const StudentPersonalPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StudentPersonalPage> createState() => _StudentPersonalPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
|
||||||
final logic = Get.find<StudentPersonalLogic>();
|
|
||||||
final state = Get
|
|
||||||
.find<StudentPersonalLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Obx(() {
|
|
||||||
return Text(
|
|
||||||
state.studentInfo.value.studentName,
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF000000)),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: const [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 14.r, left: 14.r),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
// RouterManager.router.navigateTo(context,
|
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
|
||||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
|
||||||
'studentId': state.studentInfo.value.studentId,
|
|
||||||
'studentName': state.studentInfo.value.studentName
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 93.r,
|
|
||||||
height: 28.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFEAF3FF),
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'历史作业',
|
|
||||||
style: TextStyle(fontSize: 10.r,
|
|
||||||
color: Color(0xFF2080F7)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
/* showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId).then((value) {
|
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
});*/
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 93.r,
|
|
||||||
height: 28.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFEDFFF7),
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'原稿笔迹',
|
|
||||||
style: TextStyle(fontSize: 10.r,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
//客观题
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
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(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return Text(
|
|
||||||
'${state.studentInfo.value.kgtCorrectRate}%',
|
|
||||||
style: TextStyle(fontSize: 14.sp,
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return SizedBox(
|
|
||||||
height: state.studentInfo.value.kgtList.length > 8
|
|
||||||
? 300.r
|
|
||||||
: state
|
|
||||||
.studentInfo.value.kgtList.length * 40.r + 40.r,
|
|
||||||
child: StudentKgTable(
|
|
||||||
headList: ['题号', '学生答案', '标准答案'],
|
|
||||||
bodyList: state.studentInfo.value.kgtList,
|
|
||||||
questionNumCall: (no) {
|
|
||||||
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
|
||||||
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
// });
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 15.r,
|
|
||||||
),
|
|
||||||
//主观题
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
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(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return Text(
|
|
||||||
'${state.studentInfo.value.zgtCorrectRate}%',
|
|
||||||
style: TextStyle(fontSize: 14.sp,
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return SizedBox(
|
|
||||||
height: state.studentInfo.value.zgtList.length > 8
|
|
||||||
? 300.r
|
|
||||||
: state
|
|
||||||
.studentInfo.value.zgtList.length * 40.r + 40.r,
|
|
||||||
child: StudentZgTable(
|
|
||||||
headList: ['题号', '用时', '批注结果', '答案'],
|
|
||||||
bodyList: state.studentInfo.value.zgtList,
|
|
||||||
questionNumCall: (no) {
|
|
||||||
/* showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
});*/
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
Get.delete<StudentPersonalLogic>();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,118 +0,0 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_personal_info.dart';
|
|
||||||
|
|
||||||
class StudentKgTable extends StatefulWidget {
|
|
||||||
final List headList;
|
|
||||||
final List bodyList;
|
|
||||||
final int? fixedRows;
|
|
||||||
final int? fixedCols;
|
|
||||||
final Function(String)? questionNumCall;
|
|
||||||
|
|
||||||
const StudentKgTable({
|
|
||||||
Key? key,
|
|
||||||
required this.headList,
|
|
||||||
required this.bodyList,
|
|
||||||
this.fixedCols = 0,
|
|
||||||
this.fixedRows = 0,
|
|
||||||
this.questionNumCall,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StudentKgTable> createState() => _StudentKgTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _StudentKgTableState extends State<StudentKgTable> {
|
|
||||||
final ScrollController _controller = ScrollController();
|
|
||||||
int? _sortColumnIndex;
|
|
||||||
final bool _sortAscending = true;
|
|
||||||
|
|
||||||
String sortString(String str) {
|
|
||||||
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
|
||||||
}
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
|
||||||
assert(index >= 0);
|
|
||||||
KgtList item = widget.bodyList[index];
|
|
||||||
return DataRow2.byIndex(
|
|
||||||
index: index,
|
|
||||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
|
||||||
cells: [
|
|
||||||
DataCell(
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (widget.questionNumCall != null) {
|
|
||||||
widget.questionNumCall!(item.questionNo.toString());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.questionNo.toString(), style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(
|
|
||||||
item.studentAnswer == null ? '未作答' : item.studentAnswer!,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: item.studentAnswer == null
|
|
||||||
? Color(0xFF525252)
|
|
||||||
: item.isCorrect!
|
|
||||||
? const Color(0xFF4CC793)
|
|
||||||
: const Color(0xFFFF7474)),
|
|
||||||
),
|
|
||||||
))),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.answer == null ? '无' : item.answer!, style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return DataTable2(
|
|
||||||
dividerThickness: 0,
|
|
||||||
scrollController: _controller,
|
|
||||||
columnSpacing: 0,
|
|
||||||
horizontalMargin: 0,
|
|
||||||
bottomMargin: 0,
|
|
||||||
dataRowHeight: 40.r,
|
|
||||||
headingRowHeight: 40.r,
|
|
||||||
border: TableBorder(
|
|
||||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
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)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
|
||||||
minWidth: MediaQuery.of(context).size.width,
|
|
||||||
fixedTopRows: widget.fixedRows!,
|
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
|
||||||
sortColumnIndex: _sortColumnIndex,
|
|
||||||
sortAscending: _sortAscending,
|
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
|
||||||
var item = widget.headList[index];
|
|
||||||
return DataColumn2(
|
|
||||||
label: Center(
|
|
||||||
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 3,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,152 +0,0 @@
|
||||||
import 'package:data_table_2/data_table_2.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/homework_details.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_personal_info.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/imgDialog.dart';
|
|
||||||
|
|
||||||
class StudentZgTable extends StatefulWidget {
|
|
||||||
final List headList;
|
|
||||||
final List bodyList;
|
|
||||||
final int? fixedRows;
|
|
||||||
final int? fixedCols;
|
|
||||||
final Function(String)? questionNumCall;
|
|
||||||
|
|
||||||
const StudentZgTable({
|
|
||||||
Key? key,
|
|
||||||
required this.headList,
|
|
||||||
required this.bodyList,
|
|
||||||
this.fixedCols = 0,
|
|
||||||
this.fixedRows = 0,
|
|
||||||
this.questionNumCall,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StudentZgTable> createState() => _StudentZgTableState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _StudentZgTableState extends State<StudentZgTable> {
|
|
||||||
final ScrollController _controller = ScrollController();
|
|
||||||
int? _sortColumnIndex;
|
|
||||||
bool _sortAscending = true;
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
|
||||||
assert(index >= 0);
|
|
||||||
ZgtList item = widget.bodyList[index];
|
|
||||||
return DataRow2.byIndex(
|
|
||||||
index: index,
|
|
||||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
|
||||||
cells: [
|
|
||||||
DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (widget.questionNumCall != null) {
|
|
||||||
widget.questionNumCall!(item.questionNo.toString());
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.questionNo.toString(),
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(Utils.second2HMS(item.useTime!),
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
/* DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (item.state != 0) {
|
|
||||||
ImageDialog.showImgDialog(context, item.studentAnswer!);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.state != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),*/
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: item.isCorrect == null
|
|
||||||
? Text('',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252)))
|
|
||||||
: item.isCorrect!
|
|
||||||
? Image.asset(
|
|
||||||
'assets/images/job_personal_correct_icon.png',
|
|
||||||
width: 18.r,
|
|
||||||
height: 18.r,
|
|
||||||
)
|
|
||||||
: Image.asset(
|
|
||||||
'assets/images/job_personal_error_icon.png',
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
DataCell(InkWell(
|
|
||||||
onTap: () {
|
|
||||||
ImageDialog.showImgDialog(context, item.picture!);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text('查看',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return DataTable2(
|
|
||||||
dividerThickness: 0,
|
|
||||||
scrollController: _controller,
|
|
||||||
columnSpacing: 0,
|
|
||||||
horizontalMargin: 0,
|
|
||||||
bottomMargin: 0,
|
|
||||||
headingRowHeight: 40.r,
|
|
||||||
dataRowHeight: 40.r,
|
|
||||||
border: TableBorder(
|
|
||||||
horizontalInside: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
bottom: BorderSide(
|
|
||||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
|
||||||
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)),
|
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
|
||||||
fixedCornerColor: Colors.grey[400],
|
|
||||||
minWidth: MediaQuery.of(context).size.width,
|
|
||||||
fixedTopRows: widget.fixedRows!,
|
|
||||||
fixedLeftColumns: widget.fixedCols!,
|
|
||||||
sortColumnIndex: _sortColumnIndex,
|
|
||||||
sortAscending: _sortAscending,
|
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
|
||||||
var item = widget.headList[index];
|
|
||||||
return DataColumn2(
|
|
||||||
label: Center(
|
|
||||||
child: Text(item,
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 4,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
|
||||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
|
|
||||||
import 'student_work_detail_logic.dart';
|
|
||||||
|
|
||||||
class StudentWorkDetailBinding extends Bindings {
|
|
||||||
@override
|
|
||||||
void dependencies() {
|
|
||||||
Get.lazyPut(() => StudentWorkDetailLogic());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,64 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history_params.dart';
|
|
||||||
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
|
|
||||||
|
|
||||||
import 'student_work_detail_state.dart';
|
|
||||||
|
|
||||||
class StudentWorkDetailLogic extends GetxController with RequestToolMixin, GetSingleTickerProviderStateMixin{
|
|
||||||
final StudentWorkDetailState state = StudentWorkDetailState();
|
|
||||||
late TabController tabController;
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void onInit() {
|
|
||||||
super.onInit();
|
|
||||||
state.studentName.value = Get.arguments['studentName'] ?? '';
|
|
||||||
state.studentId = Get.arguments['studentId'] ?? -1;
|
|
||||||
tabController = TabController(length: 3, vsync: this);
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getList() async {
|
|
||||||
StudentHistoryParams params = StudentHistoryParams(
|
|
||||||
assessType: state.isJob.value?0:1,
|
|
||||||
studentId: state.studentId,
|
|
||||||
dateStart: state.dateStart,
|
|
||||||
dateEnd: state.dateEnd,
|
|
||||||
pageNumber: state.page,
|
|
||||||
pageSize: 10,
|
|
||||||
);
|
|
||||||
StudentHistory data = await getClient().getStudentHistory(params);
|
|
||||||
state.studentData.value = data;
|
|
||||||
for(var element in state.studentData.value.items.items){
|
|
||||||
int num = 0;
|
|
||||||
for (var item in element.kgtList) {
|
|
||||||
if (item.state == 0) {
|
|
||||||
num = num + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (var subject in element.zgtList) {
|
|
||||||
if (subject.state == 0) {
|
|
||||||
num = num + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (num == (element.kgtList.length + element.zgtList.length)) {
|
|
||||||
element.allNotDone = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
tabController.dispose();
|
|
||||||
refreshController.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
|
|
||||||
class StudentWorkDetailState {
|
|
||||||
StudentWorkDetailState() {
|
|
||||||
///Initialize variables
|
|
||||||
}
|
|
||||||
|
|
||||||
late RxString studentName = ''.obs;
|
|
||||||
late int studentId = -1;
|
|
||||||
late RxBool isJob = true.obs;
|
|
||||||
late int page = 1;
|
|
||||||
late int totalPages = 0;
|
|
||||||
late String dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
|
|
||||||
late String dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
|
|
||||||
late RxString customTimeStr = '自定义'.obs;
|
|
||||||
late Rx<StudentHistory> studentData = Rx(StudentHistory(0,0,Items([],0),0));
|
|
||||||
}
|
|
||||||
|
|
@ -1,598 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/student_history.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_work_detail/widget/job_condition_filter.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
|
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
import 'student_work_detail_logic.dart';
|
|
||||||
|
|
||||||
class StudentWorkDetailPage extends StatefulWidget {
|
|
||||||
const StudentWorkDetailPage({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<StudentWorkDetailPage> createState() => _StudentWorkDetailPageState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|
||||||
final logic = Get.find<StudentWorkDetailLogic>();
|
|
||||||
final state = Get
|
|
||||||
.find<StudentWorkDetailLogic>()
|
|
||||||
.state;
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text('${state.studentName}作业详情',
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: const [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
elevation: 0,
|
|
||||||
),
|
|
||||||
body: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 1.r,
|
|
||||||
width: MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width,
|
|
||||||
color: Color.fromRGBO(179, 179, 179, 0.3),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
color: Colors.white,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 2.r),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
state.page = 1;
|
|
||||||
state.totalPages = 0;
|
|
||||||
state.isJob.value = true;
|
|
||||||
logic.getList();
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
width: (MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width - 1.r) / 2,
|
|
||||||
height: 40.r,
|
|
||||||
child: Obx(() {
|
|
||||||
return Center(
|
|
||||||
child: Text(
|
|
||||||
'作业',
|
|
||||||
style: TextStyle(fontSize: 14.sp,
|
|
||||||
color: state.isJob.value
|
|
||||||
? Color(0xFF7491FD)
|
|
||||||
: Color(0xFF505E6E)),
|
|
||||||
));
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 40.r,
|
|
||||||
width: 1.r,
|
|
||||||
color: Color.fromRGBO(179, 179, 179, 0.3),
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
state.isJob.value = false;
|
|
||||||
state.page = 1;
|
|
||||||
state.totalPages = 0;
|
|
||||||
logic.getList();
|
|
||||||
},
|
|
||||||
child: SizedBox(
|
|
||||||
width: (MediaQuery
|
|
||||||
.of(context)
|
|
||||||
.size
|
|
||||||
.width - 1.r) / 2,
|
|
||||||
height: 40.r,
|
|
||||||
child: Center(
|
|
||||||
child: Obx(() {
|
|
||||||
return Text(
|
|
||||||
'考试',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: !state.isJob.value
|
|
||||||
? Color(0xFF7491FD)
|
|
||||||
: Color(0xFF505E6E)),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Obx(() {
|
|
||||||
return Container(
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 10.r, left: 10.r, right: 10.r, bottom: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white),
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'总览:',
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF7491FD),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
|
||||||
ProgressBar(
|
|
||||||
title: '客观题正确率:',
|
|
||||||
color: Color(0xFFB8C7FF),
|
|
||||||
percent: state.studentData.value.kgtCorrectRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
ProgressBar(
|
|
||||||
title: '主观题正确率:',
|
|
||||||
color: Color(0xFFB8C7FF),
|
|
||||||
percent: state.studentData.value.zgtCorrectRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
ProgressBar(
|
|
||||||
title: '总正确率:',
|
|
||||||
color: Color(0xFFB8C7FF),
|
|
||||||
percent: state.studentData.value.correctRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
|
|
||||||
|
|
||||||
Obx(() {
|
|
||||||
return JobConditionFilter(
|
|
||||||
controller: logic.tabController,
|
|
||||||
jobType: state.isJob.value ? 1 : 2,
|
|
||||||
customTimeStr: state.customTimeStr.value,
|
|
||||||
customTime: logic.tabController.index != 2 ||
|
|
||||||
((state.dateEnd == null || state.dateEnd == '') &&
|
|
||||||
(state.dateStart == null || state.dateStart == ''))
|
|
||||||
? null
|
|
||||||
: PickerDateRange(
|
|
||||||
state.dateStart == null || state.dateStart == ''
|
|
||||||
? null
|
|
||||||
: DateTime
|
|
||||||
.parse(state.dateStart!),
|
|
||||||
state.dateEnd == null || state.dateEnd == '' ? null : DateTime
|
|
||||||
.parse(state.dateEnd!),
|
|
||||||
),
|
|
||||||
onTimeFilter: (String? startTime, String? endTime) {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
if (startTime == null && endTime == null) {
|
|
||||||
if (logic.tabController.index == 2) {
|
|
||||||
logic.tabController.animateTo(0);
|
|
||||||
}
|
|
||||||
state.dateStart =
|
|
||||||
Utils.getWeekStartDate().toString().substring(0, 10);
|
|
||||||
state.dateEnd =
|
|
||||||
Utils.getWeekEndDate().toString().substring(0, 10);
|
|
||||||
state.customTimeStr.value = '自定义';
|
|
||||||
} else {
|
|
||||||
state.dateStart = startTime ?? '';
|
|
||||||
state.dateEnd = endTime ?? '';
|
|
||||||
}
|
|
||||||
state.page = 1;
|
|
||||||
logic.getList();
|
|
||||||
},
|
|
||||||
refreshTime: (value) {
|
|
||||||
if (value != null && value.startDate != null) {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
value.startDate?.toString().substring(0, 10) ?? '';
|
|
||||||
|
|
||||||
if (value.endDate != null) {
|
|
||||||
if (!Utils.isPad() &&
|
|
||||||
value.startDate!.year == value.endDate!.year) {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
'${value.startDate.toString().substring(5, 10)}~${value
|
|
||||||
.endDate.toString().substring(5, 10)}';
|
|
||||||
} else {
|
|
||||||
state.customTimeStr.value =
|
|
||||||
'${state.customTimeStr.value}~${value.endDate
|
|
||||||
?.toString()
|
|
||||||
.substring(
|
|
||||||
0, 10)}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 14.r, right: 14.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'注:',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
// color: Color(0xFF4CC793),
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'正确',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
// color: Color(0xFFFF7474),
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFFFF7474)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'错误',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
// color: Color(0xFF666666),
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF666666)),
|
|
||||||
// border: Border.all(width: 1.r,color: Colors.grey),
|
|
||||||
/* boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: Colors.grey,
|
|
||||||
offset: Offset(1.w, 1.h), //阴影y轴偏移量
|
|
||||||
blurRadius: 4, //阴影模糊程度
|
|
||||||
spreadRadius: 0.1, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],*/
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'已作答未批阅',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 15.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(5.r)),
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
|
||||||
// color: Color(0xFFDDDDDD),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 2.r,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'未做',
|
|
||||||
style: TextStyle(fontSize: 8.sp, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
|
||||||
child: Obx(() {
|
|
||||||
return EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: logic.refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
state.page = 1;
|
|
||||||
logic.getList();
|
|
||||||
},
|
|
||||||
onLoad: () async {
|
|
||||||
if (state.page < state.totalPages) {
|
|
||||||
state.page += 1;
|
|
||||||
logic.getList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: state.studentData.value.items.items.isNotEmpty
|
|
||||||
? ListView.builder(
|
|
||||||
itemCount: state.studentData.value.items.items.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
StudentItems item = state.studentData.value.items
|
|
||||||
.items[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(Routes.studentPersonalPage, arguments: {
|
|
||||||
'homeworkId': item.id,
|
|
||||||
'studentId': state.studentId
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 5.r,
|
|
||||||
horizontal: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r,
|
|
||||||
horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(10.r)),
|
|
||||||
color: item.allNotDone
|
|
||||||
? const Color(0xFFFFEDD3)
|
|
||||||
: Colors.white),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 32.w,
|
|
||||||
height: 18.h,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: state.isJob.value ? const Color
|
|
||||||
.fromRGBO(
|
|
||||||
104, 136, 253, 1) : const Color(
|
|
||||||
0xFFFFA116),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(14.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: Text(
|
|
||||||
state.isJob.value ? '作业' : '考试',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.name,
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF464646)),
|
|
||||||
)),
|
|
||||||
// SizedBox(width: 5.r,),
|
|
||||||
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
|
|
||||||
|
|
||||||
Container(
|
|
||||||
width: 40.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(4.r)),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
EnumUtils.formatSubject(
|
|
||||||
item.subject),
|
|
||||||
style: TextStyle(fontSize: 10.sp,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'客:',
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF5B5B5B)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
item.kgtList.isNotEmpty
|
|
||||||
? Expanded(
|
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
spacing: 8,
|
|
||||||
runSpacing: 5,
|
|
||||||
children: List.generate(
|
|
||||||
item.kgtList.length, (i) {
|
|
||||||
KgtList subjective = item
|
|
||||||
.kgtList[i];
|
|
||||||
return Container(
|
|
||||||
width: 20.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.transparent,
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r,
|
|
||||||
color: subjective.state == 0
|
|
||||||
? Color(0xFFDDDDDD)
|
|
||||||
: subjective.state == 3
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: subjective.state == 2
|
|
||||||
? Color(0xFFFF7474)
|
|
||||||
: Color(0xFF666666)),
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(10.r))),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
subjective.questionNo
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.r,
|
|
||||||
color: subjective.state ==
|
|
||||||
0
|
|
||||||
? Color(0xFFDDDDDD)
|
|
||||||
: subjective.state ==
|
|
||||||
3
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: subjective.state ==
|
|
||||||
2
|
|
||||||
? Color(0xFFFF7474)
|
|
||||||
: Color(0xFF666666)),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Text(
|
|
||||||
'无',
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF5B5B5B)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'主:',
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF5B5B5B)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
item.zgtList.isNotEmpty
|
|
||||||
? Expanded(
|
|
||||||
child: Wrap(
|
|
||||||
direction: Axis.horizontal,
|
|
||||||
alignment: WrapAlignment.start,
|
|
||||||
spacing: 8,
|
|
||||||
runSpacing: 5,
|
|
||||||
children: List.generate(
|
|
||||||
item.zgtList.length, (i) {
|
|
||||||
ZgtList subjective = item
|
|
||||||
.zgtList[i];
|
|
||||||
return Container(
|
|
||||||
width: 20.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.transparent,
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r,
|
|
||||||
color: subjective.state == 0
|
|
||||||
? Color(0xFFDDDDDD)
|
|
||||||
: subjective.state == 3
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: subjective.state == 2
|
|
||||||
? Color(0xFFFF7474)
|
|
||||||
: Color(0xFF666666)),
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(10.r))),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
subjective.questionNo
|
|
||||||
.toString(),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.r,
|
|
||||||
color: subjective.state ==
|
|
||||||
0
|
|
||||||
? Color(0xFFDDDDDD)
|
|
||||||
: subjective.state ==
|
|
||||||
3
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: subjective.state ==
|
|
||||||
2
|
|
||||||
? Color(0xFFFF7474)
|
|
||||||
: Color(0xFF666666)),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
: Text(
|
|
||||||
'无',
|
|
||||||
style: TextStyle(fontSize: 12.sp,
|
|
||||||
color: Color(0xFF5B5B5B)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
ProgressBar(
|
|
||||||
title: '客观题正确率:',
|
|
||||||
color: Color(0xFF90E0BE),
|
|
||||||
percent: item.kgtCorrectRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
ProgressBar(
|
|
||||||
title: '主观题正确率:',
|
|
||||||
color: Color(0xFF90E0BE),
|
|
||||||
percent: item.zgtCorrectRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
ProgressBar(
|
|
||||||
title: '总正确率:',
|
|
||||||
color: Color(0xFF90E0BE),
|
|
||||||
percent: item.correctRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: const MyEmptyWidget(),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
Get.delete<StudentWorkDetailLogic>();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,178 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:get/get.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_work_detail/widget/personal_detail_topbar.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
class JobConditionFilter extends StatefulWidget {
|
|
||||||
final TabController controller;
|
|
||||||
final int jobType;
|
|
||||||
final PickerDateRange? customTime;
|
|
||||||
final Function? refreshTime;
|
|
||||||
final String customTimeStr;
|
|
||||||
final bool? hasAll;
|
|
||||||
final Function(String? startTime, String? endTime) onTimeFilter;
|
|
||||||
const JobConditionFilter({Key? key,
|
|
||||||
required this.controller,
|
|
||||||
required this.jobType,
|
|
||||||
this.customTime,
|
|
||||||
this.refreshTime,
|
|
||||||
required this.customTimeStr,
|
|
||||||
required this.onTimeFilter,
|
|
||||||
this.hasAll = false,
|
|
||||||
}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<JobConditionFilter> createState() => _JobConditionFilterState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _JobConditionFilterState extends State<JobConditionFilter> {
|
|
||||||
|
|
||||||
var customTimeState = const PickerDateRange(null, null);
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
if (widget.customTime != null) {
|
|
||||||
customTimeState = PickerDateRange(widget.customTime!.startDate,
|
|
||||||
widget.customTime!.endDate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DateTime getMonthStartDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
return DateTime(now.year, now.month, 1); // 获取当前月份的第一天
|
|
||||||
}
|
|
||||||
|
|
||||||
DateTime getMonthEndDate() {
|
|
||||||
DateTime now = DateTime.now();
|
|
||||||
int nextMonth = now.month + 1;
|
|
||||||
if (nextMonth > 12) {
|
|
||||||
nextMonth = 1;
|
|
||||||
now = now.add(Duration(days: 31 - now.day)); // 跨年了,所以加到当前月的最后一天
|
|
||||||
} else {
|
|
||||||
now = now.add(Duration(days: DateTime(now.year, nextMonth, 0).day - now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
|
||||||
}
|
|
||||||
return now;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
// height: 39.h,
|
|
||||||
// padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
// border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
|
||||||
),
|
|
||||||
child: PersonalDetailTopBar(
|
|
||||||
controller: widget.controller,
|
|
||||||
customTimeStr: widget.customTimeStr,
|
|
||||||
hasAll: widget.hasAll,
|
|
||||||
onTap: (int val) async {
|
|
||||||
if(val == 0 && widget.hasAll == true){
|
|
||||||
widget.onTimeFilter(null, null);
|
|
||||||
}else if(val == 1 || (val == 0 && widget.hasAll == false)){
|
|
||||||
widget.onTimeFilter(
|
|
||||||
Utils.getWeekStartDate().toString().substring(0, 10),
|
|
||||||
Utils.getWeekEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
}else if(val == 2 || (val == 1 && widget.hasAll == false)){
|
|
||||||
widget.onTimeFilter(
|
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
}else{
|
|
||||||
var dialogData = await showDialog<PickerDateRange?>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context1) {
|
|
||||||
return Center(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
width: Utils.isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
|
||||||
height: ScreenUtil().screenHeight / 2,
|
|
||||||
child: SfDateRangePicker(
|
|
||||||
showActionButtons: true,
|
|
||||||
confirmText: '确定',
|
|
||||||
cancelText: '取消',
|
|
||||||
onSubmit: (p0) {
|
|
||||||
print(p0);
|
|
||||||
Get.back(result: p0);
|
|
||||||
// Navigator.of(context1).pop(p0);
|
|
||||||
widget.refreshTime!(p0);
|
|
||||||
},
|
|
||||||
onCancel: () {
|
|
||||||
Get.back();
|
|
||||||
// Navigator.of(context1).pop();
|
|
||||||
},
|
|
||||||
selectionMode: DateRangePickerSelectionMode.range,
|
|
||||||
initialSelectedRange: customTimeState,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
widget.onTimeFilter(
|
|
||||||
dialogData?.startDate?.toString().substring(0, 10),
|
|
||||||
dialogData?.endDate?.toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
customTimeState = dialogData!;
|
|
||||||
}
|
|
||||||
/* switch (val) {
|
|
||||||
case 0: // 全部
|
|
||||||
widget.onTimeFilter(null, null);
|
|
||||||
break;
|
|
||||||
case 1: // 近一周
|
|
||||||
widget.onTimeFilter(
|
|
||||||
Utils.getWeekStartDate().toString().substring(0, 10),
|
|
||||||
Utils.getWeekEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 2: // 近一个月
|
|
||||||
widget.onTimeFilter(
|
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default: // 自定义
|
|
||||||
var dialogData = await showDialog<PickerDateRange?>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context1) {
|
|
||||||
return Center(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
width: Utils.isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
|
||||||
height: ScreenUtil().screenHeight / 2,
|
|
||||||
child: SfDateRangePicker(
|
|
||||||
showActionButtons: true,
|
|
||||||
confirmText: '确定',
|
|
||||||
cancelText: '取消',
|
|
||||||
onSubmit: (p0) {
|
|
||||||
print(p0);
|
|
||||||
Get.back(result: p0);
|
|
||||||
// Navigator.of(context1).pop(p0);
|
|
||||||
widget.refreshTime!(p0);
|
|
||||||
},
|
|
||||||
onCancel: () {
|
|
||||||
Get.back();
|
|
||||||
// Navigator.of(context1).pop();
|
|
||||||
},
|
|
||||||
selectionMode: DateRangePickerSelectionMode.range,
|
|
||||||
initialSelectedRange: customTimeState,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
widget.onTimeFilter(
|
|
||||||
dialogData?.startDate?.toString().substring(0, 10),
|
|
||||||
dialogData?.endDate?.toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
customTimeState = dialogData!;
|
|
||||||
}*/
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
|
|
||||||
class PersonalDetailTopBar extends StatefulWidget {
|
|
||||||
final TabController controller;
|
|
||||||
final ValueChanged<int>? onTap;
|
|
||||||
final String customTimeStr;
|
|
||||||
final bool? hasAll;
|
|
||||||
const PersonalDetailTopBar({Key? key,required this.controller, this.onTap, required this.customTimeStr,this.hasAll=false}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<PersonalDetailTopBar> createState() => _PersonalDetailTopBarState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _PersonalDetailTopBarState extends State<PersonalDetailTopBar> {
|
|
||||||
@override
|
|
||||||
void initState(){
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
|
||||||
),
|
|
||||||
child: TabBar(
|
|
||||||
controller: widget.controller,
|
|
||||||
unselectedLabelStyle: TextStyle(fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: const Color.fromRGBO(116, 145, 253, 1),
|
|
||||||
),
|
|
||||||
isScrollable: true,
|
|
||||||
labelColor: const Color(0xFF7491FD),
|
|
||||||
unselectedLabelColor: const Color(0xFF505E6E),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
|
||||||
onTap: widget.onTap,
|
|
||||||
tabs: <Widget>[
|
|
||||||
if(widget.hasAll == true)
|
|
||||||
const Tab(text: '全部'),
|
|
||||||
const Tab(text: '近一周'),
|
|
||||||
const Tab(text: '近一月'),
|
|
||||||
Tab(text: widget.customTimeStr),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student.dart';
|
import 'package:school_asignment_app/common/job/work_student.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student_params.dart';
|
import 'package:school_asignment_app/common/job/work_student_params.dart';
|
||||||
|
|
@ -9,26 +8,21 @@ import 'home_state.dart';
|
||||||
|
|
||||||
class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
||||||
final HomeState state = HomeState();
|
final HomeState state = HomeState();
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
void getList() async {
|
void getList() async {
|
||||||
WorkStudentParams params = WorkStudentParams(
|
WorkStudentParams params = WorkStudentParams(
|
||||||
assessType: 0,
|
assessType: 0,
|
||||||
);
|
);
|
||||||
WorkStudent data = await getClient().getUnAnnotateList(params);
|
WorkStudent data = await getClient().getWorkList(params);
|
||||||
UserStore.to.readOver.value = data.items.length;
|
UserStore.to.readOver.value = data.items.length;
|
||||||
state.workList.value = data.items;
|
|
||||||
refreshController.finishRefresh();
|
|
||||||
}
|
}
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
refreshController.dispose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:school_asignment_app/common/job/user_info.dart';
|
import 'package:school_asignment_app/common/job/user_info.dart';
|
||||||
import 'package:school_asignment_app/common/store/user_store.dart';
|
import 'package:school_asignment_app/common/store/user_store.dart';
|
||||||
import 'package:school_asignment_app/common/job/work_student.dart';
|
|
||||||
|
|
||||||
class HomeState {
|
class HomeState {
|
||||||
HomeState() {
|
HomeState() {
|
||||||
|
|
@ -10,6 +9,5 @@ class HomeState {
|
||||||
|
|
||||||
late Rx<UserInfo?> userInfo;
|
late Rx<UserInfo?> userInfo;
|
||||||
late RxInt readOver = UserStore.to.readOver;
|
late RxInt readOver = UserStore.to.readOver;
|
||||||
late RxList<Items> workList = RxList();
|
|
||||||
late int type = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,10 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:badges/badges.dart' as badges;
|
import 'package:badges/badges.dart' as badges;
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/job/work_student.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/enum_untils.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
import 'package:school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
||||||
import 'package:school_asignment_app/routes/app_pages.dart';
|
import 'package:school_asignment_app/routes/app_pages.dart';
|
||||||
|
|
||||||
|
|
@ -43,7 +38,7 @@ class _HomePageState extends State<HomePage>
|
||||||
statusBarIconBrightness: Brightness.dark,
|
statusBarIconBrightness: Brightness.dark,
|
||||||
statusBarBrightness: Brightness.light,
|
statusBarBrightness: Brightness.light,
|
||||||
),
|
),
|
||||||
child: Column(
|
child: ListView(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 200.h,
|
height: 200.h,
|
||||||
|
|
@ -93,8 +88,8 @@ class _HomePageState extends State<HomePage>
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
0),
|
0),
|
||||||
|
spaceWidth,
|
||||||
/* $TermRow(
|
$TermRow(
|
||||||
context,
|
context,
|
||||||
[
|
[
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
|
|
@ -102,183 +97,7 @@ class _HomePageState extends State<HomePage>
|
||||||
image: 'assets/images/job_home_marking_set.png',
|
image: 'assets/images/job_home_marking_set.png',
|
||||||
navigationUrl: '')
|
navigationUrl: '')
|
||||||
],
|
],
|
||||||
0),*/
|
0),
|
||||||
Expanded(child: Obx(() {
|
|
||||||
return EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: logic.refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
child: ListView.builder(
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
Items item = state.workList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
Get.toNamed(Routes.annotateClassPage, arguments: {
|
|
||||||
'id': item.id,
|
|
||||||
'name': item.name,
|
|
||||||
'grade': item.grade
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(bottom: 16.h),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(height: 30.h),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 16.h, horizontal: 10.w),
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
|
||||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
|
||||||
boxShadow: const [
|
|
||||||
BoxShadow(
|
|
||||||
color: Color.fromRGBO(210, 216, 241, 1),
|
|
||||||
offset: Offset.zero, //阴影y轴偏移量
|
|
||||||
blurRadius: 5.8, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: Utils.isPad() ? 32.w : 38.w,
|
|
||||||
height: 18.h,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(
|
|
||||||
left: Utils.isPad() ? 2.w : 3.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: state.type == 1
|
|
||||||
? const Color.fromRGBO(
|
|
||||||
104, 136, 253, 1)
|
|
||||||
: const Color.fromRGBO(
|
|
||||||
255, 175, 56, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(14.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: quickText(
|
|
||||||
state.type == 1 ? '作业' : '考试',
|
|
||||||
color: Colors.white,
|
|
||||||
size: 10.sp),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: quickText(
|
|
||||||
item.name,
|
|
||||||
maxLines: 2,
|
|
||||||
size: Utils.isPad() ? 14.sp : 16.sp,
|
|
||||||
color:
|
|
||||||
const Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
quickText(
|
|
||||||
EnumUtils.formatSubject(item.subject),
|
|
||||||
color:
|
|
||||||
const Color.fromRGBO(97, 97, 97, 1),
|
|
||||||
size: 12.sp,
|
|
||||||
),
|
|
||||||
quickText(' / ',
|
|
||||||
color: const Color.fromRGBO(
|
|
||||||
130, 130, 130, 1),
|
|
||||||
size: 11.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
Container(
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment:
|
|
||||||
CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
quickText('题量:',
|
|
||||||
color: const Color.fromRGBO(
|
|
||||||
130, 130, 130, 1),
|
|
||||||
size: 11.sp),
|
|
||||||
quickText(
|
|
||||||
'10',
|
|
||||||
color: const Color.fromRGBO(
|
|
||||||
97, 97, 97, 1),
|
|
||||||
size: 13.sp,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
quickText(' / ',
|
|
||||||
color: const Color.fromRGBO(
|
|
||||||
130, 130, 130, 1),
|
|
||||||
size: 11.sp,
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
quickText(
|
|
||||||
DateTime.parse(item.publishTime)
|
|
||||||
.toString()
|
|
||||||
.substring(0, 10),
|
|
||||||
color:
|
|
||||||
const Color.fromRGBO(97, 97, 97, 1),
|
|
||||||
size: 12.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.r),
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 8.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: item.annotateRate == null?0:item.annotateRate! / 100,
|
|
||||||
progressColor:
|
|
||||||
const Color(0xFF6888FD),
|
|
||||||
backgroundColor:
|
|
||||||
const Color(0xFFE8E8E8),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
quickText(
|
|
||||||
'${item.annotateRate!.toStringAsFixed(0)}%',
|
|
||||||
size: 10.sp,
|
|
||||||
color: const Color(0xFF464646)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// FavoriteButton(jobTaskItem.id, jobTaskItem.title),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: state.workList.length,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,60 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
|
|
||||||
class ProgressBar extends StatefulWidget {
|
|
||||||
late double? fontSize;
|
|
||||||
late double? lineHeight;
|
|
||||||
final String title;
|
|
||||||
final Color color;
|
|
||||||
final double percent;
|
|
||||||
final EdgeInsets padingEdg;
|
|
||||||
final EdgeInsets marginEdg;
|
|
||||||
ProgressBar({Key? key,this.fontSize,this.lineHeight,required this.title,required this.color,required this.percent,required this.marginEdg,required this.padingEdg}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<ProgressBar> createState() => _ProgressBarState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _ProgressBarState extends State<ProgressBar> {
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var percentStr = '${Utils.doubleToStringAsFixed(widget.percent * 100)}%';
|
|
||||||
widget.fontSize ??= 10.sp;
|
|
||||||
widget.lineHeight ??= 8.h;
|
|
||||||
return Container(
|
|
||||||
margin: widget.marginEdg,
|
|
||||||
padding: widget.padingEdg,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
if (widget.title == '总正确率:') quickText('确率', color: Colors.transparent, size: widget.fontSize),
|
|
||||||
quickText(widget.title, color: const Color(0xFF8B8B8B), size: widget.fontSize),
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10.r),
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: widget.lineHeight!,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: widget.percent,
|
|
||||||
progressColor: widget.color,
|
|
||||||
backgroundColor: const Color(0xFFE8E8E8),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 4.w),
|
|
||||||
// percentStr
|
|
||||||
quickText(percentStr, size: widget.fontSize, color: const Color(0xFF464646)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -32,7 +32,7 @@ class StudentGroupList extends StatelessWidget {
|
||||||
ClassItem item = studentGroups[index];
|
ClassItem item = studentGroups[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goNextPage(item.classId,'${EnumUtils.formatGrade(item.grade)}${item.className}',item.subject);
|
goNextPage(item.id,'${EnumUtils.formatGrade(item.grade)}${item.className}');
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
|
|
@ -94,7 +94,7 @@ class StudentGroupList extends StatelessWidget {
|
||||||
ClassItem item = studentGroups[index];
|
ClassItem item = studentGroups[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
goNextPage(item.classId,'${EnumUtils.formatGrade(item.grade)}${item.className}',item.subject);
|
// goNextPage(item.groupId, item.groupName);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding:
|
padding:
|
||||||
|
|
|
||||||
|
|
@ -1,23 +1,13 @@
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/other_page.dart';
|
import 'package:school_asignment_app/page/global_widget/other_page.dart';
|
||||||
import 'package:school_asignment_app/page/global_widget/start_page.dart';
|
import 'package:school_asignment_app/page/global_widget/start_page.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_binding.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_view.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_binding.dart';
|
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_binding.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_view.dart';
|
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_view.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_binding.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_view.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/my_info.dart';
|
import 'package:school_asignment_app/page/home_page/children/my_info.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_binding.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_view.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_binding.dart';
|
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_binding.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_view.dart';
|
import 'package:school_asignment_app/page/home_page/children/read_over/read_over_view.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_binding.dart';
|
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_binding.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_view.dart';
|
import 'package:school_asignment_app/page/home_page/children/student_history_work/student_history_work_view.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_personal/student_personal_binding.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_personal/student_personal_view.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_work_detail/student_work_detail_binding.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/children/student_work_detail/student_work_detail_view.dart';
|
|
||||||
import 'package:school_asignment_app/page/home_page/home_binding.dart';
|
import 'package:school_asignment_app/page/home_page/home_binding.dart';
|
||||||
import 'package:school_asignment_app/page/home_page/home_view.dart';
|
import 'package:school_asignment_app/page/home_page/home_view.dart';
|
||||||
import 'package:school_asignment_app/page/login_page/children/agreement_page.dart';
|
import 'package:school_asignment_app/page/login_page/children/agreement_page.dart';
|
||||||
|
|
@ -39,11 +29,5 @@ abstract class AppPages {
|
||||||
GetPage(name: Routes.readOverPage, page: () => const ReadOverPage(), binding: ReadOverBinding(), transition: Transition.noTransition),
|
GetPage(name: Routes.readOverPage, page: () => const ReadOverPage(), binding: ReadOverBinding(), transition: Transition.noTransition),
|
||||||
GetPage(name: Routes.studentHistoryWorkPage, page: () => const StudentHistoryWorkPage(), binding: StudentHistoryWorkBinding(), transition: Transition.noTransition),
|
GetPage(name: Routes.studentHistoryWorkPage, page: () => const StudentHistoryWorkPage(), binding: StudentHistoryWorkBinding(), transition: Transition.noTransition),
|
||||||
GetPage(name: Routes.classStudentPage, page: () => const ClassStudentPage(), binding: ClassStudentBinding(), transition: Transition.noTransition),
|
GetPage(name: Routes.classStudentPage, page: () => const ClassStudentPage(), binding: ClassStudentBinding(), transition: Transition.noTransition),
|
||||||
GetPage(name: Routes.annotateClassPage, page: () => const AnnotateClassPage(), binding: AnnotateClassBinding(), transition: Transition.noTransition),
|
|
||||||
GetPage(name: Routes.quickDataCheckPage, page: () => const QuickDataCheckPage(), binding: QuickDataCheckBinding(), transition: Transition.noTransition),
|
|
||||||
GetPage(name: Routes.jobReportPage, page: () => const JobReportPage(), binding: JobReportBinding(), transition: Transition.noTransition),
|
|
||||||
GetPage(name: Routes.studentPersonalPage, page: () => const StudentPersonalPage(), binding: StudentPersonalBinding(), transition: Transition.noTransition),
|
|
||||||
GetPage(name: Routes.studentWorkDetailPage, page: () => const StudentWorkDetailPage(), binding: StudentWorkDetailBinding(), transition: Transition.noTransition),
|
|
||||||
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,4 @@ abstract class Routes {
|
||||||
static const readOverPage = '/readOverPage';
|
static const readOverPage = '/readOverPage';
|
||||||
static const studentHistoryWorkPage = '/studentHistoryWorkPage';
|
static const studentHistoryWorkPage = '/studentHistoryWorkPage';
|
||||||
static const classStudentPage = '/classStudentPage';
|
static const classStudentPage = '/classStudentPage';
|
||||||
static const annotateClassPage = '/annotateClassPage';
|
|
||||||
static const quickDataCheckPage = '/quickDataCheckPage';
|
|
||||||
static const jobReportPage = '/jobReportPage';
|
|
||||||
static const studentPersonalPage = '/studentPersonalPage';
|
|
||||||
static const studentWorkDetailPage = '/studentWorkDetailPage';
|
|
||||||
}
|
}
|
||||||
69
pubspec.lock
69
pubspec.lock
|
|
@ -233,14 +233,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.3.6"
|
version: "2.3.6"
|
||||||
data_table_2:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: data_table_2
|
|
||||||
sha256: e403de6d9a58dddf27700114b614ea8ea5aa8442d7fbdfbe8b3d11b0512e7a49
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.5.12"
|
|
||||||
dbus:
|
dbus:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -257,22 +249,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.4.2+1"
|
version: "5.4.2+1"
|
||||||
dropdown_button2:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: dropdown_button2
|
|
||||||
sha256: b0fe8d49a030315e9eef6c7ac84ca964250155a6224d491c1365061bc974a9e1
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.3.9"
|
|
||||||
equatable:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: equatable
|
|
||||||
sha256: c2b87cb7756efdf69892005af546c56c0b5037f54d2a88269b4f347a505e3ca2
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "2.0.5"
|
|
||||||
fake_async:
|
fake_async:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -305,14 +281,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.1.0"
|
version: "1.1.0"
|
||||||
fl_chart:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: fl_chart
|
|
||||||
sha256: "48a1b69be9544e2b03d9a8e843affd89e43f3194c9248776222efcb4206bb1ec"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.62.0"
|
|
||||||
flutter:
|
flutter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -350,11 +318,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.0.3"
|
version: "2.0.3"
|
||||||
flutter_localizations:
|
|
||||||
dependency: "direct main"
|
|
||||||
description: flutter
|
|
||||||
source: sdk
|
|
||||||
version: "0.0.0"
|
|
||||||
flutter_screenutil:
|
flutter_screenutil:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -371,14 +334,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.2.1"
|
version: "5.2.1"
|
||||||
flutter_staggered_grid_view:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: flutter_staggered_grid_view
|
|
||||||
sha256: "1312314293acceb65b92754298754801b0e1f26a1845833b740b30415bbbcf07"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.6.2"
|
|
||||||
flutter_test:
|
flutter_test:
|
||||||
dependency: "direct dev"
|
dependency: "direct dev"
|
||||||
description: flutter
|
description: flutter
|
||||||
|
|
@ -485,14 +440,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "4.0.2"
|
version: "4.0.2"
|
||||||
intl:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: intl
|
|
||||||
sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "0.18.0"
|
|
||||||
io:
|
io:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -858,22 +805,6 @@ packages:
|
||||||
url: "https://pub.dev"
|
url: "https://pub.dev"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.2.0"
|
||||||
syncfusion_flutter_core:
|
|
||||||
dependency: transitive
|
|
||||||
description:
|
|
||||||
name: syncfusion_flutter_core
|
|
||||||
sha256: "8db8f55c77f56968681447d3837c10f27a9e861e238a898fda116c7531def979"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "21.2.10"
|
|
||||||
syncfusion_flutter_datepicker:
|
|
||||||
dependency: "direct main"
|
|
||||||
description:
|
|
||||||
name: syncfusion_flutter_datepicker
|
|
||||||
sha256: "6b0dacfe2f968de2b9107e2dc24fcaa2499415ae655df8f0d3ad0356eb090213"
|
|
||||||
url: "https://pub.dev"
|
|
||||||
source: hosted
|
|
||||||
version: "21.2.10"
|
|
||||||
synchronized:
|
synchronized:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -30,8 +30,6 @@ environment:
|
||||||
dependencies:
|
dependencies:
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_localizations:
|
|
||||||
sdk: flutter
|
|
||||||
|
|
||||||
# The following adds the Cupertino Icons font to your application.
|
# The following adds the Cupertino Icons font to your application.
|
||||||
# Use with the CupertinoIcons class for iOS style icons.
|
# Use with the CupertinoIcons class for iOS style icons.
|
||||||
|
|
@ -72,12 +70,6 @@ dependencies:
|
||||||
# 进度条
|
# 进度条
|
||||||
percent_indicator: ^4.2.3
|
percent_indicator: ^4.2.3
|
||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
# 图表
|
|
||||||
fl_chart: ^0.62.0
|
|
||||||
data_table_2: ^2.5.10
|
|
||||||
flutter_staggered_grid_view: ^0.6.2
|
|
||||||
dropdown_button2: ^2.3.9
|
|
||||||
syncfusion_flutter_datepicker: ^21.2.10
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue