Compare commits
4 Commits
491cad7955
...
1494e69b56
| Author | SHA1 | Date |
|---|---|---|
|
|
1494e69b56 | |
|
|
fbebdbc428 | |
|
|
21183f11bc | |
|
|
0c54c16865 |
Binary file not shown.
|
After Width: | Height: | Size: 286 B |
|
|
@ -15,7 +15,7 @@ part 'marking_list_params.g.dart';
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class MarkingListParams extends BasePage {
|
class MarkingListParams extends BasePage {
|
||||||
@JsonKey(name: 'isFinish')
|
@JsonKey(name: 'isFinish')
|
||||||
bool isFinish;
|
bool? isFinish;
|
||||||
|
|
||||||
// 阅卷类型
|
// 阅卷类型
|
||||||
@JsonKey(name: 'PageType')
|
@JsonKey(name: 'PageType')
|
||||||
|
|
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
|
||||||
int? markingType; // 1 作业 2考试
|
int? markingType; // 1 作业 2考试
|
||||||
|
|
||||||
MarkingListParams({
|
MarkingListParams({
|
||||||
required this.isFinish,
|
this.isFinish,
|
||||||
required this.pageType,
|
required this.pageType,
|
||||||
required page,
|
required page,
|
||||||
required limit,
|
required limit,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,251 @@
|
||||||
|
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/config/request_config.dart';
|
||||||
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
|
import 'package:marking_app/common/model/common/base_page_data.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/common/model/job/job_task_item.dart';
|
||||||
|
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
||||||
|
import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||||
|
import 'package:marking_app/pages/homework_correction/widget/answer_trajectory_job.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/my_text.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 final EasyRefreshController refreshController2;
|
||||||
|
late String loginName;
|
||||||
|
List studentGroups = [];
|
||||||
|
List<JobTaskItem> jobList = [];
|
||||||
|
late TabController tabController;
|
||||||
|
int tabIndex = 0;
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
int total = 0;
|
||||||
|
|
||||||
|
@override
|
||||||
|
void initState() {
|
||||||
|
super.initState();
|
||||||
|
refreshController = EasyRefreshController();
|
||||||
|
refreshController2 = 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();
|
||||||
|
getWorkList();
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
|
void getWorkList() async {
|
||||||
|
final MarkingListParams params = MarkingListParams(
|
||||||
|
page: page,
|
||||||
|
limit: pageSize,
|
||||||
|
pageType: 0,
|
||||||
|
markingType: 1,
|
||||||
|
);
|
||||||
|
print('params=${params.limit}&page=${params.page}');
|
||||||
|
RestClient client = await getClient();
|
||||||
|
BaseStructureResult<BasePageData<JobTaskItem>> res =
|
||||||
|
await client.getJobsByPage(params);
|
||||||
|
List<JobTaskItem> arr = [];
|
||||||
|
if (res.success) {
|
||||||
|
if (page == 1) {
|
||||||
|
arr = res.data!.items;
|
||||||
|
} else {
|
||||||
|
arr = [...jobList, ...res.data!.items];
|
||||||
|
}
|
||||||
|
total = res.data!.total;
|
||||||
|
} else {
|
||||||
|
jobList = [];
|
||||||
|
}
|
||||||
|
jobList = arr;
|
||||||
|
setState(() {});
|
||||||
|
print('total=${res.data!.total}');
|
||||||
|
refreshController2.finishRefresh();
|
||||||
|
EasyLoading.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
refreshController.dispose();
|
||||||
|
refreshController2.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...');
|
||||||
|
if(val == 0){
|
||||||
|
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:
|
||||||
|
tabIndex == 0
|
||||||
|
?
|
||||||
|
EasyRefresh(
|
||||||
|
firstRefresh: false,
|
||||||
|
taskIndependence: true,
|
||||||
|
controller: refreshController,
|
||||||
|
header: MaterialHeader(),
|
||||||
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async {
|
||||||
|
getStudentGroups();
|
||||||
|
},
|
||||||
|
child: 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)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
):EasyRefresh(
|
||||||
|
firstRefresh: false,
|
||||||
|
taskIndependence: true,
|
||||||
|
controller: refreshController2,
|
||||||
|
header: MaterialHeader(),
|
||||||
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async {
|
||||||
|
page = 1;
|
||||||
|
setState(() {});
|
||||||
|
getWorkList();
|
||||||
|
},
|
||||||
|
onLoad: () async {
|
||||||
|
if (jobList.length < total) {
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
|
page = page + 1;
|
||||||
|
getWorkList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child:AnswerTrajectoryJob(jobList)),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -93,11 +93,11 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
image: 'assets/images/job_home_history.png',
|
image: 'assets/images/job_home_history.png',
|
||||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history',
|
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history',
|
||||||
),
|
),
|
||||||
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: '')
|
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: RouterManager.jobKnowledgePointsPath)
|
||||||
]),
|
]),
|
||||||
spaceWidth,
|
spaceWidth,
|
||||||
$TermRow([
|
$TermRow([
|
||||||
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: ''),
|
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: RouterManager.answerTrajectoryPath),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '优先批阅设定',
|
title: '优先批阅设定',
|
||||||
image: 'assets/images/job_home_youxian.png',
|
image: 'assets/images/job_home_youxian.png',
|
||||||
|
|
|
||||||
|
|
@ -208,9 +208,17 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
item.readLevel == 1
|
|
||||||
?
|
widget.page == 'answerTrajectory'?Container(
|
||||||
widget.page == 'history'?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,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -218,7 +226,9 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||||
),
|
),
|
||||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||||
):InkWell(
|
): item.readLevel == 1
|
||||||
|
?
|
||||||
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
|
|
@ -256,15 +266,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: widget.page == 'history'?Container(
|
:InkWell(
|
||||||
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(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
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,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
item.readLevel == 1
|
widget.page == 'answerTrajectory'?Container(
|
||||||
? widget.page == 'history'?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,
|
height: 24.r,
|
||||||
width: 82.r,
|
width: 82.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -373,7 +355,8 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||||
),
|
),
|
||||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||||
):InkWell(
|
):item.readLevel == 1
|
||||||
|
? InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
|
|
@ -411,15 +394,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: widget.page == 'history'?Container(
|
: InkWell(
|
||||||
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(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setJobReadLevel(
|
setJobReadLevel(
|
||||||
item.studentGroupDetailId, 1);
|
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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)*/
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,261 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||||
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
import 'package:marking_app/utils/my_text.dart';
|
||||||
|
|
||||||
|
class AnswerTrajectoryJob extends StatelessWidget {
|
||||||
|
final List<JobTaskItem> jobList;
|
||||||
|
|
||||||
|
const AnswerTrajectoryJob(this.jobList, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return jobList != null && jobList.length > 0
|
||||||
|
? isPad()
|
||||||
|
? GridView(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: ClampingScrollPhysics(),
|
||||||
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
|
mainAxisSpacing: 10.h,
|
||||||
|
crossAxisSpacing: 6.w,
|
||||||
|
childAspectRatio: 2.5 //宽高比为1时,子widget
|
||||||
|
),
|
||||||
|
children: List.generate(jobList.length, (index) {
|
||||||
|
JobTaskItem item = jobList[index];
|
||||||
|
return Container(
|
||||||
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
|
color: Colors.white,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(210, 216, 241, 1),
|
||||||
|
offset: Offset.zero, //阴影y轴偏移量
|
||||||
|
blurRadius: 5.8, //阴影模糊程度
|
||||||
|
spreadRadius: 0, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// 顶部任务名称
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 6.w),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
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: quickText(item.markingTypeEnum.name,
|
||||||
|
color: Colors.white, size: 10.sp),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: quickText(item.title,
|
||||||
|
size: 12.sp,
|
||||||
|
color: Color.fromRGBO(70, 70, 70, 1),
|
||||||
|
maxLines: 2),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 1.r, horizontal: 5.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.r, color: Color(0xFF4CC793)),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
item.subjectName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 8.r,
|
||||||
|
color: Color(0xFF4CC793)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(6.r),
|
||||||
|
bottomRight: Radius.circular(6.r)),
|
||||||
|
color: Colors.white,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
||||||
|
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
||||||
|
blurRadius: 4, //阴影模糊程度
|
||||||
|
spreadRadius: 0, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: quickText('详情',
|
||||||
|
color: Color(0xFFFFA115), size: 12.sp),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/icon_back_orange.png',
|
||||||
|
width: 8.r,
|
||||||
|
height: 8.r,
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
: ListView.builder(
|
||||||
|
shrinkWrap: true,
|
||||||
|
physics: ClampingScrollPhysics(),
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
JobTaskItem item = jobList[index];
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {},
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
padding: EdgeInsets.only(top: 10.h),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
|
color: Colors.white,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(210, 216, 241, 1),
|
||||||
|
offset: Offset.zero, //阴影y轴偏移量
|
||||||
|
blurRadius: 5.8, //阴影模糊程度
|
||||||
|
spreadRadius: 0, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
// 顶部任务名称
|
||||||
|
Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r),
|
||||||
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
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: quickText(item.markingTypeEnum.name,
|
||||||
|
color: Colors.white, size: 10.sp),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: quickText(item.title,
|
||||||
|
size: 14.sp,
|
||||||
|
color: Color.fromRGBO(70, 70, 70, 1),
|
||||||
|
maxLines: 2),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 5.r,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(
|
||||||
|
vertical: 1.r, horizontal: 5.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.r, color: Color(0xFF4CC793)),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text(
|
||||||
|
item.subjectName,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12.r,
|
||||||
|
color: Color(0xFF4CC793)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.r,
|
||||||
|
),
|
||||||
|
Container(height: 1.r,
|
||||||
|
color: Color(0xFFF5F5F5),),
|
||||||
|
Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.only(
|
||||||
|
bottomLeft: Radius.circular(6.r),
|
||||||
|
bottomRight: Radius.circular(6.r)),
|
||||||
|
color: Colors.white,
|
||||||
|
/*boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
||||||
|
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
||||||
|
blurRadius: 4, //阴影模糊程度
|
||||||
|
spreadRadius: 0, //阴影扩散程度
|
||||||
|
)
|
||||||
|
],*/
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: quickText('详情',
|
||||||
|
color: Color(0xFFFFA115), size: 12.sp),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
'assets/images/icon_back_orange.png',
|
||||||
|
width: 8.r,
|
||||||
|
height: 8.r,
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
itemCount: jobList.length,
|
||||||
|
)
|
||||||
|
: MyEmptyWidget();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,12 +7,17 @@ import 'package:marking_app/utils/index.dart';
|
||||||
class StudentGroupList extends StatelessWidget {
|
class StudentGroupList extends StatelessWidget {
|
||||||
final List studentGroups;
|
final List studentGroups;
|
||||||
final Function goNextPage;
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return studentGroups != null && studentGroups.length > 0
|
return studentGroups != null && studentGroups.length > 0
|
||||||
? isPad()?GridView(
|
? isPad()
|
||||||
|
? GridView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
|
|
@ -24,8 +29,8 @@ class StudentGroupList extends StatelessWidget {
|
||||||
JobStudentGroups item = studentGroups[index];
|
JobStudentGroups item = studentGroups[index];
|
||||||
String classNames = item.classNames.join(" ");
|
String classNames = item.classNames.join(" ");
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
goNextPage(item.groupId,item.groupName);
|
goNextPage(item.groupId, item.groupName);
|
||||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -56,7 +61,9 @@ class StudentGroupList extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
rightBtn != null
|
||||||
|
? rightBtn!
|
||||||
|
: Container(
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
margin: EdgeInsets.only(left: 5.r),
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 55.r,
|
width: 55.r,
|
||||||
|
|
@ -78,13 +85,20 @@ class StudentGroupList extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
):ListView.builder(
|
)
|
||||||
|
: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: (context,index){
|
itemBuilder: (context, index) {
|
||||||
JobStudentGroups item = studentGroups[index];
|
JobStudentGroups item = studentGroups[index];
|
||||||
String classNames = item.classNames.join(" ");
|
String classNames = item.classNames.join(" ");
|
||||||
return Container(
|
return InkWell(
|
||||||
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
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),
|
margin: EdgeInsets.only(bottom: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
|
|
@ -112,12 +126,9 @@ class StudentGroupList extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
rightBtn != null
|
||||||
onTap: (){
|
? rightBtn!
|
||||||
goNextPage(item.groupId,item.groupName);
|
: Container(
|
||||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
margin: EdgeInsets.only(left: 5.r),
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
width: 55.r,
|
width: 55.r,
|
||||||
|
|
@ -133,16 +144,17 @@ class StudentGroupList extends StatelessWidget {
|
||||||
fontSize: 10.sp, color: Colors.white),
|
fontSize: 10.sp, color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: studentGroups.length,
|
itemCount: studentGroups.length,
|
||||||
)
|
)
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
padding: EdgeInsets.only(
|
||||||
|
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||||
child: MyEmptyWidget(),
|
child: MyEmptyWidget(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ 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/answer_trajectory.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/index.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/job_knowledge_points.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 reportHistoryPath = '/report_detail/report_history';
|
||||||
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
|
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
|
||||||
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
||||||
|
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
||||||
// TheMine
|
// TheMine
|
||||||
|
|
||||||
static final FluroRouter router = FluroRouter();
|
static final FluroRouter router = FluroRouter();
|
||||||
|
|
@ -395,6 +396,15 @@ class RouterManager {
|
||||||
return JobKnowledgePointsDetail(knowledgeName:knowledgeName,knowledgeId:knowledgeId);
|
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());
|
// 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(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
||||||
|
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
// getTransition()
|
// getTransition()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue