Compare commits
5 Commits
be2c1e1e6b
...
4dfab0f4c3
| Author | SHA1 | Date |
|---|---|---|
|
|
4dfab0f4c3 | |
|
|
fa9e9912d5 | |
|
|
9174e69bb0 | |
|
|
84ece07e29 | |
|
|
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_hooks/flutter_hooks.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/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_params.dart';
|
||||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
|
@ -210,7 +207,7 @@ Widget $completedHomeworkView(BuildContext context,
|
|||
quickText(
|
||||
jobTaskItem.createTime.substring(0, 10),
|
||||
color: Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 14.sp,
|
||||
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: [
|
||||
SizedBox(height: 30.h),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.h, horizontal: 10.w),
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
|
|
@ -564,16 +561,16 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
|||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
width: isPad() ? 32.w : 38.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
padding: EdgeInsets.only(left: isPad() ? 2.w : 3.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),
|
||||
topLeft: Radius.circular(14.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
bottomLeft: Radius.circular(4.r),
|
||||
bottomRight: Radius.circular(4.r),
|
||||
|
|
@ -584,47 +581,43 @@ Widget $unfinishedHomework(BuildContext context, {required JobTaskItem jobTaskIt
|
|||
),
|
||||
quickText(
|
||||
jobTaskItem.title,
|
||||
size: 16.sp,
|
||||
size: isPad() ? 14.sp : 16.sp,
|
||||
color: Color.fromRGBO(70, 70, 70, 1),
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
],
|
||||
),
|
||||
SizedBox(height: 22.h),
|
||||
SizedBox(height: 10.h),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
quickText(
|
||||
jobTaskItem.subjectName,
|
||||
color: Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 14.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
size: 12.sp,
|
||||
),
|
||||
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(
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 13.sp),
|
||||
quickText('题量:', color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||
quickText(
|
||||
jobTaskItem.totalCount,
|
||||
color: Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 14.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
size: 13.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
quickText(' / ',
|
||||
color: Color.fromRGBO(130, 130, 130, 1), size: 12.sp, fontWeight: FontWeight.w500),
|
||||
quickText(
|
||||
jobTaskItem.createTime.substring(0, 16),
|
||||
color: Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 12.sp,
|
||||
),
|
||||
color: Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||
quickText(jobTaskItem.createTime.substring(0, 16),
|
||||
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,
|
||||
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
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 2.2 //宽高比为1时,子widget
|
||||
childAspectRatio: 2.0 //宽高比为1时,子widget
|
||||
),
|
||||
children: data.map((e) {
|
||||
return $ReviewedItem(jobTaskItem: e);
|
||||
}).toList(),
|
||||
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
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: padEdg,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
|
|
@ -419,7 +418,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
? const Color.fromRGBO(104, 136, 253, 1)
|
||||
: const Color.fromRGBO(255, 175, 56, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(18.r),
|
||||
topLeft: Radius.circular(14.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
bottomLeft: 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),
|
||||
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,
|
||||
Expanded(
|
||||
child: quickText(jobTaskItem.title,
|
||||
size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
@ -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(
|
||||
'参与班级:${jobTaskItem.taskCount}',
|
||||
'参与班级:',
|
||||
color: Color.fromRGBO(76, 199, 147, 1),
|
||||
size: 9.sp,
|
||||
),
|
||||
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,
|
||||
size: 9.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: FavoriteButton(
|
||||
jobTaskItem.id,
|
||||
jobTaskItem.title,
|
||||
margin: EdgeInsets.only(top: 4.h, bottom: 6.h),
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||
RouterManager.router.navigateTo(
|
||||
|
|
@ -512,7 +520,7 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
|
|||
if (customTime != null) {
|
||||
customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? '';
|
||||
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) {
|
||||
customTimeStr =
|
||||
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||
|
|
@ -605,7 +613,7 @@ Widget $completedJobConditionFilter(BuildContext context,
|
|||
}
|
||||
|
||||
return Container(
|
||||
height: 36.h,
|
||||
height: 39.h,
|
||||
padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
JobReportJoinClass? classData;
|
||||
late String loginName;
|
||||
final int pageSize = 100;
|
||||
String className = '-1';
|
||||
String className = '全部';
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
|
|
@ -376,6 +376,7 @@ Widget $classSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinCl
|
|||
)),
|
||||
child: DropdownButton(
|
||||
value: classData?.uniqueId ?? '-1',
|
||||
|
||||
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
|
||||
underline: Container(),
|
||||
// isExpanded:true,
|
||||
|
|
|
|||
|
|
@ -376,15 +376,20 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async {
|
||||
Navigator.of(context).pop(isRefresh);
|
||||
return false;
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Color.fromRGBO(51, 51, 51, 1)),
|
||||
onPressed: () => Navigator.of(context).pop()),
|
||||
onPressed: () => Navigator.of(context).pop(isRefresh)),
|
||||
title: Container(
|
||||
child:
|
||||
quickText(widget.jobName, size: 16.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500),
|
||||
child: quickText(widget.jobName,
|
||||
size: 14.sp, color: Color.fromRGBO(51, 51, 51, 1), fontWeight: FontWeight.w500),
|
||||
alignment: Alignment.center,
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
|
|
@ -444,6 +449,7 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
|||
showStudentList: showStudentList,
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -547,7 +553,7 @@ class TabletEndCompleted extends StatelessWidget {
|
|||
var padingEdg = EdgeInsets.only(left: 10.w, right: 10.w);
|
||||
return Container(
|
||||
width: ScreenUtil().screenWidth,
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 16.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 16.h),
|
||||
child: GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
|
|
@ -608,13 +614,13 @@ class TabletEndCompleted extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(104, 136, 253, 1),
|
||||
borderRadius: BorderRadius.circular(16.r),
|
||||
child: InkWell(
|
||||
onTap: () => easyThrottle(
|
||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)),
|
||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, true)),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
|
|
@ -629,13 +635,13 @@ class TabletEndCompleted extends StatelessWidget {
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () => easyThrottle(
|
||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, false)),
|
||||
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
|
|
@ -649,7 +655,7 @@ class TabletEndCompleted extends StatelessWidget {
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -660,7 +666,7 @@ class TabletEndCompleted extends StatelessWidget {
|
|||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 4.h),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
|
|
@ -795,13 +801,13 @@ class MobileEndCompleted extends StatelessWidget {
|
|||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(104, 136, 253, 1),
|
||||
borderRadius: BorderRadius.circular(16.r),
|
||||
child: InkWell(
|
||||
onTap: () =>
|
||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)),
|
||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, true)),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
|
|
@ -816,13 +822,13 @@ class MobileEndCompleted extends StatelessWidget {
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
child: InkWell(
|
||||
onTap: () =>
|
||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, false)),
|
||||
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)),
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
|
|
@ -836,7 +842,7 @@ class MobileEndCompleted extends StatelessWidget {
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1027,7 +1033,7 @@ Widget $itemDataViewOfPad(
|
|||
children: task.isFinish
|
||||
? [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1038,19 +1044,19 @@ Widget $itemDataViewOfPad(
|
|||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 3.h),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(flex: 3, child: SizedBox()),
|
||||
Expanded(flex: 4, child: SizedBox()),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(flex: 3, child: SizedBox()),
|
||||
Expanded(flex: 4, child: SizedBox()),
|
||||
]
|
||||
: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(104, 136, 253, 1),
|
||||
borderRadius: BorderRadius.circular(16.r),
|
||||
|
|
@ -1070,7 +1076,7 @@ Widget $itemDataViewOfPad(
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1088,7 +1094,7 @@ Widget $itemDataViewOfPad(
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1288,7 +1294,7 @@ Widget $itemDataView(
|
|||
children: task.isFinish
|
||||
? [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1299,19 +1305,19 @@ Widget $itemDataView(
|
|||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(flex: 3, child: SizedBox()),
|
||||
Expanded(flex: 4, child: SizedBox()),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(flex: 3, child: SizedBox()),
|
||||
Expanded(flex: 4, child: SizedBox()),
|
||||
]
|
||||
: [
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(104, 136, 253, 1),
|
||||
borderRadius: BorderRadius.circular(16.r),
|
||||
|
|
@ -1331,7 +1337,7 @@ Widget $itemDataView(
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1349,7 +1355,7 @@ Widget $itemDataView(
|
|||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 3,
|
||||
flex: 4,
|
||||
child: Material(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
|
|
@ -1360,7 +1366,7 @@ Widget $itemDataView(
|
|||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.symmetric(vertical: 5.h),
|
||||
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)),
|
||||
),
|
||||
),
|
||||
|
|
@ -1546,7 +1552,7 @@ Widget $completedHomeworkProgressBar(
|
|||
percent: percent,
|
||||
center: Text(
|
||||
percentStr,
|
||||
style: TextStyle(color: Colors.white, fontSize: 8.sp),
|
||||
style: TextStyle(color: Colors.white, fontSize: 6.sp),
|
||||
),
|
||||
// linearStrokeCap: LinearStrokeCap.butt,
|
||||
progressColor: color,
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
|||
style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
||||
)),
|
||||
)),
|
||||
SizedBox(width: 24.r,),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r),
|
||||
|
|
|
|||
|
|
@ -34,27 +34,29 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
|||
assert(index >= 0);
|
||||
StudentDetails item = widget.bodyList[index];
|
||||
int num = 0;
|
||||
int total = 0;
|
||||
item.kgDetails.forEach((element) {
|
||||
if (element.state == 0) {
|
||||
num = num + 1;
|
||||
}
|
||||
total = total + 1;
|
||||
});
|
||||
item.zgDetails.forEach((element) {
|
||||
if (element.state == 0) {
|
||||
num = num + 1;
|
||||
}
|
||||
total = total + 1;
|
||||
});
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null
|
||||
? num == 0
|
||||
? MaterialStateProperty.all(color)
|
||||
: MaterialStateProperty.all(Color(0xFFFFD79C))
|
||||
? num == total
|
||||
? MaterialStateProperty.all(Color(0xFFFFD79C))
|
||||
: MaterialStateProperty.all(color)
|
||||
: null,
|
||||
cells: [
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.quickCheckPersonalPath +
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ abstract class RestClient {
|
|||
@the_retrofit.GET("/api/jobs/job-report")
|
||||
Future<BaseStructureResult<JobReportModel>> getJobReport(@the_retrofit.Queries() Map<String, dynamic> params);
|
||||
|
||||
// 作业 => 获取作业报告
|
||||
// 作业 => 获取作业班级列表(参与班级)
|
||||
@the_retrofit.GET("/api/jobs/student-job-for-class")
|
||||
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")
|
||||
Future<BaseStructureResult> getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params);
|
||||
|
||||
|
||||
// 作业 => 取消收藏
|
||||
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
||||
Future<BaseStructureResult> getJobDeFavorites(
|
||||
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId,@the_retrofit.Field("questionPage") int questionPage);
|
||||
Future<BaseStructureResult> getJobDeFavorites(@the_retrofit.Field("jobId") int jobId,
|
||||
@the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue