补充提交
This commit is contained in:
parent
d42f5febdd
commit
0b60055e88
|
|
@ -196,3 +196,5 @@ 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_card.g.dart
|
||||||
marking_app/lib/common/model/report/report_marking_detail_params.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/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
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
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()
|
||||||
|
|
@ -127,6 +129,9 @@ 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,
|
||||||
|
|
@ -161,6 +166,9 @@ 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;
|
||||||
|
|
||||||
|
|
@ -173,6 +181,7 @@ 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);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
@ -358,9 +358,9 @@ Widget $completedHomeworkChildView(
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.h),
|
SizedBox(height: 10.h),
|
||||||
$CompletedHomeworkInfoBox(
|
$CompletedHomeworkInfoBox(
|
||||||
precision: jobTaskItem.precision / 100,
|
precision: taskItem.precision / 100,
|
||||||
objectivePrecision: jobTaskItem.objectivePrecision / 100,
|
objectivePrecision: taskItem.objectivePrecision / 100,
|
||||||
subjectivePrecision: jobTaskItem.subjectivePrecision / 100,
|
subjectivePrecision: taskItem.subjectivePrecision / 100,
|
||||||
submittedQuantity: taskItem.commitStudentCount,
|
submittedQuantity: taskItem.commitStudentCount,
|
||||||
unsubmittedQuantity: taskItem.studentCount - taskItem.commitStudentCount,
|
unsubmittedQuantity: taskItem.studentCount - taskItem.commitStudentCount,
|
||||||
showStudentsCall: showStudentsCall,
|
showStudentsCall: showStudentsCall,
|
||||||
|
|
@ -440,7 +440,8 @@ Widget $completedHomeworkProgressBar(
|
||||||
required Color color,
|
required Color color,
|
||||||
required double percent,
|
required double percent,
|
||||||
}) {
|
}) {
|
||||||
var percentStr = '${getDoubleRemoveZero(percent * 100)}%';
|
var percentStr = '${doubleToStringAsFixed(percent * 100)}%';
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,13 @@ 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';
|
||||||
|
|
||||||
|
|
@ -30,6 +32,7 @@ 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() {
|
||||||
|
|
@ -68,6 +71,153 @@ 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(
|
||||||
|
|
@ -107,11 +257,11 @@ class _JobReportState extends State<JobReport> with CommonMixin {
|
||||||
// 顶部图形数据
|
// 顶部图形数据
|
||||||
$TopGraphic(data),
|
$TopGraphic(data),
|
||||||
// 掌握知识点的情况
|
// 掌握知识点的情况
|
||||||
$MasterKnowledgePoint(data.knowledgeInfos),
|
$MasterKnowledgePoint(data.knowledgeInfos, detailKnowledgeCall),
|
||||||
// 掌握知识点的情况
|
// 掌握知识点的情况
|
||||||
$OverallPerformance(data.studentCount, data.overallTitles),
|
$OverallPerformance(data.studentCount, data.overallTitles),
|
||||||
// 单位时间答题情况
|
// 单位时间答题情况
|
||||||
$UnitTimeAnsweringSituation(data.questionAnswerInfos),
|
$UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos),
|
||||||
// 人员数据概况
|
// 人员数据概况
|
||||||
$PersonnelDataOverview(data.studentAnswerInfos),
|
$PersonnelDataOverview(data.studentAnswerInfos),
|
||||||
],
|
],
|
||||||
|
|
@ -148,6 +298,7 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
|
||||||
void showDetail(String showType) async {
|
void showDetail(String showType) async {
|
||||||
// 全对 及格 不及格 未做
|
// 全对 及格 不及格 未做
|
||||||
List<StudentAnswerInfos> students = [];
|
List<StudentAnswerInfos> students = [];
|
||||||
|
List<Widget> dataColumns = [];
|
||||||
String title = '';
|
String title = '';
|
||||||
switch (showType) {
|
switch (showType) {
|
||||||
case '全对':
|
case '全对':
|
||||||
|
|
@ -183,31 +334,42 @@ Widget $topGraphic(BuildContext context, JobReportModel data) {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(child: quickText('$title学生', color: Color.fromRGBO(60, 60, 60, 1), size: 15.sp)),
|
Container(child: quickText('$title学生', color: Color.fromRGBO(60, 60, 60, 1), size: 15.sp)),
|
||||||
// Expanded(
|
Expanded(
|
||||||
// child: ListView(padding: EdgeInsets.symmetric(horizontal: 12.w), children: [
|
child: ListView(padding: EdgeInsets.symmetric(horizontal: 12.w), children: [
|
||||||
// DataTable(
|
DataTable(
|
||||||
// columns: [
|
sortAscending: false,
|
||||||
// DataColumn(
|
columns: [
|
||||||
// label: quickText('姓名',
|
DataColumn(
|
||||||
// color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
label: quickText('姓名',
|
||||||
// numeric: true),
|
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
||||||
// DataColumn(
|
),
|
||||||
// label: quickText('正确率',
|
DataColumn(
|
||||||
// color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
label: quickText('正确率',
|
||||||
// numeric: true),
|
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
||||||
// DataColumn(
|
),
|
||||||
// label: quickText('未答题数',
|
DataColumn(
|
||||||
// color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
label: quickText('未答题数',
|
||||||
// numeric: true),
|
color: Color.fromRGBO(114, 114, 114, 1), size: 14.sp, fontWeight: FontWeight.bold),
|
||||||
// ],
|
),
|
||||||
// rows: [
|
DataColumn(
|
||||||
// DataRow(cells: [
|
label: quickText('用时(秒)',
|
||||||
// DataCell(quickText('', color: Color.fromRGBO(61, 61, 61, 1))),
|
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(),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -768,7 +930,8 @@ 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(
|
||||||
|
|
@ -815,13 +978,16 @@ 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),
|
||||||
Row(
|
InkWell(
|
||||||
|
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)),
|
||||||
],
|
],
|
||||||
)
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
@ -897,7 +1063,7 @@ Widget $overallPerformance(int totalNumber, List<OverallTitles> overallTitles) {
|
||||||
|
|
||||||
/// 单位时间答题情况
|
/// 单位时间答题情况
|
||||||
@swidget
|
@swidget
|
||||||
Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfos> questionAnswerInfos) {
|
Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<QuestionAnswerInfos> questionAnswerInfos) {
|
||||||
List<String> questionNos = []; // 题号
|
List<String> questionNos = []; // 题号
|
||||||
List<String> questionTypes = []; // 题型
|
List<String> questionTypes = []; // 题型
|
||||||
List<String> completionStatusWithinThirtySeconds = []; // 30s内完成情况
|
List<String> completionStatusWithinThirtySeconds = []; // 30s内完成情况
|
||||||
|
|
@ -906,8 +1072,8 @@ Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfo
|
||||||
List<String> accuracys = []; // 正确率
|
List<String> accuracys = []; // 正确率
|
||||||
List<String> errorRate = []; // 错误率
|
List<String> errorRate = []; // 错误率
|
||||||
List<String> notDone = []; // 未做
|
List<String> notDone = []; // 未做
|
||||||
List<String> viewOriginalQuestion = []; // 查看原题
|
List<QuestionPictureModel> viewOriginalQuestion = []; // 查看原题
|
||||||
List<String> operate = [];
|
List<QuestionPictureModel> operate = [];
|
||||||
Map<String, List<dynamic>> mapData = {
|
Map<String, List<dynamic>> mapData = {
|
||||||
'题号': questionNos,
|
'题号': questionNos,
|
||||||
'题型': questionTypes,
|
'题型': questionTypes,
|
||||||
|
|
@ -918,18 +1084,24 @@ Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfo
|
||||||
'错误率': 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(e.questionId.toString());
|
viewOriginalQuestion.add(_quinfoModel);
|
||||||
operate.add(e.questionId.toString());
|
operate.add(_quinfoModel);
|
||||||
|
|
||||||
e.finishInfos.forEach((element) {
|
e.finishInfos.forEach((element) {
|
||||||
if ('30s内完成情况' == element.title) {
|
if ('30s内完成情况' == element.title) {
|
||||||
|
|
@ -996,7 +1168,6 @@ Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfo
|
||||||
),
|
),
|
||||||
...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,
|
||||||
|
|
@ -1005,7 +1176,61 @@ Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfo
|
||||||
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,
|
||||||
|
|
@ -1048,119 +1273,6 @@ Widget $unitTimeAnsweringSituation(BuildContext context, List<QuestionAnswerInfo
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
// ...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)),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -1280,3 +1392,11 @@ 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});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,9 @@ 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';
|
||||||
|
|
@ -257,4 +259,14 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue