no message
This commit is contained in:
parent
1f2e5dbb56
commit
c955f1859a
|
|
@ -29,9 +29,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
final bool isHomeworkCorrection;
|
final bool isHomeworkCorrection;
|
||||||
final VoidCallback? call;
|
final VoidCallback? call;
|
||||||
final MarkingListType? markingtype;
|
final MarkingListType? markingtype;
|
||||||
const TestPaperItem(
|
const TestPaperItem({required this.markingItem, this.markingtype, this.isHomeworkCorrection = false, this.call, Key? key}) : super(key: key);
|
||||||
{required this.markingItem, this.markingtype, this.isHomeworkCorrection = false, this.call, Key? key})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context, WidgetRef ref) {
|
Widget build(BuildContext context, WidgetRef ref) {
|
||||||
|
|
@ -65,7 +63,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h),
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 10.h),
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight: 120.h,
|
minHeight: 120.h,
|
||||||
maxHeight: 130.h,
|
maxHeight: 144.h,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
|
|
@ -117,8 +115,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
margin: EdgeInsets.only(right: 8.w),
|
margin: EdgeInsets.only(right: 8.w),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
|
||||||
color: const Color.fromRGBO(245, 108, 108, 0.236),
|
color: const Color.fromRGBO(245, 108, 108, 0.236),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -137,8 +134,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
margin: EdgeInsets.only(right: 8.w),
|
margin: EdgeInsets.only(right: 8.w),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
|
||||||
color: const Color.fromRGBO(4, 201, 208, 0.10),
|
color: const Color.fromRGBO(4, 201, 208, 0.10),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -157,8 +153,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
margin: EdgeInsets.only(right: 8.w),
|
margin: EdgeInsets.only(right: 8.w),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||||
BorderRadius.only(topLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
|
||||||
color: const Color.fromRGBO(231, 236, 255, 1),
|
color: const Color.fromRGBO(231, 236, 255, 1),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|
@ -270,10 +265,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
Text(
|
Text(
|
||||||
'${markingItem.finishCount}',
|
'${markingItem.finishCount}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: markingItem.isFinish && isHomeworkCorrection
|
color: markingItem.isFinish && isHomeworkCorrection ? Colors.green : Theme.of(context).primaryColor, fontSize: 12.sp),
|
||||||
? Colors.green
|
|
||||||
: Theme.of(context).primaryColor,
|
|
||||||
fontSize: 12.sp),
|
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'/',
|
'/',
|
||||||
|
|
@ -299,8 +291,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
style: TextStyle(color: Colors.white, fontSize: 8.sp),
|
style: TextStyle(color: Colors.white, fontSize: 8.sp),
|
||||||
),
|
),
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
// linearStrokeCap: LinearStrokeCap.butt,
|
||||||
progressColor:
|
progressColor: markingItem.isFinish && isHomeworkCorrection ? Colors.green : Theme.of(context).primaryColor,
|
||||||
markingItem.isFinish && isHomeworkCorrection ? Colors.green : Theme.of(context).primaryColor,
|
|
||||||
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
|
backgroundColor: const Color.fromRGBO(219, 224, 243, 1),
|
||||||
barRadius: Radius.circular(10.r),
|
barRadius: Radius.circular(10.r),
|
||||||
),
|
),
|
||||||
|
|
@ -503,9 +494,7 @@ class TestPaperItem extends ConsumerWidget with CommonMixin {
|
||||||
RestClient client = await getClient();
|
RestClient client = await getClient();
|
||||||
BaseStructureResult<bool?> result = await client.endMarkingTask(markingUserId);
|
BaseStructureResult<bool?> result = await client.endMarkingTask(markingUserId);
|
||||||
if (result.code == RequestConfig.successCode && result.data == null ? false : result.data!) {
|
if (result.code == RequestConfig.successCode && result.data == null ? false : result.data!) {
|
||||||
ref
|
ref.read(currentTaskIdProvider.notifier).setDoTaskEntity(CurrentReviewTask(taskId: markingItem.markingUserId, refresh: true));
|
||||||
.read(currentTaskIdProvider.notifier)
|
|
||||||
.setDoTaskEntity(CurrentReviewTask(taskId: markingItem.markingUserId, refresh: true));
|
|
||||||
} else {
|
} else {
|
||||||
ToastUtils.getFluttertoast(context: context, msg: '提交失败');
|
ToastUtils.getFluttertoast(context: context, msg: '提交失败');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -624,7 +624,7 @@ class _JobHomeState extends State<JobHome>
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context);
|
super.build(context);
|
||||||
var spaceWidth = SizedBox(height: ScreenUtil().screenWidth / 19);
|
|
||||||
return AnnotatedRegion(
|
return AnnotatedRegion(
|
||||||
value: const SystemUiOverlayStyle(
|
value: const SystemUiOverlayStyle(
|
||||||
systemNavigationBarColor: Color(0xFF000000),
|
systemNavigationBarColor: Color(0xFF000000),
|
||||||
|
|
@ -639,7 +639,7 @@ class _JobHomeState extends State<JobHome>
|
||||||
taskIndependence: true,
|
taskIndependence: true,
|
||||||
enableControlFinishLoad: true,
|
enableControlFinishLoad: true,
|
||||||
enableControlFinishRefresh: true,
|
enableControlFinishRefresh: true,
|
||||||
emptyWidget: jobDatas.isEmpty ? const MyEmptyWidget() : null,
|
emptyWidget: jobDatas.isEmpty ? $TheJobMainBox(emptyWidget: MyEmptyWidget()) : null,
|
||||||
controller: _refreshController,
|
controller: _refreshController,
|
||||||
header: MaterialHeader(),
|
header: MaterialHeader(),
|
||||||
footer: TaurusFooter(),
|
footer: TaurusFooter(),
|
||||||
|
|
@ -658,28 +658,10 @@ class _JobHomeState extends State<JobHome>
|
||||||
// // ),
|
// // ),
|
||||||
// child: Image.asset('assets/images/job_home_top_bgm.png', fit: BoxFit.fitWidth),
|
// child: Image.asset('assets/images/job_home_top_bgm.png', fit: BoxFit.fitWidth),
|
||||||
// ),
|
// ),
|
||||||
SizedBox(height: MediaQuery.of(context).padding.top + 20.h),
|
$TheJobMainBox(),
|
||||||
SlidingData([
|
|
||||||
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: RouterManager.jobMainListPagePath),
|
|
||||||
EntranceModel(
|
|
||||||
title: '学生历史作业',
|
|
||||||
image: 'assets/images/job_home_history.png',
|
|
||||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history',
|
|
||||||
),
|
|
||||||
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: RouterManager.jobKnowledgePointsPath)
|
|
||||||
]),
|
|
||||||
spaceWidth,
|
|
||||||
$TermRow([
|
|
||||||
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: RouterManager.answerTrajectoryPath),
|
|
||||||
EntranceModel(
|
|
||||||
title: '优先批阅设定',
|
|
||||||
image: 'assets/images/job_home_youxian.png',
|
|
||||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=set',
|
|
||||||
)
|
|
||||||
], 0),
|
|
||||||
// spaceWidth,
|
// spaceWidth,
|
||||||
// $TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], 0),
|
// $TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], 0),
|
||||||
spaceWidth,
|
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
@ -844,3 +826,36 @@ class SlidingData extends HookWidget with EventBusMixin {
|
||||||
return $TermRow(items, dataNumber.value?.num ?? 0);
|
return $TermRow(items, dataNumber.value?.num ?? 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 作业主页
|
||||||
|
@swidget
|
||||||
|
Widget $theJobMainBox(BuildContext context, {Widget? emptyWidget}) {
|
||||||
|
var spaceWidth = SizedBox(height: ScreenUtil().screenWidth / 19);
|
||||||
|
|
||||||
|
return Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
SizedBox(height: MediaQuery.of(context).padding.top + 20.h),
|
||||||
|
SlidingData([
|
||||||
|
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: RouterManager.jobMainListPagePath),
|
||||||
|
EntranceModel(
|
||||||
|
title: '学生历史作业',
|
||||||
|
image: 'assets/images/job_home_history.png',
|
||||||
|
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history',
|
||||||
|
),
|
||||||
|
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: RouterManager.jobKnowledgePointsPath)
|
||||||
|
]),
|
||||||
|
spaceWidth,
|
||||||
|
$TermRow([
|
||||||
|
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: RouterManager.answerTrajectoryPath),
|
||||||
|
EntranceModel(
|
||||||
|
title: '优先批阅设定',
|
||||||
|
image: 'assets/images/job_home_youxian.png',
|
||||||
|
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=set',
|
||||||
|
)
|
||||||
|
], 0),
|
||||||
|
if (emptyWidget != null) emptyWidget,
|
||||||
|
spaceWidth,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue