no message
This commit is contained in:
parent
290d4efddf
commit
a9a9b03deb
|
|
@ -1,5 +1,3 @@
|
||||||
import 'package:achievement_view/achievement_view.dart';
|
|
||||||
import 'package:collection/collection.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
@ -7,7 +5,6 @@ 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:marking_app/common/model/common/base_structure_result.dart';
|
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/job/job_concerned_with_student.dart';
|
import 'package:marking_app/common/model/job/job_concerned_with_student.dart';
|
||||||
import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
|
@ -210,7 +207,7 @@ Widget $completedHomeworkView(BuildContext context,
|
||||||
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: 12.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),
|
||||||
|
|
@ -543,7 +540,7 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 10.w),
|
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
|
|
@ -564,16 +561,16 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 32.w,
|
width: isPad() ? 32.w : 38.w,
|
||||||
height: 18.h,
|
height: 18.h,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
padding: EdgeInsets.only(left: isPad() ? 2.w : 3.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: jobTaskItem.markingTypeEnum.name == '作业'
|
color: jobTaskItem.markingTypeEnum.name == '作业'
|
||||||
? const Color.fromRGBO(104, 136, 253, 1)
|
? const Color.fromRGBO(104, 136, 253, 1)
|
||||||
: const Color.fromRGBO(255, 175, 56, 1),
|
: const Color.fromRGBO(255, 175, 56, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(18.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(3.r),
|
topRight: Radius.circular(3.r),
|
||||||
bottomLeft: Radius.circular(4.r),
|
bottomLeft: Radius.circular(4.r),
|
||||||
bottomRight: Radius.circular(4.r),
|
bottomRight: Radius.circular(4.r),
|
||||||
|
|
@ -584,47 +581,43 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
||||||
),
|
),
|
||||||
quickText(
|
quickText(
|
||||||
jobTaskItem.title,
|
jobTaskItem.title,
|
||||||
size: 16.sp,
|
size: isPad() ? 14.sp : 16.sp,
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
color: Color.fromRGBO(70, 70, 70, 1),
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 22.h),
|
SizedBox(height: 10.h),
|
||||||
Row(
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText(
|
quickText(
|
||||||
jobTaskItem.subjectName,
|
jobTaskItem.subjectName,
|
||||||
color: Color.fromRGBO(97, 97, 97, 1),
|
color: Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 14.sp,
|
size: 12.sp,
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
),
|
||||||
quickText(' / ',
|
quickText(' / ',
|
||||||
color: Color.fromRGBO(130, 130, 130, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||||
Container(
|
Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 13.sp),
|
quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||||
quickText(
|
quickText(
|
||||||
jobTaskItem.totalCount,
|
jobTaskItem.totalCount,
|
||||||
color: Color.fromRGBO(97, 97, 97, 1),
|
color: Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 14.sp,
|
size: 13.sp,
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
quickText(' / ',
|
quickText(' / ',
|
||||||
color: Color.fromRGBO(130, 130, 130, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(jobTaskItem.createTime.substring(0, 16),
|
||||||
jobTaskItem.createTime.substring(0, 16),
|
color: Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
|
||||||
color: Color.fromRGBO(97, 97, 97, 1),
|
|
||||||
size: 12.sp,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
FavoriteButton(jobTaskItem.id, jobTaskItem.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -679,3 +672,70 @@ typedef ShowStudentsCall = Future<void> Function(
|
||||||
bool? submitted,
|
bool? submitted,
|
||||||
String? className,
|
String? className,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
/// 收藏夹按钮
|
||||||
|
class FavoriteButton extends HookWidget with CommonMixin {
|
||||||
|
final int jobId;
|
||||||
|
final String jobName;
|
||||||
|
EdgeInsets? margin;
|
||||||
|
FavoriteButton(this.jobId, this.jobName, {this.margin, super.key});
|
||||||
|
|
||||||
|
Future<int> getInvolveClasses() async {
|
||||||
|
try {
|
||||||
|
RestClient _client = await getClient();
|
||||||
|
var result = await _client.getListOfJobFavoriteNumber(jobId);
|
||||||
|
|
||||||
|
if (result.success && (result.data?.isNotEmpty ?? false)) {
|
||||||
|
return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
print(e);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 收藏夹
|
||||||
|
void bookmarks(BuildContext context) {
|
||||||
|
RouterManager.router.navigateTo(
|
||||||
|
context,
|
||||||
|
RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
|
||||||
|
transition: getTransition(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
var favoriteNumber = useState(0);
|
||||||
|
useEffect(() {
|
||||||
|
getInvolveClasses().then((value) {
|
||||||
|
var favoriteCount = favoriteNumber.value;
|
||||||
|
if (favoriteCount != value) favoriteNumber.value = value;
|
||||||
|
});
|
||||||
|
return () {};
|
||||||
|
}, []);
|
||||||
|
if (favoriteNumber.value <= 0) return Container();
|
||||||
|
margin ??= EdgeInsets.only(top: 15.h);
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
margin: margin,
|
||||||
|
child: Material(
|
||||||
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => bookmarks(context),
|
||||||
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||||
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
|
child: quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(child: SizedBox())
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -356,11 +356,9 @@ Widget $easyRefresh({
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
crossAxisSpacing: 6.w,
|
crossAxisSpacing: 6.w,
|
||||||
childAspectRatio: 2.2 //宽高比为1时,子widget
|
childAspectRatio: 2.0 //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
children: data.map((e) {
|
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
|
||||||
return $ReviewedItem(jobTaskItem: e);
|
|
||||||
}).toList(),
|
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||||
|
|
@ -408,6 +406,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
Padding(
|
Padding(
|
||||||
padding: padEdg,
|
padding: padEdg,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 32.w,
|
width: 32.w,
|
||||||
|
|
@ -419,7 +418,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
? const Color.fromRGBO(104, 136, 253, 1)
|
? const Color.fromRGBO(104, 136, 253, 1)
|
||||||
: const Color.fromRGBO(255, 175, 56, 1),
|
: const Color.fromRGBO(255, 175, 56, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(18.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(3.r),
|
topRight: Radius.circular(3.r),
|
||||||
bottomLeft: Radius.circular(4.r),
|
bottomLeft: Radius.circular(4.r),
|
||||||
bottomRight: Radius.circular(4.r),
|
bottomRight: Radius.circular(4.r),
|
||||||
|
|
@ -428,11 +427,9 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
margin: EdgeInsets.only(right: 4.w),
|
||||||
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
||||||
),
|
),
|
||||||
quickText(
|
Expanded(
|
||||||
jobTaskItem.title,
|
child: quickText(jobTaskItem.title,
|
||||||
size: 16.sp,
|
size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500),
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -451,21 +448,32 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
),
|
),
|
||||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||||
quickText(
|
quickText(
|
||||||
'参与班级:${jobTaskItem.taskCount}',
|
'参与班级:',
|
||||||
|
color: Color.fromRGBO(76, 199, 147, 1),
|
||||||
|
size: 9.sp,
|
||||||
|
),
|
||||||
|
quickText(
|
||||||
|
'${jobTaskItem.taskCount}',
|
||||||
color: Color.fromRGBO(76, 199, 147, 1),
|
color: Color.fromRGBO(76, 199, 147, 1),
|
||||||
size: 10.sp,
|
size: 10.sp,
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
),
|
||||||
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.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: 10.sp,
|
size: 9.sp,
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||||
|
child: FavoriteButton(
|
||||||
|
jobTaskItem.id,
|
||||||
|
jobTaskItem.title,
|
||||||
|
margin: EdgeInsets.only(top: 4.h, bottom: 6.h),
|
||||||
|
),
|
||||||
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||||
RouterManager.router.navigateTo(
|
RouterManager.router.navigateTo(
|
||||||
|
|
@ -512,7 +520,7 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
|
||||||
if (customTime != null) {
|
if (customTime != null) {
|
||||||
customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? '';
|
customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? '';
|
||||||
if (customTime.endDate != null) {
|
if (customTime.endDate != null) {
|
||||||
print(customTime.startDate!.year == customTime.endDate!.year);
|
// print(customTime.startDate!.year == customTime.endDate!.year);
|
||||||
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
|
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
|
||||||
customTimeStr =
|
customTimeStr =
|
||||||
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||||
|
|
@ -605,7 +613,7 @@ Widget $completedJobConditionFilter(BuildContext context,
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: 36.h,
|
height: 39.h,
|
||||||
padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
|
|
|
||||||
|
|
@ -376,29 +376,44 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return WillPopScope(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
onWillPop: () async {
|
||||||
appBar: AppBar(
|
Navigator.of(context).pop(isRefresh);
|
||||||
leading: IconButton(
|
return false;
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Color.fromRGBO(51, 51, 51, 1)),
|
},
|
||||||
onPressed: () => Navigator.of(context).pop()),
|
child: Scaffold(
|
||||||
title: Container(
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
child:
|
appBar: AppBar(
|
||||||
quickText(widget.jobName, size: 16.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500),
|
leading: IconButton(
|
||||||
alignment: Alignment.center,
|
icon: Icon(Icons.arrow_back_ios, color: Color.fromRGBO(51, 51, 51, 1)),
|
||||||
|
onPressed: () => Navigator.of(context).pop(isRefresh)),
|
||||||
|
title: Container(
|
||||||
|
child: quickText(widget.jobName,
|
||||||
|
size: 14.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
),
|
||||||
|
backgroundColor: Colors.white,
|
||||||
),
|
),
|
||||||
backgroundColor: Colors.white,
|
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
|
||||||
),
|
if (value == null) return Container();
|
||||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
|
value.forEach((e) {
|
||||||
if (value == null) return Container();
|
e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0;
|
||||||
value.forEach((e) {
|
});
|
||||||
e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0;
|
bool thePadTerminal = isPad();
|
||||||
});
|
if (widget.completed) {
|
||||||
bool thePadTerminal = isPad();
|
// 已完成
|
||||||
if (widget.completed) {
|
if (thePadTerminal)
|
||||||
// 已完成
|
return TabletEndCompleted(
|
||||||
if (thePadTerminal)
|
data: value,
|
||||||
return TabletEndCompleted(
|
genderName: widget.genderName,
|
||||||
|
bookmarks: bookmarks,
|
||||||
|
jobViewReport: jobViewReport,
|
||||||
|
quickDataCheck: quickDataCheck,
|
||||||
|
showStudentList: showStudentList,
|
||||||
|
);
|
||||||
|
|
||||||
|
// 已完成手机端
|
||||||
|
return MobileEndCompleted(
|
||||||
data: value,
|
data: value,
|
||||||
genderName: widget.genderName,
|
genderName: widget.genderName,
|
||||||
bookmarks: bookmarks,
|
bookmarks: bookmarks,
|
||||||
|
|
@ -406,21 +421,23 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
quickDataCheck: quickDataCheck,
|
quickDataCheck: quickDataCheck,
|
||||||
showStudentList: showStudentList,
|
showStudentList: showStudentList,
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// 已完成手机端
|
// 未完成页面
|
||||||
return MobileEndCompleted(
|
if (thePadTerminal)
|
||||||
data: value,
|
return TabletEnd(
|
||||||
genderName: widget.genderName,
|
data: value,
|
||||||
bookmarks: bookmarks,
|
genderName: widget.genderName,
|
||||||
jobViewReport: jobViewReport,
|
bookmarks: bookmarks,
|
||||||
quickDataCheck: quickDataCheck,
|
endReview: endReview,
|
||||||
showStudentList: showStudentList,
|
goToReview: goToReview,
|
||||||
);
|
jobViewReport: jobViewReport,
|
||||||
}
|
quickDataCheck: quickDataCheck,
|
||||||
|
oneClickReview: oneClickReview,
|
||||||
|
showStudentList: showStudentList,
|
||||||
|
);
|
||||||
|
|
||||||
// 未完成页面
|
return MobileEnd(
|
||||||
if (thePadTerminal)
|
|
||||||
return TabletEnd(
|
|
||||||
data: value,
|
data: value,
|
||||||
genderName: widget.genderName,
|
genderName: widget.genderName,
|
||||||
bookmarks: bookmarks,
|
bookmarks: bookmarks,
|
||||||
|
|
@ -431,19 +448,8 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
oneClickReview: oneClickReview,
|
oneClickReview: oneClickReview,
|
||||||
showStudentList: showStudentList,
|
showStudentList: showStudentList,
|
||||||
);
|
);
|
||||||
|
}),
|
||||||
return MobileEnd(
|
),
|
||||||
data: value,
|
|
||||||
genderName: widget.genderName,
|
|
||||||
bookmarks: bookmarks,
|
|
||||||
endReview: endReview,
|
|
||||||
goToReview: goToReview,
|
|
||||||
jobViewReport: jobViewReport,
|
|
||||||
quickDataCheck: quickDataCheck,
|
|
||||||
oneClickReview: oneClickReview,
|
|
||||||
showStudentList: showStudentList,
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -547,7 +553,7 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w);
|
var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w);
|
||||||
return Container(
|
return Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: ScreenUtil().screenWidth,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h),
|
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 16.h),
|
||||||
child: GridView(
|
child: GridView(
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
|
|
@ -608,13 +614,13 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => easyThrottle(
|
onTap: () => easyThrottle(
|
||||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)),
|
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, true)),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
@ -629,13 +635,13 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => easyThrottle(
|
onTap: () => easyThrottle(
|
||||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, false)),
|
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
@ -649,7 +655,7 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -660,7 +666,7 @@ class TabletEndCompleted extends StatelessWidget {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
padding: EdgeInsets.symmetric(vertical: 4.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('收藏夹(${taskItem.collectNumber})',
|
child: quickText(taskItem.collectNumber <= 0 ? '收藏夹' : '收藏夹(${taskItem.collectNumber})',
|
||||||
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -795,13 +801,13 @@ class MobileEndCompleted extends StatelessWidget {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)),
|
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, true)),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
@ -816,13 +822,13 @@ class MobileEndCompleted extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, false)),
|
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)),
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8.r),
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
|
|
@ -836,7 +842,7 @@ class MobileEndCompleted extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1027,7 +1033,7 @@ Widget $itemDataViewOfPad(
|
||||||
children: task.isFinish
|
children: task.isFinish
|
||||||
? [
|
? [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1038,19 +1044,19 @@ Widget $itemDataViewOfPad(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 3.h),
|
padding: EdgeInsets.symmetric(vertical: 3.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('收藏夹(${task.collectNumber})',
|
child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})',
|
||||||
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
Expanded(flex: 4, child: SizedBox()),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
Expanded(flex: 4, child: SizedBox()),
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
|
|
@ -1070,7 +1076,7 @@ Widget $itemDataViewOfPad(
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1088,7 +1094,7 @@ Widget $itemDataViewOfPad(
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1288,7 +1294,7 @@ Widget $itemDataView(
|
||||||
children: task.isFinish
|
children: task.isFinish
|
||||||
? [
|
? [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1299,19 +1305,19 @@ Widget $itemDataView(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
padding: EdgeInsets.symmetric(vertical: 5.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('收藏夹(${task.collectNumber})',
|
child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})',
|
||||||
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
Expanded(flex: 4, child: SizedBox()),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(flex: 3, child: SizedBox()),
|
Expanded(flex: 4, child: SizedBox()),
|
||||||
]
|
]
|
||||||
: [
|
: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(104, 136, 253, 1),
|
color: Color.fromRGBO(104, 136, 253, 1),
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
|
|
@ -1331,7 +1337,7 @@ Widget $itemDataView(
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1349,7 +1355,7 @@ Widget $itemDataView(
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
borderRadius: BorderRadius.circular(20.r),
|
||||||
|
|
@ -1360,7 +1366,7 @@ Widget $itemDataView(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
padding: EdgeInsets.symmetric(vertical: 5.h),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('收藏夹(${task.collectNumber})',
|
child: quickText(task.collectNumber <= 0 ? '收藏夹' : '收藏夹(${task.collectNumber})',
|
||||||
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -1546,7 +1552,7 @@ Widget $completedHomeworkProgressBar(
|
||||||
percent: percent,
|
percent: percent,
|
||||||
center: Text(
|
center: Text(
|
||||||
percentStr,
|
percentStr,
|
||||||
style: TextStyle(color: Colors.white, fontSize: 8.sp),
|
style: TextStyle(color: Colors.white, fontSize: 6.sp),
|
||||||
),
|
),
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
// linearStrokeCap: LinearStrokeCap.butt,
|
||||||
progressColor: color,
|
progressColor: color,
|
||||||
|
|
|
||||||
|
|
@ -274,7 +274,7 @@ abstract class RestClient {
|
||||||
@the_retrofit.GET("/api/jobs/job-report")
|
@the_retrofit.GET("/api/jobs/job-report")
|
||||||
Future<BaseStructureResult<JobReportModel>> getJobReport(@the_retrofit.Queries() Map<String, dynamic> params);
|
Future<BaseStructureResult<JobReportModel>> getJobReport(@the_retrofit.Queries() Map<String, dynamic> params);
|
||||||
|
|
||||||
// 作业 => 获取作业报告
|
// 作业 => 获取作业班级列表(参与班级)
|
||||||
@the_retrofit.GET("/api/jobs/student-job-for-class")
|
@the_retrofit.GET("/api/jobs/student-job-for-class")
|
||||||
Future<BaseStructureResult<List<JobReportJoinClass>>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId);
|
Future<BaseStructureResult<List<JobReportJoinClass>>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId);
|
||||||
|
|
||||||
|
|
@ -340,9 +340,8 @@ abstract class RestClient {
|
||||||
@the_retrofit.POST("/api/read/jc-job-read-level")
|
@the_retrofit.POST("/api/read/jc-job-read-level")
|
||||||
Future<BaseStructureResult> getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params);
|
Future<BaseStructureResult> getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params);
|
||||||
|
|
||||||
|
|
||||||
// 作业 => 取消收藏
|
// 作业 => 取消收藏
|
||||||
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
||||||
Future<BaseStructureResult> getJobDeFavorites(
|
Future<BaseStructureResult> getJobDeFavorites(@the_retrofit.Field("jobId") int jobId,
|
||||||
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId,@the_retrofit.Field("questionPage") int questionPage);
|
@the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue