答题轨迹
This commit is contained in:
parent
21183f11bc
commit
fbebdbc428
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,
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,21 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.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/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/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/job/job_student_goups.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/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/pages/homework_correction/widget/student_group_list.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/fast_data.dart';
|
import 'package:marking_app/utils/fast_data.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/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
|
|
||||||
class AnswerTrajectory extends StatefulWidget {
|
class AnswerTrajectory extends StatefulWidget {
|
||||||
|
|
@ -23,17 +29,24 @@ class AnswerTrajectory extends StatefulWidget {
|
||||||
State<AnswerTrajectory> createState() => _AnswerTrajectoryState();
|
State<AnswerTrajectory> createState() => _AnswerTrajectoryState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,SingleTickerProviderStateMixin{
|
class _AnswerTrajectoryState extends State<AnswerTrajectory>
|
||||||
|
with CommonMixin, SingleTickerProviderStateMixin {
|
||||||
late final EasyRefreshController refreshController;
|
late final EasyRefreshController refreshController;
|
||||||
|
late final EasyRefreshController refreshController2;
|
||||||
late String loginName;
|
late String loginName;
|
||||||
List studentGroups = [];
|
List studentGroups = [];
|
||||||
|
List<JobTaskItem> jobList = [];
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
int tabIndex = 0;
|
int tabIndex = 0;
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
int total = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
|
refreshController2 = EasyRefreshController();
|
||||||
tabController =
|
tabController =
|
||||||
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
||||||
FastData fastData = FastData.getInstance();
|
FastData fastData = FastData.getInstance();
|
||||||
|
|
@ -44,6 +57,7 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
||||||
loginName = userInfo['loginName'];
|
loginName = userInfo['loginName'];
|
||||||
});
|
});
|
||||||
getStudentGroups();
|
getStudentGroups();
|
||||||
|
getWorkList();
|
||||||
print(userInfo);
|
print(userInfo);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -51,27 +65,58 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
||||||
void getStudentGroups() async {
|
void getStudentGroups() async {
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult<List<JobStudentGroups>> res =
|
BaseStructureResult<List<JobStudentGroups>> res =
|
||||||
await _client.getJobLevelStudentGroups(loginName);
|
await _client.getJobLevelStudentGroups(loginName);
|
||||||
setState(() {
|
setState(() {
|
||||||
if(res.code == 200){
|
if (res.code == 200) {
|
||||||
studentGroups = res.data!;
|
studentGroups = res.data!;
|
||||||
}else{
|
} else {
|
||||||
studentGroups = [];
|
studentGroups = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
void goNextPage(id,title){
|
void goNextPage(id, title) {
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=answerTrajectory',transition: getTransition());
|
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
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
refreshController.dispose();
|
refreshController.dispose();
|
||||||
|
refreshController2.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -99,37 +144,39 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.r,
|
height: 10.r,
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
border: Border(
|
||||||
),
|
bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
onTap: (int val) {
|
onTap: (int val) {
|
||||||
print(val);
|
print(val);
|
||||||
setState(() {
|
setState(() {
|
||||||
tabIndex = val;
|
tabIndex = val;
|
||||||
});
|
});
|
||||||
EasyLoading.show(status: 'loading...');
|
/*EasyLoading.show(status: 'loading...');
|
||||||
getStudentGroups();
|
if(val == 0){
|
||||||
|
getStudentGroups();
|
||||||
|
}*/
|
||||||
},
|
},
|
||||||
tabs: [
|
tabs: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
width: (MediaQuery.of(context).size.width - 28.r) / 2,
|
||||||
child: Tab(
|
child: Tab(
|
||||||
text: '按学生',
|
text: '按学生',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
width: (MediaQuery.of(context).size.width - 28.r) / 2,
|
||||||
child: Tab(
|
child: Tab(
|
||||||
text: '按作业',
|
text: '按作业',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
controller: tabController,
|
controller: tabController,
|
||||||
unselectedLabelStyle: TextStyle(
|
unselectedLabelStyle:
|
||||||
fontSize: 14.sp, color:Color(0xFF666666)),
|
TextStyle(fontSize: 14.sp, color: Color(0xFF666666)),
|
||||||
labelStyle: TextStyle(
|
labelStyle: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
color: Color(0xFF6888FD),
|
color: Color(0xFF6888FD),
|
||||||
|
|
@ -138,239 +185,65 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
||||||
labelColor: Color(0xFF6888FD),
|
labelColor: Color(0xFF6888FD),
|
||||||
unselectedLabelColor: Color(0xFF666666),
|
unselectedLabelColor: Color(0xFF666666),
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
labelPadding: const EdgeInsets.all(0),
|
labelPadding: const EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
padding:
|
||||||
child: EasyRefresh(
|
EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||||
firstRefresh: false,
|
child:
|
||||||
taskIndependence: true,
|
tabIndex == 0
|
||||||
controller: refreshController,
|
?
|
||||||
header: MaterialHeader(),
|
EasyRefresh(
|
||||||
footer: TaurusFooter(),
|
firstRefresh: false,
|
||||||
onRefresh: () async{
|
taskIndependence: true,
|
||||||
getStudentGroups();
|
controller: refreshController,
|
||||||
},
|
header: MaterialHeader(),
|
||||||
child:
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async {
|
||||||
tabIndex == 0?StudentGroupList(studentGroups,goNextPage, rightBtn:Container(
|
getStudentGroups();
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
},
|
||||||
height: 20.r,
|
child: StudentGroupList(studentGroups, goNextPage,
|
||||||
width: 55.r,
|
rightBtn: Container(
|
||||||
decoration: BoxDecoration(
|
margin: EdgeInsets.only(left: 5.r),
|
||||||
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,
|
height: 20.r,
|
||||||
|
width: 55.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
borderRadius:
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF4CC793)),
|
BorderRadius.all(Radius.circular(20.r)),
|
||||||
|
border: Border.all(
|
||||||
|
width: 1.r, color: Color(0xFFFF9800)),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'数学',
|
'详情',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF4CC793)),
|
style: TextStyle(
|
||||||
)),
|
fontSize: 10.sp, color: Color(0xFFFF9800)),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
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(
|
):EasyRefresh(
|
||||||
'无',
|
firstRefresh: false,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
taskIndependence: true,
|
||||||
),*//*
|
controller: refreshController2,
|
||||||
],
|
header: MaterialHeader(),
|
||||||
),
|
footer: TaurusFooter(),
|
||||||
SizedBox(
|
onRefresh: () async {
|
||||||
height: 10.r,
|
page = 1;
|
||||||
),
|
setState(() {});
|
||||||
Row(
|
getWorkList();
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
},
|
||||||
children: [
|
onLoad: () async {
|
||||||
Text(
|
if (jobList.length < total) {
|
||||||
'主:',
|
EasyLoading.show(status: 'loading...');
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF5B5B5B)),
|
page = page + 1;
|
||||||
),
|
getWorkList();
|
||||||
SizedBox(
|
}
|
||||||
width: 5.r,
|
},
|
||||||
),
|
child:AnswerTrajectoryJob(jobList)),
|
||||||
*//* 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)),),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
)*/,
|
)
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -87,17 +87,17 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
),
|
),
|
||||||
SizedBox(height: 30.h),
|
SizedBox(height: 30.h),
|
||||||
SlidingData([
|
SlidingData([
|
||||||
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: ''),
|
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: RouterManager.jobMainListPagePath),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '学生历史作业',
|
title: '学生历史作业',
|
||||||
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',
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue