Compare commits
No commits in common. "0fad2da7f6511335f26a0c4a41cbefbfe551a94e" and "7e1ce0ef7298b923ba151e3d33e7fbc1b8eebe22" have entirely different histories.
0fad2da7f6
...
7e1ce0ef72
|
|
@ -1,91 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'job_data_report.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
JobDataReport _$JobDataReportFromJson(Map<String, dynamic> json) =>
|
|
||||||
JobDataReport(
|
|
||||||
json['jobId'] as int,
|
|
||||||
json['jobName'] as String,
|
|
||||||
json['gradeName'] as String,
|
|
||||||
json['className'] as String?,
|
|
||||||
json['validCount'] as int,
|
|
||||||
json['noAnswerCount'] as int,
|
|
||||||
(json['kgValidRate'] as num).toDouble(),
|
|
||||||
json['kgQuestionCount'] as int,
|
|
||||||
(json['zgValidRate'] as num).toDouble(),
|
|
||||||
json['zgQuestionCount'] as int,
|
|
||||||
(json['studentDetails'] as List<dynamic>)
|
|
||||||
.map((e) => StudentDetails.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$JobDataReportToJson(JobDataReport instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'jobId': instance.jobId,
|
|
||||||
'jobName': instance.jobName,
|
|
||||||
'gradeName': instance.gradeName,
|
|
||||||
'className': instance.className,
|
|
||||||
'validCount': instance.validCount,
|
|
||||||
'noAnswerCount': instance.noAnswerCount,
|
|
||||||
'kgValidRate': instance.kgValidRate,
|
|
||||||
'kgQuestionCount': instance.kgQuestionCount,
|
|
||||||
'zgValidRate': instance.zgValidRate,
|
|
||||||
'zgQuestionCount': instance.zgQuestionCount,
|
|
||||||
'studentDetails': instance.studentDetails,
|
|
||||||
};
|
|
||||||
|
|
||||||
StudentDetails _$StudentDetailsFromJson(Map<String, dynamic> json) =>
|
|
||||||
StudentDetails(
|
|
||||||
json['studentId'] as int,
|
|
||||||
json['studentName'] as String,
|
|
||||||
json['kgValidCount'] as int,
|
|
||||||
json['kgValidRate'] as int,
|
|
||||||
json['zgValidCount'] as int,
|
|
||||||
json['zgValidRate'] as int,
|
|
||||||
(json['kgDetails'] as List<dynamic>)
|
|
||||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
(json['zgDetails'] as List<dynamic>)
|
|
||||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
|
||||||
.toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$StudentDetailsToJson(StudentDetails instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'studentId': instance.studentId,
|
|
||||||
'studentName': instance.studentName,
|
|
||||||
'kgValidCount': instance.kgValidCount,
|
|
||||||
'kgValidRate': instance.kgValidRate,
|
|
||||||
'zgValidCount': instance.zgValidCount,
|
|
||||||
'zgValidRate': instance.zgValidRate,
|
|
||||||
'kgDetails': instance.kgDetails,
|
|
||||||
'zgDetails': instance.zgDetails,
|
|
||||||
};
|
|
||||||
|
|
||||||
KgDetails _$KgDetailsFromJson(Map<String, dynamic> json) => KgDetails(
|
|
||||||
json['questionNo'] as String,
|
|
||||||
json['questionId'] as int,
|
|
||||||
json['partName'] as String,
|
|
||||||
json['state'] as int,
|
|
||||||
json['studentAnswer'] as String?,
|
|
||||||
json['questionAnswer'] as String?,
|
|
||||||
json['useTime'] as int?,
|
|
||||||
json['annotateAnswers'] as String?,
|
|
||||||
(json['score'] as num?)?.toDouble(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$KgDetailsToJson(KgDetails instance) => <String, dynamic>{
|
|
||||||
'questionNo': instance.questionNo,
|
|
||||||
'questionId': instance.questionId,
|
|
||||||
'partName': instance.partName,
|
|
||||||
'state': instance.state,
|
|
||||||
'studentAnswer': instance.studentAnswer,
|
|
||||||
'questionAnswer': instance.questionAnswer,
|
|
||||||
'useTime': instance.useTime,
|
|
||||||
'annotateAnswers': instance.annotateAnswers,
|
|
||||||
'score': instance.score,
|
|
||||||
};
|
|
||||||
|
|
@ -56,8 +56,6 @@ class JobTaskItem extends Object {
|
||||||
@JsonKey(name: 'markingTypeEnum')
|
@JsonKey(name: 'markingTypeEnum')
|
||||||
JobMarkingTypeEnum markingTypeEnum; // 考试类型
|
JobMarkingTypeEnum markingTypeEnum; // 考试类型
|
||||||
|
|
||||||
int taskCount; // 参与班级数量
|
|
||||||
|
|
||||||
JobTaskItem(
|
JobTaskItem(
|
||||||
this.id,
|
this.id,
|
||||||
this.title,
|
this.title,
|
||||||
|
|
@ -74,7 +72,6 @@ class JobTaskItem extends Object {
|
||||||
// this.markingTasks,
|
// this.markingTasks,
|
||||||
this.createTime,
|
this.createTime,
|
||||||
this.markingType,
|
this.markingType,
|
||||||
this.taskCount,
|
|
||||||
{this.progressPercentage = 0,
|
{this.progressPercentage = 0,
|
||||||
this.markingTypeEnum = JobMarkingTypeEnum.UNUSED}) {
|
this.markingTypeEnum = JobMarkingTypeEnum.UNUSED}) {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -21,22 +21,12 @@ class MarkingListParams extends BasePage {
|
||||||
@JsonKey(name: 'PageType')
|
@JsonKey(name: 'PageType')
|
||||||
int pageType;
|
int pageType;
|
||||||
|
|
||||||
String? startTime;
|
|
||||||
String? endTime;
|
|
||||||
|
|
||||||
int? markingType; // 1 作业 2考试
|
|
||||||
|
|
||||||
MarkingListParams({
|
MarkingListParams({
|
||||||
required this.isFinish,
|
required this.isFinish,
|
||||||
required this.pageType,
|
required this.pageType,
|
||||||
required page,
|
required page,
|
||||||
required limit,
|
required limit,
|
||||||
this.markingType,
|
}) : super(page, limit);
|
||||||
this.startTime,
|
|
||||||
this.endTime,
|
|
||||||
}) : super(page, limit) {
|
|
||||||
this.markingType ??= 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
factory MarkingListParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingListParamsFromJson(srcJson);
|
factory MarkingListParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingListParamsFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import 'dart:async';
|
||||||
|
|
||||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
|
||||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||||
|
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
|
|
@ -84,28 +83,6 @@ class _MyAppState extends State<MyApp> {
|
||||||
title: '远轩阅卷系统',
|
title: '远轩阅卷系统',
|
||||||
navigatorKey: TheGlobal.navigatorKey,
|
navigatorKey: TheGlobal.navigatorKey,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
|
||||||
// supportedLocales: [
|
|
||||||
// const Locale('zh', 'CN'), // 中文简体
|
|
||||||
// // 其他支持的locale可以在这里添加
|
|
||||||
// ],
|
|
||||||
// 这里是国际化支持,确保添加flutter_localizations依赖
|
|
||||||
supportedLocales: [
|
|
||||||
const Locale('zh', 'CN'), // 中文简体
|
|
||||||
// 其他支持的locale可以在这里添加
|
|
||||||
],
|
|
||||||
localizationsDelegates: [
|
|
||||||
// ...其他delegates
|
|
||||||
GlobalMaterialLocalizations.delegate,
|
|
||||||
GlobalWidgetsLocalizations.delegate,
|
|
||||||
GlobalCupertinoLocalizations.delegate, // 如果你使用了Cupertino风格的组件
|
|
||||||
// ...添加其他必要的delegates
|
|
||||||
],
|
|
||||||
localeResolutionCallback: (locale, supportedLocales) {
|
|
||||||
// 在这里可以实现自定义的locale解析逻辑
|
|
||||||
// 如果需要,返回你想要的Locale对象
|
|
||||||
return locale;
|
|
||||||
},
|
|
||||||
theme: ThemeData(
|
theme: ThemeData(
|
||||||
primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
|
primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
|
||||||
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
|
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
|
||||||
|
|
|
||||||
|
|
@ -357,6 +357,29 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap})
|
||||||
isScrollable: true,
|
isScrollable: true,
|
||||||
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
||||||
indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||||
|
// labelPadding: EdgeInsets.symmetric(vertical: 0), // 设置标签的内边距
|
||||||
|
// background: linear-gradient(270deg, #2E5BFF 30.23%, rgba(46, 91, 255, 0.00) 96.59%);
|
||||||
|
// indicatorColor: RectangleIndicator(),
|
||||||
|
// indicator: BoxDecoration(
|
||||||
|
// gradient: LinearGradient(
|
||||||
|
// begin: Alignment.centerLeft,
|
||||||
|
// end: Alignment.centerRight,
|
||||||
|
// colors: [
|
||||||
|
// Color.fromRGBO(46, 91, 255, 0.00),
|
||||||
|
// Color(0xFF2E5BFF),
|
||||||
|
// ],
|
||||||
|
// stops: [0.3023, 0.9659],
|
||||||
|
// // transform: GradientRotation(3.14 / 2), //将270度转换为弧度
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// indicator: BoxDecoration(
|
||||||
|
// // 设置指示器样式
|
||||||
|
// gradient: LinearGradient(
|
||||||
|
// colors: [Colors.yellow, Colors.green], // 设置渐变色
|
||||||
|
// begin: Alignment.centerLeft,
|
||||||
|
// end: Alignment.centerRight,
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
tabs: const <Widget>[Tab(text: '阅卷'), Tab(text: '作业')],
|
tabs: const <Widget>[Tab(text: '阅卷'), Tab(text: '作业')],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -145,161 +145,154 @@ class HomeworkTasksViewItem extends StatelessWidget with CommonMixin {
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $completedHomeworkView(BuildContext context,
|
Widget $completedHomeworkView(BuildContext context,
|
||||||
{required JobTaskItem jobTaskItem, required ShowStudentsCall showStudentsCall}) {
|
{required JobTaskItem jobTaskItem, required ShowStudentsCall showStudentsCall}) {
|
||||||
return InkWell(
|
return Container(
|
||||||
onTap: () {
|
width: double.infinity,
|
||||||
String url =
|
padding: EdgeInsets.only(top: 20.h),
|
||||||
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
|
margin: EdgeInsets.only(bottom: 12.h),
|
||||||
RouterManager.router.navigateTo(context, url, transition: getTransition());
|
decoration: BoxDecoration(
|
||||||
},
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
child: Container(
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
width: double.infinity,
|
boxShadow: [
|
||||||
padding: EdgeInsets.only(top: 20.h),
|
BoxShadow(
|
||||||
margin: EdgeInsets.only(bottom: 12.h),
|
color: const Color.fromRGBO(210, 216, 241, 1),
|
||||||
decoration: BoxDecoration(
|
offset: Offset.zero, //阴影y轴偏移量
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
blurRadius: 5.8, //阴影模糊程度
|
||||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
spreadRadius: 0, //阴影扩散程度
|
||||||
boxShadow: [
|
)
|
||||||
BoxShadow(
|
],
|
||||||
color: const Color.fromRGBO(210, 216, 241, 1),
|
),
|
||||||
offset: Offset.zero, //阴影y轴偏移量
|
child: Column(
|
||||||
blurRadius: 5.8, //阴影模糊程度
|
children: [
|
||||||
spreadRadius: 0, //阴影扩散程度
|
// 顶部任务名称
|
||||||
)
|
Padding(
|
||||||
],
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||||
),
|
child: Row(
|
||||||
child: Column(
|
children: [
|
||||||
children: [
|
Container(
|
||||||
// 顶部任务名称
|
width: 32.w,
|
||||||
Padding(
|
height: 18.h,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
alignment: Alignment.center,
|
||||||
child: Row(
|
padding: EdgeInsets.only(left: 2.w),
|
||||||
children: [
|
decoration: BoxDecoration(
|
||||||
Container(
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
width: 32.w,
|
borderRadius: BorderRadius.only(
|
||||||
height: 18.h,
|
topLeft: Radius.circular(18.r),
|
||||||
alignment: Alignment.center,
|
topRight: Radius.circular(3.r),
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
bottomLeft: Radius.circular(4.r),
|
||||||
decoration: BoxDecoration(
|
bottomRight: Radius.circular(4.r),
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(18.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: quickText('作业', color: Colors.white, size: 10.sp),
|
|
||||||
),
|
),
|
||||||
quickText(
|
margin: EdgeInsets.only(right: 4.w),
|
||||||
jobTaskItem.title,
|
child: quickText('作业', color: Colors.white, size: 10.sp),
|
||||||
size: 16.sp,
|
),
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
quickText(
|
||||||
fontWeight: FontWeight.bold,
|
jobTaskItem.title,
|
||||||
)
|
size: 16.sp,
|
||||||
],
|
color: Color.fromRGBO(70, 70, 70, 1),
|
||||||
),
|
fontWeight: FontWeight.bold,
|
||||||
|
)
|
||||||
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
SizedBox(height: 12.h),
|
SizedBox(height: 12.h),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText(
|
quickText(
|
||||||
jobTaskItem.createTime.substring(0, 10),
|
jobTaskItem.createTime.substring(0, 10),
|
||||||
color: Color.fromRGBO(97, 97, 97, 1),
|
color: Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(
|
||||||
'参与班级:${jobTaskItem.taskCount}',
|
'参与班级:字段待定',
|
||||||
color: Color.fromRGBO(76, 199, 147, 1),
|
color: Color.fromRGBO(76, 199, 147, 1),
|
||||||
size: 12.sp,
|
size: 12.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(
|
||||||
'科目:' + jobTaskItem.subjectName,
|
'科目:' + jobTaskItem.subjectName,
|
||||||
color: Color.fromRGBO(116, 145, 253, 1),
|
color: Color.fromRGBO(116, 145, 253, 1),
|
||||||
size: 12.sp,
|
size: 12.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
|
||||||
SizedBox(height: 20.h),
|
SizedBox(height: 20.h),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.h),
|
padding: EdgeInsets.symmetric(vertical: 8.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
boxShadow: [
|
boxShadow: [
|
||||||
BoxShadow(
|
BoxShadow(
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
||||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
||||||
blurRadius: 4, //阴影模糊程度
|
blurRadius: 4, //阴影模糊程度
|
||||||
spreadRadius: 0, //阴影扩散程度
|
spreadRadius: 0, //阴影扩散程度
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
|
||||||
child: Row(children: [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_homework_report', () => {}),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]),
|
|
||||||
),
|
),
|
||||||
// $CompletedHomeworkInfoBox(
|
child: Row(children: [
|
||||||
// segmentation: false,
|
Expanded(
|
||||||
// showStudentsCall: showStudentsCall,
|
child: InkWell(
|
||||||
// unsubmittedQuantity: jobTaskItem.studentCount - jobTaskItem.commitStudentCount,
|
onTap: () => easyThrottle('go_to_homework_report', () => {}),
|
||||||
// submittedQuantity: jobTaskItem.commitStudentCount,
|
child: Container(
|
||||||
// precision: jobTaskItem.precision / 100,
|
alignment: Alignment.center,
|
||||||
// objectivePrecision: jobTaskItem.objectivePrecision / 100,
|
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp),
|
||||||
// subjectivePrecision: jobTaskItem.subjectivePrecision / 100,
|
),
|
||||||
// ),
|
)),
|
||||||
// InkWell(
|
]),
|
||||||
// onTap: () {
|
),
|
||||||
// RouterManager.router.navigateTo(
|
// $CompletedHomeworkInfoBox(
|
||||||
// context,
|
// segmentation: false,
|
||||||
// RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
// showStudentsCall: showStudentsCall,
|
||||||
// transition: getTransition(),
|
// unsubmittedQuantity: jobTaskItem.studentCount - jobTaskItem.commitStudentCount,
|
||||||
// );
|
// submittedQuantity: jobTaskItem.commitStudentCount,
|
||||||
// },
|
// precision: jobTaskItem.precision / 100,
|
||||||
// child: Row(
|
// objectivePrecision: jobTaskItem.objectivePrecision / 100,
|
||||||
// children: [
|
// subjectivePrecision: jobTaskItem.subjectivePrecision / 100,
|
||||||
// Expanded(flex: 1, child: SizedBox()),
|
// ),
|
||||||
// Expanded(
|
// InkWell(
|
||||||
// flex: 9,
|
// onTap: () {
|
||||||
// child: Container(
|
// RouterManager.router.navigateTo(
|
||||||
// alignment: Alignment.center,
|
// context,
|
||||||
// margin: EdgeInsets.only(top: 20.h),
|
// RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||||
// padding: EdgeInsets.symmetric(vertical: 7.h),
|
// transition: getTransition(),
|
||||||
// decoration: BoxDecoration(
|
// );
|
||||||
// borderRadius: BorderRadius.circular(20),
|
// },
|
||||||
// gradient: LinearGradient(
|
// child: Row(
|
||||||
// begin: Alignment.centerLeft,
|
// children: [
|
||||||
// end: Alignment.centerRight,
|
// Expanded(flex: 1, child: SizedBox()),
|
||||||
// colors: [Color.fromRGBO(95, 197, 255, 1), Color.fromRGBO(61, 68, 255, 0.82)],
|
// Expanded(
|
||||||
// ),
|
// flex: 9,
|
||||||
// ),
|
// child: Container(
|
||||||
// child: quickText('查看报告', color: Colors.white, size: 12.sp),
|
// alignment: Alignment.center,
|
||||||
// ),
|
// margin: EdgeInsets.only(top: 20.h),
|
||||||
// ),
|
// padding: EdgeInsets.symmetric(vertical: 7.h),
|
||||||
// Expanded(flex: 1, child: SizedBox()),
|
// decoration: BoxDecoration(
|
||||||
// ],
|
// borderRadius: BorderRadius.circular(20),
|
||||||
// ),
|
// gradient: LinearGradient(
|
||||||
// )
|
// begin: Alignment.centerLeft,
|
||||||
],
|
// end: Alignment.centerRight,
|
||||||
),
|
// colors: [Color.fromRGBO(95, 197, 255, 1), Color.fromRGBO(61, 68, 255, 0.82)],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// child: quickText('查看报告', color: Colors.white, size: 12.sp),
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
|
// Expanded(flex: 1, child: SizedBox()),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// )
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -661,6 +654,13 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
||||||
),
|
),
|
||||||
backgroundColor: Color.fromRGBO(244, 244, 244, 1),
|
backgroundColor: Color.fromRGBO(244, 244, 244, 1),
|
||||||
),
|
),
|
||||||
|
// Container(
|
||||||
|
// child: Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
// height: 40.r,
|
||||||
|
// width: 40.r,
|
||||||
|
// )
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
|
|
@ -27,7 +26,6 @@ import 'package:marking_app/common/model/common/base_page_data.dart';
|
||||||
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/mixin/refresh_data_handle.dart';
|
import 'package:marking_app/utils/easy_refresh/mixin/refresh_data_handle.dart';
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
part 'index.g.dart';
|
part 'index.g.dart';
|
||||||
|
|
||||||
|
|
@ -42,7 +40,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
||||||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
with
|
with
|
||||||
CommonMixin,
|
CommonMixin,
|
||||||
TickerProviderStateMixin,
|
SingleTickerProviderStateMixin,
|
||||||
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
||||||
AutomaticKeepAliveClientMixin {
|
AutomaticKeepAliveClientMixin {
|
||||||
@override
|
@override
|
||||||
|
|
@ -50,8 +48,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
|
|
||||||
/* Tab控制器 */
|
/* Tab控制器 */
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late TabController _tabController2;
|
|
||||||
|
|
||||||
int _tabIndex = 0;
|
int _tabIndex = 0;
|
||||||
bool completedToRefresh = true;
|
bool completedToRefresh = true;
|
||||||
|
|
||||||
|
|
@ -100,7 +96,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
length: 2,
|
length: 2,
|
||||||
vsync: this,
|
vsync: this,
|
||||||
);
|
);
|
||||||
_tabController2 = TabController(length: 4, vsync: this);
|
|
||||||
_refreshController1 = EasyRefreshController();
|
_refreshController1 = EasyRefreshController();
|
||||||
_refreshController2 = EasyRefreshController();
|
_refreshController2 = EasyRefreshController();
|
||||||
|
|
||||||
|
|
@ -123,7 +118,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
if (_currentTaskIdListener != null) {
|
if (_currentTaskIdListener != null) {
|
||||||
_currentTaskIdListener!();
|
_currentTaskIdListener!();
|
||||||
}
|
}
|
||||||
_tabController2.dispose();
|
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
_refreshController1.dispose();
|
_refreshController1.dispose();
|
||||||
_refreshController2.dispose();
|
_refreshController2.dispose();
|
||||||
|
|
@ -176,7 +170,10 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: SizedBox(),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -269,29 +266,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (_tabIndex == 1)
|
|
||||||
$CompletedJobConditionFilter(
|
|
||||||
controller: _tabController2,
|
|
||||||
jobType: params2.markingType ?? 1,
|
|
||||||
customTime: _tabController2.index != 3 || (params2.startTime == null && params2.endTime == null)
|
|
||||||
? null
|
|
||||||
: PickerDateRange(
|
|
||||||
params2.startTime == null ? null : DateTime.parse(params2.startTime!),
|
|
||||||
params2.endTime == null ? null : DateTime.parse(params2.endTime!),
|
|
||||||
),
|
|
||||||
onJobTypeTap: (int jobTypeVal) {
|
|
||||||
params2.markingType = jobTypeVal;
|
|
||||||
_refreshController2.callRefresh();
|
|
||||||
},
|
|
||||||
onTimeFilter: (String? startTime, String? endTime) {
|
|
||||||
if (startTime == null && endTime == null && _tabController2.index == 3) {
|
|
||||||
_tabController2.animateTo(0);
|
|
||||||
}
|
|
||||||
params2.endTime = endTime;
|
|
||||||
params2.startTime = startTime;
|
|
||||||
_refreshController2.callRefresh();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: IndexedStack(
|
child: IndexedStack(
|
||||||
index: _tabIndex,
|
index: _tabIndex,
|
||||||
|
|
@ -379,337 +353,112 @@ Widget $easyRefresh({
|
||||||
@swidget
|
@swidget
|
||||||
Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
String url =
|
|
||||||
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
|
|
||||||
RouterManager.router.navigateTo(context, url, transition: getTransition());
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(top: 10.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(210, 216, 241, 1),
|
|
||||||
offset: Offset.zero, //阴影y轴偏移量
|
|
||||||
blurRadius: 5.8, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
// 顶部任务名称
|
|
||||||
Padding(
|
|
||||||
padding: padEdg,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 32.w,
|
|
||||||
height: 18.h,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: jobTaskItem.markingTypeEnum.name == '作业'
|
|
||||||
? const Color.fromRGBO(104, 136, 253, 1)
|
|
||||||
: const Color.fromRGBO(255, 175, 56, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(18.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
|
||||||
),
|
|
||||||
quickText(
|
|
||||||
jobTaskItem.title,
|
|
||||||
size: 16.sp,
|
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Padding(
|
|
||||||
padding: padEdg,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
quickText(
|
|
||||||
jobTaskItem.createTime.substring(0, 10),
|
|
||||||
color: Color.fromRGBO(97, 97, 97, 1),
|
|
||||||
size: 10.sp,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
|
||||||
quickText(
|
|
||||||
'参与班级:${jobTaskItem.taskCount}',
|
|
||||||
color: Color.fromRGBO(76, 199, 147, 1),
|
|
||||||
size: 10.sp,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
|
||||||
quickText(
|
|
||||||
'科目:' + jobTaskItem.subjectName,
|
|
||||||
color: Color.fromRGBO(116, 145, 253, 1),
|
|
||||||
size: 10.sp,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
GestureDetector(
|
|
||||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
|
||||||
print('子级点击方法');
|
|
||||||
}),
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
|
||||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
|
||||||
blurRadius: 4, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Row(children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 筛选时间
|
|
||||||
@swidget
|
|
||||||
Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap, PickerDateRange? customTime}) {
|
|
||||||
var customTimeStr = '自定义';
|
|
||||||
if (customTime != null) {
|
|
||||||
customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? '';
|
|
||||||
if (customTime.endDate != null) {
|
|
||||||
print(customTime.startDate!.year == customTime.endDate!.year);
|
|
||||||
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
|
|
||||||
customTimeStr =
|
|
||||||
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
|
||||||
} else {
|
|
||||||
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Container(
|
return Container(
|
||||||
alignment: Alignment.centerLeft,
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
child: TabBar(
|
|
||||||
controller: controller,
|
|
||||||
unselectedLabelStyle: TextStyle(fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
labelStyle: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Color.fromRGBO(116, 145, 253, 1),
|
|
||||||
),
|
|
||||||
isScrollable: true,
|
|
||||||
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
|
||||||
indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
|
||||||
onTap: onTap,
|
|
||||||
tabs: <Widget>[
|
|
||||||
const Tab(text: '全部'),
|
|
||||||
const Tab(text: '近一周'),
|
|
||||||
const Tab(text: '近一月'),
|
|
||||||
Tab(text: customTimeStr),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 已完成作业条件筛选栏
|
|
||||||
@hwidget
|
|
||||||
Widget $completedJobConditionFilter(BuildContext context,
|
|
||||||
{required TabController controller,
|
|
||||||
required int jobType,
|
|
||||||
PickerDateRange? customTime,
|
|
||||||
required ValueChanged<int> onJobTypeTap,
|
|
||||||
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
|
||||||
List<Map<String, dynamic>> jobTypes = [
|
|
||||||
{'type': 1, 'name': '作业'},
|
|
||||||
{'type': 2, 'name': '考试'}
|
|
||||||
];
|
|
||||||
var jobTypeState = useState(0);
|
|
||||||
var customTimeState = useState<PickerDateRange?>(null);
|
|
||||||
|
|
||||||
useEffect(() {
|
|
||||||
if (jobTypeState.value != jobType) jobTypeState.value = jobType;
|
|
||||||
if (customTimeState.value != customTime) customTimeState.value = customTime;
|
|
||||||
|
|
||||||
return () {};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
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)); // 减去天数差,得到本周一的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
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)); // 加上天数差减一,得到本周日的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Container(
|
|
||||||
height: 36.h,
|
|
||||||
padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
color: Colors.white,
|
||||||
),
|
boxShadow: [
|
||||||
child: Row(
|
BoxShadow(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
color: const Color.fromRGBO(210, 216, 241, 1),
|
||||||
children: [
|
offset: Offset.zero, //阴影y轴偏移量
|
||||||
$TheTabBar(
|
blurRadius: 5.8, //阴影模糊程度
|
||||||
controller: controller,
|
spreadRadius: 0, //阴影扩散程度
|
||||||
customTime: customTimeState.value,
|
|
||||||
onTap: (int val) async {
|
|
||||||
switch (val) {
|
|
||||||
case 0: // 全部
|
|
||||||
onTimeFilter(null, null);
|
|
||||||
break;
|
|
||||||
case 1: // 近一周
|
|
||||||
onTimeFilter(
|
|
||||||
getWeekStartDate().toString().substring(0, 10),
|
|
||||||
getWeekEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 2: // 近一个月
|
|
||||||
onTimeFilter(
|
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default: // 自定义
|
|
||||||
// DateTimeRange? range = await showDateRangePicker(
|
|
||||||
// // locale: const Locale('zh', 'CN'),
|
|
||||||
// locale: const Locale('zh', 'CN'),
|
|
||||||
// context: context,
|
|
||||||
// confirmText: '搜索',
|
|
||||||
// initialEntryMode: DatePickerEntryMode.calendarOnly,
|
|
||||||
// currentDate: DateTime.now(),
|
|
||||||
// firstDate: DateTime.now().subtract(const Duration(days: 4)),
|
|
||||||
// lastDate: DateTime.now().add(const Duration(days: 3)),
|
|
||||||
// );
|
|
||||||
|
|
||||||
var dialogData = await showDialog<PickerDateRange?>(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context1) {
|
|
||||||
return Center(
|
|
||||||
child: Container(
|
|
||||||
color: Colors.white,
|
|
||||||
width: isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
|
||||||
height: ScreenUtil().screenHeight / 2,
|
|
||||||
child: SfDateRangePicker(
|
|
||||||
showActionButtons: true,
|
|
||||||
confirmText: '确定',
|
|
||||||
cancelText: '取消',
|
|
||||||
onSubmit: (p0) {
|
|
||||||
print(p0);
|
|
||||||
Navigator.of(context1).pop(p0);
|
|
||||||
},
|
|
||||||
onCancel: () {
|
|
||||||
Navigator.of(context1).pop();
|
|
||||||
},
|
|
||||||
selectionMode: DateRangePickerSelectionMode.range,
|
|
||||||
initialSelectedRange: customTimeState.value,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
// startDate: 2024-03-04 18:47:00.117958, endDate: 2024-03-11 18:47:00.117986
|
|
||||||
// if (dialogData != null && (dialogData.startDate != null || dialogData.endDate != null)) {}
|
|
||||||
onTimeFilter(
|
|
||||||
dialogData?.startDate?.toString().substring(0, 10),
|
|
||||||
dialogData?.endDate?.toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
customTimeState.value = dialogData;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
Expanded(child: SizedBox()),
|
|
||||||
Container(
|
|
||||||
width: 74.r,
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 5.h),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.vertical(
|
|
||||||
top: Radius.elliptical(6, 6),
|
|
||||||
bottom: Radius.elliptical(6, 6),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: DropdownButton(
|
|
||||||
icon: Icon(Icons.expand_more_outlined),
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
// value: params2.jobType ?? 1,
|
|
||||||
value: jobType,
|
|
||||||
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
|
|
||||||
underline: Container(),
|
|
||||||
isExpanded: true,
|
|
||||||
items: jobTypes.map((e) {
|
|
||||||
return DropdownMenuItem(
|
|
||||||
value: e['type'],
|
|
||||||
child: quickText(e['name'], size: 12.sp, color: Colors.black),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
onChanged: (dynamic value) {
|
|
||||||
if (value != null) {
|
|
||||||
jobTypeState.value = value;
|
|
||||||
onJobTypeTap(value as int);
|
|
||||||
}
|
|
||||||
// jobTypeState
|
|
||||||
},
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// 顶部任务名称
|
||||||
|
Padding(
|
||||||
|
padding: padEdg,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 32.w,
|
||||||
|
height: 18.h,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.only(left: 2.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: jobTaskItem.markingTypeEnum.name == '作业'
|
||||||
|
? const Color.fromRGBO(104, 136, 253, 1)
|
||||||
|
: const Color.fromRGBO(255, 175, 56, 1),
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
topLeft: Radius.circular(18.r),
|
||||||
|
topRight: Radius.circular(3.r),
|
||||||
|
bottomLeft: Radius.circular(4.r),
|
||||||
|
bottomRight: Radius.circular(4.r),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
margin: EdgeInsets.only(right: 4.w),
|
||||||
|
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
||||||
|
),
|
||||||
|
quickText(
|
||||||
|
jobTaskItem.title,
|
||||||
|
size: 16.sp,
|
||||||
|
color: Color.fromRGBO(70, 70, 70, 1),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: padEdg,
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: [
|
||||||
|
quickText(
|
||||||
|
jobTaskItem.createTime.substring(0, 10),
|
||||||
|
color: Color.fromRGBO(97, 97, 97, 1),
|
||||||
|
size: 10.sp,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||||
|
quickText(
|
||||||
|
'参与班级:2',
|
||||||
|
color: Color.fromRGBO(76, 199, 147, 1),
|
||||||
|
size: 10.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||||
|
quickText(
|
||||||
|
'科目:' + jobTaskItem.subjectName,
|
||||||
|
color: Color.fromRGBO(116, 145, 253, 1),
|
||||||
|
size: 10.sp,
|
||||||
|
fontWeight: FontWeight.w600,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
|
color: Colors.white,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
||||||
|
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
||||||
|
blurRadius: 4, //阴影模糊程度
|
||||||
|
spreadRadius: 0, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Row(children: [
|
||||||
|
Expanded(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => easyThrottle('go_to_homework_report', () => {}),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,7 @@ class JobListParticipateInClass extends StatefulWidget {
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final String jobName;
|
final String jobName;
|
||||||
final String genderName;
|
final String genderName;
|
||||||
final bool completed;
|
const JobListParticipateInClass({required this.jobId, required this.jobName, required this.genderName, super.key});
|
||||||
const JobListParticipateInClass(
|
|
||||||
{required this.jobId, required this.jobName, required this.genderName, this.completed = false, super.key});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobListParticipateInClass> createState() => _JobListParticipateInClassState();
|
State<JobListParticipateInClass> createState() => _JobListParticipateInClassState();
|
||||||
|
|
@ -256,9 +254,6 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
|
|
||||||
// 查看作业报告
|
// 查看作业报告
|
||||||
void jobViewReport(MarkingTasks task) {}
|
void jobViewReport(MarkingTasks task) {}
|
||||||
|
|
||||||
/// 查看学生名单
|
|
||||||
void showStudentList([bool submitted = false]) {}
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -276,31 +271,8 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
),
|
),
|
||||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
|
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
|
||||||
if (value == null) return Container();
|
if (value == null) return Container();
|
||||||
bool thePadTerminal = isPad();
|
|
||||||
if (widget.completed) {
|
|
||||||
// 已完成
|
|
||||||
if (thePadTerminal)
|
|
||||||
return TabletEndCompleted(
|
|
||||||
data: value,
|
|
||||||
genderName: widget.genderName,
|
|
||||||
bookmarks: bookmarks,
|
|
||||||
jobViewReport: jobViewReport,
|
|
||||||
quickDataCheck: quickDataCheck,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 已完成手机端
|
if (isPad())
|
||||||
return MobileEndCompleted(
|
|
||||||
data: value,
|
|
||||||
genderName: widget.genderName,
|
|
||||||
bookmarks: bookmarks,
|
|
||||||
jobViewReport: jobViewReport,
|
|
||||||
quickDataCheck: quickDataCheck,
|
|
||||||
showStudentList: showStudentList,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 未完成页面
|
|
||||||
if (thePadTerminal)
|
|
||||||
return TabletEnd(
|
return TabletEnd(
|
||||||
data: value,
|
data: value,
|
||||||
genderName: widget.genderName,
|
genderName: widget.genderName,
|
||||||
|
|
@ -327,7 +299,7 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 平板电脑端(未完成)
|
/// 平板电脑端
|
||||||
class TabletEnd extends StatelessWidget {
|
class TabletEnd extends StatelessWidget {
|
||||||
final String genderName;
|
final String genderName;
|
||||||
final List<MarkingTasks> data;
|
final List<MarkingTasks> data;
|
||||||
|
|
@ -360,7 +332,7 @@ class TabletEnd extends StatelessWidget {
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
spacing: 8.0.w, // 子元素之间的间距
|
spacing: 8.0.w, // 子元素之间的间距
|
||||||
runSpacing: 10.h, // 主轴方向上不同行之间的间距
|
runSpacing: 10.h, // 主轴方向上不同行之间的间距
|
||||||
children: data
|
children: [...data, ...data, ...data]
|
||||||
.map((e) => $ItemDataViewOfPad(
|
.map((e) => $ItemDataViewOfPad(
|
||||||
task: e,
|
task: e,
|
||||||
bookmarks: bookmarks,
|
bookmarks: bookmarks,
|
||||||
|
|
@ -377,462 +349,6 @@ class TabletEnd extends StatelessWidget {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 平板展示(已完成)
|
|
||||||
class TabletEndCompleted extends StatelessWidget {
|
|
||||||
final String genderName;
|
|
||||||
final List<MarkingTasks> data;
|
|
||||||
|
|
||||||
final Bookmarks bookmarks; // 收藏夹
|
|
||||||
final JobViewReport jobViewReport;
|
|
||||||
final QuickDataCheck quickDataCheck; // 数据快查
|
|
||||||
const TabletEndCompleted({
|
|
||||||
required this.genderName,
|
|
||||||
required this.data,
|
|
||||||
|
|
||||||
/// 方法
|
|
||||||
required this.bookmarks,
|
|
||||||
required this.jobViewReport,
|
|
||||||
required this.quickDataCheck,
|
|
||||||
super.key,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w);
|
|
||||||
return Container(
|
|
||||||
width: ScreenUtil().screenWidth,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h),
|
|
||||||
child: GridView(
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
|
||||||
mainAxisSpacing: 10.h,
|
|
||||||
crossAxisSpacing: 6.w,
|
|
||||||
childAspectRatio: 1.48 //宽高比为1时,子widget
|
|
||||||
),
|
|
||||||
children: data.map((taskItem) {
|
|
||||||
return Container(
|
|
||||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(6.r)),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 6.h),
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)),
|
|
||||||
),
|
|
||||||
child: quickText(taskItem.className, color: Color.fromRGBO(104, 136, 253, 1), size: 12.sp),
|
|
||||||
),
|
|
||||||
Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(76, 199, 147, 1),
|
|
||||||
percent: taskItem.objectivePrecision,
|
|
||||||
title: '客观题正确率:',
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
fontSize: 8.sp,
|
|
||||||
lineHeight: 5.h,
|
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
|
||||||
),
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(255, 190, 91, 1),
|
|
||||||
percent: taskItem.subjectivePrecision,
|
|
||||||
title: '主观题正确率:',
|
|
||||||
fontSize: 8.sp,
|
|
||||||
lineHeight: 5.h,
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
|
||||||
),
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(166, 139, 242, 1),
|
|
||||||
percent: taskItem.precision,
|
|
||||||
title: '总正确率:',
|
|
||||||
fontSize: 8.sp,
|
|
||||||
lineHeight: 5.h,
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
marginEdg: EdgeInsets.only(top: 5.h),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 4.h),
|
|
||||||
Padding(
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('OneClickReview', () {}),
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
),
|
|
||||||
child: quickText('已提交(${taskItem.commitStudentCount})', size: 8.sp, color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {},
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
child: quickText('数据快查', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {},
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
child: quickText('收藏夹(2)', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 4.h),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(10.r),
|
|
||||||
bottomRight: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
|
||||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
|
||||||
blurRadius: 5, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Row(children: [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_review_homework', () => quickDataCheck(taskItem)),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('数据快查', color: Color.fromRGBO(79, 79, 79, 1), size: 11.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(width: 1.w, height: 26.h, color: Color.fromRGBO(221, 221, 221, 1)),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_end_review_homework', () => jobViewReport(taskItem)),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 10.sp),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 手机端(已完成)
|
|
||||||
class MobileEndCompleted extends StatelessWidget {
|
|
||||||
final String genderName;
|
|
||||||
final List<MarkingTasks> data;
|
|
||||||
|
|
||||||
final Bookmarks bookmarks; // 收藏夹
|
|
||||||
final JobViewReport jobViewReport; // 查看报告
|
|
||||||
final QuickDataCheck quickDataCheck; // 数据快查
|
|
||||||
final ShowStudentList showStudentList;
|
|
||||||
|
|
||||||
const MobileEndCompleted({
|
|
||||||
required this.genderName,
|
|
||||||
required this.data,
|
|
||||||
|
|
||||||
/// 方法
|
|
||||||
required this.bookmarks,
|
|
||||||
required this.showStudentList,
|
|
||||||
required this.jobViewReport,
|
|
||||||
required this.quickDataCheck,
|
|
||||||
super.key,
|
|
||||||
});
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w);
|
|
||||||
return ListView(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h),
|
|
||||||
children: data.map((task) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.only(top: 11.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadiusDirectional.circular(10.r),
|
|
||||||
boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.15), blurRadius: 10)],
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
quickText(genderName + task.className, color: Color.fromRGBO(0, 0, 0, 1), size: 14.sp),
|
|
||||||
Expanded(child: SizedBox()),
|
|
||||||
quickText('已交:${task.commitStudentCount}', color: Color.fromRGBO(104, 136, 253, 1), size: 12.sp),
|
|
||||||
SizedBox(width: 16.w),
|
|
||||||
quickText('未交:${task.studentCount - task.commitStudentCount}',
|
|
||||||
color: Color.fromRGBO(255, 86, 86, 1), size: 12.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 13.h),
|
|
||||||
Padding(
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: task.isFinish
|
|
||||||
? [
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {},
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
child: quickText('收藏夹(2)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('OneClickReview', () {}),
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
),
|
|
||||||
child: quickText('一键批阅', size: 10.sp, color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {},
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
child: quickText('数据快查', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(
|
|
||||||
flex: 3,
|
|
||||||
child: Material(
|
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () async {},
|
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
child: quickText('收藏夹(2)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 13.h),
|
|
||||||
Padding(
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 8.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
|
|
||||||
percent: task.progressPercentage / 100,
|
|
||||||
// center: Text(
|
|
||||||
// '${getDoubleRemoveZero(jobTaskClassItem.progressPercentage)}%',
|
|
||||||
// style: TextStyle(color: Colors.white, fontSize: 8.sp),
|
|
||||||
// ),
|
|
||||||
linearGradient: LinearGradient(
|
|
||||||
tileMode: TileMode.mirror,
|
|
||||||
stops: [0.0, 1.0],
|
|
||||||
colors: task.progressPercentage / 100 != 1
|
|
||||||
? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor]
|
|
||||||
: [
|
|
||||||
Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1),
|
|
||||||
Color.fromRGBO(144, 224, 190, 1),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
|
||||||
// progressColor: Theme.of(context).primaryColor,
|
|
||||||
backgroundColor: Color.fromRGBO(232, 232, 232, 1),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 7.w),
|
|
||||||
quickText('${getDoubleRemoveZero(task.progressPercentage)}%',
|
|
||||||
size: 10.sp, color: Color.fromRGBO(70, 70, 70, 1))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
if (task.isFinish)
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(76, 199, 147, 1),
|
|
||||||
percent: task.objectivePrecision,
|
|
||||||
title: '客观题正确率:',
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
),
|
|
||||||
if (task.isFinish)
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(255, 190, 91, 1),
|
|
||||||
percent: task.subjectivePrecision,
|
|
||||||
title: '主观题正确率:',
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
),
|
|
||||||
if (task.isFinish)
|
|
||||||
$CompletedHomeworkProgressBar(
|
|
||||||
color: Color.fromRGBO(166, 139, 242, 1),
|
|
||||||
percent: task.precision,
|
|
||||||
title: '总正确率:',
|
|
||||||
padingEdg: padingEdg,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
),
|
|
||||||
SizedBox(height: 13.h),
|
|
||||||
Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
bottomLeft: Radius.circular(10.r),
|
|
||||||
bottomRight: Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
color: Colors.white,
|
|
||||||
boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
|
||||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
|
||||||
blurRadius: 5, //阴影模糊程度
|
|
||||||
spreadRadius: 0, //阴影扩散程度
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: task.isFinish
|
|
||||||
? [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_review_homework', () => quickDataCheck(task)),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('数据快查', color: Color.fromRGBO(79, 79, 79, 1), size: 13.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(width: 1.w, height: 32.h, color: Color.fromRGBO(221, 221, 221, 1)),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_end_review_homework', () => jobViewReport(task)),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_review_homework', () {}),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('批阅', color: Color.fromRGBO(79, 79, 79, 1), size: 13.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Container(width: 1.w, height: 32.h, color: Color.fromRGBO(221, 221, 221, 1)),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('go_to_end_review_homework', () => {}),
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('结束批阅', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
));
|
|
||||||
}).toList(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 移动端
|
/// 移动端
|
||||||
class MobileEnd extends StatelessWidget {
|
class MobileEnd extends StatelessWidget {
|
||||||
final String genderName;
|
final String genderName;
|
||||||
|
|
@ -1475,11 +991,3 @@ typedef Bookmarks = void Function(MarkingTasks);
|
||||||
|
|
||||||
/// 查看作业报告
|
/// 查看作业报告
|
||||||
typedef JobViewReport = void Function(MarkingTasks);
|
typedef JobViewReport = void Function(MarkingTasks);
|
||||||
|
|
||||||
/// 展示学生名单
|
|
||||||
typedef ShowStudentList = void Function([bool submitted]);
|
|
||||||
|
|
||||||
/// 查看学生名单
|
|
||||||
// void showStudentList([bool submitted = false]) {
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
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_easyrefresh/easy_refresh.dart';
|
||||||
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:marking_app/common/config/request_config.dart';
|
import 'package:marking_app/common/config/request_config.dart';
|
||||||
|
|
@ -20,6 +21,8 @@ import 'package:marking_app/common/model/event_bus/marking_statistics_bus.dart';
|
||||||
import 'package:marking_app/common/model/marking/marking_statistics.dart';
|
import 'package:marking_app/common/model/marking/marking_statistics.dart';
|
||||||
import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
||||||
import 'package:marking_app/provider/review_provider.dart';
|
import 'package:marking_app/provider/review_provider.dart';
|
||||||
|
import 'package:marking_app/utils/anti_shake_throttling.dart';
|
||||||
|
import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
import 'package:marking_app/common/model/common/base_page_data.dart';
|
import 'package:marking_app/common/model/common/base_page_data.dart';
|
||||||
import 'package:marking_app/common/model/marking/marking_item.dart';
|
import 'package:marking_app/common/model/marking/marking_item.dart';
|
||||||
|
|
|
||||||
|
|
@ -254,27 +254,26 @@ class RouterManager {
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
String jobName = params['jobName']![0];
|
String jobName = params['jobName']![0];
|
||||||
String genderName = params['genderName']![0];
|
String genderName = params['genderName']![0];
|
||||||
// ignore: sdk_version_since
|
|
||||||
bool completed = bool.parse(params['completed']?[0] ?? 'false');
|
return JobListParticipateInClass(jobId: jobId, jobName: jobName, genderName: genderName);
|
||||||
return JobListParticipateInClass(jobId: jobId, jobName: jobName, genderName: genderName, completed: completed);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// 数据快查
|
// 数据快查
|
||||||
static final _quickDataCheckPageHandler = Handler(
|
static final _quickDataCheckPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params){
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
String className = params['className']![0];
|
String className = params['className']![0];
|
||||||
return QuickDataCheckPage(jobId: jobId, className: className);
|
return QuickDataCheckPage(jobId: jobId,className:className);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// 数据快查-个人信息
|
// 数据快查-个人信息
|
||||||
static final _quickCheckPersonalPageHandler = Handler(
|
static final _quickCheckPersonalPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params){
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
int studentId = int.parse(params['studentId']![0]);
|
int studentId = int.parse(params['studentId']![0]);
|
||||||
return QuickCheckPersonal(jobId: jobId, studentId: studentId);
|
return QuickCheckPersonal(jobId: jobId,studentId:studentId);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -322,8 +321,7 @@ class RouterManager {
|
||||||
router.define(jobListParticipateInClassPath,
|
router.define(jobListParticipateInClassPath,
|
||||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickCheckPersonalPath,
|
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
// getTransition()
|
// getTransition()
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ description: A new Flutter project.
|
||||||
|
|
||||||
# The following line prevents the package from being accidentally published to
|
# The following line prevents the package from being accidentally published to
|
||||||
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
# pub.dev using `flutter pub publish`. This is preferred for private packages.
|
||||||
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
|
|
||||||
# The following defines the version and build number for your application.
|
# The following defines the version and build number for your application.
|
||||||
# A version number is three numbers separated by dots, like 1.2.43
|
# A version number is three numbers separated by dots, like 1.2.43
|
||||||
|
|
@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||||
version: 1.0.87
|
version: 1.0.87
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.17.1 <3.0.0'
|
sdk: ">=2.17.1 <3.0.0"
|
||||||
|
|
||||||
# Dependencies specify other packages that your package needs in order to woyrk.
|
# Dependencies specify other packages that your package needs in order to woyrk.
|
||||||
# To automatically upgrade your package dependencies to the latest versions
|
# To automatically upgrade your package dependencies to the latest versions
|
||||||
|
|
@ -29,8 +29,7 @@ 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.
|
||||||
cupertino_icons: ^1.0.2
|
cupertino_icons: ^1.0.2
|
||||||
|
|
@ -40,7 +39,7 @@ dependencies:
|
||||||
# easy_refresh: ^3.3.2+1
|
# easy_refresh: ^3.3.2+1
|
||||||
retrofit: ^3.3.1
|
retrofit: ^3.3.1
|
||||||
logger: ^1.1.0
|
logger: ^1.1.0
|
||||||
|
|
||||||
flutter_lints: ^2.0.0
|
flutter_lints: ^2.0.0
|
||||||
fluttertoast: ^8.2.3
|
fluttertoast: ^8.2.3
|
||||||
json_annotation: ^4.8.1
|
json_annotation: ^4.8.1
|
||||||
|
|
@ -61,6 +60,7 @@ dependencies:
|
||||||
permission_handler: ^11.0.1
|
permission_handler: ^11.0.1
|
||||||
flutter_widget_from_html_core: ^0.10.3
|
flutter_widget_from_html_core: ^0.10.3
|
||||||
|
|
||||||
|
|
||||||
# 事件总线
|
# 事件总线
|
||||||
event_bus: ^2.0.0
|
event_bus: ^2.0.0
|
||||||
image_picker: ^0.8.6
|
image_picker: ^0.8.6
|
||||||
|
|
@ -108,7 +108,6 @@ dependencies:
|
||||||
badges: ^3.1.2
|
badges: ^3.1.2
|
||||||
horizontal_data_table: ^4.1.1
|
horizontal_data_table: ^4.1.1
|
||||||
data_table_2: ^2.5.10
|
data_table_2: ^2.5.10
|
||||||
syncfusion_flutter_datepicker: ^21.2.4
|
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|
@ -118,13 +117,16 @@ dev_dependencies:
|
||||||
json_serializable: ^6.3.1
|
json_serializable: ^6.3.1
|
||||||
# 分离样式
|
# 分离样式
|
||||||
functional_widget: ^0.10.1
|
functional_widget: ^0.10.1
|
||||||
|
|
||||||
|
|
||||||
# The "flutter_lints" package below contains a set of recommended lints to
|
# The "flutter_lints" package below contains a set of recommended lints to
|
||||||
# encourage good coding practices. The lint set provided by the package is
|
# encourage good coding practices. The lint set provided by the package is
|
||||||
# activated in the `analysis_options.yaml` file located at the root of your
|
# activated in the `analysis_options.yaml` file located at the root of your
|
||||||
# package. See that file for information about deactivating specific lint
|
# package. See that file for information about deactivating specific lint
|
||||||
# rules and activating additional ones.
|
# rules and activating additional ones.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# For information on the generic Dart part of this file, see the
|
# For information on the generic Dart part of this file, see the
|
||||||
# following page: https://dart.dev/tools/pub/pubspec
|
# following page: https://dart.dev/tools/pub/pubspec
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue