Merge branch 'mcy_new' into new_main
This commit is contained in:
commit
d62560184d
|
|
@ -10,21 +10,21 @@ class ItemBtn extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height:20.r,
|
height:25.r,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
overlayColor:MaterialStateProperty.all(
|
overlayColor:WidgetStateProperty.all(
|
||||||
const Color(0xFF6888FD)),
|
const Color(0xFF6888FD)),
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
MaterialStateProperty.all(
|
WidgetStateProperty.all(
|
||||||
const Color(0xFFF4F4F4)),
|
const Color(0xFFF4F4F4)),
|
||||||
// foregroundColor: MaterialStateProperty.all(Colors.red.shade200),//文字颜色
|
// foregroundColor: MaterialStateProperty.all(Colors.red.shade200),//文字颜色
|
||||||
shape: MaterialStateProperty.all(
|
shape: WidgetStateProperty.all(
|
||||||
RoundedRectangleBorder(
|
RoundedRectangleBorder(
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(22), //设置圆角
|
BorderRadius.circular(22), //设置圆角
|
||||||
)),
|
)),
|
||||||
padding: MaterialStateProperty.all(
|
padding: WidgetStateProperty.all(
|
||||||
EdgeInsets.zero,
|
EdgeInsets.zero,
|
||||||
)),
|
)),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,12 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
|
||||||
child: TabBar(
|
child: TabBar(
|
||||||
dividerHeight: 0,
|
dividerHeight: 0,
|
||||||
tabAlignment: TabAlignment.start,
|
tabAlignment: TabAlignment.start,
|
||||||
|
indicator: const UnderlineTabIndicator(
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: const Color.fromRGBO(104, 136, 253, 1),
|
||||||
|
),
|
||||||
|
|
||||||
|
),
|
||||||
onTap: (int val) {
|
onTap: (int val) {
|
||||||
state.tabIndex.value = val;
|
state.tabIndex.value = val;
|
||||||
// EasyLoading.show(status: 'loading...');
|
// EasyLoading.show(status: 'loading...');
|
||||||
|
|
|
||||||
|
|
@ -257,7 +257,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
||||||
|
|
@ -291,7 +291,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(top: 2.r, left: 4.r),
|
padding: EdgeInsets.only(top: 5.r, left: 4.r),
|
||||||
child: Text(
|
child: Text(
|
||||||
'优先批阅',
|
'优先批阅',
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8A9691)),
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,13 @@ class QuickDataCheckLogic extends GetxController with RequestToolMixin {
|
||||||
|
|
||||||
void getWorkData() async {
|
void getWorkData() async {
|
||||||
HomeworkDetails data = await getClient().getHomeworkDetails(state.homeworkId.value, state.classId.value);
|
HomeworkDetails data = await getClient().getHomeworkDetails(state.homeworkId.value, state.classId.value);
|
||||||
|
EasyLoading.dismiss();
|
||||||
state.dataCount = Utils.getHomeworkData(data);
|
state.dataCount = Utils.getHomeworkData(data);
|
||||||
state.homeData = data;
|
state.homeData = data;
|
||||||
state.kgReport.value = data.questions.where((w) => w.questionType == 1).toList();
|
state.kgReport.value = data.questions.where((w) => w.questionType == 1).toList();
|
||||||
state.zgReport.value = data.questions.where((w) => w.questionType == 2).toList();
|
state.zgReport.value = data.questions.where((w) => w.questionType == 2).toList();
|
||||||
state.studentList.value = data.students;
|
state.studentList.value = data.students;
|
||||||
state.hasData.value = true;
|
state.hasData.value = true;
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,12 +89,10 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 6.r,
|
width: 6.r,
|
||||||
),
|
),
|
||||||
Obx(() {
|
Text(
|
||||||
return Text(
|
'${EnumUtils.formatGrade(state.grade)}${state.className.value}',
|
||||||
'${EnumUtils.formatGrade(state.grade)}${state.className.value}',
|
style: TextStyle(fontSize: 14.r, color: Colors.white),
|
||||||
style: TextStyle(fontSize: 14.r, color: Colors.white),
|
),
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
children: [
|
children: [
|
||||||
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||||
quickText(
|
quickText(
|
||||||
'10',
|
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
size: 13.sp,
|
size: 13.sp,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -10,21 +10,29 @@ import 'home_state.dart';
|
||||||
class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
||||||
final HomeState state = HomeState();
|
final HomeState state = HomeState();
|
||||||
late final EasyRefreshController refreshController;
|
late final EasyRefreshController refreshController;
|
||||||
|
WorkStudentParams params = WorkStudentParams(
|
||||||
|
assessType: 0,
|
||||||
|
);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
|
params.pageSize = state.pageSize;
|
||||||
|
|
||||||
getList();
|
getList();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getList() async {
|
||||||
WorkStudentParams params = WorkStudentParams(
|
params.pageNumber = state.pageNumber;
|
||||||
assessType: 0,
|
|
||||||
);
|
|
||||||
WorkStudent data = await getClient().getUnAnnotateList(params);
|
WorkStudent data = await getClient().getUnAnnotateList(params);
|
||||||
|
state.totalCount = data.totalCount;
|
||||||
state.readOver.value = data.items.length;
|
state.readOver.value = data.items.length;
|
||||||
state.workList.value = data.items;
|
if(params.pageNumber == 1){
|
||||||
|
state.workList.value = data.items;
|
||||||
|
}else{
|
||||||
|
state.workList.addAll(data.items);
|
||||||
|
}
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,4 +12,7 @@ class HomeState {
|
||||||
late RxInt readOver = 0.obs;
|
late RxInt readOver = 0.obs;
|
||||||
late RxList<Items> workList = RxList();
|
late RxList<Items> workList = RxList();
|
||||||
late int type = 1;
|
late int type = 1;
|
||||||
|
late int pageSize = 10;
|
||||||
|
late int pageNumber = 1;
|
||||||
|
late int totalCount = 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,16 @@ class _HomePageState extends State<HomePage>
|
||||||
controller: logic.refreshController,
|
controller: logic.refreshController,
|
||||||
header: MaterialHeader(),
|
header: MaterialHeader(),
|
||||||
footer: TaurusFooter(),
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async{
|
||||||
|
state.pageNumber = 1;
|
||||||
|
return logic.getList();
|
||||||
|
},
|
||||||
|
onLoad: () async{
|
||||||
|
if(state.workList.length<state.totalCount){
|
||||||
|
state.pageNumber ++;
|
||||||
|
return logic.getList();
|
||||||
|
}
|
||||||
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
/* Container(
|
/* Container(
|
||||||
|
|
@ -209,7 +219,7 @@ class _HomePageState extends State<HomePage>
|
||||||
130, 130, 130, 1),
|
130, 130, 130, 1),
|
||||||
size: 11.sp),
|
size: 11.sp),
|
||||||
quickText(
|
quickText(
|
||||||
'10',
|
'${item.questionCount! - item.annotateCount!}',
|
||||||
color: const Color.fromRGBO(
|
color: const Color.fromRGBO(
|
||||||
97, 97, 97, 1),
|
97, 97, 97, 1),
|
||||||
size: 13.sp,
|
size: 13.sp,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue