Compare commits

..

No commits in common. "40ff80118c3bff4096a3d6bbd892ac1dc375d39b" and "6935ff13d43b179b613a9b4f78eaca7d1df78496" have entirely different histories.

24 changed files with 215 additions and 704 deletions

11
.gitignore vendored
View File

@ -187,14 +187,3 @@ marking_app/lib/pages/homework_correction/eventBus/job_notes_view_bus.g.dart
marking_app/lib/common/model/job/job_report_model.g.dart marking_app/lib/common/model/job/job_report_model.g.dart
marking_app/lib/common/model/job/job_report_join_class.g.dart marking_app/lib/common/model/job/job_report_join_class.g.dart
marking_app/lib/pages/homework_correction/job_report.g.dart marking_app/lib/pages/homework_correction/job_report.g.dart
marking_app/lib/common/model/report/detail_base_info.g.dart
marking_app/lib/common/model/report/exam_records_all.g.dart
marking_app/lib/common/model/report/exam_records_params.g.dart
marking_app/lib/common/model/report/exam_records.g.dart
marking_app/lib/common/model/report/question_know_point.g.dart
marking_app/lib/common/model/report/report_card_params.g.dart
marking_app/lib/common/model/report/report_card.g.dart
marking_app/lib/common/model/report/report_marking_detail_params.g.dart
marking_app/lib/common/model/report/report_marking_detail.g.dart
marking_app/lib/common/model/job/job_report_knowledge_model.g.dart
marking_app/lib/common/model/job/job_report_question_deatil_model.g.dart

View File

@ -15,13 +15,13 @@ class RequestConfig {
static const devLoginBaseUrl = "http://192.168.2.9:6400"; // static const devLoginBaseUrl = "http://192.168.2.9:6400"; //
static const devBaseUrlOfReport = "http://192.168.2.9:4000"; // */ static const devBaseUrlOfReport = "http://192.168.2.9:4000"; // */
static const devBaseUrl = "https://mk-hw.23544.com"; // static const devBaseUrl = "https://mk-api.23544.com/mb-cli"; //
static const devLoginBaseUrl = "https://mk-hw.23544.com"; // static const devLoginBaseUrl = "https://mk-api.23544.com"; //
static const devBaseUrlOfReport = "https://dc-api.23544.com"; // static const devBaseUrlOfReport = "https://dc-api.23544.com"; //
/* 正式地址 */ /* 正式地址 */
static const proBaseUrl = "https://mk-hw.23544.com"; // static const proBaseUrl = "https://mk-api.23544.com/mb-cli"; //
static const proLoginBaseUrl = "https://mk-hw.23544.com"; // static const proLoginBaseUrl = "https://mk-api.23544.com"; //
static const proBaseUrlOfReport = "https://dc-api.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"; //

View File

@ -2,18 +2,15 @@ import 'package:json_annotation/json_annotation.dart';
part 'job_concerned_with_student_params.g.dart'; part 'job_concerned_with_student_params.g.dart';
@JsonSerializable(includeIfNull: false) @JsonSerializable()
class JobConcernedWithStudentParams extends Object { class JobConcernedWithStudentParams extends Object {
@JsonKey(name: 'taskIds') @JsonKey(name: 'taskIds')
List<int> taskIds; List<int> taskIds;
@JsonKey(name: 'pageIndex')
int? pageIndex;
@JsonKey(name: 'isCommit') @JsonKey(name: 'isCommit')
bool? isCommit; bool? isCommit;
JobConcernedWithStudentParams(this.taskIds, {this.isCommit, this.pageIndex}); JobConcernedWithStudentParams(this.taskIds, {this.isCommit});
factory JobConcernedWithStudentParams.fromJson(Map<String, dynamic> srcJson) => factory JobConcernedWithStudentParams.fromJson(Map<String, dynamic> srcJson) =>
_$JobConcernedWithStudentParamsFromJson(srcJson); _$JobConcernedWithStudentParamsFromJson(srcJson);

View File

@ -1,13 +1,9 @@
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'package:uuid/uuid.dart';
part 'job_report_join_class.g.dart'; part 'job_report_join_class.g.dart';
@JsonSerializable() @JsonSerializable()
class JobReportJoinClass extends Object { class JobReportJoinClass extends Object {
@JsonKey(name: 'uniqueId')
String? uniqueId;
@JsonKey(name: 'schoolId') @JsonKey(name: 'schoolId')
int schoolId; int schoolId;
@ -32,11 +28,16 @@ class JobReportJoinClass extends Object {
@JsonKey(name: 'submitCount') @JsonKey(name: 'submitCount')
int submitCount; int submitCount;
JobReportJoinClass(this.schoolId, this.schoolName, this.gradeId, this.gradeName, this.graduationYear, this.className, JobReportJoinClass(
this.toBeSubmitCount, this.submitCount, this.schoolId,
[this.uniqueId]) { this.schoolName,
if (uniqueId == null) uniqueId = Uuid().v1(); this.gradeId,
} this.gradeName,
this.graduationYear,
this.className,
this.toBeSubmitCount,
this.submitCount,
);
factory JobReportJoinClass.fromJson(Map<String, dynamic> srcJson) => _$JobReportJoinClassFromJson(srcJson); factory JobReportJoinClass.fromJson(Map<String, dynamic> srcJson) => _$JobReportJoinClassFromJson(srcJson);

View File

@ -1,67 +0,0 @@
import 'package:json_annotation/json_annotation.dart';
part 'job_report_knowledge_model.g.dart';
@JsonSerializable()
class JobReportKnowledgeModel extends Object {
@JsonKey(name: 'schoolId')
int schoolId;
@JsonKey(name: 'schoolName')
String schoolName;
@JsonKey(name: 'gradeId')
int gradeId;
@JsonKey(name: 'gradeName')
String gradeName;
@JsonKey(name: 'className')
String className;
@JsonKey(name: 'rate')
double rate;
@JsonKey(name: 'ratio')
String ratio;
@JsonKey(name: 'noAnswerCount')
int noAnswerCount;
@JsonKey(name: 'studentReports')
List<StudentReports> studentReports;
JobReportKnowledgeModel(
this.schoolId,
this.schoolName,
this.gradeId,
this.gradeName,
this.className,
this.rate,
this.ratio,
this.noAnswerCount,
this.studentReports,
);
factory JobReportKnowledgeModel.fromJson(Map<String, dynamic> srcJson) => _$JobReportKnowledgeModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$JobReportKnowledgeModelToJson(this);
}
@JsonSerializable()
class StudentReports extends Object {
@JsonKey(name: 'studentName')
String studentName;
@JsonKey(name: 'pass')
bool pass;
StudentReports(
this.studentName,
this.pass,
);
factory StudentReports.fromJson(Map<String, dynamic> srcJson) => _$StudentReportsFromJson(srcJson);
Map<String, dynamic> toJson() => _$StudentReportsToJson(this);
}

View File

@ -1,7 +1,5 @@
import 'package:json_annotation/json_annotation.dart'; import 'package:json_annotation/json_annotation.dart';
import 'job_report_knowledge_model.dart';
part 'job_report_model.g.dart'; part 'job_report_model.g.dart';
@JsonSerializable() @JsonSerializable()
@ -51,22 +49,6 @@ class JobReportModel extends Object {
@JsonKey(name: 'overallTitles') @JsonKey(name: 'overallTitles')
List<OverallTitles> overallTitles; List<OverallTitles> overallTitles;
// --
@JsonKey(name: 'allpairsStudents')
List<StudentAnswerInfos>? allpairsStudents;
// --
@JsonKey(name: 'passStudents')
List<StudentAnswerInfos>? passStudents;
// --
@JsonKey(name: 'disqualifiedStudents')
List<StudentAnswerInfos>? disqualifiedStudents;
// --
@JsonKey(name: 'notdoneStudents')
List<StudentAnswerInfos>? notdoneStudents;
JobReportModel( JobReportModel(
this.studentCount, this.studentCount,
this.finishRate, this.finishRate,
@ -82,36 +64,8 @@ class JobReportModel extends Object {
this.knowledgeInfos, this.knowledgeInfos,
this.questionAnswerInfos, this.questionAnswerInfos,
this.studentAnswerInfos, this.studentAnswerInfos,
this.overallTitles, [ this.overallTitles,
this.allpairsStudents, );
this.passStudents,
this.disqualifiedStudents,
this.notdoneStudents,
]) {
this.allpairsStudents = [];
this.passStudents = [];
this.disqualifiedStudents = [];
this.notdoneStudents = [];
//
studentAnswerInfos.forEach((item) {
if (item.correctRate == 100 && item.noAnswerCount == 0) {
//
allpairsStudents?.add(item);
}
if (item.correctRate >= 60 && item.correctRate < 100) {
//
passStudents?.add(item);
}
if (item.correctRate >= 0 && item.correctRate < 60) {
//
disqualifiedStudents?.add(item);
}
if (questionAnswerInfos.length == item.noAnswerCount) {
//
notdoneStudents?.add(item);
}
});
}
factory JobReportModel.fromJson(Map<String, dynamic> srcJson) => _$JobReportModelFromJson(srcJson); factory JobReportModel.fromJson(Map<String, dynamic> srcJson) => _$JobReportModelFromJson(srcJson);
@ -129,9 +83,6 @@ class KnowledgeInfos extends Object {
@JsonKey(name: 'rate') @JsonKey(name: 'rate')
double rate; double rate;
@JsonKey(name: 'details')
List<JobReportKnowledgeModel>? details;
KnowledgeInfos( KnowledgeInfos(
this.knowledgeId, this.knowledgeId,
this.knowledgeName, this.knowledgeName,
@ -166,9 +117,6 @@ class QuestionAnswerInfos extends Object {
@JsonKey(name: 'errorRate') @JsonKey(name: 'errorRate')
double errorRate; double errorRate;
@JsonKey(name: 'questionPicture')
String? questionPicture;
@JsonKey(name: 'noAnswerRate') @JsonKey(name: 'noAnswerRate')
double noAnswerRate; double noAnswerRate;
@ -181,7 +129,6 @@ class QuestionAnswerInfos extends Object {
this.correctRate, this.correctRate,
this.errorRate, this.errorRate,
this.noAnswerRate, this.noAnswerRate,
this.questionPicture,
); );
factory QuestionAnswerInfos.fromJson(Map<String, dynamic> srcJson) => _$QuestionAnswerInfosFromJson(srcJson); factory QuestionAnswerInfos.fromJson(Map<String, dynamic> srcJson) => _$QuestionAnswerInfosFromJson(srcJson);

View File

@ -1,124 +0,0 @@
import 'package:json_annotation/json_annotation.dart';
part 'job_report_question_deatil_model.g.dart';
@JsonSerializable()
class JobReportQuestionDeatilModel extends Object {
@JsonKey(name: 'jobName')
String? jobName;
@JsonKey(name: 'schoolId')
int schoolId;
@JsonKey(name: 'schoolName')
String schoolName;
@JsonKey(name: 'gradeId')
int gradeId;
@JsonKey(name: 'gradeName')
String gradeName;
@JsonKey(name: 'className')
String className;
@JsonKey(name: 'rate')
double rate;
@JsonKey(name: 'ratio')
String ratio;
@JsonKey(name: 'noAnswerCount')
int noAnswerCount;
@JsonKey(name: 'finishInfos')
List<FinishInfos> finishInfos;
@JsonKey(name: 'studentReports')
List<StudentReports> studentReports;
JobReportQuestionDeatilModel(
this.jobName,
this.schoolId,
this.schoolName,
this.gradeId,
this.gradeName,
this.className,
this.rate,
this.ratio,
this.noAnswerCount,
this.finishInfos,
this.studentReports,
);
factory JobReportQuestionDeatilModel.fromJson(Map<String, dynamic> srcJson) =>
_$JobReportQuestionDeatilModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$JobReportQuestionDeatilModelToJson(this);
}
@JsonSerializable()
class FinishInfos extends Object {
@JsonKey(name: 'title')
String title;
@JsonKey(name: 'finishCount')
int finishCount;
@JsonKey(name: 'correctRate')
int correctRate;
FinishInfos(
this.title,
this.finishCount,
this.correctRate,
);
factory FinishInfos.fromJson(Map<String, dynamic> srcJson) => _$FinishInfosFromJson(srcJson);
Map<String, dynamic> toJson() => _$FinishInfosToJson(this);
}
@JsonSerializable()
class StudentReports extends Object {
@JsonKey(name: 'studentName')
String studentName;
@JsonKey(name: 'pass')
bool pass;
@JsonKey(name: 'finishInfos')
List<FinishInfo> finishInfos;
StudentReports(
this.studentName,
this.pass,
this.finishInfos,
);
factory StudentReports.fromJson(Map<String, dynamic> srcJson) => _$StudentReportsFromJson(srcJson);
Map<String, dynamic> toJson() => _$StudentReportsToJson(this);
}
@JsonSerializable()
class FinishInfo extends Object {
@JsonKey(name: 'title')
String title;
@JsonKey(name: 'finishCount')
int finishCount;
@JsonKey(name: 'correctRate')
double correctRate;
FinishInfo(
this.title,
this.finishCount,
this.correctRate,
);
factory FinishInfo.fromJson(Map<String, dynamic> srcJson) => _$FinishInfoFromJson(srcJson);
Map<String, dynamic> toJson() => _$FinishInfoToJson(this);
}

View File

@ -58,10 +58,10 @@ class BaseInfo extends Object {
String ratePass; String ratePass;
@JsonKey(name: 'TotalRank') @JsonKey(name: 'TotalRank')
int? totalRank; int totalRank;
@JsonKey(name: 'JoinCount') @JsonKey(name: 'JoinCount')
int? joinCount; int joinCount;
BaseInfo(this.examName,this.examType,this.grade,this.subject,this.examTime,this.totalScore,this.avgScore,this.maxScore,this.rateGood,this.ratePass,this.totalRank,this.joinCount,); BaseInfo(this.examName,this.examType,this.grade,this.subject,this.examTime,this.totalScore,this.avgScore,this.maxScore,this.rateGood,this.ratePass,this.totalRank,this.joinCount,);

View File

@ -1,4 +1,5 @@
import 'package:achievement_view/achievement_view.dart'; import 'package:achievement_view/achievement_view.dart';
import 'package:badges/badges.dart';
import 'package:collection/collection.dart'; import 'package:collection/collection.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_hooks/flutter_hooks.dart';
@ -247,13 +248,7 @@ Widget $completedHomeworkView(BuildContext context,
taskIds: jobTaskItem.markingTasks.map((e) => e.id).toList(), taskIds: jobTaskItem.markingTasks.map((e) => e.id).toList(),
), ),
InkWell( InkWell(
onTap: () { onTap: () {},
RouterManager.router.navigateTo(
context,
RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
transition: getTransition(),
);
},
child: Row( child: Row(
children: [ children: [
Expanded(flex: 1, child: SizedBox()), Expanded(flex: 1, child: SizedBox()),
@ -358,9 +353,9 @@ Widget $completedHomeworkChildView(
), ),
SizedBox(height: 10.h), SizedBox(height: 10.h),
$CompletedHomeworkInfoBox( $CompletedHomeworkInfoBox(
precision: taskItem.precision / 100, precision: jobTaskItem.precision / 100,
objectivePrecision: taskItem.objectivePrecision / 100, objectivePrecision: jobTaskItem.objectivePrecision / 100,
subjectivePrecision: taskItem.subjectivePrecision / 100, subjectivePrecision: jobTaskItem.subjectivePrecision / 100,
submittedQuantity: taskItem.commitStudentCount, submittedQuantity: taskItem.commitStudentCount,
unsubmittedQuantity: taskItem.studentCount - taskItem.commitStudentCount, unsubmittedQuantity: taskItem.studentCount - taskItem.commitStudentCount,
showStudentsCall: showStudentsCall, showStudentsCall: showStudentsCall,
@ -440,8 +435,7 @@ Widget $completedHomeworkProgressBar(
required Color color, required Color color,
required double percent, required double percent,
}) { }) {
var percentStr = '${doubleToStringAsFixed(percent * 100)}%'; var percentStr = '${getDoubleRemoveZero(percent * 100)}%';
return Container( return Container(
margin: EdgeInsets.symmetric(vertical: 10.h), margin: EdgeInsets.symmetric(vertical: 10.h),
child: Row( child: Row(

View File

@ -113,7 +113,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context,
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value; JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // if (studentBus != null && studentBus.pageIndex == thePageIndex) return; //
if (thePageIndex != null) { if (thePageIndex != null) {
_useSwitchStudentAndType.getDataForStudents(taskId: taskId, pageIndex: thePageIndex);
int indexLocated = _useSwitchStudentAndType.tabs.value.indexWhere((element) => element.pageIndex == thePageIndex); int indexLocated = _useSwitchStudentAndType.tabs.value.indexWhere((element) => element.pageIndex == thePageIndex);
_useSwitchStudentAndType.eventFire( _useSwitchStudentAndType.eventFire(
model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex, model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex,
@ -121,22 +120,19 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context,
previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(indexLocated))); previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(indexLocated)));
} }
}); });
useValueChanged<JobConcernedWithStudent?, String>(_useSwitchStudentAndType.currentStudent.value, (oldData, __) { useValueChanged<JobConcernedWithStudent?, String>(_useSwitchStudentAndType.currentStudent.value, (_, __) {
var studentId = _useSwitchStudentAndType.currentStudent.value?.studentId; var studentId = _useSwitchStudentAndType.currentStudent.value?.studentId;
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value; JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
if (studentBus != null && studentBus.studentId == studentId) return; // if (studentBus != null && studentBus.studentId == studentId) return; //
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex; var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
if (thePageIndex != null) // if (thePageIndex != null) //
{
int indexLocated = _useSwitchStudentAndType.tabs.value.indexWhere((element) => element.pageIndex == thePageIndex);
_useSwitchStudentAndType.eventFire( _useSwitchStudentAndType.eventFire(
model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex, model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex,
studentId: studentId, studentId: studentId,
nextPageIndex: _useSwitchStudentAndType.getNextPageIndex(indexLocated), nextPageIndex: _useSwitchStudentAndType.getNextPageIndex(thePageIndex),
previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(indexLocated)), previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(thePageIndex)),
); );
}
}); });
useEffect(() { useEffect(() {
@ -166,7 +162,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context,
print('是否是优先批阅1111${_useSwitchStudentAndType.isFirst}'); print('是否是优先批阅1111${_useSwitchStudentAndType.isFirst}');
break; break;
case JobCheckSwitchingQuestionTabBus: case JobCheckSwitchingQuestionTabBus:
// //
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback); _useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback);
break; break;
case MarkingTextQuestionJobTabParams: // case MarkingTextQuestionJobTabParams: //

View File

@ -64,13 +64,11 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
} }
// //
getDataForStudents({required int taskId, int? pageIndex}) async { getDataForStudents({required int taskId}) async {
RestClient client = await getClient(); RestClient client = await getClient();
if (pageIndex == null) { BaseStructureResult<List<JobConcernedWithStudent>> result = await client.getJobWithStudents(
pageIndex = currentTab.value?.pageIndex; JobConcernedWithStudentParams([taskId], isCommit: true),
} );
BaseStructureResult<List<JobConcernedWithStudent>> result =
await client.getJobWithStudents(JobConcernedWithStudentParams([taskId], isCommit: true, pageIndex: pageIndex));
if (result.success && result.data != null) studentData.value = result.data!; if (result.success && result.data != null) studentData.value = result.data!;
} }
@ -151,8 +149,7 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
if (continueFlag == null || !continueFlag) return tabJob; // if (continueFlag == null || !continueFlag) return tabJob; //
*/ */
tabs.value = tabDatas; tabs.value = tabDatas;
if (tabJob != null) currentTab.value = tabJob; currentTab.value = tabJob;
if (tabJob == null && exitPromptFlag.value) ToastUtils.showSuccess('最后一题提交成功');
return tabJob; return tabJob;
} }
} }

View File

@ -5,13 +5,11 @@ import 'package:functional_widget_annotation/functional_widget_annotation.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_report_join_class.dart'; import 'package:marking_app/common/model/job/job_report_join_class.dart';
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
import 'package:marking_app/common/model/job/job_report_model.dart'; import 'package:marking_app/common/model/job/job_report_model.dart';
import 'package:marking_app/utils/index.dart'; import 'package:marking_app/utils/index.dart';
import 'package:marking_app/utils/my_text.dart'; import 'package:marking_app/utils/my_text.dart';
import 'package:marking_app/utils/request/rest_client.dart'; import 'package:marking_app/utils/request/rest_client.dart';
import 'package:percent_indicator/linear_percent_indicator.dart'; import 'package:percent_indicator/linear_percent_indicator.dart';
import 'package:photo_view/photo_view.dart';
import '../../utils/flutter_wave_loading.dart'; import '../../utils/flutter_wave_loading.dart';
@ -32,7 +30,6 @@ class _JobReportState extends State<JobReport> with CommonMixin {
List<JobReportJoinClass>? involveClasses = []; List<JobReportJoinClass>? involveClasses = [];
JobReportJoinClass? classData; JobReportJoinClass? classData;
JobReportModel? jobReportModel;
@override @override
void initState() { void initState() {
@ -47,7 +44,7 @@ class _JobReportState extends State<JobReport> with CommonMixin {
BaseStructureResult<List<JobReportJoinClass>> result = await _client.getJobReportJoinClasses(widget.id); BaseStructureResult<List<JobReportJoinClass>> result = await _client.getJobReportJoinClasses(widget.id);
if (result.success) { if (result.success) {
toUpState(setState, () { toUpState(setState, () {
involveClasses = [JobReportJoinClass(-1, '全部', -1, '全部', '全部', '全部', -1, -1, '-1'), ...(result.data ?? [])]; involveClasses = [JobReportJoinClass(-1, '全部', -1, '全部', '全部', '全部', -1, -1), ...(result.data ?? [])];
}, mounted); }, mounted);
} }
} catch (e) { } catch (e) {
@ -71,153 +68,6 @@ class _JobReportState extends State<JobReport> with CommonMixin {
return null; return null;
} }
Future<void> detailKnowledgeCall(KnowledgeInfos knowledge) async {
ToastUtils.showLoading();
try {
if (knowledge.details == null) {
RestClient _client = await getClient();
BaseStructureResult<List<JobReportKnowledgeModel>> datas =
await _client.getDetailKnowledge(widget.id, knowledge.knowledgeId);
if (!datas.success) return ToastUtils.showInfo(datas.message ?? '获取知识点失败');
knowledge.details = datas.data;
}
showDialog(
context: context,
builder: (BuildContext context1) {
return Container(
margin: EdgeInsets.symmetric(vertical: 150.h, horizontal: 24.w),
padding: EdgeInsets.symmetric(vertical: 15.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18.sp),
),
child: Column(
children: [
Container(
alignment: Alignment.center,
child: Row(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
quickText(knowledge.knowledgeName, color: Theme.of(context1).primaryColor, size: 16.sp),
quickText(
'的掌握情况',
color: Color.fromRGBO(60, 60, 60, 1),
size: 15.sp,
maxLines: 2,
),
],
)),
Expanded(
child: ListView(padding: EdgeInsets.symmetric(horizontal: 12.w), children: [
DataTable(
sortAscending: false,
columns: [
DataColumn(
label: quickText('班级',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('掌握度',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('人数',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('操作',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
],
rows: [
...knowledge.details?.map((e) {
return DataRow(cells: [
DataCell(quickText(e.className, color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText(e.rate > 0 ? doubleToStringAsFixed(e.rate) + '%' : 0,
color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText(e.ratio, color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText('详情', color: Color.fromRGBO(239, 135, 20, 1)), onTap: () {
showDialog(
context: context1,
builder: (BuildContext context2) {
return Container(
margin: EdgeInsets.symmetric(vertical: 150.h, horizontal: 24.w),
padding: EdgeInsets.symmetric(vertical: 15.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18.sp),
),
child: Column(
children: [
Container(
child: quickText(
'${e.className}的掌握情况',
color: Color.fromRGBO(239, 135, 20, 1),
size: 16.sp,
maxLines: 2,
fontWeight: FontWeight.bold,
)),
SizedBox(height: 20.h),
Expanded(
child:
ListView(padding: EdgeInsets.symmetric(horizontal: 12.w), children: [
DataTable(
sortAscending: false,
columns: [
DataColumn(
label: quickText('学生名字',
color: Color.fromRGBO(114, 114, 114, 1),
size: 14.sp,
fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('掌握度',
color: Color.fromRGBO(114, 114, 114, 1),
size: 14.sp,
fontWeight: FontWeight.bold),
),
],
rows: [
...e.studentReports.map((e) {
return DataRow(
cells: [
DataCell(quickText(e.studentName)),
DataCell(e.pass
? Icon(Icons.check_outlined, color: Colors.green)
: Icon(Icons.close_outlined, color: Colors.red)),
],
);
}).toList()
],
),
]),
)
],
),
);
},
);
}),
]);
}).toList() ??
[],
],
),
]),
)
],
),
);
},
);
} catch (e) {
} finally {
ToastUtils.dismiss();
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -225,17 +75,11 @@ class _JobReportState extends State<JobReport> with CommonMixin {
appBar: AppBar( appBar: AppBar(
backgroundColor: Colors.white, backgroundColor: Colors.white,
title: quickText(widget.title, size: 16.sp, color: Color.fromRGBO(51, 51, 51, 1)), title: quickText(widget.title, size: 16.sp, color: Color.fromRGBO(51, 51, 51, 1)),
leading: IconButton(
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Navigator.of(context).pop(),
),
actions: [ actions: [
// //
$DropdownSelection(involveClasses, classData, call: (JobReportJoinClass _classData) { $DropdownSelection(involveClasses, classData, call: (JobReportJoinClass _classData) {
classData = _classData; classData = _classData;
if (_classData.gradeId == -1) classData = null; toUpState(setState, () => _future = getReport(), mounted);
_future = getReport();
toUpState(setState, () {}, mounted);
}), }),
], ],
), ),
@ -252,16 +96,16 @@ class _JobReportState extends State<JobReport> with CommonMixin {
); );
return ListView( return ListView(
padding: EdgeInsets.symmetric(horizontal: 10.w), padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 10.w),
children: [ children: [
// //
$TopGraphic(data), $TopGraphic(data),
// //
$MasterKnowledgePoint(data.knowledgeInfos, detailKnowledgeCall), $MasterKnowledgePoint(data.knowledgeInfos),
// //
$OverallPerformance(data.studentCount, data.overallTitles), $OverallPerformance(data.studentCount, data.overallTitles),
// //
$UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos), $UnitTimeAnsweringSituation(data.questionAnswerInfos),
// //
$PersonnelDataOverview(data.studentAnswerInfos), $PersonnelDataOverview(data.studentAnswerInfos),
], ],
@ -275,108 +119,27 @@ class _JobReportState extends State<JobReport> with CommonMixin {
@swidget @swidget
Widget $dropdownSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinClass? classData, Widget $dropdownSelection(List<JobReportJoinClass>? involveClasses, JobReportJoinClass? classData,
{required Function(JobReportJoinClass) call}) { {required Function(JobReportJoinClass) call}) {
print('有几条数据+${involveClasses?.length}');
if (involveClasses == null) return Container(child: quickText('点击重试')); // if (involveClasses == null) return Container(child: quickText('点击重试')); //
return DropdownButton( return DropdownButton(
value: classData?.uniqueId ?? '-1', value: classData?.gradeId ?? -1,
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp), style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
items: involveClasses.map((e) { items: involveClasses.map((e) {
return DropdownMenuItem( return DropdownMenuItem(
value: e.uniqueId!, value: e.gradeId,
child: quickText(e.graduationYear + e.className, size: 12.sp, color: Colors.black), child: quickText(e.graduationYear, size: 12.sp, color: Colors.black),
); );
}).toList(), }).toList(),
onChanged: (String? value) { onChanged: (int? value) {
if (value == null) return; if (value == null) return;
call(involveClasses.firstWhere((element) => element.uniqueId == value)); call(involveClasses.firstWhere((element) => element.gradeId == value));
}, },
); );
} }
/// ///
@swidget @swidget
Widget $topGraphic(BuildContext context, JobReportModel data) { Widget $topGraphic(JobReportModel data) {
void showDetail(String showType) async {
//
List<StudentAnswerInfos> students = [];
List<Widget> dataColumns = [];
String title = '';
switch (showType) {
case '全对':
title = '全对';
students = data.allpairsStudents!;
break;
case '及格':
title = '及格';
students = data.passStudents!;
break;
case '不及格':
title = '不及格';
students = data.disqualifiedStudents!;
break;
case '未做':
title = '未做';
students = data.notdoneStudents!;
break;
}
if (students.isEmpty) return ToastUtils.showInfo('没有$title学生');
//
showDialog(
context: context,
builder: (BuildContext context1) {
return Container(
margin: EdgeInsets.symmetric(vertical: 150.h, horizontal: 24.w),
padding: EdgeInsets.symmetric(vertical: 15.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18.sp),
),
child: Column(
children: [
Container(child: quickText('$title学生', color: Color.fromRGBO(60, 60, 60, 1), size: 15.sp)),
Expanded(
child: ListView(padding: EdgeInsets.symmetric(horizontal: 12.w), children: [
DataTable(
sortAscending: false,
columns: [
DataColumn(
label: quickText('姓名',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('正确率',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('未答题数',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
DataColumn(
label: quickText('用时(秒)',
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
),
],
rows: [
...students.map((e) {
return DataRow(cells: [
DataCell(quickText(e.studentName, color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText(doubleToStringAsFixed(e.correctRate) + '%',
color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText(e.noAnswerCount, color: Color.fromRGBO(61, 61, 61, 1))),
DataCell(quickText(e.useTime, color: Color.fromRGBO(61, 61, 61, 1))),
]);
}).toList(),
],
),
]),
)
],
),
);
},
);
}
return Container( return Container(
margin: EdgeInsets.only(top: 16.h, bottom: 10.h), margin: EdgeInsets.only(top: 16.h, bottom: 10.h),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.h), padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 14.h),
@ -456,9 +219,8 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
children: [ children: [
Expanded( Expanded(
flex: 2, flex: 2,
child: child: quickText('${data.validCount}',
quickText('${data.validCount}', color: Colors.white, size: 10.sp, fontWeight: FontWeight.bold), color: Colors.white, size: 10.sp, fontWeight: FontWeight.bold)),
),
SizedBox(width: 1.2.w), SizedBox(width: 1.2.w),
Expanded( Expanded(
flex: 7, flex: 7,
@ -466,7 +228,8 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
padding: EdgeInsets.all(12.r), padding: EdgeInsets.all(12.r),
decoration: BoxDecoration( decoration: BoxDecoration(
shape: BoxShape.circle, // shape: BoxShape.circle, //
color: Color.fromRGBO(76, 199, 147, 1)), color: Color.fromRGBO(76, 199, 147, 1),
),
child: Row( child: Row(
children: [ children: [
Expanded( Expanded(
@ -633,7 +396,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
InkWell( InkWell(
onTap: () => showDetail('全对'), onTap: () {},
child: Container( child: Container(
width: 77.w, width: 77.w,
alignment: Alignment.center, alignment: Alignment.center,
@ -721,7 +484,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
InkWell( InkWell(
onTap: () => showDetail('及格'), onTap: () {},
child: Container( child: Container(
width: 77.w, width: 77.w,
alignment: Alignment.center, alignment: Alignment.center,
@ -809,7 +572,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
InkWell( InkWell(
onTap: () => showDetail('不及格'), onTap: () {},
child: Container( child: Container(
width: 77.w, width: 77.w,
alignment: Alignment.center, alignment: Alignment.center,
@ -898,7 +661,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
), ),
SizedBox(height: 8.h), SizedBox(height: 8.h),
InkWell( InkWell(
onTap: () => showDetail('未做'), onTap: () {},
child: Container( child: Container(
width: 77.w, width: 77.w,
alignment: Alignment.center, alignment: Alignment.center,
@ -930,8 +693,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
/// ///
@swidget @swidget
Widget $masterKnowledgePoint(BuildContext context, List<KnowledgeInfos> knowledgeInfos, Widget $masterKnowledgePoint(BuildContext context, List<KnowledgeInfos> knowledgeInfos) {
Future<void> Function(KnowledgeInfos knowledge) detailCall) {
Widget childItem(int serialNumber, KnowledgeInfos knowItem) => Container( Widget childItem(int serialNumber, KnowledgeInfos knowItem) => Container(
margin: EdgeInsets.only(bottom: 20.h), margin: EdgeInsets.only(bottom: 20.h),
child: Column( child: Column(
@ -978,16 +740,13 @@ Widget $masterKnowledgePoint(BuildContext context, List<KnowledgeInfos> knowledg
barRadius: Radius.circular(10.r), barRadius: Radius.circular(10.r),
)), )),
SizedBox(width: 10.w), SizedBox(width: 10.w),
InkWell( Row(
onTap: () => detailCall(knowItem),
child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
quickText('查看', size: 14.sp, color: Color.fromRGBO(239, 135, 20, 1)), quickText('查看', size: 14.sp, color: Color.fromRGBO(239, 135, 20, 1)),
Icon(Icons.arrow_forward_ios, size: 11.sp, color: Color.fromRGBO(239, 135, 20, 1)), Icon(Icons.arrow_forward_ios, size: 11.sp, color: Color.fromRGBO(239, 135, 20, 1)),
], ],
), )
),
], ],
) )
], ],
@ -1063,7 +822,7 @@ Widget $overallPerformance(int totalNumber, List<OverallTitles> overallTitles) {
/// ///
@swidget @swidget
Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<QuestionAnswerInfos> questionAnswerInfos) { Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfos> questionAnswerInfos) {
List<String> questionNos = []; // List<String> questionNos = []; //
List<String> questionTypes = []; // List<String> questionTypes = []; //
List<String> completionStatusWithinThirtySeconds = []; // 30s内完成情况 List<String> completionStatusWithinThirtySeconds = []; // 30s内完成情况
@ -1072,8 +831,8 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
List<String> accuracys = []; // List<String> accuracys = []; //
List<String> errorRate = []; // List<String> errorRate = []; //
List<String> notDone = []; // List<String> notDone = []; //
List<QuestionPictureModel> viewOriginalQuestion = []; // List<String> viewOriginalQuestion = []; //
List<QuestionPictureModel> operate = []; List<String> operate = [];
Map<String, List<dynamic>> mapData = { Map<String, List<dynamic>> mapData = {
'题号': questionNos, '题号': questionNos,
'题型': questionTypes, '题型': questionTypes,
@ -1084,24 +843,18 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
'错误率': errorRate, '错误率': errorRate,
'未做': notDone, '未做': notDone,
'查看原题': viewOriginalQuestion, '查看原题': viewOriginalQuestion,
// '操作': operate '操作': operate
}; };
questionAnswerInfos.forEach((e) { questionAnswerInfos.forEach((e) {
QuestionPictureModel _quinfoModel = QuestionPictureModel(
questionNo: e.questionNo,
jobid: jobid,
questionid: e.questionId,
questionPicture: e.questionPicture,
);
questionNos.add(e.questionNo); // questionNos.add(e.questionNo); //
questionTypes.add(e.questionType == 2 ? '主观题' : '客观题'); // questionTypes.add(e.questionType == 2 ? '主观题' : '客观题'); //
accuracys.add(doubleToStringAsFixed(e.correctRate) + '%'); accuracys.add(doubleToStringAsFixed(e.correctRate) + '%');
errorRate.add(doubleToStringAsFixed(e.errorRate) + '%'); errorRate.add(doubleToStringAsFixed(e.errorRate) + '%');
notDone.add(doubleToStringAsFixed(e.noAnswerRate) + '%'); notDone.add(doubleToStringAsFixed(e.noAnswerRate) + '%');
viewOriginalQuestion.add(_quinfoModel); viewOriginalQuestion.add(e.questionId.toString());
operate.add(_quinfoModel); operate.add(e.questionId.toString());
e.finishInfos.forEach((element) { e.finishInfos.forEach((element) {
if ('30s内完成情况' == element.title) { if ('30s内完成情况' == element.title) {
@ -1168,6 +921,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
), ),
...entrie.value.map((e) { ...entrie.value.map((e) {
bool noHasChineseCharacter = isQuestionNo && !containsChinese(e); bool noHasChineseCharacter = isQuestionNo && !containsChinese(e);
return Container( return Container(
width: 96.r, width: 96.r,
alignment: Alignment.center, alignment: Alignment.center,
@ -1176,61 +930,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
color: Color.fromRGBO(245, 245, 245, 1), color: Color.fromRGBO(245, 245, 245, 1),
child: isViewButton child: isViewButton
? InkWell( ? InkWell(
onTap: () { onTap: () {},
// e
var _qpm = e as QuestionPictureModel;
// if (entrie.key == '操作') {
// showDialog(
// context: context,
// builder: (BuildContext context1) {
// return Container(
// margin: EdgeInsets.symmetric(vertical: 150.h, horizontal: 24.w),
// padding: EdgeInsets.symmetric(vertical: 15.h),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(18.sp),
// ),
// child: Column(
// children: [
// Container(
// child: quickText('${_qpm.questionNo}',
// color: Color.fromRGBO(60, 60, 60, 1), size: 15.sp)),
// Expanded(
// child: ListView(
// padding: EdgeInsets.symmetric(horizontal: 12.w),
// children: [
// DataTable(
// sortAscending: false,
// columns: [
// DataColumn(
// label: quickText('姓名',
// color: Color.fromRGBO(114, 114, 114, 1),
// size: 14.sp,
// fontWeight: FontWeight.bold),
// ),
// ],
// rows: [],
// ),
// ]),
// )
// ],
// ),
// );
// },
// );
// return;
// }
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
Navigator.push(
context,
MaterialPageRoute(builder: (_) {
return Scaffold(
appBar: AppBar(),
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
);
}),
);
},
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
@ -1273,6 +973,119 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
), ),
), ),
), ),
// ...mapData.entries.map((entrie) {
// return Row(
// children: [
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h, right: 1.w),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText(entrie.key, color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp, maxLines: 2),
// ),
// ...entrie.value.asMap().keys.map((e) {
// String questionNo = questionNos[e];
// return Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(245, 245, 245, 1),
// child: quickText(questionNo, color: Color.fromRGBO(82, 82, 82, 1), size: 12.sp),
// );
// }).toList(),
// ],
// );
// }).toList(),
// Stack(
// children: [
// if (false)
// Container(
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// mainAxisSize: MainAxisSize.min,
// children: [
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('题号', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp),
// ),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('题型', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('30s内完成情况', maxLines: 2, color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child:
// quickText('31s-60s内完成情况', maxLines: 2, color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child:
// quickText('61s-120s内完成情况', maxLines: 2, color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('正确率', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('错误率', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('未做', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('查看原题', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// Container(
// width: 56.w,
// alignment: Alignment.center,
// margin: EdgeInsets.only(bottom: 1.h),
// padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 8.w),
// color: Color.fromRGBO(230, 230, 230, 1),
// child: quickText('操作', color: Color.fromRGBO(24, 35, 77, 1), size: 12.sp)),
// ],
// ),
// ),
// ],
// ),
], ],
), ),
); );
@ -1392,11 +1205,3 @@ TimeUnits convertMilliseconds(int totalSeconds) {
return TimeUnits(hours, minutes, seconds); return TimeUnits(hours, minutes, seconds);
} }
class QuestionPictureModel extends Object {
String? questionPicture;
String questionNo;
int questionid;
int jobid;
QuestionPictureModel({required this.jobid, required this.questionid, required this.questionNo, this.questionPicture});
}

View File

@ -118,7 +118,11 @@ class _ReviewJobState extends State<ReviewJob> with CommonMixin, SingleTickerPro
appBar: PreferredSize( appBar: PreferredSize(
preferredSize: Size.fromHeight(40.h), preferredSize: Size.fromHeight(40.h),
child: AppBar( child: AppBar(
title: quickText('回评', size: 18.sp, color: Colors.white), title: quickText(
'回评',
size: 18.sp,
color: Colors.white,
),
elevation: 0, elevation: 0,
// actions: [ // actions: [
// Container( // Container(

View File

@ -107,9 +107,9 @@ class BasicTable extends StatelessWidget {
child: Row( child: Row(
children: [ children: [
Expanded(flex: 1, child: BasicTableCell('平均分排名', false)), Expanded(flex: 1, child: BasicTableCell('平均分排名', false)),
Expanded(flex: 1, child: BasicTableCell(baseInfo!.totalRank != null?baseInfo!.totalRank.toString():'--', true)), Expanded(flex: 1, child: BasicTableCell(baseInfo!.totalRank.toString(), true)),
Expanded(flex: 1, child: BasicTableCell('参考班级总数', false)), Expanded(flex: 1, child: BasicTableCell('参考班级总数', false)),
Expanded(flex: 1, child: BasicTableCell(baseInfo!.joinCount != null?baseInfo!.joinCount.toString():'--', true)), Expanded(flex: 1, child: BasicTableCell(baseInfo!.joinCount.toString(), true)),
], ],
), ),
), ),

View File

@ -114,7 +114,7 @@ class _CardListState extends State<CardList> {
headingRowDecoration: BoxDecoration(color: Color(0xFFF0F3FF)), headingRowDecoration: BoxDecoration(color: Color(0xFFF0F3FF)),
fixedColumnsColor: Color(0xFFF0F3FF), fixedColumnsColor: Color(0xFFF0F3FF),
fixedCornerColor: Colors.grey[400], fixedCornerColor: Colors.grey[400],
minWidth: 70.r * widget.headList.length + 10.r, minWidth: 70.r * widget.headList.length,
fixedTopRows: widget.fixedRows!, fixedTopRows: widget.fixedRows!,
fixedLeftColumns: widget.fixedCols!, fixedLeftColumns: widget.fixedCols!,
sortColumnIndex: _sortColumnIndex, sortColumnIndex: _sortColumnIndex,

View File

@ -81,7 +81,6 @@ class _KnowPointTableState extends State<KnowPointTable> {
scrollController: _controller, scrollController: _controller,
columnSpacing: 0, columnSpacing: 0,
horizontalMargin: 0, horizontalMargin: 0,
dataRowHeight:50.r,
bottomMargin: 0, bottomMargin: 0,
border: TableBorder( border: TableBorder(
horizontalInside: BorderSide( horizontalInside: BorderSide(

View File

@ -269,6 +269,7 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
Row( Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if(examOrigin != null && examOrigin!.pageIndex > 1)
InkWell( InkWell(
onTap: () { onTap: () {
var num = examOrigin!.pageIndex; var num = examOrigin!.pageIndex;
@ -283,15 +284,15 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
vertical: 2.r, horizontal: 5.r), vertical: 2.r, horizontal: 5.r),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9), color: Color(0xFF6787FD),
width: 1.r), width: 1.r),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(2.r)), Radius.circular(2.r)),
), ),
child: Text( child: Text(
'一页', '一页',
style: TextStyle( style: TextStyle(
color: examOrigin != null && examOrigin!.pageIndex > 1?Color(0xFF6787FD): Color(0xFFB3B9B9), color: Color(0xFF6787FD),
), ),
), ),
), ),
@ -302,8 +303,9 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
)*/ )*/
), ),
SizedBox( SizedBox(
width: 15.r, width: 30.r,
), ),
if(examOrigin != null && examOrigin!.pageIndex < examOriginList.length)
InkWell( InkWell(
onTap: () { onTap: () {
var num = examOrigin!.pageIndex; var num = examOrigin!.pageIndex;
@ -319,15 +321,15 @@ class _ReportCardDialogState extends ConsumerState<ReportCardDialog>
vertical: 2.r, horizontal: 5.r), vertical: 2.r, horizontal: 5.r),
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9), color: Color(0xFF6787FD),
width: 1.r), width: 1.r),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(2.r)), Radius.circular(2.r)),
), ),
child: Text( child: Text(
'一页', '一页',
style: TextStyle( style: TextStyle(
color: examOrigin != null && examOrigin!.pageIndex < examOriginList.length?Color(0xFF6787FD): Color(0xFFB3B9B9), color: Color(0xFF6787FD),
), ),
), ),
), ),

View File

@ -297,7 +297,7 @@ class _TheReportState extends ConsumerState<TheReport>
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 8.h, horizontal: 20.r), vertical: 8.h, horizontal: 20.r),
width: width:
(MediaQuery.of(context).size.width - 80.r) / 2, MediaQuery.of(context).size.width / 2 - 50.r,
child: Row( child: Row(
children: [ children: [
Text( Text(
@ -334,7 +334,7 @@ class _TheReportState extends ConsumerState<TheReport>
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 8.h, horizontal: 20.r), vertical: 8.h, horizontal: 20.r),
width: width:
(MediaQuery.of(context).size.width - 80.r) / 2, MediaQuery.of(context).size.width / 2 - 60.r,
child: Row( child: Row(
children: [ children: [
Text( Text(

View File

@ -13,7 +13,6 @@ import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:marking_app/common/model/enum/marking_list_type.dart'; import 'package:marking_app/common/model/enum/marking_list_type.dart';
import 'package:marking_app/pages/common/startUpPage.dart'; import 'package:marking_app/pages/common/startUpPage.dart';
import 'package:marking_app/pages/homework_correction/job_report.dart';
import 'package:marking_app/pages/homework_correction/review_job.dart'; import 'package:marking_app/pages/homework_correction/review_job.dart';
import 'package:marking_app/pages/login/index.dart'; import 'package:marking_app/pages/login/index.dart';
@ -48,9 +47,6 @@ class RouterManager {
static const String agreementPath = 'other/agreement_page'; static const String agreementPath = 'other/agreement_page';
static const String ohterMainPagePath = 'other/index'; static const String ohterMainPagePath = 'other/index';
//
static const String jobReportPagePath = '/job/report/index';
static const String reportClassTeacherPath = 'report/details/reportClassTeacher'; static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher'; static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
static const String reportPersonalSubjectPath = 'report/details/reportPersonalSubject'; static const String reportPersonalSubjectPath = 'report/details/reportPersonalSubject';
@ -165,12 +161,7 @@ class RouterManager {
toPrint(val: '进入跳转报错啦,$e'); toPrint(val: '进入跳转报错啦,$e');
} }
}); });
//
static final _jobReportPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
int id = int.parse(params['id']![0]);
String title = params['title']![0];
return JobReport(id: id, title: title);
});
static final _agreementPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) { static final _agreementPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
AGREEMENT_KEY key = AGREEMENT_KEY.values.byName(params['type']![0]); AGREEMENT_KEY key = AGREEMENT_KEY.values.byName(params['type']![0]);
return AgreementPage(type: key); return AgreementPage(type: key);
@ -200,10 +191,10 @@ class RouterManager {
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => TheMine(), handlerFunc: (BuildContext? context, Map<String, List<String>> params) => TheMine(),
); );
static final _reportDetailPath = Handler( static final _reportDetailPath = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) { handlerFunc: (BuildContext? context, Map<String, List<String>> params){
int examId = int.parse(params['examId']![0]); int examId = int.parse(params['examId']![0]);
bool showGrade = params['showGrade']![0] == 'true'; bool showGrade = params['showGrade']![0] == 'true';
return ReportDetail(examId: examId, showGrade: showGrade); return ReportDetail(examId: examId,showGrade:showGrade);
}, },
); );
@ -257,7 +248,6 @@ class RouterManager {
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material); handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material); router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material); router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
// getTransition() // getTransition()

View File

@ -18,9 +18,7 @@ import 'package:marking_app/common/model/job/job_concerned_with_student_params.d
import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart'; import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart';
import 'package:marking_app/common/model/job/job_page_tab.dart'; import 'package:marking_app/common/model/job/job_page_tab.dart';
import 'package:marking_app/common/model/job/job_report_join_class.dart'; import 'package:marking_app/common/model/job/job_report_join_class.dart';
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
import 'package:marking_app/common/model/job/job_report_model.dart'; import 'package:marking_app/common/model/job/job_report_model.dart';
import 'package:marking_app/common/model/job/job_report_question_deatil_model.dart';
import 'package:marking_app/common/model/job/job_review_submission.dart'; import 'package:marking_app/common/model/job/job_review_submission.dart';
import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/common/model/job/job_task_item.dart';
import 'package:marking_app/common/model/job/marking_text_question_job.dart'; import 'package:marking_app/common/model/job/marking_text_question_job.dart';
@ -259,14 +257,4 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/jobs/student-job-for-class") @the_retrofit.GET("/api/jobs/student-job-for-class")
Future<BaseStructureResult<List<JobReportJoinClass>>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId); Future<BaseStructureResult<List<JobReportJoinClass>>> getJobReportJoinClasses(@the_retrofit.Query("jobId") int jobId);
// => ==>
@the_retrofit.GET("/api/jobs/job-report-knowledge-detail")
Future<BaseStructureResult<List<JobReportKnowledgeModel>>> getDetailKnowledge(
@the_retrofit.Query("jobid") int jobId, @the_retrofit.Query("knowid") int knowid);
// => ==>
@the_retrofit.GET("/api/jobs/job-report-question-detail")
Future<BaseStructureResult<List<JobReportQuestionDeatilModel>>> getJobReportQuestionDetail(
@the_retrofit.Query("jobid") int jobId, @the_retrofit.Query("questionid") int questionid);
} }

View File

@ -160,7 +160,7 @@ class ResponseHandle extends Interceptor {
void onResponse(Response response, ResponseInterceptorHandler handler) { void onResponse(Response response, ResponseInterceptorHandler handler) {
const isProd = bool.fromEnvironment('dart.vm.product'); const isProd = bool.fromEnvironment('dart.vm.product');
if (!isProd && RequestConfig.requestDataPrinting) { if (!isProd && RequestConfig.requestDataPrinting) {
// printJson(response.data); printJson(response.data);
} }
super.onResponse(response, handler); super.onResponse(response, handler);
} }

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. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.95 version: 1.0.93
environment: environment:
sdk: ">=2.17.1 <3.0.0" sdk: ">=2.17.1 <3.0.0"

View File

@ -20,13 +20,6 @@ add_executable(${BINARY_NAME} WIN32
# that need different build settings. # that need different build settings.
apply_standard_settings(${BINARY_NAME}) apply_standard_settings(${BINARY_NAME})
# Add preprocessor definitions for the build version.
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}")
target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}")
# Disable Windows macros that collide with C++ standard library functions. # Disable Windows macros that collide with C++ standard library functions.
target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX")

View File

@ -60,14 +60,14 @@ IDI_APP_ICON ICON "resources\\app_icon.ico"
// Version // Version
// //
#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) #ifdef FLUTTER_BUILD_NUMBER
#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER
#else #else
#define VERSION_AS_NUMBER 1,0,0,0 #define VERSION_AS_NUMBER 1,0,0
#endif #endif
#if defined(FLUTTER_VERSION) #ifdef FLUTTER_BUILD_NAME
#define VERSION_AS_STRING FLUTTER_VERSION #define VERSION_AS_STRING #FLUTTER_BUILD_NAME
#else #else
#define VERSION_AS_STRING "1.0.0" #define VERSION_AS_STRING "1.0.0"
#endif #endif