处理合并分支冲突
This commit is contained in:
parent
5d3d4b17a2
commit
dd8ae7724a
|
|
@ -206,3 +206,6 @@ 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
|
||||
|
|
|
|||
|
|
@ -1,91 +0,0 @@
|
|||
// 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);
|
||||
BaseStructureResult<bool> res = await _client.getJobCollect(taskId, studentId, paperId);
|
||||
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,6 +13,8 @@ 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;
|
||||
|
|
@ -58,8 +60,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;
|
||||
}
|
||||
|
||||
|
|
@ -74,16 +76,14 @@ 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,8 +104,7 @@ 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))));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
@ -118,16 +117,13 @@ 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) {
|
||||
|
|
@ -141,7 +137,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
|
||||
List pageList = [];
|
||||
List groupList = [];
|
||||
if(datas!.length>0){
|
||||
if (datas!.length > 0) {
|
||||
for (var item in datas) {
|
||||
pageList.add(item.questionPage);
|
||||
}
|
||||
|
|
@ -163,27 +159,23 @@ 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) {
|
||||
classData = _classData;
|
||||
if (_classData.gradeId == -1) classData = null;
|
||||
_future = getData();
|
||||
toUpState(setState, () {}, mounted);
|
||||
}),
|
||||
$classSelection(involveClasses, classData, call: (JobReportJoinClass _classData) {
|
||||
classData = _classData;
|
||||
if (_classData.gradeId == -1) classData = null;
|
||||
_future = getData();
|
||||
toUpState(setState, () {}, mounted);
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -195,103 +187,122 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
|||
),
|
||||
),
|
||||
Expanded(
|
||||
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)),),
|
||||
),
|
||||
GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 8.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: (){
|
||||
showStudentDialog(context);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
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)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
print('删除');
|
||||
},
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 26.r,height: 26.r,),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],),
|
||||
|
||||
],
|
||||
),
|
||||
):ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
// Items item = datas[index];
|
||||
return 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)),),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 10.r),
|
||||
margin: EdgeInsets.only(top: 5.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
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: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 8.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
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)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {},
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 32.r,height: 32.r,),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
showStudentDialog(context);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
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)),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
print('删除');
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
width: 26.r,
|
||||
height: 26.r,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
// Items item = datas[index];
|
||||
return 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)),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.only(top: 5.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
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)),
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
width: 32.r,
|
||||
height: 32.r,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
// itemCount: datas.length,
|
||||
itemCount: 10,
|
||||
),
|
||||
);
|
||||
},
|
||||
// itemCount: datas.length,
|
||||
itemCount: 10,
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
|
|
@ -299,15 +310,13 @@ GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// 下拉选择框
|
||||
@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),
|
||||
|
|
@ -325,7 +334,7 @@ Widget $classSelection(
|
|||
items: involveClasses.map((e) {
|
||||
return DropdownMenuItem(
|
||||
value: e.uniqueId!,
|
||||
child: quickText(e.uniqueId == '-1'?e.graduationYear:e.graduationYear + e.className,
|
||||
child: quickText(e.uniqueId == '-1' ? e.graduationYear : e.graduationYear + e.className,
|
||||
size: 12.sp, color: Colors.black),
|
||||
);
|
||||
}).toList(),
|
||||
|
|
@ -335,4 +344,4 @@ Widget $classSelection(
|
|||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
Future<BaseStructureResult<bool>> getJobCollect(@the_retrofit.Query("taskId") int taskId,
|
||||
@the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
||||
|
||||
// 作业 => 作业优先批阅取消
|
||||
@the_retrofit.POST("/api/read/cancel-job-read-level")
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ 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.
|
||||
|
|
@ -108,6 +110,7 @@ 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