返回事件修改
This commit is contained in:
parent
d62560184d
commit
c5ec91b295
|
|
@ -1,19 +1,23 @@
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:get_storage/get_storage.dart';
|
|
||||||
import 'package:making_school_asignment_app/common/job/annotated_class.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/mixins/request_tool_mixin.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
|
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
|
||||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
|
|
||||||
import 'annotate_class_state.dart';
|
import 'annotate_class_state.dart';
|
||||||
|
|
||||||
class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
final AnnotateClassState state = AnnotateClassState();
|
final AnnotateClassState state = AnnotateClassState();
|
||||||
|
late final EasyRefreshController refreshController;
|
||||||
|
final HomeLogic homeController = Get.find();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
refreshController = EasyRefreshController();
|
||||||
state.homeworkId.value = Get.arguments['id'] ?? '';
|
state.homeworkId.value = Get.arguments['id'] ?? '';
|
||||||
state.name.value = Get.arguments['name'] ?? '';
|
state.name.value = Get.arguments['name'] ?? '';
|
||||||
state.grade = Get.arguments['grade'];
|
state.grade = Get.arguments['grade'];
|
||||||
|
|
@ -64,4 +68,10 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||||
Get.toNamed(Routes.jobReportPage,
|
Get.toNamed(Routes.jobReportPage,
|
||||||
arguments: {'title': state.name.value, 'homeworkId': state.homeworkId.value, 'grade': state.grade, 'className': item.className});
|
arguments: {'title': state.name.value, 'homeworkId': state.homeworkId.value, 'grade': state.grade, 'className': item.className});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void dispose() {
|
||||||
|
super.dispose();
|
||||||
|
refreshController.dispose();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,12 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
|
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/annotate_class/widget/annotate_item.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/annotate_class/widget/annotate_item.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/widget/progress_bar.dart';
|
|
||||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
|
||||||
import 'annotate_class_logic.dart';
|
import 'annotate_class_logic.dart';
|
||||||
import 'widget/completed_annotate_item.dart';
|
import 'widget/completed_annotate_item.dart';
|
||||||
|
|
||||||
|
|
@ -37,7 +34,10 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () {
|
||||||
|
logic.homeController.getList();
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
@ -46,62 +46,71 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||||
child: Obx(() {
|
child: Obx(() {
|
||||||
return state.completed.value
|
return EasyRefresh(
|
||||||
|
firstRefresh: false,
|
||||||
|
taskIndependence: true,
|
||||||
|
controller: logic.refreshController,
|
||||||
|
header: MaterialHeader(),
|
||||||
|
footer: TaurusFooter(),
|
||||||
|
onRefresh: () async{
|
||||||
|
return logic.getList();
|
||||||
|
},
|
||||||
|
child: state.completed.value
|
||||||
? Utils.isPad()
|
? Utils.isPad()
|
||||||
? GridView(
|
? GridView(
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
crossAxisSpacing: 6.w,
|
crossAxisSpacing: 6.w,
|
||||||
childAspectRatio: 1.48 //宽高比为1时,子widget
|
childAspectRatio: 1.48 //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
children: state.classList.map((taskItem) {
|
children: state.classList.map((taskItem) {
|
||||||
return CompletedAnnotateItem(
|
return CompletedAnnotateItem(
|
||||||
taskItem: taskItem,
|
taskItem: taskItem,
|
||||||
logic: logic,
|
logic: logic,
|
||||||
name: state.name.value,
|
name: state.name.value,
|
||||||
);
|
);
|
||||||
}).toList(),
|
}).toList(),
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
itemCount: state.classList.length,
|
itemCount: state.classList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
AnnotatedClass taskItem = state.classList[index];
|
AnnotatedClass taskItem = state.classList[index];
|
||||||
return CompletedAnnotateItem(
|
return CompletedAnnotateItem(
|
||||||
taskItem: taskItem,
|
taskItem: taskItem,
|
||||||
logic: logic,
|
logic: logic,
|
||||||
name: state.name.value,
|
name: state.name.value,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
: Utils.isPad()
|
: Utils.isPad()
|
||||||
? MasonryGridView.count(
|
? MasonryGridView.count(
|
||||||
crossAxisCount: 2, //几列
|
crossAxisCount: 2, //几列
|
||||||
mainAxisSpacing: 4.w, // 间距
|
mainAxisSpacing: 4.w, // 间距
|
||||||
crossAxisSpacing: 4.h, // 纵向间距?
|
crossAxisSpacing: 4.h, // 纵向间距?
|
||||||
itemCount: state.classList.length,
|
itemCount: state.classList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
AnnotatedClass item = state.classList[index];
|
AnnotatedClass item = state.classList[index];
|
||||||
return AnnotateItem(
|
return AnnotateItem(
|
||||||
homeworkId: homeworkId,
|
homeworkId: homeworkId,
|
||||||
item: item,
|
item: item,
|
||||||
font: 8.sp,
|
font: 8.sp,
|
||||||
name: state.name.value,
|
name: state.name.value,
|
||||||
logic: logic,
|
logic: logic,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: ListView.builder(
|
: ListView.builder(
|
||||||
itemCount: state.classList.length,
|
itemCount: state.classList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
AnnotatedClass item = state.classList[index];
|
AnnotatedClass item = state.classList[index];
|
||||||
return AnnotateItem(
|
return AnnotateItem(
|
||||||
homeworkId: homeworkId,
|
homeworkId: homeworkId,
|
||||||
item: item,
|
item: item,
|
||||||
font: 12.sp,
|
font: 12.sp,
|
||||||
name: state.name.value,
|
name: state.name.value,
|
||||||
logic: logic,
|
logic: logic,
|
||||||
);
|
);
|
||||||
});
|
}));
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -273,12 +273,16 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
widget.logic.goQuickDataCheck(widget.item);
|
widget.logic.goQuickDataCheck(widget.item);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
padding:EdgeInsets.symmetric(vertical:10.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(right: BorderSide(width: 1.r,color:const Color.fromRGBO(221, 221, 221, 1) ))
|
||||||
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: quickText('数据快查', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
child: quickText('数据快查', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
// Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -303,12 +307,16 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
|
padding:EdgeInsets.symmetric(vertical:10.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
border: Border(right: BorderSide(width: 1.r,color:const Color.fromRGBO(221, 221, 221, 1) ))
|
||||||
|
),
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
child: quickText('批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
child: quickText('批阅', color: const Color.fromRGBO(118, 118, 118, 1), size: widget.font),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
// Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {},
|
onTap: () {},
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
|
||||||
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),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ class _AnswerTrajectoryDetailPageState
|
||||||
}),
|
}),
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,13 @@ import 'package:making_school_asignment_app/common/job/common/base_page_data.dar
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/favor_param.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/favor_param.dart';
|
||||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.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/common/utils/toast_utils.dart';
|
||||||
|
import 'package:making_school_asignment_app/page/home_page/children/annotate_class/annotate_class_logic.dart';
|
||||||
|
|
||||||
import 'fav_student_state.dart';
|
import 'fav_student_state.dart';
|
||||||
|
|
||||||
class FavStudentLogic extends GetxController with RequestToolMixin {
|
class FavStudentLogic extends GetxController with RequestToolMixin {
|
||||||
final FavStudentState state = FavStudentState();
|
final FavStudentState state = FavStudentState();
|
||||||
|
final AnnotateClassLogic controller = Get.find();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,10 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
||||||
elevation: 0.0,
|
elevation: 0.0,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios),
|
icon: const Icon(Icons.arrow_back_ios),
|
||||||
onPressed: () => Navigator.of(context).pop()),
|
onPressed: () {
|
||||||
|
logic.controller.getList();
|
||||||
|
Get.back();
|
||||||
|
}),
|
||||||
iconTheme: const IconThemeData(color: Colors.black),
|
iconTheme: const IconThemeData(color: Colors.black),
|
||||||
title: quickText('收藏夹'),
|
title: quickText('收藏夹'),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
bool confim = await widget.confirmDialog();
|
bool confim = await widget.confirmDialog();
|
||||||
if (confim) {
|
if (confim) {
|
||||||
widget.deleteFav(currentStudent);
|
widget.deleteFav(currentStudent.value);
|
||||||
imageList.removeAt(defaultIndex.value);
|
imageList.removeAt(defaultIndex.value);
|
||||||
if (imageList.isNotEmpty) {
|
if (imageList.isNotEmpty) {
|
||||||
if (defaultIndex.value < imageList.length) {
|
if (defaultIndex.value < imageList.length) {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
})),
|
})),
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
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),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
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),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,14 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/enum_subject.dart';
|
|
||||||
import 'package:making_school_asignment_app/common/job/work_student.dart';
|
|
||||||
import 'package:making_school_asignment_app/common/job/work_student_params.dart';
|
|
||||||
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
import 'package:making_school_asignment_app/common/mixins/request_tool_mixin.dart';
|
||||||
import 'package:making_school_asignment_app/common/store/user_store.dart';
|
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
|
||||||
|
|
||||||
import 'read_over_state.dart';
|
import 'read_over_state.dart';
|
||||||
|
|
||||||
class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
||||||
final ReadOverState state = ReadOverState();
|
final ReadOverState state = ReadOverState();
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
|
final HomeLogic homeController = Get.find();
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
|
|
@ -25,74 +20,10 @@ class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProvi
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Future<void> showStudents(
|
|
||||||
BuildContext context, [
|
|
||||||
bool? submitted = false,
|
|
||||||
String? className,
|
|
||||||
]) async {
|
|
||||||
ToastUtils.showLoading();
|
|
||||||
List<JobConcernedWithStudent> students = [];
|
|
||||||
|
|
||||||
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(
|
|
||||||
'${className ?? ''}${submitted! ? '已提交' : '未提交'}作业学生',
|
|
||||||
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.0, // 主轴(水平)方向间距
|
|
||||||
runSpacing: 4.0, // 纵轴(垂直)方向间距
|
|
||||||
alignment: WrapAlignment.spaceAround, //沿主轴方向居中
|
|
||||||
children: students.map((e) {
|
|
||||||
return Chip(
|
|
||||||
backgroundColor: Color.fromRGBO(239, 242, 255, 1),
|
|
||||||
avatar: CircleAvatar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
child: quickText(e.studentName.substring(0, 1),
|
|
||||||
size: 12.sp, color: Theme.of(context).primaryColor),
|
|
||||||
),
|
|
||||||
label: quickText(e.studentName, color: Color.fromRGBO(80, 94, 110, 1), size: 12.sp),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
tabController.dispose();
|
tabController.dispose();
|
||||||
/* tabController2.dispose();
|
|
||||||
refreshController1.dispose();
|
|
||||||
refreshController2.dispose();*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,15 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: Container(
|
child: InkWell(
|
||||||
alignment: Alignment.centerLeft,
|
onTap: () {
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
logic.homeController.getList();
|
||||||
child: InkWell(
|
Get.back();
|
||||||
onTap: () {
|
},
|
||||||
// SystemNavigator.pop();
|
child: Container(
|
||||||
Get.back();
|
height: 30.h,
|
||||||
},
|
alignment: Alignment.centerLeft,
|
||||||
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_ios_sharp,
|
Icons.arrow_back_ios_sharp,
|
||||||
size: 16.sp,
|
size: 16.sp,
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(bottom: 16.h),
|
margin: EdgeInsets.only(bottom: 16.h),
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
|
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
|
||||||
width: double.infinity,
|
width: Get.width,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
borderRadius: BorderRadius.circular(6.r),
|
||||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||||
|
|
@ -178,92 +178,97 @@ class _TaskListItemState extends State<TaskListItem> {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
SizedBox(height: 30.h),
|
Expanded(
|
||||||
Row(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
Container(
|
children: [
|
||||||
width: Utils.isPad() ? 32.w : 38.w,
|
SizedBox(height: 30.h),
|
||||||
height: 18.h,
|
Row(
|
||||||
alignment: Alignment.center,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: widget.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 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(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: quickText(
|
|
||||||
widget.jobTaskItem.name,
|
|
||||||
maxLines: 2,
|
|
||||||
size: Utils.isPad() ? 14.sp : 16.sp,
|
|
||||||
color: const Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
quickText(
|
|
||||||
EnumUtils.formatSubject(widget.jobTaskItem.subject),
|
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
|
||||||
size: 12.sp,
|
|
||||||
),
|
|
||||||
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
|
||||||
Container(
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
children: [
|
||||||
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
Container(
|
||||||
quickText(
|
width: Utils.isPad() ? 32.w : 38.w,
|
||||||
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
|
height: 18.h,
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
alignment: Alignment.center,
|
||||||
size: 13.sp,
|
padding: EdgeInsets.only(left: Utils.isPad() ? 2.w : 3.w),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: widget.type == 1 ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 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(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
|
||||||
),
|
),
|
||||||
|
Expanded(
|
||||||
|
child: quickText(
|
||||||
|
widget.jobTaskItem.name,
|
||||||
|
maxLines: 2,
|
||||||
|
size: Utils.isPad() ? 14.sp : 16.sp,
|
||||||
|
color: const Color.fromRGBO(70, 70, 70, 1),
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
SizedBox(height: 10.h),
|
||||||
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
Row(
|
||||||
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10),
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
|
children: [
|
||||||
],
|
quickText(
|
||||||
),
|
EnumUtils.formatSubject(widget.jobTaskItem.subject),
|
||||||
SizedBox(height: 10.h),
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
InkWell(
|
size: 12.sp,
|
||||||
onTap: () {
|
),
|
||||||
if (!widget.jobTaskItem.isFixed!) {
|
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||||
EasyLoading.show(status: 'loading...');
|
Row(
|
||||||
widget.collectFun(widget.jobTaskItem);
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
}
|
children: [
|
||||||
},
|
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||||
child: Container(
|
quickText(
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.r, horizontal: 20.r),
|
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
|
||||||
decoration: BoxDecoration(
|
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||||
color: widget.jobTaskItem.isFixed! ? Color(0xFFF4F4F4) : Color(0xFFF2FFFA),
|
size: 13.sp,
|
||||||
border: Border.all(width: 1.r, color: widget.jobTaskItem.isFixed! ? Colors.transparent : Color(0xFF4CC793)),
|
),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
],
|
||||||
),
|
),
|
||||||
child: Text(
|
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||||
widget.jobTaskItem.isFixed! ? '已订正' : '收集订正',
|
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10),
|
||||||
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
color: const Color.fromRGBO(97, 97, 97, 1), size: 12.sp),
|
||||||
),
|
],
|
||||||
|
),
|
||||||
|
SizedBox(height: 10.h),
|
||||||
|
InkWell(
|
||||||
|
onTap: () {
|
||||||
|
if (!widget.jobTaskItem.isFixed!) {
|
||||||
|
EasyLoading.show(status: 'loading...');
|
||||||
|
widget.collectFun(widget.jobTaskItem);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.symmetric(vertical: 4.r, horizontal: 20.r),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: widget.jobTaskItem.isFixed! ? Color(0xFFF4F4F4) : Color(0xFFF2FFFA),
|
||||||
|
border: Border.all(width: 1.r, color: widget.jobTaskItem.isFixed! ? Colors.transparent : Color(0xFF4CC793)),
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
widget.jobTaskItem.isFixed! ? '已订正' : '收集订正',
|
||||||
|
style: TextStyle(fontSize: 10.sp, color: const Color(0xFF4CC793)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// FavoriteButton(jobTaskItem.id, jobTaskItem.title),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// FavoriteButton(jobTaskItem.id, jobTaskItem.title),
|
SizedBox(width: 100.r,),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
leading: IconButton(
|
leading: IconButton(
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
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),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
||||||
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),
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Get.back(),
|
||||||
),
|
),
|
||||||
actions: const [
|
actions: const [
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue