答题轨迹
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()
|
||||
class MarkingListParams extends BasePage {
|
||||
@JsonKey(name: 'isFinish')
|
||||
bool isFinish;
|
||||
bool? isFinish;
|
||||
|
||||
// 阅卷类型
|
||||
@JsonKey(name: 'PageType')
|
||||
|
|
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
|
|||
int? markingType; // 1 作业 2考试
|
||||
|
||||
MarkingListParams({
|
||||
required this.isFinish,
|
||||
this.isFinish,
|
||||
required this.pageType,
|
||||
required page,
|
||||
required limit,
|
||||
|
|
|
|||
|
|
@ -5,15 +5,21 @@ 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 {
|
||||
|
|
@ -23,17 +29,24 @@ class AnswerTrajectory extends StatefulWidget {
|
|||
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 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();
|
||||
|
|
@ -44,6 +57,7 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
|||
loginName = userInfo['loginName'];
|
||||
});
|
||||
getStudentGroups();
|
||||
getWorkList();
|
||||
print(userInfo);
|
||||
});
|
||||
}
|
||||
|
|
@ -51,27 +65,58 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
|||
void getStudentGroups() async {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobStudentGroups>> res =
|
||||
await _client.getJobLevelStudentGroups(loginName);
|
||||
await _client.getJobLevelStudentGroups(loginName);
|
||||
setState(() {
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
studentGroups = res.data!;
|
||||
}else{
|
||||
} 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 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
|
||||
|
|
@ -99,37 +144,39 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
|||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
||||
),
|
||||
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();
|
||||
/*EasyLoading.show(status: 'loading...');
|
||||
if(val == 0){
|
||||
getStudentGroups();
|
||||
}*/
|
||||
},
|
||||
tabs: [
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
width: (MediaQuery.of(context).size.width - 28.r) / 2,
|
||||
child: Tab(
|
||||
text: '按学生',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
width: (MediaQuery.of(context).size.width - 28.r) / 2,
|
||||
child: Tab(
|
||||
text: '按作业',
|
||||
),
|
||||
)
|
||||
],
|
||||
controller: tabController,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 14.sp, color:Color(0xFF666666)),
|
||||
unselectedLabelStyle:
|
||||
TextStyle(fontSize: 14.sp, color: Color(0xFF666666)),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFF6888FD),
|
||||
|
|
@ -138,239 +185,65 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory> with CommonMixin,Si
|
|||
labelColor: Color(0xFF6888FD),
|
||||
unselectedLabelColor: Color(0xFF666666),
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
labelPadding: const EdgeInsets.all(0),
|
||||
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,
|
||||
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(4.r)),
|
||||
border: Border.all(width: 1.r, color: Color(0xFF4CC793)),
|
||||
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(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)),
|
||||
)),
|
||||
);
|
||||
}),
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFFFF9800)),
|
||||
),
|
||||
),
|
||||
)
|
||||
: 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)),),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)),
|
||||
):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)),
|
||||
),
|
||||
)*/,
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -87,17 +87,17 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
),
|
||||
SizedBox(height: 30.h),
|
||||
SlidingData([
|
||||
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: ''),
|
||||
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: RouterManager.jobMainListPagePath),
|
||||
EntranceModel(
|
||||
title: '学生历史作业',
|
||||
image: 'assets/images/job_home_history.png',
|
||||
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,
|
||||
$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(
|
||||
title: '优先批阅设定',
|
||||
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