Compare commits
No commits in common. "dd8ae7724ab06b8baaffbf1ba67117b4dfc74f53" and "e84eca79d2f70a0b41e8232196d2e09c32097e42" have entirely different histories.
dd8ae7724a
...
e84eca79d2
|
|
@ -206,6 +206,3 @@ marking_app/lib/common/model/job/job_level_set_params.g.dart
|
|||
marking_app/lib/common/model/job/job_student_goups.g.dart
|
||||
marking_app/lib/common/model/job/job_student_level.g.dart
|
||||
marking_app/lib/common/model/job/job_favorite_item_model.g.dart
|
||||
marking_app/lib/pages/homework_correction/pages/job_favorite.g.dart
|
||||
marking_app/lib/common/model/job/job_fav_student.g.dart
|
||||
marking_app/lib/common/model/job/job_data_report.g.dart
|
||||
|
|
|
|||
|
|
@ -0,0 +1,91 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'job_data_report.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
JobDataReport _$JobDataReportFromJson(Map<String, dynamic> json) =>
|
||||
JobDataReport(
|
||||
json['jobId'] as int,
|
||||
json['jobName'] as String,
|
||||
json['gradeName'] as String,
|
||||
json['className'] as String?,
|
||||
json['validCount'] as int,
|
||||
json['noAnswerCount'] as int,
|
||||
(json['kgValidRate'] as num).toDouble(),
|
||||
json['kgQuestionCount'] as int,
|
||||
(json['zgValidRate'] as num).toDouble(),
|
||||
json['zgQuestionCount'] as int,
|
||||
(json['studentDetails'] as List<dynamic>)
|
||||
.map((e) => StudentDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$JobDataReportToJson(JobDataReport instance) =>
|
||||
<String, dynamic>{
|
||||
'jobId': instance.jobId,
|
||||
'jobName': instance.jobName,
|
||||
'gradeName': instance.gradeName,
|
||||
'className': instance.className,
|
||||
'validCount': instance.validCount,
|
||||
'noAnswerCount': instance.noAnswerCount,
|
||||
'kgValidRate': instance.kgValidRate,
|
||||
'kgQuestionCount': instance.kgQuestionCount,
|
||||
'zgValidRate': instance.zgValidRate,
|
||||
'zgQuestionCount': instance.zgQuestionCount,
|
||||
'studentDetails': instance.studentDetails,
|
||||
};
|
||||
|
||||
StudentDetails _$StudentDetailsFromJson(Map<String, dynamic> json) =>
|
||||
StudentDetails(
|
||||
json['studentId'] as int,
|
||||
json['studentName'] as String,
|
||||
json['kgValidCount'] as int,
|
||||
json['kgValidRate'] as int,
|
||||
json['zgValidCount'] as int,
|
||||
json['zgValidRate'] as int,
|
||||
(json['kgDetails'] as List<dynamic>)
|
||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
(json['zgDetails'] as List<dynamic>)
|
||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StudentDetailsToJson(StudentDetails instance) =>
|
||||
<String, dynamic>{
|
||||
'studentId': instance.studentId,
|
||||
'studentName': instance.studentName,
|
||||
'kgValidCount': instance.kgValidCount,
|
||||
'kgValidRate': instance.kgValidRate,
|
||||
'zgValidCount': instance.zgValidCount,
|
||||
'zgValidRate': instance.zgValidRate,
|
||||
'kgDetails': instance.kgDetails,
|
||||
'zgDetails': instance.zgDetails,
|
||||
};
|
||||
|
||||
KgDetails _$KgDetailsFromJson(Map<String, dynamic> json) => KgDetails(
|
||||
json['questionNo'] as String,
|
||||
json['questionId'] as int,
|
||||
json['partName'] as String,
|
||||
json['state'] as int,
|
||||
json['studentAnswer'] as String?,
|
||||
json['questionAnswer'] as String?,
|
||||
json['useTime'] as int?,
|
||||
json['annotateAnswers'] as String?,
|
||||
(json['score'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KgDetailsToJson(KgDetails instance) => <String, dynamic>{
|
||||
'questionNo': instance.questionNo,
|
||||
'questionId': instance.questionId,
|
||||
'partName': instance.partName,
|
||||
'state': instance.state,
|
||||
'studentAnswer': instance.studentAnswer,
|
||||
'questionAnswer': instance.questionAnswer,
|
||||
'useTime': instance.useTime,
|
||||
'annotateAnswers': instance.annotateAnswers,
|
||||
'score': instance.score,
|
||||
};
|
||||
|
|
@ -39,7 +39,7 @@ class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestio
|
|||
Future<JobCollectParams?> getData(int taskId, int studentId, int paperId) async {
|
||||
try {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<bool> res = await _client.getJobCollect(taskId, studentId, paperId);
|
||||
BaseStructureResult<bool> res = await _client.getJobCollect(taskId, studentId);
|
||||
if (res.success) return JobCollectParams(paperId, taskId, studentId, res.data ?? false);
|
||||
} catch (e) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -261,8 +261,8 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router
|
||||
.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
||||
RouterManager.router.navigateTo(context, RouterManager.jobStudentGroupPath,
|
||||
transition: getTransition());
|
||||
},
|
||||
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
||||
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||
|
|
|
|||
|
|
@ -13,8 +13,6 @@ import 'package:marking_app/utils/index.dart';
|
|||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
part 'job_favorite.g.dart';
|
||||
|
||||
/// 作业收藏学生名单列表
|
||||
class JobFavorite extends StatefulWidget {
|
||||
final int jobId;
|
||||
|
|
@ -60,8 +58,8 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
|
||||
Future<List<Items>> getData() async {
|
||||
var _client = await getClient();
|
||||
var result =
|
||||
await _client.getListOfJobFavorites(widget.jobId, widget.jobName, widget.className, loginName, pageSize);
|
||||
var result = await _client.getListOfJobFavorites(
|
||||
widget.jobId, widget.jobName, widget.className,loginName,pageSize);
|
||||
return result.data!.items;
|
||||
}
|
||||
|
||||
|
|
@ -76,14 +74,16 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
Future<void> getInvolveClasses() async {
|
||||
try {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobReportJoinClass>> result = await _client.getJobReportJoinClasses(widget.jobId);
|
||||
BaseStructureResult<List<JobReportJoinClass>> result =
|
||||
await _client.getJobReportJoinClasses(widget.jobId);
|
||||
if (result.success) {
|
||||
toUpState(setState, () {
|
||||
involveClasses = [JobReportJoinClass(-1, '全部', -1, '全部', '全部', '全部', -1, -1, '-1'), ...(result.data ?? [])];
|
||||
involveClasses = [
|
||||
JobReportJoinClass(-1, '全部', -1, '全部', '全部', '全部', -1, -1, '-1'),
|
||||
...(result.data ?? [])
|
||||
];
|
||||
involveClasses?.forEach((element) {
|
||||
if (element.className == widget.className &&
|
||||
element.gradeId == widget.gradeId &&
|
||||
element.schoolId == widget.schoolId) {
|
||||
if(element.className == widget.className && element.gradeId == widget.gradeId && element.schoolId == widget.schoolId){
|
||||
classData = element;
|
||||
}
|
||||
});
|
||||
|
|
@ -104,7 +104,8 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
insetPadding: EdgeInsets.all(25.r),
|
||||
content: FavoriteStudentDialog(),
|
||||
contentPadding: EdgeInsets.all(0),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))));
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
@ -117,13 +118,16 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
appBar: AppBar(
|
||||
// titleSpacing: 0,
|
||||
elevation: 0.0,
|
||||
leading: IconButton(icon: Icon(Icons.arrow_back_ios), onPressed: () => Navigator.of(context).pop()),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
onPressed: () => Navigator.of(context).pop()),
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
title: quickText('收藏夹'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<Items>>(
|
||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<
|
||||
List<Items>>(
|
||||
context,
|
||||
_future,
|
||||
(List<Items>? datas) {
|
||||
|
|
@ -159,14 +163,17 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
children: [
|
||||
Text(
|
||||
'函数A的对称性研究',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C)),
|
||||
style:
|
||||
TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C)),
|
||||
),
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
|
||||
child: Row(
|
||||
children: [
|
||||
$classSelection(involveClasses, classData, call: (JobReportJoinClass _classData) {
|
||||
$classSelection(involveClasses, classData,
|
||||
call: (JobReportJoinClass _classData) {
|
||||
classData = _classData;
|
||||
if (_classData.gradeId == -1) classData = null;
|
||||
_future = getData();
|
||||
|
|
@ -176,6 +183,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -187,21 +195,16 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
),
|
||||
),
|
||||
Expanded(
|
||||
child: isPadFlag
|
||||
? Padding(
|
||||
child: isPadFlag? Padding(
|
||||
padding: EdgeInsets.only(top: 10.r,bottom:8.r,left: 14.r,right: 14.r),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.r),
|
||||
child: Text(
|
||||
'第六题',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF2E5BFF)),
|
||||
child: Text('第六题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF2E5BFF)),),
|
||||
),
|
||||
),
|
||||
GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 8.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
|
|
@ -222,35 +225,29 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText('张小凡', color: Color(0xFF333333), size: 12.sp),
|
||||
quickText('张小凡',
|
||||
color: Color(0xFF333333),
|
||||
size: 12.sp),
|
||||
Expanded(child: Container()),
|
||||
Padding(
|
||||
padding:EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
'12班',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF666666)),
|
||||
),
|
||||
child: Text('12班',style: TextStyle(fontSize: 12.sp,color: Color(0xFF666666)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
print('删除');
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
width: 26.r,
|
||||
height: 26.r,
|
||||
),
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 26.r,height: 26.r,),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],),
|
||||
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
):ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
// Items item = datas[index];
|
||||
|
|
@ -261,10 +258,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.r),
|
||||
child: Text(
|
||||
'第六题',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF2E5BFF)),
|
||||
),
|
||||
child: Text('第六题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF2E5BFF)),),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 10.r),
|
||||
|
|
@ -276,22 +270,17 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText('张小凡', color: Color(0xFF333333), size: 14.sp),
|
||||
quickText('张小凡',
|
||||
color: Color(0xFF333333),
|
||||
size: 14.sp),
|
||||
Expanded(child: Container()),
|
||||
Padding(
|
||||
padding:EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
'12班',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF666666)),
|
||||
),
|
||||
child: Text('12班',style: TextStyle(fontSize: 14.sp,color: Color(0xFF666666)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
width: 32.r,
|
||||
height: 32.r,
|
||||
),
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 32.r,height: 32.r,),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -310,13 +299,15 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/// 下拉选择框
|
||||
@swidget
|
||||
Widget $classSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinClass? classData,
|
||||
Widget $classSelection(
|
||||
List<JobReportJoinClass>? involveClasses, JobReportJoinClass? classData,
|
||||
{required Function(JobReportJoinClass) call}) {
|
||||
if (involveClasses == null) return Container(child: quickText('点击重试')); // 点击重试
|
||||
if (involveClasses == null)
|
||||
return Container(child: quickText('点击重试')); // 点击重试
|
||||
return Container(
|
||||
// width: 200.r,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
|
|
|
|||
|
|
@ -249,8 +249,8 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 查询作业是否收藏
|
||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
||||
Future<BaseStructureResult<bool>> getJobCollect(@the_retrofit.Query("taskId") int taskId,
|
||||
@the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
||||
Future<BaseStructureResult<bool>> getJobCollect(
|
||||
@the_retrofit.Query("taskId") int taskId, @the_retrofit.Query("studentId") int studentId);
|
||||
|
||||
// 作业 => 作业优先批阅取消
|
||||
@the_retrofit.POST("/api/read/cancel-job-read-level")
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ environment:
|
|||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
# Use with the CupertinoIcons class for iOS style icons.
|
||||
|
|
@ -110,7 +108,6 @@ dependencies:
|
|||
badges: ^3.1.2
|
||||
horizontal_data_table: ^4.1.1
|
||||
data_table_2: ^2.5.10
|
||||
syncfusion_flutter_datepicker: ^21.2.10
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
|
|
|||
Loading…
Reference in New Issue