答题轨迹
This commit is contained in:
parent
42d2e4ab39
commit
0c54c16865
|
|
@ -0,0 +1,378 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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_student_goups.dart';
|
||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/student_group_list.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/fast_data.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class AnswerTrajectory extends StatefulWidget {
|
||||
const AnswerTrajectory({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<AnswerTrajectory> createState() => _AnswerTrajectoryState();
|
||||
}
|
||||
|
||||
class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,SingleTickerProviderStateMixin{
|
||||
late final EasyRefreshController refreshController;
|
||||
late String loginName;
|
||||
List studentGroups = [];
|
||||
late TabController tabController;
|
||||
int tabIndex = 0;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
refreshController = EasyRefreshController();
|
||||
tabController =
|
||||
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
||||
FastData fastData = FastData.getInstance();
|
||||
fastData.getUser().then((value) {
|
||||
if (value == null || value == '') return;
|
||||
Map<String, dynamic> userInfo = json.decode(value);
|
||||
setState(() {
|
||||
loginName = userInfo['loginName'];
|
||||
});
|
||||
getStudentGroups();
|
||||
print(userInfo);
|
||||
});
|
||||
}
|
||||
|
||||
void getStudentGroups() async {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobStudentGroups>> res =
|
||||
await _client.getJobLevelStudentGroups(loginName);
|
||||
setState(() {
|
||||
if(res.code == 200){
|
||||
studentGroups = res.data!;
|
||||
}else{
|
||||
studentGroups = [];
|
||||
}
|
||||
|
||||
});
|
||||
refreshController.finishRefresh();
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
void goNextPage(id,title){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=answerTrajectory',transition: getTransition());
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
refreshController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'答题轨迹',
|
||||
style: TextStyle(fontSize: 16.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
actions: [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
||||
),
|
||||
child: TabBar(
|
||||
onTap: (int val) {
|
||||
print(val);
|
||||
setState(() {
|
||||
tabIndex = val;
|
||||
});
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getStudentGroups();
|
||||
},
|
||||
tabs: [
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
child: Tab(
|
||||
text: '按学生',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
child: Tab(
|
||||
text: '按作业',
|
||||
),
|
||||
)
|
||||
],
|
||||
controller: tabController,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 14.sp, color:Color(0xFF666666)),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
isScrollable: true,
|
||||
labelColor: Color(0xFF6888FD),
|
||||
unselectedLabelColor: Color(0xFF666666),
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
labelPadding: const EdgeInsets.all(0),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||
child: EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async{
|
||||
getStudentGroups();
|
||||
},
|
||||
child:
|
||||
|
||||
tabIndex == 0?StudentGroupList(studentGroups,goNextPage, rightBtn:Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
border: Border.all(width: 1.r,color: Color(0xFFFF9800)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFFFF9800)),
|
||||
),
|
||||
),
|
||||
)):
|
||||
MyEmptyWidget()
|
||||
/*Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color:Colors.white),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color.fromRGBO(104, 136, 253, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(14.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
bottomLeft: Radius.circular(4.r),
|
||||
bottomRight: Radius.circular(4.r),
|
||||
),
|
||||
),
|
||||
margin: EdgeInsets.only(right: 4.w),
|
||||
child: Text(
|
||||
'作业',
|
||||
style: TextStyle(fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'解析几何小题',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF464646)),
|
||||
)),
|
||||
// SizedBox(width: 5.r,),
|
||||
// Text('2024.1',style: TextStyle(fontSize: 12.sp,color: Color(0xFF5B5B5B)),),
|
||||
|
||||
Container(
|
||||
width: 40.r,
|
||||
height: 20.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
border: Border.all(width: 1.r, color: Color(0xFF4CC793)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'数学',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'客:',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
*//* item.objectiveDtls.length > 0
|
||||
?
|
||||
Expanded(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.start,
|
||||
spacing: 8,
|
||||
runSpacing: 5,
|
||||
children: List.generate(1, (i) {
|
||||
SubjectiveDtls subjective = item.objectiveDtls[i];
|
||||
return Container(
|
||||
width: 20.r,
|
||||
height: 20.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
? Color(0xFF666666)
|
||||
: subjective.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
subjective.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
? Color(0xFF666666)
|
||||
: subjective.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793)),
|
||||
)),
|
||||
);
|
||||
}),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'无',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
||||
),*//*
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'主:',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
*//* item.subjectiveDtls.length > 0
|
||||
? Expanded(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.start,
|
||||
spacing: 8,
|
||||
runSpacing: 5,
|
||||
children: List.generate(item.subjectiveDtls.length, (i) {
|
||||
SubjectiveDtls subjective = item.subjectiveDtls[i];
|
||||
return Container(
|
||||
width: 20.r,
|
||||
height: 20.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.transparent,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
? Color(0xFF666666)
|
||||
: subjective.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
subjective.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: subjective.state == 0
|
||||
? Color(0xFFDDDDDD)
|
||||
: subjective.state == 3
|
||||
? Color(0xFF666666)
|
||||
: subjective.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793)),
|
||||
)),
|
||||
);
|
||||
}),
|
||||
),
|
||||
)
|
||||
: Text(
|
||||
'无',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
||||
),*//*
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 142.r,
|
||||
height: 25.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E)),),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
)*/,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -46,7 +46,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
EntranceModel(
|
||||
title: '答题轨迹',
|
||||
image: '',
|
||||
navigationUrl: '',
|
||||
navigationUrl: RouterManager.answerTrajectoryPath,
|
||||
),
|
||||
EntranceModel(
|
||||
title: '优先批阅设定',
|
||||
|
|
|
|||
|
|
@ -208,9 +208,17 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
item.readLevel == 1
|
||||
?
|
||||
widget.page == 'history'?Container(
|
||||
|
||||
widget.page == 'answerTrajectory'?Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
|
||||
),
|
||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
||||
)):widget.page == 'history'?Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -218,7 +226,9 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
):InkWell(
|
||||
): item.readLevel == 1
|
||||
?
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isClicking = true;
|
||||
|
|
@ -256,15 +266,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
),
|
||||
),
|
||||
)
|
||||
: widget.page == 'history'?Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
):InkWell(
|
||||
:InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isClicking = true;
|
||||
|
|
@ -302,34 +304,6 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
),
|
||||
),
|
||||
),
|
||||
/* SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(context,
|
||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFFFCA017))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFFCA017)),
|
||||
),
|
||||
),
|
||||
),
|
||||
)*/
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -364,8 +338,16 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
item.readLevel == 1
|
||||
? widget.page == 'history'?Container(
|
||||
widget.page == 'answerTrajectory'?Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
|
||||
),
|
||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
||||
)):widget.page == 'history'?Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -373,7 +355,8 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
):InkWell(
|
||||
):item.readLevel == 1
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isClicking = true;
|
||||
|
|
@ -411,15 +394,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
),
|
||||
),
|
||||
)
|
||||
: widget.page == 'history'?Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
):InkWell(
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
setJobReadLevel(
|
||||
item.studentGroupDetailId, 1);
|
||||
|
|
@ -454,34 +429,6 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
),
|
||||
),
|
||||
),
|
||||
/* SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(context,
|
||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFFFCA017))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFFCA017)),
|
||||
),
|
||||
),
|
||||
),
|
||||
)*/
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -7,143 +7,155 @@ import 'package:marking_app/utils/index.dart';
|
|||
class StudentGroupList extends StatelessWidget {
|
||||
final List studentGroups;
|
||||
final Function goNextPage;
|
||||
const StudentGroupList(this.studentGroups,this.goNextPage,{Key? key}) : super(key: key);
|
||||
final Widget? rightBtn;
|
||||
|
||||
const StudentGroupList(this.studentGroups, this.goNextPage,
|
||||
{Key? key,this.rightBtn})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return studentGroups != null && studentGroups.length > 0
|
||||
? isPad()?GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
goNextPage(item.groupId,item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
? isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
goNextPage(item.groupId, item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
rightBtn != null
|
||||
? rightBtn!
|
||||
: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
):ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context,index){
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
||||
margin: EdgeInsets.only(bottom: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
goNextPage(item.groupId,item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 24.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
goNextPage(item.groupId, item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.only(bottom: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
rightBtn != null
|
||||
? rightBtn!
|
||||
: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 24.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: studentGroups.length,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: studentGroups.length,
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
);
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import 'package:fluro/fluro.dart';
|
|||
import 'package:flutter/material.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/homework_correction/answer_trajectory.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_knowledge_points.dart';
|
||||
|
|
@ -84,7 +85,7 @@ class RouterManager {
|
|||
static const String reportHistoryPath = '/report_detail/report_history';
|
||||
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
|
||||
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
||||
|
||||
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
||||
// TheMine
|
||||
|
||||
static final FluroRouter router = FluroRouter();
|
||||
|
|
@ -395,6 +396,15 @@ class RouterManager {
|
|||
return JobKnowledgePointsDetail(knowledgeName:knowledgeName,knowledgeId:knowledgeId);
|
||||
},
|
||||
);
|
||||
|
||||
//答题轨迹
|
||||
static final _answerTrajectoryPathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return AnswerTrajectory();
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
// 开始阅卷页面
|
||||
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
||||
|
||||
|
|
@ -444,6 +454,7 @@ class RouterManager {
|
|||
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
||||
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
||||
|
||||
// getTransition()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue