样式修改

This commit is contained in:
machuanyu 2024-06-14 09:48:12 +08:00
parent 9421c6e90e
commit cd9904ef0a
9 changed files with 46 additions and 20 deletions

View File

@ -10,21 +10,21 @@ class ItemBtn extends StatelessWidget {
@override
Widget build(BuildContext context) {
return SizedBox(
height:20.r,
height:25.r,
child: ElevatedButton(
style: ButtonStyle(
overlayColor:MaterialStateProperty.all(
overlayColor:WidgetStateProperty.all(
const Color(0xFF6888FD)),
backgroundColor:
MaterialStateProperty.all(
WidgetStateProperty.all(
const Color(0xFFF4F4F4)),
// foregroundColor: MaterialStateProperty.all(Colors.red.shade200),//
shape: MaterialStateProperty.all(
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(22), //
)),
padding: MaterialStateProperty.all(
padding: WidgetStateProperty.all(
EdgeInsets.zero,
)),
onPressed: () {

View File

@ -55,6 +55,12 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
child: TabBar(
dividerHeight: 0,
tabAlignment: TabAlignment.start,
indicator: const UnderlineTabIndicator(
borderSide: BorderSide(
color: const Color.fromRGBO(104, 136, 253, 1),
),
),
onTap: (int val) {
state.tabIndex.value = val;
// EasyLoading.show(status: 'loading...');

View File

@ -257,7 +257,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
),
),
Padding(
padding: EdgeInsets.only(top: 2.r, left: 4.r),
padding: EdgeInsets.only(top: 5.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
@ -291,7 +291,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
),
),
Padding(
padding: EdgeInsets.only(top: 2.r, left: 4.r),
padding: EdgeInsets.only(top: 5.r, left: 4.r),
child: Text(
'优先批阅',
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF8A9691)),

View File

@ -22,12 +22,13 @@ class QuickDataCheckLogic extends GetxController with RequestToolMixin {
void getWorkData() async {
HomeworkDetails data = await getClient().getHomeworkDetails(state.homeworkId.value, state.classId.value);
EasyLoading.dismiss();
state.dataCount = Utils.getHomeworkData(data);
state.homeData = data;
state.kgReport.value = data.questions.where((w) => w.questionType == 1).toList();
state.zgReport.value = data.questions.where((w) => w.questionType == 2).toList();
state.studentList.value = data.students;
state.hasData.value = true;
EasyLoading.dismiss();
}
}

View File

@ -89,12 +89,10 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
SizedBox(
width: 6.r,
),
Obx(() {
return Text(
'${EnumUtils.formatGrade(state.grade)}${state.className.value}',
style: TextStyle(fontSize: 14.r, color: Colors.white),
);
})
Text(
'${EnumUtils.formatGrade(state.grade)}${state.className.value}',
style: TextStyle(fontSize: 14.r, color: Colors.white),
),
],
),
),

View File

@ -230,7 +230,7 @@ class _TaskListItemState extends State<TaskListItem> {
children: [
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
quickText(
'10',
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
color: const Color.fromRGBO(97, 97, 97, 1),
size: 13.sp,
),

View File

@ -10,21 +10,29 @@ import 'home_state.dart';
class HomeLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
final HomeState state = HomeState();
late final EasyRefreshController refreshController;
WorkStudentParams params = WorkStudentParams(
assessType: 0,
);
@override
void onInit() {
super.onInit();
refreshController = EasyRefreshController();
params.pageSize = state.pageSize;
getList();
}
void getList() async {
WorkStudentParams params = WorkStudentParams(
assessType: 0,
);
params.pageNumber = state.pageNumber;
WorkStudent data = await getClient().getUnAnnotateList(params);
state.totalCount = data.totalCount;
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();
}

View File

@ -12,4 +12,7 @@ class HomeState {
late RxInt readOver = 0.obs;
late RxList<Items> workList = RxList();
late int type = 1;
late int pageSize = 10;
late int pageNumber = 1;
late int totalCount = 1;
}

View File

@ -53,6 +53,16 @@ class _HomePageState extends State<HomePage>
controller: logic.refreshController,
header: MaterialHeader(),
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(
children: [
/* Container(
@ -209,7 +219,7 @@ class _HomePageState extends State<HomePage>
130, 130, 130, 1),
size: 11.sp),
quickText(
'10',
'${item.questionCount! - item.annotateCount!}',
color: const Color.fromRGBO(
97, 97, 97, 1),
size: 13.sp,