入参优化
This commit is contained in:
parent
e0814ba901
commit
290d4efddf
|
|
@ -67,10 +67,10 @@ class Items extends Object {
|
||||||
String className;
|
String className;
|
||||||
|
|
||||||
@JsonKey(name: 'questionPage')
|
@JsonKey(name: 'questionPage')
|
||||||
int questionPage;
|
int? questionPage;
|
||||||
|
|
||||||
@JsonKey(name: 'questionPicture')
|
@JsonKey(name: 'questionPicture')
|
||||||
String questionPicture;
|
String? questionPicture;
|
||||||
|
|
||||||
@JsonKey(name: 'createTime')
|
@JsonKey(name: 'createTime')
|
||||||
String createTime;
|
String createTime;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@ class FavoriteStudentDialog extends StatefulWidget {
|
||||||
final Function deleteFav;
|
final Function deleteFav;
|
||||||
|
|
||||||
const FavoriteStudentDialog(
|
const FavoriteStudentDialog(
|
||||||
{Key? key, required this.item, required this.group,required this.deleteFav})
|
{Key? key,
|
||||||
|
required this.item,
|
||||||
|
required this.group,
|
||||||
|
required this.deleteFav})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -26,7 +29,6 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
late Items currentStudent;
|
late Items currentStudent;
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
pageController = PageController(initialPage: defaultIndex);
|
|
||||||
currentStudent = widget.item;
|
currentStudent = widget.item;
|
||||||
List<Items> list = [];
|
List<Items> list = [];
|
||||||
widget.group.forEach((element) {
|
widget.group.forEach((element) {
|
||||||
|
|
@ -38,6 +40,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
imageList = list;
|
imageList = list;
|
||||||
defaultIndex = list.indexWhere((element) => element.id == widget.item.id);
|
defaultIndex = list.indexWhere((element) => element.id == widget.item.id);
|
||||||
});
|
});
|
||||||
|
pageController = PageController(initialPage: defaultIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
void dispose() {
|
void dispose() {
|
||||||
|
|
@ -67,12 +70,24 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
||||||
widget.deleteFav(currentStudent);
|
widget.deleteFav(currentStudent);
|
||||||
imageList.removeAt(defaultIndex);
|
imageList.removeAt(defaultIndex);
|
||||||
|
print('imageList.length=${imageList.length}');
|
||||||
|
print('defaultIndex=${defaultIndex}');
|
||||||
setState(() {
|
setState(() {
|
||||||
|
if (imageList.length > 0) {
|
||||||
|
if (defaultIndex < imageList.length) {
|
||||||
|
currentStudent = imageList[defaultIndex];
|
||||||
|
} else {
|
||||||
|
currentStudent = imageList[defaultIndex - 1];
|
||||||
|
defaultIndex = defaultIndex - 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
currentStudent.className = '';
|
||||||
|
currentStudent.studentName = '';
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.r),
|
padding: EdgeInsets.symmetric(horizontal: 8.r),
|
||||||
|
|
@ -98,8 +113,8 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.r,
|
height: 10.r,
|
||||||
),
|
),
|
||||||
imageList.length>0?
|
imageList.length > 0
|
||||||
Expanded(
|
? Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
|
@ -108,7 +123,7 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
builder: (BuildContext context, int index) {
|
builder: (BuildContext context, int index) {
|
||||||
final Items item = imageList[index];
|
final Items item = imageList[index];
|
||||||
return PhotoViewGalleryPageOptions(
|
return PhotoViewGalleryPageOptions(
|
||||||
imageProvider: NetworkImage(item.questionPicture),
|
imageProvider: NetworkImage(item.questionPicture!),
|
||||||
heroAttributes: PhotoViewHeroAttributes(tag: item.id),
|
heroAttributes: PhotoViewHeroAttributes(tag: item.id),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
@ -121,11 +136,12 @@ class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
):Padding(
|
)
|
||||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||||
child: MyEmptyWidget(),
|
child: MyEmptyWidget(),
|
||||||
),
|
),
|
||||||
if (imageList.length > 0)
|
if (imageList.length > 0)
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,16 @@ part 'job_favorite.g.dart';
|
||||||
/// 作业收藏学生名单列表
|
/// 作业收藏学生名单列表
|
||||||
class JobFavorite extends StatefulWidget {
|
class JobFavorite extends StatefulWidget {
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final int schoolId;
|
final int? schoolId;
|
||||||
final int gradeId;
|
final int? gradeId;
|
||||||
final String className;
|
final String? className;
|
||||||
final String jobName;
|
final String jobName;
|
||||||
|
|
||||||
const JobFavorite({
|
const JobFavorite({
|
||||||
required this.jobId,
|
required this.jobId,
|
||||||
required this.schoolId,
|
this.schoolId,
|
||||||
required this.gradeId,
|
this.gradeId,
|
||||||
required this.className,
|
this.className,
|
||||||
required this.jobName,
|
required this.jobName,
|
||||||
super.key,
|
super.key,
|
||||||
});
|
});
|
||||||
|
|
@ -43,6 +43,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
JobReportJoinClass? classData;
|
JobReportJoinClass? classData;
|
||||||
late String loginName;
|
late String loginName;
|
||||||
final int pageSize = 100;
|
final int pageSize = 100;
|
||||||
|
String className = '-1';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -55,6 +56,10 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
loginName = userInfo['loginName'];
|
loginName = userInfo['loginName'];
|
||||||
});
|
});
|
||||||
});*/
|
});*/
|
||||||
|
if(widget.className != null){
|
||||||
|
className = widget.className!;
|
||||||
|
}
|
||||||
|
|
||||||
getInvolveClasses();
|
getInvolveClasses();
|
||||||
_future = getData();
|
_future = getData();
|
||||||
}
|
}
|
||||||
|
|
@ -62,7 +67,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
Future<List<Items>> getData() async {
|
Future<List<Items>> getData() async {
|
||||||
var _client = await getClient();
|
var _client = await getClient();
|
||||||
var result =
|
var result =
|
||||||
await _client.getListOfJobFavorites(widget.jobId, widget.jobName, widget.className, pageSize);
|
await _client.getListOfJobFavorites(widget.jobId, widget.jobName, className == '全部'?'':className, pageSize);
|
||||||
return result.data!.items;
|
return result.data!.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,7 +103,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
|
|
||||||
deleteFav(Items student) async{
|
deleteFav(Items student) async{
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult res = await _client.getJobDeFavorites(widget.jobId,student.studentId,student.questionPage);
|
BaseStructureResult res = await _client.getJobDeFavorites(widget.jobId,student.studentId,student.questionPage!);
|
||||||
if(res.success){
|
if(res.success){
|
||||||
_future = getData();
|
_future = getData();
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -140,15 +145,18 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
(List<Items>? datas) {
|
(List<Items>? datas) {
|
||||||
if (datas == null)
|
if (datas == null)
|
||||||
return Container(
|
return Container(
|
||||||
|
child: InkWell(
|
||||||
|
onTap: (){
|
||||||
|
toUpState(setState, () => _future = getData(), mounted);
|
||||||
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: quickText('请求错误'),
|
child: quickText('请求错误,点击再次发起请求'),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
List pageList = [];
|
List pageList = [];
|
||||||
List groupList = [];
|
List groupList = [];
|
||||||
String name = '';
|
|
||||||
if (datas!.length > 0) {
|
if (datas!.length > 0) {
|
||||||
name = datas[0].jobName;
|
|
||||||
for (var item in datas) {
|
for (var item in datas) {
|
||||||
pageList.add(item.questionPage);
|
pageList.add(item.questionPage);
|
||||||
}
|
}
|
||||||
|
|
@ -169,7 +177,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
name,
|
widget.jobName,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C)),
|
style: TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C)),
|
||||||
),
|
),
|
||||||
// 下拉框
|
// 下拉框
|
||||||
|
|
@ -180,6 +188,7 @@ class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||||
$classSelection(involveClasses, classData, call: (JobReportJoinClass _classData) {
|
$classSelection(involveClasses, classData, call: (JobReportJoinClass _classData) {
|
||||||
classData = _classData;
|
classData = _classData;
|
||||||
if (_classData.gradeId == -1) classData = null;
|
if (_classData.gradeId == -1) classData = null;
|
||||||
|
className = _classData.className;
|
||||||
_future = getData();
|
_future = getData();
|
||||||
toUpState(setState, () {}, mounted);
|
toUpState(setState, () {}, mounted);
|
||||||
}),
|
}),
|
||||||
|
|
@ -376,6 +385,7 @@ Widget $classSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinCl
|
||||||
onChanged: (String? value) {
|
onChanged: (String? value) {
|
||||||
if (value == null) return;
|
if (value == null) return;
|
||||||
call(involveClasses.firstWhere((element) => element.uniqueId == value));
|
call(involveClasses.firstWhere((element) => element.uniqueId == value));
|
||||||
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||||
import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/quick_student_data_table.dart';
|
import 'package:marking_app/pages/homework_correction/widget/quick_student_data_table.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
|
@ -17,14 +16,23 @@ import 'package:percent_indicator/linear_percent_indicator.dart';
|
||||||
class QuickDataCheckPage extends StatefulWidget {
|
class QuickDataCheckPage extends StatefulWidget {
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final String className;
|
final String className;
|
||||||
|
final int? schoolId;
|
||||||
|
final int? gradeId;
|
||||||
|
|
||||||
const QuickDataCheckPage({Key? key, required this.jobId,required this.className}) : super(key: key);
|
const QuickDataCheckPage(
|
||||||
|
{Key? key,
|
||||||
|
required this.jobId,
|
||||||
|
required this.className,
|
||||||
|
this.schoolId,
|
||||||
|
this.gradeId})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
|
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixin {
|
class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
|
with CommonMixin {
|
||||||
JobDataReport? jobData;
|
JobDataReport? jobData;
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -37,7 +45,14 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
Map<String, dynamic> params = {};
|
Map<String, dynamic> params = {};
|
||||||
params['jobid'] = widget.jobId;
|
params['jobid'] = widget.jobId;
|
||||||
print(widget.jobId);
|
params['className'] = widget.className;
|
||||||
|
if (widget.schoolId != null) {
|
||||||
|
params['schoolId'] = widget.schoolId;
|
||||||
|
}
|
||||||
|
if (widget.gradeId != null) {
|
||||||
|
params['gradeId'] = widget.gradeId;
|
||||||
|
}
|
||||||
|
|
||||||
BaseStructureResult<JobDataReport?> data =
|
BaseStructureResult<JobDataReport?> data =
|
||||||
await _client.getJobDataCenterReport(params);
|
await _client.getJobDataCenterReport(params);
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
|
|
@ -46,8 +61,6 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
jobData = data.data;
|
jobData = data.data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -91,8 +104,9 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.r),
|
SizedBox(height: 10.r),
|
||||||
jobData != null?
|
jobData != null
|
||||||
Expanded(child: SingleChildScrollView(
|
? Expanded(
|
||||||
|
child: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
|
|
@ -110,17 +124,21 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
widget.className,
|
widget.className,
|
||||||
style: TextStyle(fontSize: 14.r, color: Colors.white),
|
style: TextStyle(
|
||||||
|
fontSize: 14.r, color: Colors.white),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 15.r),
|
padding: EdgeInsets.symmetric(
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
vertical: 10.r, horizontal: 15.r),
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
vertical: 10.r, horizontal: 14.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.r))),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -132,8 +150,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
height: 14.r,
|
height: 14.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF4CC793),
|
color: Color(0xFF4CC793),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.all(
|
||||||
BorderRadius.all(Radius.circular(7.r))),
|
Radius.circular(7.r))),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 6.r,
|
width: 6.r,
|
||||||
|
|
@ -141,7 +159,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
Text(
|
Text(
|
||||||
'已提交',
|
'已提交',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp, color: Color(0xFF333333)),
|
fontSize: 12.sp,
|
||||||
|
color: Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 35.r,
|
width: 35.r,
|
||||||
|
|
@ -151,8 +170,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
height: 14.r,
|
height: 14.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0xFF6888FD),
|
color: Color(0xFF6888FD),
|
||||||
borderRadius:
|
borderRadius: BorderRadius.all(
|
||||||
BorderRadius.all(Radius.circular(7.r))),
|
Radius.circular(7.r))),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 6.r,
|
width: 6.r,
|
||||||
|
|
@ -160,7 +179,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
Text(
|
Text(
|
||||||
'未提交',
|
'未提交',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp, color: Color(0xFF333333)),
|
fontSize: 12.sp,
|
||||||
|
color: Color(0xFF333333)),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -171,12 +191,19 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
PieChartData(
|
PieChartData(
|
||||||
borderData: FlBorderData(show: false),
|
borderData: FlBorderData(show: false),
|
||||||
sectionsSpace: 0,
|
sectionsSpace: 0,
|
||||||
centerSpaceRadius: MediaQuery.of(context).size.width * 0.1,
|
centerSpaceRadius:
|
||||||
|
MediaQuery.of(context).size.width * 0.1,
|
||||||
sections: [
|
sections: [
|
||||||
PieChartSectionData(
|
PieChartSectionData(
|
||||||
color: Color(0xFF4CC793),
|
color: Color(0xFF4CC793),
|
||||||
value: jobData!.validCount/(jobData!.validCount+jobData!.noAnswerCount) * 100,
|
value: jobData!.validCount /
|
||||||
radius: MediaQuery.of(context).size.width * 0.1 + 5,
|
(jobData!.validCount +
|
||||||
|
jobData!.noAnswerCount) *
|
||||||
|
100,
|
||||||
|
radius:
|
||||||
|
MediaQuery.of(context).size.width *
|
||||||
|
0.1 +
|
||||||
|
5,
|
||||||
title: '${jobData!.validCount}人',
|
title: '${jobData!.validCount}人',
|
||||||
titleStyle: TextStyle(
|
titleStyle: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
|
|
@ -185,8 +212,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
),
|
),
|
||||||
PieChartSectionData(
|
PieChartSectionData(
|
||||||
color: Color(0xFF6888FD),
|
color: Color(0xFF6888FD),
|
||||||
value: jobData!.noAnswerCount/(jobData!.validCount+jobData!.noAnswerCount) * 100,
|
value: jobData!.noAnswerCount /
|
||||||
radius: MediaQuery.of(context).size.width * 0.1,
|
(jobData!.validCount +
|
||||||
|
jobData!.noAnswerCount) *
|
||||||
|
100,
|
||||||
|
radius:
|
||||||
|
MediaQuery.of(context).size.width *
|
||||||
|
0.1,
|
||||||
title: '${jobData!.noAnswerCount}人',
|
title: '${jobData!.noAnswerCount}人',
|
||||||
titleStyle: TextStyle(
|
titleStyle: TextStyle(
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
|
|
@ -199,22 +231,27 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
),
|
),
|
||||||
// 客观进度条
|
// 客观进度条
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题答题进度',
|
'客观题答题进度',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
fontSize: 10.sp,
|
||||||
|
color: Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
Text('${doubleToStringAsFixed(jobData!.kgValidRate)}%',
|
Text(
|
||||||
|
'${doubleToStringAsFixed(jobData!.kgValidRate)}%',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10.sp, color: Color(0xFF333333)),
|
fontSize: 10.sp,
|
||||||
|
color: Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 6.r),
|
SizedBox(height: 6.r),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 10,
|
flex: 10,
|
||||||
|
|
@ -233,23 +270,27 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
SizedBox(height: 20.r),
|
SizedBox(height: 20.r),
|
||||||
// 主观进度条
|
// 主观进度条
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'主观题答题进度',
|
'主观题答题进度',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
fontSize: 10.sp,
|
||||||
|
color: Color(0xFF8B8B8B)),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${doubleToStringAsFixed(jobData!.zgValidRate)}%',
|
'${doubleToStringAsFixed(jobData!.zgValidRate)}%',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 10.sp, color: Color(0xFF333333)),
|
fontSize: 10.sp,
|
||||||
|
color: Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 6.r),
|
SizedBox(height: 6.r),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment:
|
||||||
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 10,
|
flex: 10,
|
||||||
|
|
@ -269,11 +310,14 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
padding: EdgeInsets.symmetric(
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
vertical: 10.r, horizontal: 10.r),
|
||||||
|
margin: EdgeInsets.symmetric(
|
||||||
|
vertical: 10.r, horizontal: 14.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
borderRadius:
|
||||||
|
BorderRadius.all(Radius.circular(6.r))),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
|
|
@ -293,7 +337,8 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
Text(
|
Text(
|
||||||
'未提交排序',
|
'未提交排序',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp, color: Color(0xFF6888FD)),
|
fontSize: 12.sp,
|
||||||
|
color: Color(0xFF6888FD)),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -306,11 +351,22 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.r,),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: jobData!.studentDetails.length>5?350.r:jobData!.studentDetails.length * 50.r + 40.r,
|
height: 10.r,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: jobData!.studentDetails.length > 5
|
||||||
|
? 350.r
|
||||||
|
: jobData!.studentDetails.length * 50.r +
|
||||||
|
40.r,
|
||||||
child: QuickStudentDataTable(
|
child: QuickStudentDataTable(
|
||||||
headList: ['学生姓名','客观题','主观题','客观题错题','主观题错题'],
|
headList: [
|
||||||
|
'学生姓名',
|
||||||
|
'客观题',
|
||||||
|
'主观题',
|
||||||
|
'客观题错题',
|
||||||
|
'主观题错题'
|
||||||
|
],
|
||||||
bodyList: jobData!.studentDetails,
|
bodyList: jobData!.studentDetails,
|
||||||
jobId: widget.jobId,
|
jobId: widget.jobId,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
|
|
@ -322,8 +378,10 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixi
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)):Padding(
|
))
|
||||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
: Padding(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||||
child: MyEmptyWidget(),
|
child: MyEmptyWidget(),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,15 @@ class RouterManager {
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
String className = params['className']![0];
|
String className = params['className']![0];
|
||||||
return QuickDataCheckPage(jobId: jobId, className: className);
|
int? schoolId;
|
||||||
|
if (params['schoolId'] != null && params['schoolId']![0] != null && params['schoolId']![0] != 'null') {
|
||||||
|
schoolId = int.parse(params['schoolId']![0]);
|
||||||
|
}
|
||||||
|
int? gradeId;
|
||||||
|
if (params['gradeId'] != null && params['gradeId']![0] != null && params['gradeId']![0] != 'null') {
|
||||||
|
gradeId = int.parse(params['gradeId']![0]);
|
||||||
|
}
|
||||||
|
return QuickDataCheckPage(jobId: jobId, className: className,schoolId:schoolId,gradeId:gradeId);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -309,10 +317,16 @@ class RouterManager {
|
||||||
static final _jobFavoritePagePathHandler = Handler(
|
static final _jobFavoritePagePathHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
int gradeId = int.parse(params['gradeId']![0]);
|
|
||||||
int schoolId = int.parse(params['schoolId']![0]);
|
|
||||||
String className = params['className']![0];
|
|
||||||
String jobName = params['jobName']![0];
|
String jobName = params['jobName']![0];
|
||||||
|
String? className = params['className']![0];
|
||||||
|
int? schoolId;
|
||||||
|
if (params['schoolId'] != null && params['schoolId']![0] != null && params['schoolId']![0] != 'null') {
|
||||||
|
schoolId = int.parse(params['schoolId']![0]);
|
||||||
|
}
|
||||||
|
int? gradeId;
|
||||||
|
if (params['gradeId'] != null && params['gradeId']![0] != null && params['gradeId']![0] != 'null') {
|
||||||
|
gradeId = int.parse(params['gradeId']![0]);
|
||||||
|
}
|
||||||
return JobFavorite(jobId: jobId, gradeId: gradeId, schoolId: schoolId, className: className,jobName:jobName);
|
return JobFavorite(jobId: jobId, gradeId: gradeId, schoolId: schoolId, className: className,jobName:jobName);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ abstract class RestClient {
|
||||||
Future<BaseStructureResult<JobFavStudent>> getListOfJobFavorites(
|
Future<BaseStructureResult<JobFavStudent>> getListOfJobFavorites(
|
||||||
@the_retrofit.Query("JobId") int jobId,
|
@the_retrofit.Query("JobId") int jobId,
|
||||||
@the_retrofit.Query("JobName") String jobName,
|
@the_retrofit.Query("JobName") String jobName,
|
||||||
@the_retrofit.Query("className") String className,
|
@the_retrofit.Query("className") String? className,
|
||||||
@the_retrofit.Query("PageSize") int pageSize,
|
@the_retrofit.Query("PageSize") int pageSize,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue