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/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;
|
||||
|
||||
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
|
||||
void initState() {
|
||||
|
|
@ -97,7 +63,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context);
|
||||
|
||||
var spaceWidth = SizedBox(height: ScreenUtil().screenWidth / 19);
|
||||
return AnnotatedRegion(
|
||||
value: const SystemUiOverlayStyle(
|
||||
systemNavigationBarColor: Color(0xFF000000),
|
||||
|
|
@ -148,19 +114,27 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 30.h),
|
||||
$TermRow([
|
||||
EntranceModel(
|
||||
title: '答题轨迹',
|
||||
image: '',
|
||||
title: '作业批阅',
|
||||
image: 'assets/images/job_home_marking.png',
|
||||
navigationUrl: '',
|
||||
),
|
||||
EntranceModel(
|
||||
title: '优先批阅设定',
|
||||
image: '',
|
||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
||||
page: 'set',
|
||||
),
|
||||
], data)
|
||||
title: '学生历史作业',
|
||||
image: 'assets/images/job_home_history.png',
|
||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history'),
|
||||
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: '')
|
||||
], 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(
|
||||
// children: [
|
||||
// Expanded(child: Container(
|
||||
|
|
@ -240,8 +214,7 @@ class EntranceModel extends Object {
|
|||
String title;
|
||||
String image;
|
||||
String navigationUrl;
|
||||
String? page;
|
||||
EntranceModel({required this.title, required this.image, required this.navigationUrl, this.page = ''});
|
||||
EntranceModel({required this.title, required this.image, required this.navigationUrl});
|
||||
}
|
||||
|
||||
@swidget
|
||||
|
|
@ -250,148 +223,85 @@ Widget $termRow(BuildContext context, List<EntranceModel> items, int data) {
|
|||
Widget childWidget;
|
||||
switch (leng) {
|
||||
case 1:
|
||||
var e = items[0];
|
||||
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),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
childWidget = Row(children: [Expanded(child: $TermItem(items[0], data))]);
|
||||
break;
|
||||
case 2:
|
||||
childWidget = Row(
|
||||
children: items.map((e) {
|
||||
var e = items[0];
|
||||
bool isJob = e.title == '作业批阅';
|
||||
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(),
|
||||
);
|
||||
|
||||
childWidget = Row(children: [
|
||||
Expanded(flex: 9, child: $TermItem(items[0], data)),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(flex: 9, child: $TermItem(items[1], data)),
|
||||
]);
|
||||
break;
|
||||
case 3:
|
||||
var e = items[0];
|
||||
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,
|
||||
double _theHeight = ScreenUtil().screenWidth / 19 + 54.h * 2;
|
||||
childWidget = Row(
|
||||
children: [
|
||||
// Image(image: e.image),
|
||||
Icon(
|
||||
const IconData(0xe642, fontFamily: "AlibabaIcon"),
|
||||
size: 12.sp,
|
||||
),
|
||||
quickText(e.title, size: 12.sp),
|
||||
Expanded(child: $TermItem(items[0], data, theHeight: _theHeight)),
|
||||
SizedBox(width: ScreenUtil().screenWidth / 19),
|
||||
Expanded(
|
||||
child: SizedBox(
|
||||
height: _theHeight,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
$TermItem(items[1], data),
|
||||
$TermItem(items[2], data),
|
||||
],
|
||||
),
|
||||
),
|
||||
));
|
||||
),
|
||||
],
|
||||
);
|
||||
break;
|
||||
default:
|
||||
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