job_report_revision #2
|
|
@ -0,0 +1,91 @@
|
|||
// 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,6 +56,8 @@ class JobTaskItem extends Object {
|
|||
@JsonKey(name: 'markingTypeEnum')
|
||||
JobMarkingTypeEnum markingTypeEnum; // 考试类型
|
||||
|
||||
int taskCount; // 参与班级数量
|
||||
|
||||
JobTaskItem(
|
||||
this.id,
|
||||
this.title,
|
||||
|
|
@ -72,6 +74,7 @@ class JobTaskItem extends Object {
|
|||
// this.markingTasks,
|
||||
this.createTime,
|
||||
this.markingType,
|
||||
this.taskCount,
|
||||
{this.progressPercentage = 0,
|
||||
this.markingTypeEnum = JobMarkingTypeEnum.UNUSED}) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -21,12 +21,22 @@ class MarkingListParams extends BasePage {
|
|||
@JsonKey(name: 'PageType')
|
||||
int pageType;
|
||||
|
||||
String? startTime;
|
||||
String? endTime;
|
||||
|
||||
int? markingType; // 1 作业 2考试
|
||||
|
||||
MarkingListParams({
|
||||
required this.isFinish,
|
||||
required this.pageType,
|
||||
required page,
|
||||
required limit,
|
||||
}) : super(page, limit);
|
||||
this.markingType,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
}) : super(page, limit) {
|
||||
this.markingType ??= 1;
|
||||
}
|
||||
|
||||
factory MarkingListParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingListParamsFromJson(srcJson);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -83,6 +84,28 @@ class _MyAppState extends State<MyApp> {
|
|||
title: '远轩阅卷系统',
|
||||
navigatorKey: TheGlobal.navigatorKey,
|
||||
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(
|
||||
primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
|
||||
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
|
||||
|
|
|
|||
|
|
@ -357,29 +357,6 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap})
|
|||
isScrollable: true,
|
||||
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
||||
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,
|
||||
tabs: const <Widget>[Tab(text: '阅卷'), Tab(text: '作业')],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -145,7 +145,13 @@ class HomeworkTasksViewItem extends StatelessWidget with CommonMixin {
|
|||
@hwidget
|
||||
Widget $completedHomeworkView(BuildContext context,
|
||||
{required JobTaskItem jobTaskItem, required ShowStudentsCall showStudentsCall}) {
|
||||
return Container(
|
||||
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(
|
||||
width: double.infinity,
|
||||
padding: EdgeInsets.only(top: 20.h),
|
||||
margin: EdgeInsets.only(bottom: 12.h),
|
||||
|
|
@ -209,7 +215,7 @@ Widget $completedHomeworkView(BuildContext context,
|
|||
),
|
||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
||||
quickText(
|
||||
'参与班级:字段待定',
|
||||
'参与班级:${jobTaskItem.taskCount}',
|
||||
color: Color.fromRGBO(76, 199, 147, 1),
|
||||
size: 12.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
|
@ -294,6 +300,7 @@ Widget $completedHomeworkView(BuildContext context,
|
|||
// )
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -654,13 +661,6 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
|||
),
|
||||
backgroundColor: Color.fromRGBO(244, 244, 244, 1),
|
||||
),
|
||||
// Container(
|
||||
// child: Container(
|
||||
// color: Colors.red,
|
||||
// height: 40.r,
|
||||
// width: 40.r,
|
||||
// )
|
||||
// ),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
|
|
@ -18,6 +19,7 @@ import 'package:marking_app/common/config/request_config.dart';
|
|||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart';
|
||||
import 'package:marking_app/provider/review_provider.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
|
@ -25,6 +27,7 @@ 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/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/mixin/refresh_data_handle.dart';
|
||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||
|
||||
part 'index.g.dart';
|
||||
|
||||
|
|
@ -39,7 +42,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
|||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||
with
|
||||
CommonMixin,
|
||||
SingleTickerProviderStateMixin,
|
||||
TickerProviderStateMixin,
|
||||
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
||||
AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
|
|
@ -47,6 +50,8 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
|
||||
/* Tab控制器 */
|
||||
late TabController _tabController;
|
||||
late TabController _tabController2;
|
||||
|
||||
int _tabIndex = 0;
|
||||
bool completedToRefresh = true;
|
||||
|
||||
|
|
@ -95,6 +100,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
length: 2,
|
||||
vsync: this,
|
||||
);
|
||||
_tabController2 = TabController(length: 4, vsync: this);
|
||||
_refreshController1 = EasyRefreshController();
|
||||
_refreshController2 = EasyRefreshController();
|
||||
|
||||
|
|
@ -117,6 +123,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
if (_currentTaskIdListener != null) {
|
||||
_currentTaskIdListener!();
|
||||
}
|
||||
_tabController2.dispose();
|
||||
_tabController.dispose();
|
||||
_refreshController1.dispose();
|
||||
_refreshController2.dispose();
|
||||
|
|
@ -169,10 +176,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: SizedBox(),
|
||||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
|
|
@ -263,6 +267,29 @@ 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(
|
||||
child: IndexedStack(
|
||||
index: _tabIndex,
|
||||
|
|
@ -350,7 +377,13 @@ Widget $easyRefresh({
|
|||
@swidget
|
||||
Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
||||
return Container(
|
||||
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),
|
||||
|
|
@ -414,7 +447,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
),
|
||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||
quickText(
|
||||
'参与班级:2',
|
||||
'参与班级:${jobTaskItem.taskCount}',
|
||||
color: Color.fromRGBO(76, 199, 147, 1),
|
||||
size: 10.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
|
|
@ -429,8 +462,11 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
],
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
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)),
|
||||
|
|
@ -446,15 +482,231 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
),
|
||||
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),
|
||||
),
|
||||
)),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 筛选时间
|
||||
@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(
|
||||
alignment: Alignment.centerLeft,
|
||||
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(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
$TheTabBar(
|
||||
controller: controller,
|
||||
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
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,9 @@ class JobListParticipateInClass extends StatefulWidget {
|
|||
final int jobId;
|
||||
final String jobName;
|
||||
final String genderName;
|
||||
const JobListParticipateInClass({required this.jobId, required this.jobName, required this.genderName, super.key});
|
||||
final bool completed;
|
||||
const JobListParticipateInClass(
|
||||
{required this.jobId, required this.jobName, required this.genderName, this.completed = false, super.key});
|
||||
|
||||
@override
|
||||
State<JobListParticipateInClass> createState() => _JobListParticipateInClassState();
|
||||
|
|
@ -254,6 +256,9 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
|
||||
// 查看作业报告
|
||||
void jobViewReport(MarkingTasks task) {}
|
||||
|
||||
/// 查看学生名单
|
||||
void showStudentList([bool submitted = false]) {}
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
|
|
@ -271,8 +276,31 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
),
|
||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
|
||||
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(
|
||||
data: value,
|
||||
genderName: widget.genderName,
|
||||
|
|
@ -299,7 +327,7 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
}
|
||||
}
|
||||
|
||||
/// 平板电脑端
|
||||
/// 平板电脑端(未完成)
|
||||
class TabletEnd extends StatelessWidget {
|
||||
final String genderName;
|
||||
final List<MarkingTasks> data;
|
||||
|
|
@ -332,7 +360,7 @@ class TabletEnd extends StatelessWidget {
|
|||
child: Wrap(
|
||||
spacing: 8.0.w, // 子元素之间的间距
|
||||
runSpacing: 10.h, // 主轴方向上不同行之间的间距
|
||||
children: [...data, ...data, ...data]
|
||||
children: data
|
||||
.map((e) => $ItemDataViewOfPad(
|
||||
task: e,
|
||||
bookmarks: bookmarks,
|
||||
|
|
@ -349,6 +377,462 @@ 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 {
|
||||
final String genderName;
|
||||
|
|
@ -991,3 +1475,11 @@ typedef Bookmarks = void Function(MarkingTasks);
|
|||
|
||||
/// 查看作业报告
|
||||
typedef JobViewReport = void Function(MarkingTasks);
|
||||
|
||||
/// 展示学生名单
|
||||
typedef ShowStudentList = void Function([bool submitted]);
|
||||
|
||||
/// 查看学生名单
|
||||
// void showStudentList([bool submitted = false]) {
|
||||
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:marking_app/common/config/request_config.dart';
|
||||
|
|
@ -21,8 +20,6 @@ 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/pages/common/event_bus_mixin.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/common/model/common/base_page_data.dart';
|
||||
import 'package:marking_app/common/model/marking/marking_item.dart';
|
||||
|
|
|
|||
|
|
@ -251,8 +251,9 @@ class RouterManager {
|
|||
int jobId = int.parse(params['jobId']![0]);
|
||||
String jobName = params['jobName']![0];
|
||||
String genderName = params['genderName']![0];
|
||||
|
||||
return JobListParticipateInClass(jobId: jobId, jobName: jobName, genderName: genderName);
|
||||
// ignore: sdk_version_since
|
||||
bool completed = bool.parse(params['completed']?[0] ?? 'false');
|
||||
return JobListParticipateInClass(jobId: jobId, jobName: jobName, genderName: genderName, completed: completed);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -310,7 +311,8 @@ class RouterManager {
|
|||
router.define(jobListParticipateInClassPath,
|
||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(quickCheckPersonalPath,
|
||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||
|
||||
// getTransition()
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ description: A new Flutter project.
|
|||
|
||||
# The following line prevents the package from being accidentally published to
|
||||
# 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.
|
||||
# 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
|
||||
|
||||
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.
|
||||
# To automatically upgrade your package dependencies to the latest versions
|
||||
|
|
@ -29,7 +29,8 @@ environment:
|
|||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
cupertino_icons: ^1.0.2
|
||||
|
|
@ -60,7 +61,6 @@ dependencies:
|
|||
permission_handler: ^11.0.1
|
||||
flutter_widget_from_html_core: ^0.10.3
|
||||
|
||||
|
||||
# 事件总线
|
||||
event_bus: ^2.0.0
|
||||
image_picker: ^0.8.6
|
||||
|
|
@ -108,6 +108,7 @@ dependencies:
|
|||
badges: ^3.1.2
|
||||
horizontal_data_table: ^4.1.1
|
||||
data_table_2: ^2.5.10
|
||||
syncfusion_flutter_datepicker: ^21.2.4
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
@ -118,15 +119,12 @@ dev_dependencies:
|
|||
# 分离样式
|
||||
functional_widget: ^0.10.1
|
||||
|
||||
|
||||
# The "flutter_lints" package below contains a set of recommended lints to
|
||||
# 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
|
||||
# package. See that file for information about deactivating specific lint
|
||||
# rules and activating additional ones.
|
||||
|
||||
|
||||
|
||||
# For information on the generic Dart part of this file, see the
|
||||
# following page: https://dart.dev/tools/pub/pubspec
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue