mcy_new #1
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 292 KiB |
|
After Width: | Height: | Size: 238 KiB |
|
After Width: | Height: | Size: 618 B |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 956 B |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -122,6 +122,10 @@ abstract class RetrofitClient {
|
|||
@POST("/api/hms/Annotate/AllCorrect")
|
||||
Future getAllCorrect(@Field() String homeworkId, @Field() String classId);
|
||||
|
||||
// 结束提交
|
||||
@POST("/api/hms/Annotate/OverAnnotate")
|
||||
Future overAnnotate(@Field() String homeworkId, @Field() String classId);
|
||||
|
||||
// 批阅提交
|
||||
@POST("/api/hms/Annotate/AnnotateSubmit")
|
||||
Future reviewSubmission(@Body() ReviewSubmissionParams param);
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import 'package:get/get.dart';
|
|||
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
|
||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||
import 'package:making_school_asignment_app/page/home_page/children/read_over/read_over_logic.dart';
|
||||
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
|
||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||
|
||||
|
|
@ -13,16 +14,22 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
final AnnotateClassState state = AnnotateClassState();
|
||||
late final EasyRefreshController refreshController;
|
||||
final HomeLogic homeController = Get.find();
|
||||
late ReadOverLogic readOverController ;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
state.preIndex = Get.arguments['tabIndex'] ?? 3;
|
||||
if(state.preIndex != 3){
|
||||
readOverController = Get.find();
|
||||
}
|
||||
refreshController = EasyRefreshController();
|
||||
state.homeworkId.value = Get.arguments['id'] ?? '';
|
||||
state.name.value = Get.arguments['name'] ?? '';
|
||||
state.grade = Get.arguments['grade'];
|
||||
state.subject = Get.arguments['subject'];
|
||||
state.completed.value = Get.arguments['completed'] ?? false;
|
||||
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getList();
|
||||
}
|
||||
|
|
@ -47,7 +54,7 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
//一键批阅
|
||||
void getAllCorrect(classId) async{
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
|
|
@ -58,6 +65,17 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
ToastUtils.showError('操作失败,请重试');
|
||||
}
|
||||
}
|
||||
//结束批阅
|
||||
void getOverAnnotate(classId) async{
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
await getClient().overAnnotate(state.homeworkId.value,classId);
|
||||
getList();
|
||||
} catch (e) {
|
||||
EasyLoading.dismiss();
|
||||
ToastUtils.showError('操作失败,请重试');
|
||||
}
|
||||
}
|
||||
|
||||
void goQuickDataCheck(item) {
|
||||
Get.toNamed(Routes.quickDataCheckPage,
|
||||
|
|
@ -73,5 +91,6 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
void dispose() {
|
||||
super.dispose();
|
||||
refreshController.dispose();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,4 +12,5 @@ class AnnotateClassState {
|
|||
late RxBool completed = false.obs;
|
||||
late int grade;
|
||||
late int subject;
|
||||
late int preIndex = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () {
|
||||
logic.homeController.getList();
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
|
|
@ -120,5 +119,11 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|||
void dispose() {
|
||||
Get.delete<AnnotateClassLogic>();
|
||||
super.dispose();
|
||||
if(state.preIndex != 3){
|
||||
logic.readOverController.state.tabIndex.value = state.preIndex;
|
||||
}else{
|
||||
logic.homeController.getList();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class AnnotateItem extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _AnnotateItemState extends State<AnnotateItem> {
|
||||
Future<bool> confirmDialog() async {
|
||||
Future<bool> confirmDialog(String text) async {
|
||||
return await showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
|
|
@ -34,7 +34,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
|||
content: SizedBox(
|
||||
width: 200.r,
|
||||
child: Text(
|
||||
'一键批阅后,默认学生答题结果全部正确, 是否进行此操作?',
|
||||
text,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505E6E)),
|
||||
),
|
||||
),
|
||||
|
|
@ -152,7 +152,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
|||
title: "一键批阅",
|
||||
font: widget.font - 2.sp,
|
||||
clickFunction: () async {
|
||||
var confim = await confirmDialog();
|
||||
var confim = await confirmDialog('一键批阅后,默认学生答题结果全部正确, 是否进行此操作?');
|
||||
if (confim) {
|
||||
widget.logic.getAllCorrect(widget.item.classId);
|
||||
}
|
||||
|
|
@ -319,7 +319,12 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
|||
// Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
||||
Expanded(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
onTap: () async{
|
||||
var confim = await confirmDialog('当前批阅任务未完成,请确认需要结束此任务?');
|
||||
if (confim) {
|
||||
widget.logic.getOverAnnotate(widget.item.classId);
|
||||
}
|
||||
},
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: quickText('结束批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
||||
|
|
|
|||
|
|
@ -65,69 +65,101 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children: List.generate(state.studentList.length, (index) {
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {'studentName': item.name, 'studentId': item.id});
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(fontSize: 12.sp, color: const Color(0xFF6888FD)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: const Color(0xFF6888FD)),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r, color: const Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情', style: TextStyle(fontSize: 10.r, color: Color(0xFFFFA41E))),
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFF6888FD), borderRadius: BorderRadius.all(Radius.circular(20.r))),
|
||||
color:
|
||||
const Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(fontSize: 10.r, color: Colors.white),
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, false);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFB7FFE0),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
|
|
@ -135,10 +167,16 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -147,21 +185,31 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, true);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFE1E1E1),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
|
|
@ -169,10 +217,16 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -192,64 +246,94 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {'studentName': item.name, 'studentId': item.id});
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 20.r, horizontal: 15.r),
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 20.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.only(bottom: 15.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.name,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r, color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情', style: TextStyle(fontSize: 10.r, color: Color(0xFFFFA41E))),
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration:
|
||||
BoxDecoration(color: Color(0xFF6888FD), borderRadius: BorderRadius.all(Radius.circular(20.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),
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, false);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: Color(0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
|
|
@ -257,10 +341,16 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -269,21 +359,31 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(item.id, true);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(4.r)),
|
||||
color: const Color(0xFFE1E1E1),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 3.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
|
|
@ -291,10 +391,16 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios),
|
||||
onPressed: () {
|
||||
logic.controller.getList();
|
||||
Get.back();
|
||||
}),
|
||||
iconTheme: const IconThemeData(color: Colors.black),
|
||||
|
|
@ -382,5 +381,6 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
void dispose() {
|
||||
Get.delete<FavStudentLogic>();
|
||||
super.dispose();
|
||||
logic.controller.getList();
|
||||
}
|
||||
}
|
||||
|
|
@ -62,7 +62,6 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
|||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
logic.homeController.getList();
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
|
|
@ -209,5 +208,6 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
|||
void dispose() {
|
||||
Get.delete<ReadOverLogic>();
|
||||
super.dispose();
|
||||
logic.homeController.getList();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ Widget $easyRefresh({
|
|||
children: List.generate(data.length, (index) {
|
||||
Items item = data[index];
|
||||
String subjectName = EnumUtils.formatSubject(item.subject);
|
||||
return $reviewedItem(jobTaskItem: item, type: type, subjectName: subjectName, collectFun: collectFun);
|
||||
return $reviewedItem(jobTaskItem: item, type: type, subjectName: subjectName, collectFun: collectFun,tabIndex:tab - 1);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
|
|
@ -242,6 +242,7 @@ Widget $easyRefresh({
|
|||
jobTaskItem: item,
|
||||
type: type,
|
||||
collectFun: collectFun,
|
||||
tabIndex:tab - 1
|
||||
);
|
||||
},
|
||||
itemCount: data.length,
|
||||
|
|
@ -256,6 +257,7 @@ Widget $easyRefresh({
|
|||
Widget $reviewedItem({
|
||||
required Items jobTaskItem,
|
||||
required int type,
|
||||
required int tabIndex,
|
||||
required String subjectName,
|
||||
required Future<void> Function(Items item) collectFun,
|
||||
}) {
|
||||
|
|
@ -264,7 +266,7 @@ Widget $reviewedItem({
|
|||
return InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.annotateClassPage,
|
||||
arguments: {'id': jobTaskItem.id, 'name': jobTaskItem.name, 'grade': jobTaskItem.grade,'subject':jobTaskItem.subject, 'completed': true});
|
||||
arguments: {'id': jobTaskItem.id, 'name': jobTaskItem.name, 'grade': jobTaskItem.grade,'subject':jobTaskItem.subject, 'completed': true,'tabIndex':tabIndex});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 10.h),
|
||||
|
|
|
|||
|
|
@ -16,9 +16,10 @@ class TaskListItem extends StatefulWidget {
|
|||
final bool completed;
|
||||
final Items jobTaskItem;
|
||||
final int type;
|
||||
final int tabIndex;
|
||||
final Function(Items item) collectFun;
|
||||
|
||||
const TaskListItem({Key? key, required this.completed, required this.jobTaskItem, required this.type, required this.collectFun}) : super(key: key);
|
||||
const TaskListItem({Key? key, required this.completed, required this.jobTaskItem, required this.type, required this.collectFun,required this.tabIndex}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<TaskListItem> createState() => _TaskListItemState();
|
||||
|
|
@ -31,7 +32,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
|||
? InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.annotateClassPage,
|
||||
arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject': widget.jobTaskItem.subject, 'completed': true});
|
||||
arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject': widget.jobTaskItem.subject, 'completed': true,'tabIndex':widget.tabIndex});
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
|
|
@ -157,7 +158,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
|||
: InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(Routes.annotateClassPage,
|
||||
arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject':widget.jobTaskItem.subject,});
|
||||
arguments: {'id': widget.jobTaskItem.id, 'name': widget.jobTaskItem.name, 'grade': widget.jobTaskItem.grade,'subject':widget.jobTaskItem.subject,'tabIndex':widget.tabIndex});
|
||||
},
|
||||
child: Stack(
|
||||
alignment: const FractionalOffset(0.95, 0),
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderS
|
|||
void getList() async {
|
||||
params.pageNumber = state.pageNumber;
|
||||
WorkStudent data = await getClient().getUnAnnotateList(params);
|
||||
state.totalCount = data.totalCount;
|
||||
state.totalCount.value = data.totalCount;
|
||||
state.readOver.value = data.items.length;
|
||||
if(params.pageNumber == 1){
|
||||
state.workList.value = data.items;
|
||||
|
|
|
|||
|
|
@ -14,5 +14,5 @@ class HomeState {
|
|||
late int type = 1;
|
||||
late int pageSize = 10;
|
||||
late int pageNumber = 1;
|
||||
late int totalCount = 1;
|
||||
late RxInt totalCount = 1.obs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||
return logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
if (state.workList.length < state.totalCount) {
|
||||
if (state.workList.length < state.totalCount.value) {
|
||||
state.pageNumber++;
|
||||
return logic.getList();
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
|
|||
page: 'history',
|
||||
),
|
||||
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: Routes.knowledgePointsGraspPage)
|
||||
], state.readOver.value);
|
||||
], state.totalCount.value);
|
||||
}),
|
||||
spaceWidth,
|
||||
$TermRow([
|
||||
|
|
|
|||
|
|
@ -114,8 +114,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
border: InputBorder.none,
|
||||
prefixIcon: Image.asset(
|
||||
'assets/images/login_account.png',
|
||||
width: 20.r,
|
||||
height: 20.r,
|
||||
width: 10.r,
|
||||
height: 10.r,
|
||||
),
|
||||
/* suffixIcon: !state.hasNameVal
|
||||
? null
|
||||
|
|
@ -178,8 +178,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
),*/
|
||||
prefixIcon: Image.asset(
|
||||
'assets/images/login_pwd.png',
|
||||
width: 20.r,
|
||||
height: 20.r,
|
||||
width: 10.r,
|
||||
height: 10.r,
|
||||
),
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
|
|
@ -277,8 +277,8 @@ class _LoginPageState extends State<LoginPage> {
|
|||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 30.w,
|
||||
padding: EdgeInsets.only(right: 10.w),
|
||||
width: 20.w,
|
||||
padding: EdgeInsets.only(right: 0.w),
|
||||
child: Obx(() {
|
||||
return Checkbox(
|
||||
activeColor: Theme.of(context).primaryColor,
|
||||
|
|
@ -299,7 +299,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
onTap: () {
|
||||
Get.toNamed(Routes.agreementPage, arguments: {"type": AGREEMENT_KEY.USER_AGREEMENT.name});
|
||||
},
|
||||
child: quickText('请仔细阅读', size: 13.sp),
|
||||
child: quickText('请仔细阅读', size: 11.sp),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
|
@ -307,7 +307,7 @@ class _LoginPageState extends State<LoginPage> {
|
|||
},
|
||||
child: Text(
|
||||
'《用户协议》',
|
||||
style: TextStyle(fontSize: 14.r, color: Colors.deepOrangeAccent),
|
||||
style: TextStyle(fontSize: 12.r, color: Colors.deepOrangeAccent),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 238 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 481 B |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 108 KiB |
|
After Width: | Height: | Size: 1.9 KiB |