no message
This commit is contained in:
parent
4e812bc5c0
commit
727c774ea0
|
|
@ -222,3 +222,5 @@ marking_app/lib/pages/homework_correction/job_knowledge_points_detail.g.dart
|
||||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
||||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
||||||
marking_app/lib/pages/homework_correction/job_home.g.dart
|
marking_app/lib/pages/homework_correction/job_home.g.dart
|
||||||
|
marking_app/lib/common/model/marking/keyboard_assist_event.g.dart
|
||||||
|
marking_app/lib/common/model/marking/marking_history_zoom_info.g.dart
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'keyboard_assist_event.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
KeyboardAssistEvent _$KeyboardAssistEventFromJson(Map<String, dynamic> json) =>
|
|
||||||
KeyboardAssistEvent(
|
|
||||||
openAuxiliary: json['openAuxiliary'] as bool? ?? false,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$KeyboardAssistEventToJson(
|
|
||||||
KeyboardAssistEvent instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'openAuxiliary': instance.openAuxiliary,
|
|
||||||
};
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'marking_history_zoom_info.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
MarkingHistoryZoomInfo _$MarkingHistoryZoomInfoFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
MarkingHistoryZoomInfo(
|
|
||||||
markingUserId: json['markingUserId'] as int,
|
|
||||||
questionNum: json['questionNum'] as String,
|
|
||||||
scale: (json['scale'] as num).toDouble(),
|
|
||||||
positionY: (json['positionY'] as num).toDouble(),
|
|
||||||
positionX: (json['positionX'] as num).toDouble(),
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$MarkingHistoryZoomInfoToJson(
|
|
||||||
MarkingHistoryZoomInfo instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'markingUserId': instance.markingUserId,
|
|
||||||
'questionNum': instance.questionNum,
|
|
||||||
'scale': instance.scale,
|
|
||||||
'positionY': instance.positionY,
|
|
||||||
'positionX': instance.positionX,
|
|
||||||
};
|
|
||||||
|
|
@ -28,40 +28,6 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
bool get wantKeepAlive => true;
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
late Future<int> _future;
|
late Future<int> _future;
|
||||||
List<EntranceModel> entrances = [
|
|
||||||
EntranceModel(
|
|
||||||
title: '作业批阅',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: RouterManager.jobMainListPagePath,
|
|
||||||
),
|
|
||||||
EntranceModel(
|
|
||||||
title: '学生历史作业',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
|
||||||
page: 'history',
|
|
||||||
),
|
|
||||||
EntranceModel(
|
|
||||||
title: '知识点掌握',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: RouterManager.jobKnowledgePointsPath,
|
|
||||||
),
|
|
||||||
EntranceModel(
|
|
||||||
title: '答题轨迹',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: '',
|
|
||||||
),
|
|
||||||
EntranceModel(
|
|
||||||
title: '优先批阅设定',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
|
||||||
page: 'set',
|
|
||||||
),
|
|
||||||
EntranceModel(
|
|
||||||
title: '批阅设置',
|
|
||||||
image: '',
|
|
||||||
navigationUrl: '',
|
|
||||||
),
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -97,7 +63,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
@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),
|
||||||
|
|
@ -148,19 +114,27 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
SizedBox(height: 30.h),
|
||||||
$TermRow([
|
$TermRow([
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '答题轨迹',
|
title: '作业批阅',
|
||||||
image: '',
|
image: 'assets/images/job_home_marking.png',
|
||||||
navigationUrl: '',
|
navigationUrl: '',
|
||||||
),
|
),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '优先批阅设定',
|
title: '学生历史作业',
|
||||||
image: '',
|
image: 'assets/images/job_home_history.png',
|
||||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history'),
|
||||||
page: 'set',
|
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: '')
|
||||||
),
|
], data),
|
||||||
], data)
|
spaceWidth,
|
||||||
|
$TermRow([
|
||||||
|
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: ''),
|
||||||
|
EntranceModel(
|
||||||
|
title: '优先批阅设定', image: 'assets/images/job_home_youxian.png', navigationUrl: '${RouterManager.jobStudentGroupPath}?page=set')
|
||||||
|
], data),
|
||||||
|
spaceWidth,
|
||||||
|
$TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], data),
|
||||||
// Row(
|
// Row(
|
||||||
// children: [
|
// children: [
|
||||||
// Expanded(child: Container(
|
// Expanded(child: Container(
|
||||||
|
|
@ -240,8 +214,7 @@ class EntranceModel extends Object {
|
||||||
String title;
|
String title;
|
||||||
String image;
|
String image;
|
||||||
String navigationUrl;
|
String navigationUrl;
|
||||||
String? page;
|
EntranceModel({required this.title, required this.image, required this.navigationUrl});
|
||||||
EntranceModel({required this.title, required this.image, required this.navigationUrl, this.page = ''});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
|
|
@ -250,148 +223,85 @@ Widget $termRow(BuildContext context, List<EntranceModel> items, int data) {
|
||||||
Widget childWidget;
|
Widget childWidget;
|
||||||
switch (leng) {
|
switch (leng) {
|
||||||
case 1:
|
case 1:
|
||||||
var e = items[0];
|
childWidget = Row(children: [Expanded(child: $TermItem(items[0], data))]);
|
||||||
bool isJob = e.title == '作业批阅';
|
|
||||||
childWidget = InkWell(
|
|
||||||
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
|
||||||
if (e.page != '') {
|
|
||||||
RouterManager.router.navigateTo(context, '${e.navigationUrl}?page=${e.page}', transition: getTransition());
|
|
||||||
} else {
|
|
||||||
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,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
// Image(image: e.image),
|
|
||||||
Icon(
|
|
||||||
const IconData(0xe642, fontFamily: "AlibabaIcon"),
|
|
||||||
size: 12.sp,
|
|
||||||
),
|
|
||||||
quickText(e.title, size: 12.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
childWidget = Row(
|
childWidget = Row(children: [
|
||||||
children: items.map((e) {
|
Expanded(flex: 9, child: $TermItem(items[0], data)),
|
||||||
var e = items[0];
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
bool isJob = e.title == '作业批阅';
|
Expanded(flex: 9, child: $TermItem(items[1], data)),
|
||||||
return InkWell(
|
]);
|
||||||
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
|
||||||
if (e.page != '') {
|
|
||||||
RouterManager.router.navigateTo(context, '${e.navigationUrl}?page=${e.page}', transition: getTransition());
|
|
||||||
} else {
|
|
||||||
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,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
// Image(image: e.image),
|
|
||||||
Icon(
|
|
||||||
const IconData(0xe642, fontFamily: "AlibabaIcon"),
|
|
||||||
size: 12.sp,
|
|
||||||
),
|
|
||||||
quickText(e.title, size: 12.sp),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
));
|
|
||||||
}).toList(),
|
|
||||||
);
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
var e = items[0];
|
double _theHeight = ScreenUtil().screenWidth / 19 + 54.h * 2;
|
||||||
bool isJob = e.title == '作业批阅';
|
childWidget = Row(
|
||||||
childWidget = InkWell(
|
|
||||||
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
|
||||||
if (e.page != '') {
|
|
||||||
RouterManager.router.navigateTo(context, '${e.navigationUrl}?page=${e.page}', transition: getTransition());
|
|
||||||
} else {
|
|
||||||
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,
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
children: [
|
||||||
// Image(image: e.image),
|
Expanded(child: $TermItem(items[0], data, theHeight: _theHeight)),
|
||||||
Icon(
|
SizedBox(width: ScreenUtil().screenWidth / 19),
|
||||||
const IconData(0xe642, fontFamily: "AlibabaIcon"),
|
Expanded(
|
||||||
size: 12.sp,
|
child: SizedBox(
|
||||||
),
|
height: _theHeight,
|
||||||
quickText(e.title, size: 12.sp),
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
$TermItem(items[1], data),
|
||||||
|
$TermItem(items[2], data),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
childWidget = Container();
|
childWidget = Container();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Container(child: childWidget);
|
return Container(padding: EdgeInsets.symmetric(horizontal: 14.w), child: childWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
@swidget
|
||||||
|
Widget $termItem(BuildContext context, EntranceModel e, int data, {double? theHeight}) {
|
||||||
|
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(
|
||||||
|
height: theHeight,
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 18.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(231, 231, 231, 1),
|
||||||
|
offset: Offset(4.w, 6.h), //阴影y轴偏移量
|
||||||
|
blurRadius: 8, //阴影模糊程度
|
||||||
|
spreadRadius: 0.2, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
// border: Border.all(width: 0.5.w, color: Color.fromARGB(255, 219, 226, 250)),
|
||||||
|
),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Image.asset(e.image, height: 32.w, width: 32.w, fit: BoxFit.cover),
|
||||||
|
quickText(e.title, size: 12.sp, color: Color.fromRGBO(79, 79, 79, 1), fontWeight: FontWeight.w500),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue