Compare commits

..

No commits in common. "6d7857ccefc01348437030e821b391ff8800a594" and "705945c270312c2767e5e197d7cb714b3f4e41d1" have entirely different histories.

16 changed files with 159 additions and 698 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

View File

@ -316,7 +316,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -352,7 +351,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 18;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -360,7 +359,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.98;
MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -396,7 +395,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -452,7 +450,6 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -490,7 +487,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 18;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -498,7 +495,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.98;
MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -520,7 +517,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 18;
CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@ -528,7 +525,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.98;
MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -18,13 +18,13 @@ class RequestConfig {
static const devBaseUrl = "https://mhw.qwit.top"; //
static const devLoginBaseUrl = "https://mhw.qwit.top"; //
static const devBaseUrlOfReport = "https://mhw.qwit.top"; //
// static const proBaseUrlOfHomework = "https://mhw.qwit.top/hw"; //
static const proBaseUrlOfHomework = "https://mhw.qwit.top/hw"; //
/* 正式地址 */
static const proBaseUrl = "https://mk-hw.23544.com"; //
static const proLoginBaseUrl = "https://mk-hw.23544.com"; //
static const proBaseUrlOfReport = "https://dc-api.23544.com"; //
static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; //
// static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; //
static const hwProxyKeywords = "/hw"; //
@ -47,10 +47,7 @@ class RequestConfig {
//
//
RequestConfig._(
{required this.baseUrl,
required this.baseUrlOfReport,
required this.loginBaseUrl});
RequestConfig._({required this.baseUrl, required this.baseUrlOfReport, required this.loginBaseUrl});
factory RequestConfig() {
if (_instance == null) {
@ -70,10 +67,8 @@ class RequestConfig {
newBaseUrlOfReport = devBaseUrlOfReport;
newLoginBaseUrl = devLoginBaseUrl;
}
_instance = RequestConfig._(
baseUrl: newBaseUrl,
baseUrlOfReport: newBaseUrlOfReport,
loginBaseUrl: newLoginBaseUrl);
_instance =
RequestConfig._(baseUrl: newBaseUrl, baseUrlOfReport: newBaseUrlOfReport, loginBaseUrl: newLoginBaseUrl);
}
return _instance!;
}

View File

@ -2,8 +2,10 @@ import 'package:json_annotation/json_annotation.dart';
part 'job_data_report.g.dart';
@JsonSerializable()
class JobDataReport extends Object {
@JsonKey(name: 'jobId')
int jobId;
@ -34,31 +36,21 @@ class JobDataReport extends Object {
@JsonKey(name: 'zgQuestionCount')
int zgQuestionCount;
bool sortType; // true false
bool sortLevel;
bool hasUnrated;//
@JsonKey(name: 'studentDetails')
List<StudentDetails> studentDetails;
JobDataReport(this.jobId, this.jobName, this.gradeName, this.className, this.validCount, this.noAnswerCount,
this.kgValidRate, this.kgQuestionCount, this.zgValidRate, this.zgQuestionCount, this.studentDetails,
[this.sortType = true,this.sortLevel = false,this.hasUnrated = false]) {
this.studentDetails.sort((a, b) {
int num1 = a.kgValidRate + a.zgValidRate;
int num2 = b.kgValidRate + b.zgValidRate;
return num2.compareTo(num1);
});
}
JobDataReport(this.jobId,this.jobName,this.gradeName,this.className,this.validCount,this.noAnswerCount,this.kgValidRate,this.kgQuestionCount,this.zgValidRate,this.zgQuestionCount,this.studentDetails,);
factory JobDataReport.fromJson(Map<String, dynamic> srcJson) => _$JobDataReportFromJson(srcJson);
Map<String, dynamic> toJson() => _$JobDataReportToJson(this);
}
@JsonSerializable()
class StudentDetails extends Object {
@JsonKey(name: 'studentId')
int? studentId;
@ -83,44 +75,18 @@ class StudentDetails extends Object {
@JsonKey(name: 'zgDetails')
List<KgDetails> zgDetails;
@JsonKey(name: 'readLevel')
int? readLevel;
@JsonKey(name: 'kgError')
int kgError;
@JsonKey(name: 'zgError')
int zgError;
@JsonKey(name: 'kgCorrect')
int kgCorrect;
@JsonKey(name: 'zgCorrect')
int zgCorrect;
@JsonKey(name: 'unrated')
int unrated;
StudentDetails(
this.studentId,
this.studentName,
this.kgValidCount,
this.kgValidRate,
this.zgValidCount,
this.zgValidRate,
this.kgDetails,
this.zgDetails,
this.readLevel,
[this.kgError = 0,this.kgCorrect = 0,this.zgCorrect = 0,this.zgError = 0,this.unrated = 0]
);
StudentDetails(this.studentId,this.studentName,this.kgValidCount,this.kgValidRate,this.zgValidCount,this.zgValidRate,this.kgDetails,this.zgDetails,);
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
Map<String, dynamic> toJson() => _$StudentDetailsToJson(this);
}
@JsonSerializable()
class KgDetails extends Object {
@JsonKey(name: 'questionNo')
String questionNo;
@ -148,19 +114,12 @@ class KgDetails extends Object {
@JsonKey(name: 'score')
double? score;
KgDetails(
this.questionNo,
this.questionId,
this.partName,
this.state,
this.studentAnswer,
this.questionAnswer,
this.useTime,
this.annotateAnswers,
this.score,
);
KgDetails(this.questionNo,this.questionId,this.partName,this.state,this.studentAnswer,this.questionAnswer,this.useTime,this.annotateAnswers,this.score,);
factory KgDetails.fromJson(Map<String, dynamic> srcJson) => _$KgDetailsFromJson(srcJson);
Map<String, dynamic> toJson() => _$KgDetailsToJson(this);
}

View File

@ -339,8 +339,8 @@ class Details extends Object {
@JsonKey(name: 'validCount')
String validCount;
/* @JsonKey(name: 'validStudentNames')
List<String> validStudentNames;*/
@JsonKey(name: 'validStudentNames')
List<String> validStudentNames;
@JsonKey(name: 'correctRate')
int correctRate;
@ -357,13 +357,7 @@ class Details extends Object {
@JsonKey(name: 'priorityStudentNames')
List<String> priorityStudentNames;
@JsonKey(name: 'answerNgStudentNames')
List<String> answerNgStudentNames;
@JsonKey(name: 'noAnswerStudentNames')
List<String> noAnswerStudentNames;
Details(this.questionNo,this.questionId,this.partName,this.questionType,this.validRate,this.validCount,this.correctRate,this.questionAnswer,this.questionPicture,this.priorityGeneral,this.priorityStudentNames,this.answerNgStudentNames,this.noAnswerStudentNames);
Details(this.questionNo,this.questionId,this.partName,this.questionType,this.validRate,this.validCount,this.validStudentNames,this.correctRate,this.questionAnswer,this.questionPicture,this.priorityGeneral,this.priorityStudentNames,);
factory Details.fromJson(Map<String, dynamic> srcJson) => _$DetailsFromJson(srcJson);

View File

@ -680,25 +680,18 @@ typedef ShowStudentsCall = Future<void> Function(
String? className,
]);
class FavoriteButton extends StatefulWidget {
///
class FavoriteButton extends HookWidget with CommonMixin {
final int jobId;
final String jobName;
EdgeInsets? margin;
final bool isRow;
final EdgeInsets? margin;
const FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
@override
State<FavoriteButton> createState() => _FavoriteButtonState();
}
class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
late Future<int> _future; //
FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
Future<int> getInvolveClasses() async {
print('我的收藏请求数据');
try {
RestClient _client = await getClient();
var result = await _client.getListOfJobFavoriteNumber(widget.jobId);
var result = await _client.getListOfJobFavoriteNumber(jobId);
if (result.success && (result.data?.isNotEmpty ?? false)) {
return result.data!.map((e) => e.count).reduce((value, element) => value + element);
@ -711,37 +704,26 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
//
void bookmarks(BuildContext context) {
RouterManager.router
.navigateTo(
RouterManager.router.navigateTo(
context,
RouterManager.jobFavoritePagePath + '?jobId=${widget.jobId}&jobName=${Uri.encodeComponent(widget.jobName)}',
RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
transition: getTransition(),
)
.then((value) {
toUpState(setState, () {}, mounted);
});
}
@override
void initState() {
super.initState();
// _future = getInvolveClasses();
);
}
@override
Widget build(BuildContext context) {
var margin = widget.margin ?? EdgeInsets.only(top: 15.h);
return FutureBuilder<int>(
builder: (context, AsyncSnapshot<int> async) {
//widget
if (async.connectionState == ConnectionState.active || async.connectionState == ConnectionState.waiting) {
return Container();
}
if (async.connectionState == ConnectionState.done) {
var favoriteNumber = async.data;
if (favoriteNumber == null || favoriteNumber <= 0) return Container();
return widget.isRow
var favoriteNumber = useState(0);
useEffect(() {
getInvolveClasses().then((value) {
var favoriteCount = favoriteNumber.value;
if (favoriteCount != value) favoriteNumber.value = value;
});
return () {};
}, []);
if (favoriteNumber.value <= 0) return Container();
margin ??= EdgeInsets.only(top: 15.h);
return isRow
? Row(
children: [
Container(
@ -756,8 +738,8 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child:
quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
child: quickText('收藏夹(${favoriteNumber.value})',
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
@ -777,105 +759,11 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
child:
quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
);
}
return Container();
},
future: getInvolveClasses(),
);
}
}
///
// class FavoriteButton extends HookWidget with CommonMixin {
// final int jobId;
// final String jobName;
// EdgeInsets? margin;
// final bool isRow;
// FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
// Future<int> getInvolveClasses() async {
// print('我的收藏请求数据');
// try {
// RestClient _client = await getClient();
// var result = await _client.getListOfJobFavoriteNumber(jobId);
// if (result.success && (result.data?.isNotEmpty ?? false)) {
// return result.data!.map((e) => e.count).reduce((value, element) => value + element);
// }
// } catch (e) {
// print(e);
// }
// return 0;
// }
// //
// void bookmarks(BuildContext context) {
// RouterManager.router.navigateTo(
// context,
// RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
// transition: getTransition(),
// );
// }
// @override
// Widget build(BuildContext context) {
// var favoriteNumber = useState(0);
// useEffect(() {
// getInvolveClasses().then((value) {
// var favoriteCount = favoriteNumber.value;
// if (favoriteCount != value) favoriteNumber.value = value;
// });
// return () {};
// }, []);
// if (favoriteNumber.value <= 0) return Container();
// margin ??= EdgeInsets.only(top: 15.h);
// return isRow
// ? Row(
// children: [
// Container(
// margin: margin,
// child: Material(
// color: Color.fromRGBO(244, 244, 244, 1),
// borderRadius: BorderRadius.circular(20.r),
// child: InkWell(
// onTap: () => bookmarks(context),
// borderRadius: BorderRadius.circular(8.r),
// child: Container(
// alignment: Alignment.center,
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
// child: quickText('收藏夹(${favoriteNumber.value})',
// size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
// ),
// ),
// ),
// ),
// Expanded(child: SizedBox())
// ],
// )
// : Container(
// margin: margin,
// child: Material(
// color: Color.fromRGBO(244, 244, 244, 1),
// borderRadius: BorderRadius.circular(20.r),
// child: InkWell(
// onTap: () => bookmarks(context),
// borderRadius: BorderRadius.circular(8.r),
// child: Container(
// alignment: Alignment.center,
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
// child:
// quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
// ),
// ),
// ),
// );
// }
// }

View File

@ -356,7 +356,7 @@ Widget $easyRefresh({
crossAxisCount: 2, //widget
mainAxisSpacing: 10.h,
crossAxisSpacing: 6.w,
childAspectRatio: 1.81 //1widget
childAspectRatio: 2.0 //1widget
),
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
)
@ -428,7 +428,8 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
),
Expanded(
child: quickText(jobTaskItem.title, size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
child: quickText(jobTaskItem.title,
size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500),
)
],
),

View File

@ -1494,7 +1494,7 @@ Widget $personnelDataOverview(BuildContext context, List<StudentAnswerInfos> stu
return Container(
width: double.infinity,
height: isPad() ? 290.h : 264.h,
height: isPad() ? 290 : 264.h,
margin: EdgeInsets.only(top: 20.h),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),

View File

@ -57,14 +57,11 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
RestClient _client = await getClient();
BaseStructureResult<List<JobFavoriteModel>> result = await _client.getListOfJobFavoriteNumber(widget.jobId);
if (result.success) {
if (result.data?.isEmpty ?? true) {
favoriteMap = {};
}
result.data?.forEach((e) {
favoriteMap['${e.schoolId}+${e.gradeId}+${e.className}'] = e.count;
});
toUpState(setState, () {}, mounted);
} else {}
}
}
Future<List<MarkingTasks>?> getData() async {
@ -271,17 +268,12 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
//
void bookmarks(MarkingTasks task) {
RouterManager.router
.navigateTo(
RouterManager.router.navigateTo(
context,
RouterManager.jobFavoritePagePath +
'?className=${Uri.encodeComponent(task.className)}&jobId=${widget.jobId}&schoolId=${task.dpcSchoolId}&gradeId=${task.dpcGradeId}&jobName=${Uri.encodeComponent(widget.jobName)}',
transition: getTransition(),
)
.then((value) async {
_future = getData()
..then((value) => getListOfJobFavoritesData().then((value) => toUpState(setState, () {}, mounted)));
});
);
}
//

View File

@ -57,37 +57,6 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
await _client.getJobDataCenterReport(params);
EasyLoading.dismiss();
if (data.code == 200) {
int totalUnrated = 0;
data.data!.studentDetails.forEach((element) {
element.kgError = 0;
element.kgCorrect = 0;
element.zgError = 0;
element.zgCorrect = 0;
element.kgDetails.forEach((item) {
if (item.state == 1) {
element.kgError = element.kgError + 1;
}
if (item.state == 2) {
element.kgCorrect = element.kgCorrect + 1;
}
});
element.zgDetails.forEach((item) {
if (item.state == 1) {
element.zgError = element.zgError + 1;
}
if (item.state == 2) {
element.zgCorrect = element.zgCorrect + 1;
}
if (item.state == 3) {
element.unrated = element.unrated + 1;
totalUnrated = element.unrated;
}
});
});
if (totalUnrated > 0) {
data.data!.hasUnrated = true;
}
setState(() {
jobData = data.data;
});
@ -136,9 +105,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
style: TextStyle(fontSize: 14.sp, color: Colors.white),
)),
)),
SizedBox(
width: 24.r,
),
SizedBox(width: 24.r,),
],
),
SizedBox(height: 10.r),
@ -180,9 +147,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SizedBox(
height: 10.r,
),
SizedBox(height: 10.r,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@ -360,128 +325,41 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
borderRadius:
BorderRadius.all(Radius.circular(6.r))),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
InkWell(
onTap: (){
if (jobData == null) return;
if (!jobData!.sortType) {
onTap: () {
jobData!.studentDetails.sort((a, b) {
int num1 =
a.kgValidRate + a.zgValidRate;
int num2 =
b.kgValidRate + b.zgValidRate;
int num1 = a.kgValidRate + a.zgValidRate;
int num2 = b.kgValidRate + b.zgValidRate;
return num2.compareTo(num1);
});
} else {
jobData!.studentDetails.sort((a, b) {
int num1 =
a.kgValidRate + a.zgValidRate;
int num2 =
b.kgValidRate + b.zgValidRate;
return num1.compareTo(num2);
});
}
jobData!.sortType = !jobData!.sortType;
setState(() {
jobData!.sortLevel = false;
jobData!.studentDetails;
});
},
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
if(!jobData!.sortType)
Image.asset(
'assets/images/no_check_icon.png',
width: 16.r,
height: 16.r,
),
if(jobData!.sortType)
Image.asset(
'assets/images/check_icon.png',
width: 16.r,
height: 16.r,
),
SizedBox(width: 5.r,),
Text(
'未提交排序',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF707070)),
color: Color(0xFF6888FD)),
),
],
),
),
SizedBox(
width: 20.r,
width: 10.r,
),
InkWell(
onTap: (){
if (jobData == null) return;
if (!jobData!.sortLevel) {
jobData!.studentDetails.sort((a, b) {
return b.readLevel!
.compareTo(a.readLevel!);
});
} else {
jobData!.studentDetails.sort((a, b) {
return a.readLevel!
.compareTo(b.readLevel!);
});
}
jobData!.sortLevel =
!jobData!.sortLevel;
setState(() {
jobData!.sortType = false;
jobData!.studentDetails;
});
},
child: Row(
children: [
if(!jobData!.sortLevel)
Image.asset(
'assets/images/no_check_icon.png',
width: 16.r,
height: 16.r,
),
if(jobData!.sortLevel)
Image.asset(
'assets/images/check_icon.png',
width: 16.r,
height: 16.r,
),
SizedBox(width: 5.r,),
Text(
'未批阅排序',
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF707070)),
'assets/images/sort_icon.png',
width: 14.r,
height: 14.r,
),
],
),
),
],
),
SizedBox(
height: 10.r,
),
Text(
'注:绿色代表正确,红色代表错误,白色代表已作答未批阅,灰色代表未做',
style: TextStyle(
fontSize: 8.sp, color: Color(0xFF717171)),
),
SizedBox(
height: 5.r,
),
SizedBox(
height: jobData!.studentDetails.length > 5
? 350.r
@ -492,17 +370,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
'学生姓名',
'客观题',
'主观题',
'客观题详情',
'主观题详情',
'未批阅'
'客观题错题',
'主观题错题'
],
bodyList: jobData!.studentDetails,
jobId: widget.jobId,
fixedRows: 1,
fixedCols: 0,
hasUnrated: jobData!.hasUnrated,
kgCount: jobData!.kgQuestionCount,
zgCount: jobData!.zgQuestionCount,
),
)
],

View File

@ -11,18 +11,12 @@ class QuickStudentDataTable extends StatefulWidget {
final int? fixedRows;
final int? fixedCols;
final int jobId;
final bool hasUnrated;
final int kgCount;
final int zgCount;
const QuickStudentDataTable({
Key? key,
required this.headList,
required this.bodyList,
required this.jobId,
required this.hasUnrated,
required this.kgCount,
required this.zgCount,
this.fixedCols = 0,
this.fixedRows = 0,
}) : super(key: key);
@ -96,39 +90,17 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'${item.kgCorrect}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
Text(
'/',
child: Text(
'${(item.kgValidRate / 100 * item.kgValidCount).toInt()}/${item.kgValidCount}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
Text(
'${item.kgError}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFFFF7474))),
],
),
),
)),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'${item.zgCorrect}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
Text(
'/',
child: Text(
'${(item.zgValidRate / 100 * item.zgValidCount).toInt()}/${item.zgValidCount}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
Text(
'${item.zgError}',
style: TextStyle(fontSize: 12.sp, color: Color(0xFFFF7474))),
],
),
),
)),
DataCell(
@ -147,8 +119,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? Color(0xFFD3D3D3)
: kgInfo.state == 3?Colors.white:kgInfo.state == 1
? Colors.white
: kgInfo.state == 1
? Color(0xFFFF7474)
: Color(0xFF4CC793),
borderRadius: BorderRadius.all(Radius.circular(7.r))),
@ -182,8 +154,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
height: 14.r,
decoration: BoxDecoration(
color: kgInfo.state == 0
? Color(0xFFD3D3D3)
: kgInfo.state == 3?Colors.white:kgInfo.state == 1
? Colors.white
: kgInfo.state == 1
? Color(0xFFFF7474)
: Color(0xFF4CC793),
borderRadius: BorderRadius.all(Radius.circular(7.r))),
@ -201,24 +173,12 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
),
),
),
if(widget.hasUnrated)
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text('${item.unrated}',
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
),
)),
],
);
}
@override
Widget build(BuildContext context) {
if(!widget.hasUnrated){
widget.headList.removeLast();
}
return DataTable2(
dividerThickness: 0,
scrollController: _controller,
@ -256,39 +216,13 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
// onSelectAll: (val) => setState(() => selectAll(val)),
columns: List.generate(widget.headList.length, (index) {
var item = widget.headList[index];
return index == 1?DataColumn2(
label: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(item,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
Text('(${widget.kgCount})',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
]
),
// size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
):index == 2?DataColumn2(
label: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(item,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
Text('(${widget.zgCount})',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
]
),
// size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
):DataColumn2(
return DataColumn2(
label: Center(
child: Text(item,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
),
// size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
);
}),
rows: List<DataRow>.generate(widget.bodyList.length,

View File

@ -2,7 +2,6 @@ import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
import 'package:marking_app/utils/toast_utils.dart';
import 'package:photo_view/photo_view.dart';
@ -31,144 +30,6 @@ class _ReportTableState extends State<ReportTable> {
int? _sortColumnIndex;
bool _sortAscending = true;
void showPeopleListDialog(
{required BuildContext context, required String title, required String questionNo,required List arr,List? dcList}) {
print(dcList);
showDialog(
context: context,
builder: (BuildContext context) {
return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
contentPadding: EdgeInsets.all(20.r),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.r))),
content: SizedBox(
width: MediaQuery.of(context).size.width * 0.7,
height: MediaQuery.of(context).size.height * 0.7,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Center(
child: Text(
title,
style: TextStyle(
fontSize: 15.sp,
color: Color(0xFF3C3C3C),
fontWeight: FontWeight.w500),
),
),
SizedBox(
height: 5.r,
),
Row(
children: [
Text(
widget.isKG == true ? '主观题' : '客观题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF436CFF)),
),
Text(
'',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF436CFF)),
),
Text(
'$questionNo题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF436CFF)),
),
],
),
SizedBox(height: 15.r,),
dcList != null?Row(
children: [
Expanded(
flex: 1,
child: Center(child: Text('未作答人',style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),))),
Expanded(
flex: 1,
child: Center(child: Text('答错人',style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),))),
],
):Padding(padding: EdgeInsets.only(left: 15.r),child: Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),),),
SizedBox(height: 5.r,),
if(dcList != null)
Expanded(
child: ListView.builder(
shrinkWrap: true,
itemBuilder: (context,index){
var item = arr[index];
return Container(
padding: EdgeInsets.symmetric(vertical: 5.r),
color: index.isOdd?Colors.white:Color(0xFFF0F0F0),
child: Row(
children: [
Expanded(
flex:1,
child: Center(child: Text(item['noAnswerStudentNames'],style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),))),
Expanded(
flex:1,
child: Center(child: Text(item['answerNgStudentNames'],style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),))),
],
),
);
},itemCount: arr.length,),
)
else
arr.length>0?Expanded(
child: ListView.builder(
shrinkWrap: true,
itemBuilder: (context,index){
var item = arr[index];
return Container(
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 15.r),
color: index.isOdd?Colors.white:Color(0xFFF0F0F0),
child: Text(item,style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),),
);
},itemCount: arr.length,),
):MyEmptyWidget()
],
),
),
);
});
}
void zdHandle( BuildContext context, String title, String questionNo,List noAnswerStudentNames,List answerNgStudentNames){
List list = [];
if(noAnswerStudentNames.length>answerNgStudentNames.length){
for(int i = 0;i<answerNgStudentNames.length;i++){
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':answerNgStudentNames[i]};
list.add(obj);
}
for(int i = answerNgStudentNames.length ;i<noAnswerStudentNames.length;i++){
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':'-'};
list.add(obj);
}
}else{
for(int i = 0;i<noAnswerStudentNames.length;i++){
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':answerNgStudentNames[i]};
list.add(obj);
}
for(int i = noAnswerStudentNames.length ;i<answerNgStudentNames.length;i++){
var obj = {'noAnswerStudentNames':'-','answerNgStudentNames':answerNgStudentNames[i]};
list.add(obj);
}
print('list.length=${list.length}');
print('noAnswerStudentNames.length=${noAnswerStudentNames.length}');
print('answerNgStudentNames.length=${answerNgStudentNames.length}');
}
showPeopleListDialog(context:context, title:title, questionNo:questionNo,arr:list,dcList:[]);
}
void dcHandle( BuildContext context, String title, String questionNo,List arr){
showPeopleListDialog(context:context, title:title, questionNo:questionNo,arr: arr);
}
DataRow _getRow(int index, [Color? color]) {
assert(index >= 0);
var item = widget.bodyList[index];
@ -190,28 +51,11 @@ class _ReportTableState extends State<ReportTable> {
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
DataCell(InkWell(
onTap: () {
zdHandle(context, '作答人数', item.questionNo,item.noAnswerStudentNames,item.answerNgStudentNames);
},
child: Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(item.validCount,
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
Image.asset(
'assets/images/green_right_icon.png',
width: 12.r,
height: 12.r,
),
],
),
),
child: Text(item.validCount,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
),
)),
DataCell(Center(
@ -235,8 +79,8 @@ class _ReportTableState extends State<ReportTable> {
return Scaffold(
appBar: AppBar(),
body: PhotoView(
imageProvider:
NetworkImage(item.questionPicture!)),
imageProvider: NetworkImage(
item.questionPicture!)),
);
}),
);
@ -256,28 +100,11 @@ class _ReportTableState extends State<ReportTable> {
: Color(0xFF4CC793))),
),
)),
DataCell(InkWell(
onTap: (){
List<String> parts = item.priorityGeneral.split('');
dcHandle(context, '${parts[1]}', item.questionNo,item.priorityStudentNames);
},
child: Center(
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(item.priorityGeneral,
style:
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
Image.asset(
'assets/images/job_data_right_icon.png',
width: 10.r,
height: 10.r,
)
],
),
),
child: Text(item.priorityGeneral,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
),
)),
],

View File

@ -50,7 +50,7 @@ class _StudentKgTableState extends State<StudentKgTable> {
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionAnswer == null ?'':item.questionAnswer!,
child: Text(item.annotateAnswers == null ?'':item.annotateAnswers!,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),

View File

@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.98
version: 1.0.96
environment:
sdk: ">=2.17.1 <3.0.0"