添加作业首页
This commit is contained in:
parent
5a43ccffcf
commit
ee41ad7d1b
|
|
@ -0,0 +1,12 @@
|
||||||
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
|
part 'job_home_refresh_bus.g.dart';
|
||||||
|
|
||||||
|
@JsonSerializable()
|
||||||
|
class JobHomeRefreshBus extends Object {
|
||||||
|
JobHomeRefreshBus();
|
||||||
|
|
||||||
|
factory JobHomeRefreshBus.fromJson(Map<String, dynamic> srcJson) => _$JobHomeRefreshBusFromJson(srcJson);
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() => _$JobHomeRefreshBusToJson(this);
|
||||||
|
}
|
||||||
|
|
@ -7,6 +7,8 @@
|
||||||
* @Description: 阅卷主页
|
* @Description: 阅卷主页
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
|
@ -16,7 +18,9 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:marking_app/common/config/request_config.dart';
|
import 'package:marking_app/common/config/request_config.dart';
|
||||||
|
import 'package:marking_app/common/model/event_bus/job_home_refresh_bus.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/pages/common/event_bus_mixin.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_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/provider/review_provider.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
|
|
@ -40,14 +44,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
with
|
with CommonMixin, EventBusMixin, TickerProviderStateMixin, RefreshDataHandle<JobTaskItem, MarkingListParams> {
|
||||||
CommonMixin,
|
|
||||||
TickerProviderStateMixin,
|
|
||||||
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
|
||||||
AutomaticKeepAliveClientMixin {
|
|
||||||
@override
|
|
||||||
bool get wantKeepAlive => true;
|
|
||||||
|
|
||||||
/* Tab控制器 */
|
/* Tab控制器 */
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late TabController _tabController2;
|
late TabController _tabController2;
|
||||||
|
|
@ -127,6 +124,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
_refreshController1.dispose();
|
_refreshController1.dispose();
|
||||||
_refreshController2.dispose();
|
_refreshController2.dispose();
|
||||||
|
eventCancel();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,8 +150,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
super.build(context); //调用super.build(返回值始终返回null,应将其忽略)
|
|
||||||
|
|
||||||
return AnnotatedRegion(
|
return AnnotatedRegion(
|
||||||
value: const SystemUiOverlayStyle(
|
value: const SystemUiOverlayStyle(
|
||||||
systemNavigationBarColor: Color(0xFF000000),
|
systemNavigationBarColor: Color(0xFF000000),
|
||||||
|
|
@ -176,7 +172,19 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () => easyThrottle('BACK_JOB_HOME', () => Navigator.of(context).pop()),
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_back_ios_sharp,
|
||||||
|
size: 16.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -226,9 +234,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'待批阅',
|
'待批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: _tabIndex == 0
|
color: _tabIndex == 0 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
||||||
? Theme.of(context).primaryColor
|
|
||||||
: const Color.fromRGBO(80, 94, 110, 1),
|
|
||||||
fontWeight: _tabIndex == 0 ? FontWeight.bold : null,
|
fontWeight: _tabIndex == 0 ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -246,9 +252,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'已批阅',
|
'已批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: _tabIndex == 1
|
color: _tabIndex == 1 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
||||||
? Theme.of(context).primaryColor
|
|
||||||
: const Color.fromRGBO(80, 94, 110, 1),
|
|
||||||
fontWeight: _tabIndex == 1 ? FontWeight.bold : null,
|
fontWeight: _tabIndex == 1 ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -261,11 +265,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
RouterManager.router
|
RouterManager.router.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
||||||
.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
|
||||||
},
|
},
|
||||||
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"), color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||||
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -305,6 +307,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
data: markingDatas1,
|
data: markingDatas1,
|
||||||
onLoad: onMyLoad,
|
onLoad: onMyLoad,
|
||||||
onRefresh: onMyRefresh,
|
onRefresh: onMyRefresh,
|
||||||
|
eventFire: () {
|
||||||
|
eventFire(model: JobHomeRefreshBus());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
$EasyRefresh(
|
$EasyRefresh(
|
||||||
controller: _refreshController2,
|
controller: _refreshController2,
|
||||||
|
|
@ -313,6 +318,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
data: markingDatas2,
|
data: markingDatas2,
|
||||||
onLoad: onMyLoad,
|
onLoad: onMyLoad,
|
||||||
onRefresh: onMyRefresh,
|
onRefresh: onMyRefresh,
|
||||||
|
eventFire: () {
|
||||||
|
eventFire(model: JobHomeRefreshBus());
|
||||||
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -334,6 +342,7 @@ Widget $easyRefresh({
|
||||||
required EasyRefreshController controller,
|
required EasyRefreshController controller,
|
||||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
|
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
|
||||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
|
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
|
||||||
|
required Function eventFire,
|
||||||
required MarkingListParams params,
|
required MarkingListParams params,
|
||||||
required List<JobTaskItem> data,
|
required List<JobTaskItem> data,
|
||||||
required int tab,
|
required int tab,
|
||||||
|
|
@ -366,7 +375,10 @@ Widget $easyRefresh({
|
||||||
return HomeworkTasksViewItem(
|
return HomeworkTasksViewItem(
|
||||||
completed: completed,
|
completed: completed,
|
||||||
jobTaskItem: data[index],
|
jobTaskItem: data[index],
|
||||||
call: () => controller.callRefresh(),
|
call: () {
|
||||||
|
controller.callRefresh();
|
||||||
|
eventFire();
|
||||||
|
},
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: data.length,
|
itemCount: data.length,
|
||||||
|
|
@ -414,9 +426,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
padding: EdgeInsets.only(left: 2.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: jobTaskItem.markingTypeEnum.name == '作业'
|
color: jobTaskItem.markingTypeEnum.name == '作业' ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
|
||||||
? const Color.fromRGBO(104, 136, 253, 1)
|
|
||||||
: const Color.fromRGBO(255, 175, 56, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(14.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(3.r),
|
topRight: Radius.circular(3.r),
|
||||||
|
|
@ -477,8 +487,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||||
RouterManager.router.navigateTo(
|
RouterManager.router.navigateTo(
|
||||||
context,
|
context,
|
||||||
RouterManager.jobReportPagePath +
|
RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||||
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
|
||||||
transition: getTransition(),
|
transition: getTransition(),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -521,8 +530,7 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
|
||||||
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)}';
|
|
||||||
} else {
|
} else {
|
||||||
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,15 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
|
import 'package:marking_app/common/model/event_bus/job_home_refresh_bus.dart';
|
||||||
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
||||||
|
import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
||||||
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/my_text.dart';
|
import 'package:marking_app/utils/my_text.dart';
|
||||||
|
|
||||||
|
import 'package:badges/badges.dart' as badges;
|
||||||
|
|
||||||
import '../../utils/my_future_builder.dart';
|
import '../../utils/my_future_builder.dart';
|
||||||
|
|
||||||
class JobHome extends StatefulWidget {
|
class JobHome extends StatefulWidget {
|
||||||
|
|
@ -15,16 +20,16 @@ class JobHome extends StatefulWidget {
|
||||||
State<JobHome> createState() => _JobHomeState();
|
State<JobHome> createState() => _JobHomeState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _JobHomeState extends State<JobHome> with CommonMixin, AutomaticKeepAliveClientMixin {
|
class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, AutomaticKeepAliveClientMixin {
|
||||||
@override
|
@override
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
late Future _future;
|
late Future<int> _future;
|
||||||
List<EntranceModel> entrances = [
|
List<EntranceModel> entrances = [
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '作业批阅',
|
title: '作业批阅',
|
||||||
image: '',
|
image: '',
|
||||||
navigationUrl: '',
|
navigationUrl: RouterManager.jobMainListPagePath,
|
||||||
),
|
),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '学生历史作业',
|
title: '学生历史作业',
|
||||||
|
|
@ -56,10 +61,21 @@ class _JobHomeState extends State<JobHome> with CommonMixin, AutomaticKeepAliveC
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
_future = getData();
|
_future = getData();
|
||||||
|
eventOn(callback: (JobHomeRefreshBus item) {
|
||||||
|
_future = getData();
|
||||||
|
toUpState(setState, () {}, mounted);
|
||||||
|
});
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
Future getData() async {
|
@override
|
||||||
|
void dispose() {
|
||||||
|
eventCancel();
|
||||||
|
super.dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<int> getData() async {
|
||||||
|
try {
|
||||||
var _client = await getClient();
|
var _client = await getClient();
|
||||||
var _result = await _client.getJobsByPage(MarkingListParams(
|
var _result = await _client.getJobsByPage(MarkingListParams(
|
||||||
isFinish: false,
|
isFinish: false,
|
||||||
|
|
@ -67,8 +83,10 @@ class _JobHomeState extends State<JobHome> with CommonMixin, AutomaticKeepAliveC
|
||||||
limit: 1,
|
limit: 1,
|
||||||
pageType: 0,
|
pageType: 0,
|
||||||
));
|
));
|
||||||
if (_result == null) return 0;
|
|
||||||
return _result.data?.total ?? 0;
|
return _result.data?.total ?? 0;
|
||||||
|
} catch (e) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -97,7 +115,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, AutomaticKeepAliveC
|
||||||
_future = getData();
|
_future = getData();
|
||||||
toUpState(setState, () {}, mounted);
|
toUpState(setState, () {}, mounted);
|
||||||
},
|
},
|
||||||
child: MyFutureBuilder.buildFutureBuilderOfSingleInstance(context, _future, (data) {
|
child: MyFutureBuilder.buildFutureBuilderOfSingleInstance<int>(context, _future, (data) {
|
||||||
if (data == null)
|
if (data == null)
|
||||||
return Center(
|
return Center(
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -112,22 +130,50 @@ class _JobHomeState extends State<JobHome> with CommonMixin, AutomaticKeepAliveC
|
||||||
);
|
);
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 40.h, horizontal: 20.w),
|
||||||
child: GridView(
|
child: GridView(
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 10.r,
|
mainAxisSpacing: 24.r,
|
||||||
crossAxisSpacing: 10.r,
|
crossAxisSpacing: 24.r,
|
||||||
childAspectRatio: 556 / 112,
|
childAspectRatio: 556 / 200,
|
||||||
),
|
),
|
||||||
children: entrances.map((e) {
|
children: entrances.map((e) {
|
||||||
return Container(
|
bool isJob = e.title == '作业批阅';
|
||||||
|
|
||||||
|
return InkWell(
|
||||||
|
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
||||||
|
RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition());
|
||||||
|
}),
|
||||||
|
child: badges.Badge(
|
||||||
|
showBadge: isJob && data > 0,
|
||||||
|
ignorePointer: false,
|
||||||
|
badgeContent: quickText(data, color: Colors.white),
|
||||||
|
badgeAnimation: badges.BadgeAnimation.rotation(
|
||||||
|
animationDuration: Duration(seconds: 1),
|
||||||
|
colorChangeAnimationDuration: Duration(seconds: 1),
|
||||||
|
loopAnimation: false,
|
||||||
|
curve: Curves.fastOutSlowIn,
|
||||||
|
colorChangeAnimationCurve: Curves.easeInCubic,
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 0.5.w,
|
||||||
|
color: Color.fromARGB(255, 219, 226, 250),
|
||||||
|
),
|
||||||
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
quickText(e.title),
|
// Image(image: e.image),
|
||||||
|
quickText(e.title, size: 12.sp),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
),
|
||||||
|
));
|
||||||
}).toList(),
|
}).toList(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,12 @@
|
||||||
* @Description: 路由
|
* @Description: 路由
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:fluro/fluro.dart';
|
import 'package:fluro/fluro.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
||||||
import 'package:marking_app/pages/common/startUpPage.dart';
|
import 'package:marking_app/pages/common/startUpPage.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart';
|
import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart';
|
||||||
|
import 'package:marking_app/pages/homework_correction/index.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/job_personal_detail.dart';
|
import 'package:marking_app/pages/homework_correction/job_personal_detail.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/job_priority_review_set.dart';
|
import 'package:marking_app/pages/homework_correction/job_priority_review_set.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/job_report.dart';
|
import 'package:marking_app/pages/homework_correction/job_report.dart';
|
||||||
|
|
@ -64,6 +63,8 @@ class RouterManager {
|
||||||
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
||||||
// 作业 ==> 收藏页面
|
// 作业 ==> 收藏页面
|
||||||
static const String jobFavoritePagePath = '/job/favorite/index';
|
static const String jobFavoritePagePath = '/job/favorite/index';
|
||||||
|
// 作业 ==> 列表页面
|
||||||
|
static const String jobMainListPagePath = '/job/mainList/index';
|
||||||
|
|
||||||
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
||||||
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
||||||
|
|
@ -100,18 +101,14 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启动页
|
// 启动页
|
||||||
static final _startUpPageHandler =
|
static final _startUpPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
|
||||||
// 主页
|
// 主页
|
||||||
static final _mainPageHandler =
|
static final _mainPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
|
||||||
// 登录页
|
// 登录页
|
||||||
static final _loginPageHandler =
|
static final _loginPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
|
||||||
// 阅卷进度页面
|
// 阅卷进度页面
|
||||||
static final _progressPageHandler = Handler(
|
static final _progressPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
||||||
Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
|
||||||
// 回评页面
|
// 回评页面
|
||||||
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int markingUserId = int.parse(params['markingUserId']![0]);
|
int markingUserId = int.parse(params['markingUserId']![0]);
|
||||||
|
|
@ -130,11 +127,8 @@ class RouterManager {
|
||||||
|
|
||||||
// 回评异常页面
|
// 回评异常页面
|
||||||
static final _reviewAbnormalPageHandler = Handler(
|
static final _reviewAbnormalPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => ProgressAbnormal(
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
||||||
int.parse(params['examSubjectId']![0]),
|
ProgressAbnormal(int.parse(params['examSubjectId']![0]), params['markingId']![0], params['name']![0], params['questionNum']![0]));
|
||||||
params['markingId']![0],
|
|
||||||
params['name']![0],
|
|
||||||
params['questionNum']![0]));
|
|
||||||
// 阅卷页面
|
// 阅卷页面
|
||||||
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -176,8 +170,7 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 批阅作业页面
|
// 批阅作业页面
|
||||||
static final _markingHomeworkDoPageHandler =
|
static final _markingHomeworkDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
try {
|
try {
|
||||||
int taskId = int.parse(params['taskId']![0]);
|
int taskId = int.parse(params['taskId']![0]);
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
|
|
@ -221,8 +214,7 @@ class RouterManager {
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _reportClassTeacherPageHandler =
|
static final _reportClassTeacherPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
int examId = int.parse(params['examId']![0]);
|
int examId = int.parse(params['examId']![0]);
|
||||||
|
|
||||||
return ReportClassTeacher(examId: examId);
|
return ReportClassTeacher(examId: examId);
|
||||||
|
|
@ -347,6 +339,11 @@ class RouterManager {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// 优先配置个人详情
|
||||||
|
static final _jobMainListPathHandler = Handler(
|
||||||
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => HomeworkCorrection(),
|
||||||
|
);
|
||||||
|
|
||||||
// 学生报告详情
|
// 学生报告详情
|
||||||
static final _reportCardDialogPathHandler = Handler(
|
static final _reportCardDialogPathHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
|
|
@ -380,35 +377,28 @@ class RouterManager {
|
||||||
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingHomeworkDoPath,
|
router.define(markingHomeworkDoPath, handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingReviewAbnormalPath, handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingReviewAbnormalPath,
|
|
||||||
handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
router.define(reportClassTeacherPath,
|
router.define(reportClassTeacherPath, handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
router.define(reportSubjectTeacherPath, handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportSubjectTeacherPath,
|
router.define(reportPersonalSubjectPath, handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(reportPersonalSubjectPath,
|
|
||||||
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
||||||
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobListParticipateInClassPath,
|
router.define(jobListParticipateInClassPath, handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickCheckPersonalPath,
|
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobPriorityReviewSetPath,
|
|
||||||
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
||||||
|
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
// getTransition()
|
// getTransition()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue