Compare commits

..

No commits in common. "c790a37e83e4ddf88de59cc7d6ebcfebe184205a" and "d93a203ee68baa1905eae24828a0ac7b60c3f117" have entirely different histories.

11 changed files with 275 additions and 373 deletions

View File

@ -116,7 +116,4 @@ abstract class RetrofitClient {
Future<BasePageData<HomeworkFavs>> getFavList(
@Query('HomeworkName') String homeworkName, @Query('ClassId') String classId);
// ()
@POST("/api/hms/Annotate/AllCorrect")
Future getAllCorrect(@Field() String homeworkId,@Field() String classId);
}

View File

@ -30,8 +30,6 @@ class UserStore extends GetxController with RequestToolMixin {
RxInt readOver = 0.obs;
RxInt assessType = 0.obs;
UserStore init() {
token = StorageService.to.read(AppStorageKey.token.value);
xToken = StorageService.to.read(AppStorageKey.xToken.value);

View File

@ -3,7 +3,6 @@ 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/routes/app_pages.dart';
import 'annotate_class_state.dart';
@ -43,17 +42,6 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin {
EasyLoading.dismiss();
}
void getAllCorrect(classId) async{
EasyLoading.show(status: 'loading...');
try {
await getClient().getAllCorrect(state.homeworkId.value,classId);
getList();
} catch (e) {
EasyLoading.dismiss();
ToastUtils.showError('操作失败,请重试');
}
}
void goQuickDataCheck(item) {
Get.toNamed(Routes.quickDataCheckPage,
arguments: {'homeworkId': state.homeworkId.value, 'classId': item.classId, 'grade': state.grade, 'className': item.className});

View File

@ -59,7 +59,6 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
return CompletedAnnotateItem(
taskItem: taskItem,
logic: logic,
name: state.name.value,
);
}).toList(),
)
@ -70,7 +69,6 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
return CompletedAnnotateItem(
taskItem: taskItem,
logic: logic,
name: state.name.value,
);
})
: Utils.isPad()

View File

@ -23,64 +23,6 @@ class AnnotateItem extends StatefulWidget {
}
class _AnnotateItemState extends State<AnnotateItem> {
Future<bool> confirmDialog() async {
return await showDialog(
context: context,
builder: (context) => AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0), //
),
actionsPadding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
content: SizedBox(
width: 200.r,
child: Text(
'一键批阅后,默认学生答题结果全部正确, 是否进行此操作?',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505E6E)),
),
),
actionsAlignment: MainAxisAlignment.center,
actions: <Widget>[
InkWell(
child: Container(
width: 97.r,
height: 27.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF6888FD),
),
child: const Center(
child: Text(
'确定',
style: TextStyle(color: Colors.white),
))),
onTap: () {
//
Get.back(result: true);
},
),
InkWell(
onTap: () {
Get.back(result: false);
},
child: Container(
width: 97.r,
height: 27.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFFF4F4F4),
),
child: const Center(
child: Text(
'取消',
style: TextStyle(color: Color(0xFF666666)),
))),
),
],
),
);
}
@override
Widget build(BuildContext context) {
AnnotatedClass itemData = widget.item;
@ -129,7 +71,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
Expanded(
flex: 4,
child: ItemBtn(
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty?'(${ widget.item.homeworkFavs.length})':''}",
title: "收藏夹",
font: widget.font - 2.sp,
clickFunction: () {
Get.toNamed(Routes.favStudentPage,arguments: {'homeworkName':widget.name,'classId':widget.item.classId,'homeworkId':widget.logic.state.homeworkId.value,'grade':widget.item.grade});
@ -147,14 +89,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
child: ItemBtn(
title: "一键批阅",
font: widget.font - 2.sp,
clickFunction: () async{
var confim =
await confirmDialog();
if (confim) {
widget.logic.getAllCorrect(
widget.item.classId);
}
},
clickFunction: () {},
),
),
const Expanded(
@ -178,7 +113,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
Expanded(
flex: 4,
child: ItemBtn(
title: "收藏夹${widget.item.homeworkFavs.isNotEmpty?'(${ widget.item.homeworkFavs.length})':''}",
title: "收藏夹",
font: widget.font - 2.sp,
clickFunction: () {
Get.toNamed(Routes.favStudentPage,arguments: {'homeworkName':widget.name,'classId':widget.item.classId,'homeworkId':widget.logic.state.homeworkId.value,'grade':widget.item.grade});

View File

@ -8,13 +8,11 @@ import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
import 'package:making_school_asignment_app/page/global_widget/show_student_list.dart';
import 'package:making_school_asignment_app/page/home_page/children/annotate_class/annotate_class_logic.dart';
import 'package:making_school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:making_school_asignment_app/routes/app_pages.dart';
class CompletedAnnotateItem extends StatelessWidget {
final AnnotatedClass taskItem;
final AnnotateClassLogic logic;
final String name;
const CompletedAnnotateItem({Key? key, required this.taskItem, required this.logic,required this.name}) : super(key: key);
const CompletedAnnotateItem({Key? key, required this.taskItem, required this.logic}) : super(key: key);
void showStudentList(context, List<AnnotatedStudents> students, [bool submitted = false]) async {
showDialog(
@ -49,7 +47,7 @@ class CompletedAnnotateItem extends StatelessWidget {
mainAxisSize: MainAxisSize.min,
children: [
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.kgtCorrectRate / 100,
title: '客观题正确率:',
padingEdg: EdgeInsets.only(left: 10.w, right: 10.w),
@ -58,7 +56,7 @@ class CompletedAnnotateItem extends StatelessWidget {
marginEdg: EdgeInsets.only(top: 5.h),
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.zgtCorrectRate / 100,
title: '主观题正确率:',
fontSize: 8.sp,
@ -67,7 +65,7 @@ class CompletedAnnotateItem extends StatelessWidget {
marginEdg: EdgeInsets.only(top: 5.h),
),
ProgressBar(
color: const Color.fromRGBO(76, 199, 147, 1),
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.correctRate / 100,
title: '总正确率:',
fontSize: 8.sp,
@ -135,16 +133,14 @@ class CompletedAnnotateItem extends StatelessWidget {
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () {
Get.toNamed(Routes.favStudentPage,arguments: {'homeworkName':name,'classId':taskItem.classId,'homeworkId':logic.state.homeworkId.value,'grade':taskItem.grade});
},
onTap: () {},
splashColor: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹${taskItem.homeworkFavs.isNotEmpty?'(${taskItem.homeworkFavs.length})':''}', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
child: quickText('收藏夹', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
)),

View File

@ -2,9 +2,7 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
import 'package:making_school_asignment_app/common/job/common/base_page_data.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/utils/toast_utils.dart';
import 'fav_student_state.dart';
@ -58,21 +56,14 @@ class FavStudentLogic extends GetxController with RequestToolMixin {
EasyLoading.dismiss();
}
void getDelete(student) async {
EasyLoading.show(status: 'loading...');
try {
await getClient().toFavStudent(FavorParam(
homeworkId: state.homeworkId,
studentId: student.studentId,
templateId: student.templateId,
questionNo: student.questionNo,
isFav: false,
));
getList();
} catch (e) {
EasyLoading.dismiss();
ToastUtils.showError('操作失败,请重试');
}
getDelete(student) async {
/* RestClient _client = await getClient();
BaseStructureResult res = await _client.getJobDeFavorites(
widget.jobId, student.studentId, student.questionPage!);
if (res.success) {
_future = getData();
setState(() {});
}*/
}
}

View File

@ -48,7 +48,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
actionsPadding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
content: Text(
'确定删除吗?',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF505E6E)),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505E6E)),
),
actionsAlignment: MainAxisAlignment.center,
actions: <Widget>[
@ -58,7 +58,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
height: 27.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFF6888FD),
color: Color(0xFF6888FD),
),
child: const Center(
child: Text(
@ -81,7 +81,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
height: 27.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
color: const Color(0xFFF4F4F4),
color: Color(0xFFF4F4F4),
),
child: const Center(
child: Text(
@ -96,14 +96,14 @@ class _FavStudentPageState extends State<FavStudentPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar(
// titleSpacing: 0,
elevation: 0.0,
leading: IconButton(
icon: const Icon(Icons.arrow_back_ios),
icon: Icon(Icons.arrow_back_ios),
onPressed: () => Navigator.of(context).pop()),
iconTheme: const IconThemeData(color: Colors.black),
iconTheme: IconThemeData(color: Colors.black),
title: quickText('收藏夹'),
centerTitle: true,
backgroundColor: Colors.white,
@ -111,7 +111,8 @@ class _FavStudentPageState extends State<FavStudentPage> {
ReturnToHomepage(),
],
),
body: Column(
body: Container(
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
@ -124,7 +125,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
return Text(
state.homeworkName.value,
style:
TextStyle(fontSize: 14.sp, color: const Color(0xFF3C3C3C),),
TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C),),
overflow: TextOverflow.ellipsis,
);
}),
@ -190,7 +191,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
'${item['questionPage']}',
style: TextStyle(
fontSize: 12.sp,
color: const Color(0xFF2E5BFF)),
color: Color(0xFF2E5BFF)),
),
),
GridView(
@ -247,12 +248,12 @@ class _FavStudentPageState extends State<FavStudentPage> {
),
InkWell(
onTap: () async {
var confim =
/* var confim =
await confirmDialog();
if (confim) {
logic.getDelete(
getDelete(
student);
}
}*/
},
child: Image.asset(
'assets/images/favorite_delete_icon.png',
@ -290,7 +291,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
'${item['questionPage']}',
style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF2E5BFF)),
color: Color(0xFF2E5BFF)),
),
),
ListView.builder(
@ -298,8 +299,8 @@ class _FavStudentPageState extends State<FavStudentPage> {
HomeworkFavs student = item['list'][i];
return InkWell(
onTap: () {
showStudentDialog(
context, student, state.favList);
/* showStudentDialog(
context, student, groupList);*/
},
child: Container(
padding: EdgeInsets.symmetric(
@ -317,7 +318,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
.spaceBetween,
children: [
quickText(student.studentName,
color: const Color(0xFF333333),
color: Color(0xFF333333),
size: 14.sp),
Expanded(child: Container()),
Padding(
@ -327,17 +328,17 @@ class _FavStudentPageState extends State<FavStudentPage> {
student.className!,
style: TextStyle(
fontSize: 14.sp,
color: const Color(
color: Color(
0xFF666666)),
),
),
InkWell(
onTap: () async {
var confim =
/*var confim =
await confirmDialog();
if (confim) {
logic.getDelete(student);
}
getDelete(student);
}*/
},
child: Image.asset(
'assets/images/favorite_delete_icon.png',
@ -371,7 +372,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
}),
],
),
)),
);
}

View File

@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:get/get_rx/get_rx.dart';
import 'package:making_school_asignment_app/common/config/request_config.dart';
import 'package:making_school_asignment_app/common/job/annotated_class.dart';
import 'package:making_school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:photo_view/photo_view.dart';
@ -142,7 +141,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
builder: (BuildContext context, int index) {
final HomeworkFavs item = imageList[index];
return PhotoViewGalleryPageOptions(
imageProvider: NetworkImage(RequestConfig.imgUrl + item.zgtAnswer!),
imageProvider: NetworkImage(item.zgtAnswer!),
heroAttributes: PhotoViewHeroAttributes(tag: item.id!),
);
},

View File

@ -19,11 +19,11 @@ class ReadOverLogic extends GetxController with RequestToolMixin, GetTickerProvi
late final EasyRefreshController refreshController2;
WorkStudentParams params = WorkStudentParams(
assessType: UserStore.to.assessType.value,
assessType: 0,
pageSize: 10,
);
WorkStudentParams params2 = WorkStudentParams(
assessType: UserStore.to.assessType.value,
assessType: 0,
pageSize: 10,
);

View File

@ -60,7 +60,6 @@ class _ReadOverPageState extends State<ReadOverPage> {
padding: EdgeInsets.only(left: 10.w),
child: InkWell(
onTap: () {
// SystemNavigator.pop();
Get.back();
},
child: Icon(