返回事件修改
This commit is contained in:
parent
d62560184d
commit
c5ec91b295
|
|
@ -1,19 +1,23 @@
|
|||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.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/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/home_logic.dart';
|
||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||
|
||||
import 'annotate_class_state.dart';
|
||||
|
||||
class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
||||
final AnnotateClassState state = AnnotateClassState();
|
||||
late final EasyRefreshController refreshController;
|
||||
final HomeLogic homeController = Get.find();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
refreshController = EasyRefreshController();
|
||||
state.homeworkId.value = Get.arguments['id'] ?? '';
|
||||
state.name.value = Get.arguments['name'] ?? '';
|
||||
state.grade = Get.arguments['grade'];
|
||||
|
|
@ -64,4 +68,10 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
|
|||
Get.toNamed(Routes.jobReportPage,
|
||||
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_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.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/utils/utils.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/widget/progress_bar.dart';
|
||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||
import 'annotate_class_logic.dart';
|
||||
import 'widget/completed_annotate_item.dart';
|
||||
|
||||
|
|
@ -37,7 +34,10 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () {
|
||||
logic.homeController.getList();
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
@ -46,62 +46,71 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
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()
|
||||
? GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 1.48 //宽高比为1时,子widget
|
||||
),
|
||||
children: state.classList.map((taskItem) {
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass taskItem = state.classList[index];
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
})
|
||||
? GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 1.48 //宽高比为1时,子widget
|
||||
),
|
||||
children: state.classList.map((taskItem) {
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass taskItem = state.classList[index];
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
})
|
||||
: Utils.isPad()
|
||||
? MasonryGridView.count(
|
||||
crossAxisCount: 2, //几列
|
||||
mainAxisSpacing: 4.w, // 间距
|
||||
crossAxisSpacing: 4.h, // 纵向间距?
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass item = state.classList[index];
|
||||
return AnnotateItem(
|
||||
homeworkId: homeworkId,
|
||||
item: item,
|
||||
font: 8.sp,
|
||||
name: state.name.value,
|
||||
logic: logic,
|
||||
);
|
||||
},
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass item = state.classList[index];
|
||||
return AnnotateItem(
|
||||
homeworkId: homeworkId,
|
||||
item: item,
|
||||
font: 12.sp,
|
||||
name: state.name.value,
|
||||
logic: logic,
|
||||
);
|
||||
});
|
||||
? MasonryGridView.count(
|
||||
crossAxisCount: 2, //几列
|
||||
mainAxisSpacing: 4.w, // 间距
|
||||
crossAxisSpacing: 4.h, // 纵向间距?
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass item = state.classList[index];
|
||||
return AnnotateItem(
|
||||
homeworkId: homeworkId,
|
||||
item: item,
|
||||
font: 8.sp,
|
||||
name: state.name.value,
|
||||
logic: logic,
|
||||
);
|
||||
},
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass item = state.classList[index];
|
||||
return AnnotateItem(
|
||||
homeworkId: homeworkId,
|
||||
item: item,
|
||||
font: 12.sp,
|
||||
name: state.name.value,
|
||||
logic: logic,
|
||||
);
|
||||
}));
|
||||
}),
|
||||
),
|
||||
);
|
||||
|
|
|
|||
|
|
@ -273,12 +273,16 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
|||
widget.logic.goQuickDataCheck(widget.item);
|
||||
},
|
||||
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,
|
||||
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(
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
|
|
@ -303,12 +307,16 @@ class _AnnotateItemState extends State<AnnotateItem> {
|
|||
});
|
||||
},
|
||||
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,
|
||||
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(
|
||||
child: InkWell(
|
||||
onTap: () {},
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class _AnswerTrajectoryDetailPageState
|
|||
}),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
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/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/annotate_class/annotate_class_logic.dart';
|
||||
|
||||
import 'fav_student_state.dart';
|
||||
|
||||
class FavStudentLogic extends GetxController with RequestToolMixin {
|
||||
final FavStudentState state = FavStudentState();
|
||||
final AnnotateClassLogic controller = Get.find();
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,10 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
elevation: 0.0,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios),
|
||||
onPressed: () => Navigator.of(context).pop()),
|
||||
onPressed: () {
|
||||
logic.controller.getList();
|
||||
Get.back();
|
||||
}),
|
||||
iconTheme: const IconThemeData(color: Colors.black),
|
||||
title: quickText('收藏夹'),
|
||||
centerTitle: true,
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
|||
onTap: () async {
|
||||
bool confim = await widget.confirmDialog();
|
||||
if (confim) {
|
||||
widget.deleteFav(currentStudent);
|
||||
widget.deleteFav(currentStudent.value);
|
||||
imageList.removeAt(defaultIndex.value);
|
||||
if (imageList.isNotEmpty) {
|
||||
if (defaultIndex.value < imageList.length) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class _JobReportPageState extends State<JobReportPage> {
|
|||
})),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> {
|
|||
children: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
|
|
|
|||
|
|
@ -1,19 +1,14 @@
|
|||
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: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/store/user_store.dart';
|
||||
import 'package:making_school_asignment_app/page/home_page/home_logic.dart';
|
||||
|
||||
import 'read_over_state.dart';
|
||||
|
||||
class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProviderStateMixin {
|
||||
final ReadOverState state = ReadOverState();
|
||||
late TabController tabController;
|
||||
|
||||
final HomeLogic homeController = Get.find();
|
||||
|
||||
@override
|
||||
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
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
tabController.dispose();
|
||||
/* tabController2.dispose();
|
||||
refreshController1.dispose();
|
||||
refreshController2.dispose();*/
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,14 +60,15 @@ class _ReadOverPageState extends State<ReadOverPage> {
|
|||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
// SystemNavigator.pop();
|
||||
Get.back();
|
||||
},
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
logic.homeController.getList();
|
||||
Get.back();
|
||||
},
|
||||
child: Container(
|
||||
height: 30.h,
|
||||
alignment: Alignment.centerLeft,
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
child: Icon(
|
||||
Icons.arrow_back_ios_sharp,
|
||||
size: 16.sp,
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class _TaskListItemState extends State<TaskListItem> {
|
|||
Container(
|
||||
margin: EdgeInsets.only(bottom: 16.h),
|
||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 10.w),
|
||||
width: double.infinity,
|
||||
width: Get.width,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: const Color.fromRGBO(255, 255, 255, 1),
|
||||
|
|
@ -178,92 +178,97 @@ class _TaskListItemState extends State<TaskListItem> {
|
|||
)
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
child: Row(
|
||||
children: [
|
||||
SizedBox(height: 30.h),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Container(
|
||||
width: Utils.isPad() ? 32.w : 38.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
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,
|
||||
Expanded(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(height: 30.h),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||
quickText(
|
||||
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
|
||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 13.sp,
|
||||
Container(
|
||||
width: Utils.isPad() ? 32.w : 38.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
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,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10),
|
||||
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)),
|
||||
),
|
||||
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),
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
quickText('题量:', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp),
|
||||
quickText(
|
||||
'${widget.jobTaskItem.questionCount! - widget.jobTaskItem.annotateCount!}',
|
||||
color: const Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 13.sp,
|
||||
),
|
||||
],
|
||||
),
|
||||
quickText(' / ', color: const Color.fromRGBO(130, 130, 130, 1), size: 11.sp, fontWeight: FontWeight.w500),
|
||||
quickText(DateTime.parse(widget.jobTaskItem.publishTime).toString().substring(0, 10),
|
||||
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,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class _StudentWorkDetailPageState extends State<StudentWorkDetailPage> {
|
|||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
|
|
|
|||
Loading…
Reference in New Issue