Compare commits
No commits in common. "42d2e4ab3944b971c63dfb4f296ef66f57b891d7" and "326a2fe99e9b435a03de419bc7289e310ae25b83" have entirely different histories.
42d2e4ab39
...
326a2fe99e
|
|
@ -1,29 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_knowledge_detail_student.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobKnowledgeDetailStudent extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isAnswer')
|
|
||||||
bool isAnswer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isCorrect')
|
|
||||||
bool isCorrect;
|
|
||||||
|
|
||||||
JobKnowledgeDetailStudent(this.studentId,this.studentName,this.isAnswer,this.isCorrect,);
|
|
||||||
|
|
||||||
factory JobKnowledgeDetailStudent.fromJson(Map<String, dynamic> srcJson) => _$JobKnowledgeDetailStudentFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobKnowledgeDetailStudentToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
|
||||||
|
|
||||||
part of 'job_knowledge_detail_student.dart';
|
|
||||||
|
|
||||||
// **************************************************************************
|
|
||||||
// JsonSerializableGenerator
|
|
||||||
// **************************************************************************
|
|
||||||
|
|
||||||
JobKnowledgeDetailStudent _$JobKnowledgeDetailStudentFromJson(
|
|
||||||
Map<String, dynamic> json) =>
|
|
||||||
JobKnowledgeDetailStudent(
|
|
||||||
json['studentId'] as int,
|
|
||||||
json['studentName'] as String,
|
|
||||||
json['isAnswer'] as bool,
|
|
||||||
json['isCorrect'] as bool,
|
|
||||||
);
|
|
||||||
|
|
||||||
Map<String, dynamic> _$JobKnowledgeDetailStudentToJson(
|
|
||||||
JobKnowledgeDetailStudent instance) =>
|
|
||||||
<String, dynamic>{
|
|
||||||
'studentId': instance.studentId,
|
|
||||||
'studentName': instance.studentName,
|
|
||||||
'isAnswer': instance.isAnswer,
|
|
||||||
'isCorrect': instance.isCorrect,
|
|
||||||
};
|
|
||||||
|
|
@ -274,6 +274,23 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* Row(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
RouterManager.router.navigateTo(
|
||||||
|
context,
|
||||||
|
RouterManager.jobKnowledgePointsPath,
|
||||||
|
transition: getTransition(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
child: SizedBox(
|
||||||
|
height: 30.r,
|
||||||
|
child: Text('知识点掌握')),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),*/
|
||||||
|
|
||||||
if (_tabIndex == 1)
|
if (_tabIndex == 1)
|
||||||
$CompletedJobConditionFilter(
|
$CompletedJobConditionFilter(
|
||||||
controller: _tabController2,
|
controller: _tabController2,
|
||||||
|
|
|
||||||
|
|
@ -34,9 +34,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '学生历史作业',
|
title: '学生历史作业',
|
||||||
image: '',
|
image: '',
|
||||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
navigationUrl: '',
|
||||||
page:'history',
|
|
||||||
|
|
||||||
),
|
),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '知识点掌握',
|
title: '知识点掌握',
|
||||||
|
|
@ -52,7 +50,6 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
title: '优先批阅设定',
|
title: '优先批阅设定',
|
||||||
image: '',
|
image: '',
|
||||||
navigationUrl: RouterManager.jobStudentGroupPath,
|
navigationUrl: RouterManager.jobStudentGroupPath,
|
||||||
page:'set',
|
|
||||||
),
|
),
|
||||||
EntranceModel(
|
EntranceModel(
|
||||||
title: '批阅设置',
|
title: '批阅设置',
|
||||||
|
|
@ -146,12 +143,7 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
||||||
|
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
||||||
if(e.page != ''){
|
RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition());
|
||||||
RouterManager.router.navigateTo(context, '${e.navigationUrl}?page=${e.page}', transition: getTransition());
|
|
||||||
}else{
|
|
||||||
RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition());
|
|
||||||
}
|
|
||||||
|
|
||||||
}),
|
}),
|
||||||
child: badges.Badge(
|
child: badges.Badge(
|
||||||
showBadge: isJob && data > 0,
|
showBadge: isJob && data > 0,
|
||||||
|
|
@ -196,6 +188,5 @@ class EntranceModel extends Object {
|
||||||
String title;
|
String title;
|
||||||
String image;
|
String image;
|
||||||
String navigationUrl;
|
String navigationUrl;
|
||||||
String? page;
|
EntranceModel({required this.title, required this.image, required this.navigationUrl});
|
||||||
EntranceModel({required this.title, required this.image, required this.navigationUrl,this.page = ''});
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ class _JobKnowledgePointsState extends State<JobKnowledgePoints> with CommonMixi
|
||||||
print('endDataTime=$endDataTime');
|
print('endDataTime=$endDataTime');
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult<List<KnowledgePoints>> res =
|
BaseStructureResult<List<KnowledgePoints>> res =
|
||||||
await _client.getKnowledgeReport(startDataTime,endDataTime,textController.text);
|
await _client.getKnowledgeReport(textController.text);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
setState(() {
|
setState(() {
|
||||||
if (page == 1) {
|
if (page == 1) {
|
||||||
|
|
@ -317,6 +317,7 @@ Widget progressBar(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
|
if (title == '总正确率:') quickText('确率', color: Colors.transparent, size: fontSize),
|
||||||
quickText(title, color: Color(0xFF8B8B8B), size: fontSize),
|
quickText(title, color: Color(0xFF8B8B8B), size: fontSize),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
|
@ -359,7 +360,7 @@ Widget progressBar(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.w),
|
SizedBox(width: 4.w),
|
||||||
quickText(percentStr, size: fontSize, color: Color(0xFF606060))
|
quickText(percentStr, size: fontSize, color: Color(0xFF464646))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
import 'package:functional_widget_annotation/functional_widget_annotation.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_structure_result.dart';
|
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_detail_student.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
||||||
import 'package:marking_app/common/model/job/job_student_history.dart';
|
import 'package:marking_app/common/model/job/job_student_history.dart';
|
||||||
|
|
@ -18,36 +17,41 @@ import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/my_text.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';
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
import 'package:percent_indicator/percent_indicator.dart';
|
||||||
import 'package:photo_view/photo_view.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||||
|
|
||||||
class JobKnowledgePointsDetail extends StatefulWidget {
|
|
||||||
final String knowledgeName;
|
|
||||||
final int knowledgeId;
|
|
||||||
|
|
||||||
const JobKnowledgePointsDetail(
|
class JobKnowledgePointsDetail extends StatefulWidget {
|
||||||
{Key? key, required this.knowledgeName, required this.knowledgeId})
|
final String knowledgeName;
|
||||||
: super(key: key);
|
final int knowledgeId;
|
||||||
|
const JobKnowledgePointsDetail({Key? key,required this.knowledgeName,required this.knowledgeId}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_JobKnowledgePointsDetailState createState() =>
|
_JobKnowledgePointsDetailState createState() => _JobKnowledgePointsDetailState();
|
||||||
_JobKnowledgePointsDetailState();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail> with CommonMixin, TickerProviderStateMixin {
|
||||||
with CommonMixin, TickerProviderStateMixin {
|
|
||||||
@override
|
@override
|
||||||
|
int page = 1;
|
||||||
|
int pageSize = 10;
|
||||||
|
int totalPages = 0;
|
||||||
|
late TabController tabController;
|
||||||
|
String startDataTime = CommonUtils.getWeekStartDate().toString().substring(0, 10);
|
||||||
|
String endDataTime = CommonUtils.getWeekEndDate().toString().substring(0, 10);
|
||||||
|
String customTimeStr = '自定义';
|
||||||
List<KnowledgePointsDetail> dataList = [];
|
List<KnowledgePointsDetail> dataList = [];
|
||||||
List<JobKnowledgeDetailStudent> studentList = [];
|
|
||||||
late final EasyRefreshController refreshController;
|
late final EasyRefreshController refreshController;
|
||||||
String paperImg = '';
|
|
||||||
|
|
||||||
int studentId = 0;
|
//文本输入框控制器
|
||||||
|
late final TextEditingController textController;
|
||||||
|
int studentId = 0;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
super.initState();
|
super.initState();
|
||||||
|
textController = TextEditingController();
|
||||||
|
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
|
tabController = TabController(length: 3, vsync: this);
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
@ -55,135 +59,36 @@ class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
tabController.dispose();
|
||||||
|
textController.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getList() async {
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult<List<KnowledgePointsDetail>> res =
|
BaseStructureResult<List<KnowledgePointsDetail>> res =
|
||||||
await _client.getKnowledgeReportDetail(widget.knowledgeId);
|
await _client.getKnowledgeReportDetail(widget.knowledgeId);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
setState(() {
|
setState(() {
|
||||||
dataList = res.data!;
|
if (page == 1) {
|
||||||
|
dataList = res.data!;
|
||||||
|
} else {
|
||||||
|
dataList = [...dataList, ...res.data!];
|
||||||
|
}
|
||||||
|
|
||||||
|
// totalPages = res.data!.pagedList.totalPages;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
showStudent(questionid, title) async {
|
|
||||||
await getStudents(questionid);
|
|
||||||
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
elevation: 10,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(20.r),
|
|
||||||
topRight: Radius.circular(20.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 2.w),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 14.h),
|
|
||||||
child: quickText(
|
|
||||||
title,
|
|
||||||
size: 18.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Color.fromRGBO(60, 60, 60, 1),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: ListView(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w),
|
|
||||||
children: [
|
|
||||||
Wrap(
|
|
||||||
spacing: 6.r, // 主轴(水平)方向间距
|
|
||||||
runSpacing: 4.r, // 纵轴(垂直)方向间距
|
|
||||||
alignment: WrapAlignment.spaceAround, //沿主轴方向居中
|
|
||||||
children: studentList.map((e) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 4.r, horizontal: 8.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: e.isAnswer
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: Color(0xFFE2E2E2),
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
),
|
|
||||||
child: quickText(e.studentName,
|
|
||||||
color:
|
|
||||||
e.isAnswer ? Colors.white : Color(0xFF505E6E),
|
|
||||||
size: 10.sp),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
showImg(int sectionId, String questionNo) async {
|
|
||||||
await getImg(sectionId, questionNo);
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
insetPadding: EdgeInsets.symmetric(vertical: 55.r,horizontal: 45.r),
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: Container(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
// height: MediaQuery.of(context).size.height,
|
|
||||||
child: Image.network(paperImg),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
getStudents(questionid) async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<JobKnowledgeDetailStudent>> res =
|
|
||||||
await _client.getKnowledgeStudent(questionid);
|
|
||||||
if (res.success) {
|
|
||||||
studentList = res.data!;
|
|
||||||
} else {
|
|
||||||
studentList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getImg(int sectionId, String questionNo) async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<String> res =
|
|
||||||
await _client.getKnowledgeImg(sectionId, questionNo);
|
|
||||||
if (res.success) {
|
|
||||||
paperImg = res.data!;
|
|
||||||
} else {
|
|
||||||
paperImg = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text(widget.knowledgeName,
|
title: Text(widget.knowledgeName, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
|
|
@ -194,177 +99,197 @@ class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
||||||
],
|
],
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Column(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
children: [
|
||||||
child: EasyRefresh(
|
Container(
|
||||||
firstRefresh: false,
|
margin: EdgeInsets.all(15.r),
|
||||||
taskIndependence: true,
|
height: 30.r,
|
||||||
controller: refreshController,
|
child: Row(
|
||||||
header: MaterialHeader(),
|
children: [
|
||||||
footer: TaurusFooter(),
|
Expanded(
|
||||||
onRefresh: () async {
|
child: Container(
|
||||||
getList();
|
padding: EdgeInsets.only(left: 10.r,right: 10.r),
|
||||||
},
|
decoration: BoxDecoration(
|
||||||
onLoad: () async {
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
// getList();
|
border: Border.all(width: 1.r,color: Color(0xFFDDDDDD)),
|
||||||
},
|
color: Colors.white,
|
||||||
child: dataList.length > 0
|
),
|
||||||
? ListView.builder(
|
child: TextField(
|
||||||
itemCount: dataList.length,
|
controller: textController,
|
||||||
itemBuilder: (context, index) {
|
textInputAction: TextInputAction.next,
|
||||||
KnowledgePointsDetail item = dataList[index];
|
style: TextStyle(
|
||||||
return InkWell(
|
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||||
onTap: () {
|
fontSize: 10.sp,
|
||||||
|
),
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: "请输入知识点名称",
|
||||||
|
hintStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||||
|
labelStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||||
|
border: InputBorder.none,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 10.r,),
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
page = 1;
|
||||||
|
setState(() {});
|
||||||
|
getList();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 50.r,
|
||||||
|
height: 30.r,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
|
color: Color(0xFF6888FD),
|
||||||
|
),
|
||||||
|
child:Center(
|
||||||
|
child: Text('查询',style: TextStyle(fontSize: 12.sp,color: Colors.white),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
jobConditionFilter(context,
|
||||||
|
controller: tabController,
|
||||||
|
customTimeStr: customTimeStr,
|
||||||
|
customTime: tabController.index != 3 ||
|
||||||
|
((endDataTime == null || endDataTime == '') && (startDataTime == null || startDataTime == ''))
|
||||||
|
? null
|
||||||
|
: PickerDateRange(
|
||||||
|
startDataTime == null || startDataTime == '' ? null : DateTime.parse(startDataTime!),
|
||||||
|
endDataTime == null || endDataTime == '' ? null : DateTime.parse(endDataTime!),
|
||||||
|
), onTimeFilter: (String? startTime, String? endTime) {
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
|
if (startTime == null && endTime == null) {
|
||||||
|
if (tabController.index == 3) {
|
||||||
|
tabController.animateTo(0);
|
||||||
|
}
|
||||||
|
startDataTime = '';
|
||||||
|
endDataTime = '';
|
||||||
|
customTimeStr = '自定义';
|
||||||
|
} else {
|
||||||
|
startDataTime = startTime != null ? startTime : '';
|
||||||
|
endDataTime = endTime != null ? endTime : '';
|
||||||
|
}
|
||||||
|
page = 1;
|
||||||
|
setState(() {});
|
||||||
|
getList();
|
||||||
|
// _refreshController2.callRefresh();
|
||||||
|
}, refreshTime: (value) {
|
||||||
|
if (value != null && value.startDate != null) {
|
||||||
|
customTimeStr = value.startDate?.toString().substring(0, 10) ?? '';
|
||||||
|
setState(() {});
|
||||||
|
if (value.endDate != null) {
|
||||||
|
if (!isPad() && value.startDate!.year == value.endDate!.year) {
|
||||||
|
customTimeStr =
|
||||||
|
value.startDate.toString().substring(5, 10) + '~${value.endDate.toString().substring(5, 10)}';
|
||||||
|
setState(() {});
|
||||||
|
} else {
|
||||||
|
customTimeStr = '$customTimeStr~${value.endDate?.toString().substring(0, 10)}';
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
child: EasyRefresh(
|
||||||
|
firstRefresh: false,
|
||||||
|
taskIndependence: true,
|
||||||
|
controller: refreshController,
|
||||||
|
header: MaterialHeader(),
|
||||||
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async {
|
||||||
|
setState(() {
|
||||||
|
page = 1;
|
||||||
|
});
|
||||||
|
getList();
|
||||||
|
},
|
||||||
|
onLoad: () async {
|
||||||
|
if (page < totalPages) {
|
||||||
|
setState(() {
|
||||||
|
page += 1;
|
||||||
|
});
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: dataList.length > 0
|
||||||
|
? ListView.builder(
|
||||||
|
itemCount: dataList.length,
|
||||||
|
itemBuilder: (context, index) {
|
||||||
|
KnowledgePointsDetail item = dataList[index];
|
||||||
|
return InkWell(
|
||||||
|
onTap: () {
|
||||||
/* RouterManager.router.navigateTo(
|
/* RouterManager.router.navigateTo(
|
||||||
context,
|
context,
|
||||||
RouterManager.quickCheckPersonalPath +
|
RouterManager.quickCheckPersonalPath +
|
||||||
'?jobId=${item.jobName}&studentId=$studentId',
|
'?jobId=${item.jobName}&studentId=$studentId',
|
||||||
transition: getTransition(),
|
transition: getTransition(),
|
||||||
);*/
|
);*/
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.symmetric(
|
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||||
vertical: 5.r, horizontal: 14.r),
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||||
padding: EdgeInsets.symmetric(
|
decoration: BoxDecoration(
|
||||||
vertical: 14.r, horizontal: 10.r),
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
decoration: BoxDecoration(
|
color: Colors.white),
|
||||||
borderRadius:
|
child: Column(
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
color: Colors.white),
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
child: Column(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
Row(
|
children: [
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
Expanded(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
child: Text(
|
||||||
children: [
|
item.jobName,
|
||||||
Text(
|
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||||
item.publishTime.substring(0, 10),
|
)),
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
Container(
|
||||||
color: Color(0xFF505050)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.jobName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF505050)),
|
|
||||||
)),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
showImg(item.sectionId, item.questionNo);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 49.r,
|
width: 49.r,
|
||||||
height: 22.r,
|
height: 22.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
Radius.circular(20.r)),
|
border: Border.all(width: 1.r, color: Color(0xFF6888FD)),
|
||||||
border: Border.all(
|
|
||||||
width: 1.r, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Row(
|
||||||
child: Text(
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
'${item.questionNo}题',
|
children: [
|
||||||
style: TextStyle(
|
Text(
|
||||||
fontSize: 10.sp,
|
'2次',
|
||||||
color: Color(0xFF8B8B8B)),
|
style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 8.h),
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
showStudent(
|
|
||||||
item.questionId, item.jobName);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(right: 6.r),
|
|
||||||
width: 56.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFD4FFED),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(20.r),
|
|
||||||
),
|
),
|
||||||
child: Center(
|
Image.asset('assets/images/right_icon_blue.png',width: 8.r,height: 8.r,),
|
||||||
child: quickText('正确率 >',
|
],
|
||||||
color: Color(0xFF4CC793),
|
|
||||||
size: 10.sp))),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.r),
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 8.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: item.correctRate / 100,
|
|
||||||
progressColor:
|
|
||||||
Color(0xFF90E0BE),
|
|
||||||
backgroundColor:
|
|
||||||
Color(0xFFE8E8E8),
|
|
||||||
barRadius:
|
|
||||||
Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 4.w),
|
|
||||||
quickText(
|
|
||||||
'${doubleToStringAsFixed(item.correctRate / 100 * 100)}%',
|
|
||||||
size: 10.sp,
|
|
||||||
color: Color(0xFF606060))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 10.r,),
|
||||||
/* progressBar(context,
|
progressBar(context,
|
||||||
title: '正确率 >',
|
title: '正确率:',
|
||||||
color: Color(0xFF90E0BE),
|
color: Color(0xFF90E0BE),
|
||||||
percent: item.correctRate / 100,
|
percent: item.correctRate / 100,
|
||||||
padingEdg: EdgeInsets.zero,
|
padingEdg: EdgeInsets.zero,
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||||
studentCall:showStudent(item.questionId,item.jobName),
|
],
|
||||||
),*/
|
),
|
||||||
],
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
);
|
})
|
||||||
})
|
: MyEmptyWidget(),
|
||||||
: MyEmptyWidget(),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -372,16 +297,15 @@ class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget progressBar(
|
Widget progressBar(
|
||||||
BuildContext context, {
|
BuildContext context, {
|
||||||
double? fontSize,
|
double? fontSize,
|
||||||
double? lineHeight,
|
double? lineHeight,
|
||||||
required String title,
|
required String title,
|
||||||
required Color color,
|
required Color color,
|
||||||
required double percent,
|
required double percent,
|
||||||
required EdgeInsets padingEdg,
|
required EdgeInsets padingEdg,
|
||||||
required EdgeInsets marginEdg,
|
required EdgeInsets marginEdg,
|
||||||
required Future<dynamic> studentCall,
|
}) {
|
||||||
}) {
|
|
||||||
var percentStr = '${doubleToStringAsFixed(percent * 100)}%';
|
var percentStr = '${doubleToStringAsFixed(percent * 100)}%';
|
||||||
fontSize ??= 10.sp;
|
fontSize ??= 10.sp;
|
||||||
lineHeight ??= 8.h;
|
lineHeight ??= 8.h;
|
||||||
|
|
@ -392,22 +316,8 @@ Widget progressBar(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
if (title == '总正确率:') quickText('确率', color: Colors.transparent, size: fontSize),
|
||||||
onTap: () {
|
quickText(title, color: Color(0xFF8B8B8B), size: fontSize),
|
||||||
studentCall;
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(right: 6.r),
|
|
||||||
width: 56.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFD4FFED),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: quickText(title,
|
|
||||||
color: Color(0xFF4CC793), size: fontSize))),
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -449,7 +359,7 @@ Widget progressBar(
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.w),
|
SizedBox(width: 4.w),
|
||||||
quickText(percentStr, size: fontSize, color: Color(0xFF606060))
|
quickText(percentStr, size: fontSize, color: Color(0xFF464646))
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -458,3 +368,119 @@ Widget progressBar(
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 已完成作业条件筛选栏
|
||||||
|
@hwidget
|
||||||
|
Widget jobConditionFilter(BuildContext context,
|
||||||
|
{required TabController controller,
|
||||||
|
PickerDateRange? customTime,
|
||||||
|
required Function refreshTime,
|
||||||
|
required String customTimeStr,
|
||||||
|
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
||||||
|
var customTimeState = PickerDateRange(null, null);
|
||||||
|
if (customTime != null) {
|
||||||
|
customTimeState = PickerDateRange(customTime!.startDate != null ? customTime!.startDate : null,
|
||||||
|
customTime!.endDate != null ? customTime!.endDate : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime getMonthStartDate() {
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
return DateTime(now.year, now.month, 1); // 获取当前月份的第一天
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime getMonthEndDate() {
|
||||||
|
DateTime now = DateTime.now();
|
||||||
|
int nextMonth = now.month + 1;
|
||||||
|
if (nextMonth > 12) {
|
||||||
|
nextMonth = 1;
|
||||||
|
now = now.add(Duration(days: 31 - now.day)); // 跨年了,所以加到当前月的最后一天
|
||||||
|
} else {
|
||||||
|
now = now.add(Duration(days: DateTime(now.year, nextMonth, 0).day - now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
||||||
|
}
|
||||||
|
return now;
|
||||||
|
}
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
// height: 39.h,
|
||||||
|
// padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
|
// border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
||||||
|
),
|
||||||
|
child: Container(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
||||||
|
),
|
||||||
|
child: TabBar(
|
||||||
|
controller: controller,
|
||||||
|
unselectedLabelStyle: TextStyle(fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
||||||
|
labelStyle: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Color.fromRGBO(116, 145, 253, 1),
|
||||||
|
),
|
||||||
|
isScrollable: true,
|
||||||
|
labelColor: Color(0xFF6888FD),
|
||||||
|
unselectedLabelColor: Color(0xFF666666),
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
|
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||||
|
onTap: (int val) async {
|
||||||
|
switch (val) {
|
||||||
|
case 0: // 近一周
|
||||||
|
onTimeFilter(
|
||||||
|
CommonUtils.getWeekStartDate().toString().substring(0, 10),
|
||||||
|
CommonUtils.getWeekEndDate().toString().substring(0, 10),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
case 1: // 近一个月
|
||||||
|
onTimeFilter(
|
||||||
|
getMonthStartDate().toString().substring(0, 10),
|
||||||
|
getMonthEndDate().toString().substring(0, 10),
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
default: // 自定义
|
||||||
|
var dialogData = await showDialog<PickerDateRange?>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context1) {
|
||||||
|
return Center(
|
||||||
|
child: Container(
|
||||||
|
color: Colors.white,
|
||||||
|
width: isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
||||||
|
height: ScreenUtil().screenHeight / 2,
|
||||||
|
child: SfDateRangePicker(
|
||||||
|
showActionButtons: true,
|
||||||
|
confirmText: '确定',
|
||||||
|
cancelText: '取消',
|
||||||
|
onSubmit: (p0) {
|
||||||
|
print(p0);
|
||||||
|
Navigator.of(context1).pop(p0);
|
||||||
|
refreshTime(p0);
|
||||||
|
},
|
||||||
|
onCancel: () {
|
||||||
|
Navigator.of(context1).pop();
|
||||||
|
},
|
||||||
|
selectionMode: DateRangePickerSelectionMode.range,
|
||||||
|
initialSelectedRange: customTimeState,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
// startDate: 2024-03-04 18:47:00.117958, endDate: 2024-03-11 18:47:00.117986
|
||||||
|
// if (dialogData != null && (dialogData.startDate != null || dialogData.endDate != null)) {}
|
||||||
|
onTimeFilter(
|
||||||
|
dialogData?.startDate?.toString().substring(0, 10),
|
||||||
|
dialogData?.endDate?.toString().substring(0, 10),
|
||||||
|
);
|
||||||
|
customTimeState = dialogData!;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
tabs: <Widget>[
|
||||||
|
const Tab(text: '近一周'),
|
||||||
|
const Tab(text: '近一月'),
|
||||||
|
Tab(text: customTimeStr),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,8 @@ import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
class JobPriorityReviewSet extends StatefulWidget {
|
class JobPriorityReviewSet extends StatefulWidget {
|
||||||
final String groupId;
|
final String groupId;
|
||||||
final String title;
|
final String title;
|
||||||
final String? page;
|
|
||||||
|
|
||||||
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
|
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -209,16 +208,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
item.readLevel == 1
|
item.readLevel == 1
|
||||||
?
|
? InkWell(
|
||||||
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(
|
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
|
|
@ -228,7 +218,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');
|
||||||
},
|
},
|
||||||
child:Container(
|
child: Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -256,15 +246,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;
|
||||||
|
|
@ -274,7 +256,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
EasyLoading.show(
|
EasyLoading.show(
|
||||||
status: 'loading...');
|
status: 'loading...');
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -365,15 +347,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
item.readLevel == 1
|
item.readLevel == 1
|
||||||
? 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: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
|
|
@ -411,15 +385,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);
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@ import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
|
|
||||||
class JobStudentGroup extends StatefulWidget {
|
class JobStudentGroup extends StatefulWidget {
|
||||||
final String page;
|
const JobStudentGroup({Key? key}) : super(key: key);
|
||||||
const JobStudentGroup({Key? key,required this.page}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
||||||
|
|
@ -60,7 +59,7 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
void goNextPage(id,title){
|
void goNextPage(id,title){
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition());
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -317,16 +317,14 @@ class RouterManager {
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
String groupId = params['groupId']![0];
|
String groupId = params['groupId']![0];
|
||||||
String title = params['title']![0];
|
String title = params['title']![0];
|
||||||
String? page = params['page']?[0];
|
return JobPriorityReviewSet(groupId: groupId,title:title);
|
||||||
return JobPriorityReviewSet(groupId: groupId,title:title,page:page);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
//学生分组
|
//学生分组
|
||||||
static final _jobStudentGroupPageHandler = Handler(
|
static final _jobStudentGroupPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
String page = params['page']![0];
|
return JobStudentGroup();
|
||||||
return JobStudentGroup(page:page);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//作业收藏页面
|
//作业收藏页面
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||||
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
|
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
|
||||||
import 'package:marking_app/common/model/job/job_fav_student.dart';
|
import 'package:marking_app/common/model/job/job_fav_student.dart';
|
||||||
import 'package:marking_app/common/model/job/job_favorite_model.dart';
|
import 'package:marking_app/common/model/job/job_favorite_model.dart';
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_detail_student.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
||||||
import 'package:marking_app/common/model/job/job_level_set_params.dart';
|
import 'package:marking_app/common/model/job/job_level_set_params.dart';
|
||||||
|
|
@ -361,8 +360,8 @@ abstract class RestClient {
|
||||||
// 作业 => 知识点掌握
|
// 作业 => 知识点掌握
|
||||||
@the_retrofit.GET("/api/jobs/knowledge-report")
|
@the_retrofit.GET("/api/jobs/knowledge-report")
|
||||||
Future<BaseStructureResult<List<KnowledgePoints>>> getKnowledgeReport(
|
Future<BaseStructureResult<List<KnowledgePoints>>> getKnowledgeReport(
|
||||||
@the_retrofit.Query("dateStart") String? dateStart,
|
/* @the_retrofit.Query("dateStart") String? dateStart,
|
||||||
@the_retrofit.Query("dateEnd") String? dateEnd,
|
@the_retrofit.Query("dateEnd") String? dateEnd,*/
|
||||||
@the_retrofit.Query("knowledgeName") String? knowledgeName,
|
@the_retrofit.Query("knowledgeName") String? knowledgeName,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -371,17 +370,4 @@ abstract class RestClient {
|
||||||
Future<BaseStructureResult<List<KnowledgePointsDetail>>> getKnowledgeReportDetail(
|
Future<BaseStructureResult<List<KnowledgePointsDetail>>> getKnowledgeReportDetail(
|
||||||
@the_retrofit.Query("KnowledgeId") int knowledgeId,
|
@the_retrofit.Query("KnowledgeId") int knowledgeId,
|
||||||
);
|
);
|
||||||
|
|
||||||
// 作业 => 知识点掌握详情人员名单
|
|
||||||
@the_retrofit.GET("/api/jobs/knowledge-question-detail/{questionid}")
|
|
||||||
Future<BaseStructureResult<List<JobKnowledgeDetailStudent>>> getKnowledgeStudent(
|
|
||||||
@the_retrofit.Path("questionid") int questionid,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 作业 => 知识点掌握详情原卷图
|
|
||||||
@the_retrofit.GET("/api/jobs/question-paper-img/{sectionid}/{questionno}")
|
|
||||||
Future<BaseStructureResult<String>> getKnowledgeImg(
|
|
||||||
@the_retrofit.Path("sectionid") int questionid,
|
|
||||||
@the_retrofit.Path("questionno") String questionno,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue