Compare commits
31 Commits
4d7c48941f
...
5d3d4b17a2
| Author | SHA1 | Date |
|---|---|---|
|
|
5d3d4b17a2 | |
|
|
e84eca79d2 | |
|
|
cea53d3544 | |
|
|
c653b10515 | |
|
|
001ac3a21b | |
|
|
c22e4f95bf | |
|
|
57642af805 | |
|
|
8130e8250a | |
|
|
e4c889fc6d | |
|
|
314638a3ae | |
|
|
72a04ceb10 | |
|
|
3293de1814 | |
|
|
8ef26ca793 | |
|
|
ea5a73d9a1 | |
|
|
199397ac3b | |
|
|
0143dc0da7 | |
|
|
68e3ed45f8 | |
|
|
195b6ba2b5 | |
|
|
9878d22822 | |
|
|
0fad2da7f6 | |
|
|
b8eceb80bb | |
|
|
7e1ce0ef72 | |
|
|
02a7b748e1 | |
|
|
046f8cda4d | |
|
|
1de02f27e2 | |
|
|
35eaa570d1 | |
|
|
cf76e6aa44 | |
|
|
2ca30595d9 | |
|
|
ff1b70d39d | |
|
|
624fb083df | |
|
|
e1db8ae9b9 |
|
|
@ -200,3 +200,9 @@ 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
|
||||
marking_app/lib/common/model/job/job_do_marking_status_info.g.dart
|
||||
marking_app/lib/common/model/report/small_question.g.dart
|
||||
marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.g.dart
|
||||
marking_app/lib/common/model/job/job_favorite_model.g.dart
|
||||
marking_app/lib/common/model/job/job_level_set_params.g.dart
|
||||
marking_app/lib/common/model/job/job_student_goups.g.dart
|
||||
marking_app/lib/common/model/job/job_student_level.g.dart
|
||||
marking_app/lib/common/model/job/job_favorite_item_model.g.dart
|
||||
|
|
|
|||
|
|
@ -54,6 +54,12 @@
|
|||
<div class="content unicode" style="display: block;">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">Frame</div>
|
||||
<div class="code-name">&#xe63e;</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont"></span>
|
||||
<div class="name">Frame</div>
|
||||
|
|
@ -408,9 +414,9 @@
|
|||
<pre><code class="language-css"
|
||||
>@font-face {
|
||||
font-family: 'iconfont';
|
||||
src: url('iconfont.woff2?t=1706671294868') format('woff2'),
|
||||
url('iconfont.woff?t=1706671294868') format('woff'),
|
||||
url('iconfont.ttf?t=1706671294868') format('truetype');
|
||||
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
||||
url('iconfont.woff?t=1710142362036') format('woff'),
|
||||
url('iconfont.ttf?t=1710142362036') format('truetype');
|
||||
}
|
||||
</code></pre>
|
||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||
|
|
@ -436,6 +442,15 @@
|
|||
<div class="content font-class">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-Frame14"></span>
|
||||
<div class="name">
|
||||
Frame
|
||||
</div>
|
||||
<div class="code-name">.icon-Frame14
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<span class="icon iconfont icon-Frame13"></span>
|
||||
<div class="name">
|
||||
|
|
@ -967,6 +982,14 @@
|
|||
<div class="content symbol">
|
||||
<ul class="icon_lists dib-box">
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-Frame14"></use>
|
||||
</svg>
|
||||
<div class="name">Frame</div>
|
||||
<div class="code-name">#icon-Frame14</div>
|
||||
</li>
|
||||
|
||||
<li class="dib">
|
||||
<svg class="icon svg-icon" aria-hidden="true">
|
||||
<use xlink:href="#icon-Frame13"></use>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3423846 */
|
||||
src: url('iconfont.woff2?t=1706671294868') format('woff2'),
|
||||
url('iconfont.woff?t=1706671294868') format('woff'),
|
||||
url('iconfont.ttf?t=1706671294868') format('truetype');
|
||||
src: url('iconfont.woff2?t=1710142362036') format('woff2'),
|
||||
url('iconfont.woff?t=1710142362036') format('woff'),
|
||||
url('iconfont.ttf?t=1710142362036') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
|
|
@ -13,6 +13,10 @@
|
|||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-Frame14:before {
|
||||
content: "\e63e";
|
||||
}
|
||||
|
||||
.icon-Frame13:before {
|
||||
content: "\e63d";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,13 @@
|
|||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "39483566",
|
||||
"name": "Frame",
|
||||
"font_class": "Frame14",
|
||||
"unicode": "e63e",
|
||||
"unicode_decimal": 58942
|
||||
},
|
||||
{
|
||||
"icon_id": "39175701",
|
||||
"name": "Frame",
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 326 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 290 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 443 B |
|
|
@ -15,15 +15,16 @@ class RequestConfig {
|
|||
static const devLoginBaseUrl = "http://192.168.2.9:6400"; // 基本请求接口
|
||||
static const devBaseUrlOfReport = "http://192.168.2.9:4000"; // 获取报告接口*/
|
||||
|
||||
static const devBaseUrl = "https://mk-hw.23544.com"; // 基本请求
|
||||
static const devLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
|
||||
static const devBaseUrlOfReport = "https://dc-api.23544.com"; // 获取报告接口
|
||||
static const devBaseUrl = "https://mhw.qwit.top"; // 基本请求
|
||||
static const devLoginBaseUrl = "https://mhw.qwit.top"; // 登录接口
|
||||
static const devBaseUrlOfReport = "https://mhw.qwit.top"; // 获取报告接口
|
||||
static const proBaseUrlOfHomework = "https://mhw.qwit.top/hw"; // 获取作业接口
|
||||
|
||||
/* 正式地址 */
|
||||
static const proBaseUrl = "https://mk-hw.23544.com"; // 基本请求
|
||||
static const proLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
|
||||
static const proBaseUrlOfReport = "https://dc-api.23544.com"; // 获取报告接口
|
||||
static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
|
||||
// static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
|
||||
|
||||
static const hwProxyKeywords = "/hw"; // 作业代理条件关键字
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
// 作业类型枚举
|
||||
enum JobMarkingTypeEnum {
|
||||
UNUSED(name: '未使用废弃', indexValue: 0),
|
||||
JOB(name: '作业', indexValue: 1),
|
||||
EXAMINATION(name: '考试', indexValue: 2);
|
||||
|
||||
const JobMarkingTypeEnum({required this.name, required this.indexValue});
|
||||
final String name;
|
||||
final int indexValue;
|
||||
}
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_data_report.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobDataReport extends Object {
|
||||
|
||||
@JsonKey(name: 'jobId')
|
||||
int jobId;
|
||||
|
||||
@JsonKey(name: 'jobName')
|
||||
String jobName;
|
||||
|
||||
@JsonKey(name: 'gradeName')
|
||||
String gradeName;
|
||||
|
||||
@JsonKey(name: 'className')
|
||||
String? className;
|
||||
|
||||
@JsonKey(name: 'validCount')
|
||||
int validCount;
|
||||
|
||||
@JsonKey(name: 'noAnswerCount')
|
||||
int noAnswerCount;
|
||||
|
||||
@JsonKey(name: 'kgValidRate')
|
||||
double kgValidRate;
|
||||
|
||||
@JsonKey(name: 'kgQuestionCount')
|
||||
int kgQuestionCount;
|
||||
|
||||
@JsonKey(name: 'zgValidRate')
|
||||
double zgValidRate;
|
||||
|
||||
@JsonKey(name: 'zgQuestionCount')
|
||||
int zgQuestionCount;
|
||||
|
||||
@JsonKey(name: 'studentDetails')
|
||||
List<StudentDetails> studentDetails;
|
||||
|
||||
JobDataReport(this.jobId,this.jobName,this.gradeName,this.className,this.validCount,this.noAnswerCount,this.kgValidRate,this.kgQuestionCount,this.zgValidRate,this.zgQuestionCount,this.studentDetails,);
|
||||
|
||||
factory JobDataReport.fromJson(Map<String, dynamic> srcJson) => _$JobDataReportFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobDataReportToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class StudentDetails extends Object {
|
||||
|
||||
@JsonKey(name: 'studentId')
|
||||
int? studentId;
|
||||
|
||||
@JsonKey(name: 'studentName')
|
||||
String? studentName;
|
||||
|
||||
@JsonKey(name: 'kgValidCount')
|
||||
int kgValidCount;
|
||||
|
||||
@JsonKey(name: 'kgValidRate')
|
||||
int kgValidRate;
|
||||
|
||||
@JsonKey(name: 'zgValidCount')
|
||||
int zgValidCount;
|
||||
|
||||
@JsonKey(name: 'zgValidRate')
|
||||
int zgValidRate;
|
||||
|
||||
@JsonKey(name: 'kgDetails')
|
||||
List<KgDetails> kgDetails;
|
||||
|
||||
@JsonKey(name: 'zgDetails')
|
||||
List<KgDetails> zgDetails;
|
||||
|
||||
StudentDetails(this.studentId,this.studentName,this.kgValidCount,this.kgValidRate,this.zgValidCount,this.zgValidRate,this.kgDetails,this.zgDetails,);
|
||||
|
||||
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StudentDetailsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class KgDetails extends Object {
|
||||
|
||||
@JsonKey(name: 'questionNo')
|
||||
String questionNo;
|
||||
|
||||
@JsonKey(name: 'questionId')
|
||||
int questionId;
|
||||
|
||||
@JsonKey(name: 'partName')
|
||||
String partName;
|
||||
|
||||
@JsonKey(name: 'state')
|
||||
int state;
|
||||
|
||||
@JsonKey(name: 'studentAnswer')
|
||||
String? studentAnswer;
|
||||
|
||||
@JsonKey(name: 'questionAnswer')
|
||||
String? questionAnswer;
|
||||
|
||||
@JsonKey(name: 'useTime')
|
||||
int? useTime;
|
||||
|
||||
@JsonKey(name: 'annotateAnswers')
|
||||
String? annotateAnswers;
|
||||
|
||||
@JsonKey(name: 'score')
|
||||
double? score;
|
||||
|
||||
KgDetails(this.questionNo,this.questionId,this.partName,this.state,this.studentAnswer,this.questionAnswer,this.useTime,this.annotateAnswers,this.score,);
|
||||
|
||||
factory KgDetails.fromJson(Map<String, dynamic> srcJson) => _$KgDetailsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$KgDetailsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'job_data_report.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
JobDataReport _$JobDataReportFromJson(Map<String, dynamic> json) =>
|
||||
JobDataReport(
|
||||
json['jobId'] as int,
|
||||
json['jobName'] as String,
|
||||
json['gradeName'] as String,
|
||||
json['className'] as String?,
|
||||
json['validCount'] as int,
|
||||
json['noAnswerCount'] as int,
|
||||
(json['kgValidRate'] as num).toDouble(),
|
||||
json['kgQuestionCount'] as int,
|
||||
(json['zgValidRate'] as num).toDouble(),
|
||||
json['zgQuestionCount'] as int,
|
||||
(json['studentDetails'] as List<dynamic>)
|
||||
.map((e) => StudentDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$JobDataReportToJson(JobDataReport instance) =>
|
||||
<String, dynamic>{
|
||||
'jobId': instance.jobId,
|
||||
'jobName': instance.jobName,
|
||||
'gradeName': instance.gradeName,
|
||||
'className': instance.className,
|
||||
'validCount': instance.validCount,
|
||||
'noAnswerCount': instance.noAnswerCount,
|
||||
'kgValidRate': instance.kgValidRate,
|
||||
'kgQuestionCount': instance.kgQuestionCount,
|
||||
'zgValidRate': instance.zgValidRate,
|
||||
'zgQuestionCount': instance.zgQuestionCount,
|
||||
'studentDetails': instance.studentDetails,
|
||||
};
|
||||
|
||||
StudentDetails _$StudentDetailsFromJson(Map<String, dynamic> json) =>
|
||||
StudentDetails(
|
||||
json['studentId'] as int,
|
||||
json['studentName'] as String,
|
||||
json['kgValidCount'] as int,
|
||||
json['kgValidRate'] as int,
|
||||
json['zgValidCount'] as int,
|
||||
json['zgValidRate'] as int,
|
||||
(json['kgDetails'] as List<dynamic>)
|
||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
(json['zgDetails'] as List<dynamic>)
|
||||
.map((e) => KgDetails.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$StudentDetailsToJson(StudentDetails instance) =>
|
||||
<String, dynamic>{
|
||||
'studentId': instance.studentId,
|
||||
'studentName': instance.studentName,
|
||||
'kgValidCount': instance.kgValidCount,
|
||||
'kgValidRate': instance.kgValidRate,
|
||||
'zgValidCount': instance.zgValidCount,
|
||||
'zgValidRate': instance.zgValidRate,
|
||||
'kgDetails': instance.kgDetails,
|
||||
'zgDetails': instance.zgDetails,
|
||||
};
|
||||
|
||||
KgDetails _$KgDetailsFromJson(Map<String, dynamic> json) => KgDetails(
|
||||
json['questionNo'] as String,
|
||||
json['questionId'] as int,
|
||||
json['partName'] as String,
|
||||
json['state'] as int,
|
||||
json['studentAnswer'] as String?,
|
||||
json['questionAnswer'] as String?,
|
||||
json['useTime'] as int?,
|
||||
json['annotateAnswers'] as String?,
|
||||
(json['score'] as num?)?.toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$KgDetailsToJson(KgDetails instance) => <String, dynamic>{
|
||||
'questionNo': instance.questionNo,
|
||||
'questionId': instance.questionId,
|
||||
'partName': instance.partName,
|
||||
'state': instance.state,
|
||||
'studentAnswer': instance.studentAnswer,
|
||||
'questionAnswer': instance.questionAnswer,
|
||||
'useTime': instance.useTime,
|
||||
'annotateAnswers': instance.annotateAnswers,
|
||||
'score': instance.score,
|
||||
};
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_fav_student.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobFavStudent extends Object {
|
||||
|
||||
@JsonKey(name: 'page')
|
||||
int page;
|
||||
|
||||
@JsonKey(name: 'pageSize')
|
||||
int pageSize;
|
||||
|
||||
@JsonKey(name: 'total')
|
||||
int total;
|
||||
|
||||
@JsonKey(name: 'totalPages')
|
||||
int totalPages;
|
||||
|
||||
@JsonKey(name: 'items')
|
||||
List<Items> items;
|
||||
|
||||
@JsonKey(name: 'hasPrevPage')
|
||||
bool hasPrevPage;
|
||||
|
||||
@JsonKey(name: 'hasNextPage')
|
||||
bool hasNextPage;
|
||||
|
||||
JobFavStudent(this.page,this.pageSize,this.total,this.totalPages,this.items,this.hasPrevPage,this.hasNextPage,);
|
||||
|
||||
factory JobFavStudent.fromJson(Map<String, dynamic> srcJson) => _$JobFavStudentFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobFavStudentToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class Items extends Object {
|
||||
|
||||
@JsonKey(name: 'id')
|
||||
String id;
|
||||
|
||||
@JsonKey(name: 'teacherId')
|
||||
int teacherId;
|
||||
|
||||
@JsonKey(name: 'teacherAccount')
|
||||
String teacherAccount;
|
||||
|
||||
@JsonKey(name: 'folderName')
|
||||
String folderName;
|
||||
|
||||
@JsonKey(name: 'jobId')
|
||||
int jobId;
|
||||
|
||||
@JsonKey(name: 'jobName')
|
||||
String jobName;
|
||||
|
||||
@JsonKey(name: 'studentId')
|
||||
int studentId;
|
||||
|
||||
@JsonKey(name: 'studentName')
|
||||
String studentName;
|
||||
|
||||
@JsonKey(name: 'className')
|
||||
String className;
|
||||
|
||||
@JsonKey(name: 'questionPage')
|
||||
int questionPage;
|
||||
|
||||
@JsonKey(name: 'questionPicture')
|
||||
String questionPicture;
|
||||
|
||||
@JsonKey(name: 'createTime')
|
||||
String createTime;
|
||||
|
||||
@JsonKey(name: 'schoolName')
|
||||
String schoolName;
|
||||
|
||||
@JsonKey(name: 'gradeName')
|
||||
String gradeName;
|
||||
|
||||
@JsonKey(name: 'studentClassName')
|
||||
String studentClassName;
|
||||
|
||||
Items(this.id,this.teacherId,this.teacherAccount,this.folderName,this.jobId,this.jobName,this.studentId,this.studentName,this.className,this.questionPage,this.questionPicture,this.createTime,this.schoolName,this.gradeName,this.studentClassName,);
|
||||
|
||||
factory Items.fromJson(Map<String, dynamic> srcJson) => _$ItemsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ItemsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_favorite_item_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class JobFavoriteItemModel extends Object {
|
||||
@JsonKey(name: 'studentId')
|
||||
int studentId;
|
||||
|
||||
@JsonKey(name: 'studentName')
|
||||
String studentName;
|
||||
|
||||
@JsonKey(name: 'createTime')
|
||||
String createTime;
|
||||
|
||||
JobFavoriteItemModel(
|
||||
this.studentId,
|
||||
this.studentName,
|
||||
this.createTime,
|
||||
);
|
||||
|
||||
factory JobFavoriteItemModel.fromJson(Map<String, dynamic> srcJson) => _$JobFavoriteItemModelFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobFavoriteItemModelToJson(this);
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_favorite_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class JobFavoriteModel extends Object {
|
||||
@JsonKey(name: 'schoolId')
|
||||
int schoolId;
|
||||
|
||||
@JsonKey(name: 'gradeId')
|
||||
int gradeId;
|
||||
|
||||
@JsonKey(name: 'graduationYear')
|
||||
String graduationYear;
|
||||
|
||||
@JsonKey(name: 'className')
|
||||
String className;
|
||||
|
||||
@JsonKey(name: 'count')
|
||||
int count;
|
||||
|
||||
JobFavoriteModel(
|
||||
this.schoolId,
|
||||
this.gradeId,
|
||||
this.graduationYear,
|
||||
this.className,
|
||||
this.count,
|
||||
);
|
||||
|
||||
factory JobFavoriteModel.fromJson(Map<String, dynamic> srcJson) => _$JobFavoriteModelFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobFavoriteModelToJson(this);
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_level_set_params.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobLevelSetParams extends Object {
|
||||
|
||||
@JsonKey(name: 'studentGroupDetailId')
|
||||
int studentGroupDetailId;
|
||||
|
||||
@JsonKey(name: 'readLevel')
|
||||
int readLevel;
|
||||
|
||||
JobLevelSetParams(this.studentGroupDetailId,this.readLevel,);
|
||||
|
||||
factory JobLevelSetParams.fromJson(Map<String, dynamic> srcJson) => _$JobLevelSetParamsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobLevelSetParamsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -51,6 +51,12 @@ class JobReportModel extends Object {
|
|||
@JsonKey(name: 'overallTitles')
|
||||
List<OverallTitles> overallTitles;
|
||||
|
||||
@JsonKey(name: 'kgReport')
|
||||
KgReport kgReport;
|
||||
|
||||
@JsonKey(name: 'zgReport')
|
||||
ZgReport zgReport;
|
||||
|
||||
// 前端自定义 -- 全对学生
|
||||
@JsonKey(name: 'allpairsStudents')
|
||||
List<StudentAnswerInfos>? allpairsStudents;
|
||||
|
|
@ -82,7 +88,10 @@ class JobReportModel extends Object {
|
|||
this.knowledgeInfos,
|
||||
this.questionAnswerInfos,
|
||||
this.studentAnswerInfos,
|
||||
this.overallTitles, [
|
||||
this.overallTitles,
|
||||
this.kgReport,
|
||||
this.zgReport,
|
||||
[
|
||||
this.allpairsStudents,
|
||||
this.passStudents,
|
||||
this.disqualifiedStudents,
|
||||
|
|
@ -274,3 +283,84 @@ class OverallTitles extends Object {
|
|||
|
||||
Map<String, dynamic> toJson() => _$OverallTitlesToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class KgReport extends Object {
|
||||
|
||||
@JsonKey(name: 'correctRate')
|
||||
int correctRate;
|
||||
|
||||
@JsonKey(name: 'details')
|
||||
List<Details> details;
|
||||
|
||||
KgReport(this.correctRate,this.details,);
|
||||
|
||||
factory KgReport.fromJson(Map<String, dynamic> srcJson) => _$KgReportFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$KgReportToJson(this);
|
||||
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class ZgReport extends Object {
|
||||
|
||||
@JsonKey(name: 'correctRate')
|
||||
int correctRate;
|
||||
|
||||
@JsonKey(name: 'details')
|
||||
List<Details> details;
|
||||
|
||||
ZgReport(this.correctRate,this.details,);
|
||||
|
||||
factory ZgReport.fromJson(Map<String, dynamic> srcJson) => _$ZgReportFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ZgReportToJson(this);
|
||||
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Details extends Object {
|
||||
|
||||
@JsonKey(name: 'questionNo')
|
||||
String questionNo;
|
||||
|
||||
@JsonKey(name: 'questionId')
|
||||
int questionId;
|
||||
|
||||
@JsonKey(name: 'partName')
|
||||
String partName;
|
||||
|
||||
@JsonKey(name: 'questionType')
|
||||
int questionType;
|
||||
|
||||
@JsonKey(name: 'validRate')
|
||||
int validRate;
|
||||
|
||||
@JsonKey(name: 'validCount')
|
||||
String validCount;
|
||||
|
||||
@JsonKey(name: 'validStudentNames')
|
||||
List<String> validStudentNames;
|
||||
|
||||
@JsonKey(name: 'correctRate')
|
||||
int correctRate;
|
||||
|
||||
@JsonKey(name: 'questionAnswer')
|
||||
String questionAnswer;
|
||||
|
||||
@JsonKey(name: 'questionPicture')
|
||||
String? questionPicture;
|
||||
|
||||
@JsonKey(name: 'priorityGeneral')
|
||||
String priorityGeneral;
|
||||
|
||||
@JsonKey(name: 'priorityStudentNames')
|
||||
List<String> priorityStudentNames;
|
||||
|
||||
Details(this.questionNo,this.questionId,this.partName,this.questionType,this.validRate,this.validCount,this.validStudentNames,this.correctRate,this.questionAnswer,this.questionPicture,this.priorityGeneral,this.priorityStudentNames,);
|
||||
|
||||
factory Details.fromJson(Map<String, dynamic> srcJson) => _$DetailsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DetailsToJson(this);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part "job_student_goups.g.dart";
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobStudentGroups extends Object {
|
||||
|
||||
@JsonKey(name: 'groupId')
|
||||
int groupId;
|
||||
|
||||
@JsonKey(name: 'groupName')
|
||||
String groupName;
|
||||
|
||||
@JsonKey(name: 'classNames')
|
||||
List<String> classNames;
|
||||
|
||||
JobStudentGroups(this.groupId,this.groupName,this.classNames,);
|
||||
|
||||
factory JobStudentGroups.fromJson(Map<String, dynamic> srcJson) => _$JobStudentGroupsFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobStudentGroupsToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'job_student_level.g.dart';
|
||||
|
||||
|
||||
@JsonSerializable()
|
||||
class JobStudentLevel extends Object {
|
||||
|
||||
@JsonKey(name: 'studentGroupDetailId')
|
||||
int studentGroupDetailId;
|
||||
|
||||
@JsonKey(name: 'studentId')
|
||||
int studentId;
|
||||
|
||||
@JsonKey(name: 'studentName')
|
||||
String studentName;
|
||||
|
||||
@JsonKey(name: 'createTime')
|
||||
String createTime;
|
||||
|
||||
@JsonKey(name: 'readLevel')
|
||||
int readLevel;
|
||||
|
||||
JobStudentLevel(this.studentGroupDetailId,this.studentId,this.studentName,this.createTime,this.readLevel,);
|
||||
|
||||
factory JobStudentLevel.fromJson(Map<String, dynamic> srcJson) => _$JobStudentLevelFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobStudentLevelToJson(this);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:marking_app/common/model/enum/job_marking_type_enum.dart';
|
||||
|
||||
part 'job_task_item.g.dart';
|
||||
|
||||
|
|
@ -40,8 +41,8 @@ class JobTaskItem extends Object {
|
|||
@JsonKey(name: 'precision')
|
||||
double precision;
|
||||
|
||||
@JsonKey(name: 'markingTasks')
|
||||
List<MarkingTasks> markingTasks;
|
||||
// @JsonKey(name: 'markingTasks')
|
||||
// List<MarkingTasks> markingTasks;
|
||||
|
||||
@JsonKey(name: 'createTime')
|
||||
String createTime;
|
||||
|
|
@ -49,23 +50,33 @@ class JobTaskItem extends Object {
|
|||
@JsonKey(name: 'progressPercentage')
|
||||
double progressPercentage; // 进度百分比
|
||||
|
||||
@JsonKey(name: 'markingType')
|
||||
int markingType; // 考试类型
|
||||
|
||||
@JsonKey(name: 'markingTypeEnum')
|
||||
JobMarkingTypeEnum markingTypeEnum; // 考试类型
|
||||
|
||||
int taskCount; // 参与班级数量
|
||||
|
||||
JobTaskItem(
|
||||
this.id,
|
||||
this.title,
|
||||
this.subjectName,
|
||||
this.genderName,
|
||||
this.isFinish,
|
||||
this.studentCount,
|
||||
this.commitStudentCount,
|
||||
this.totalCount,
|
||||
this.finishCount,
|
||||
this.objectivePrecision,
|
||||
this.subjectivePrecision,
|
||||
this.precision,
|
||||
this.markingTasks,
|
||||
this.createTime, {
|
||||
this.progressPercentage = 0,
|
||||
}) {
|
||||
this.id,
|
||||
this.title,
|
||||
this.subjectName,
|
||||
this.genderName,
|
||||
this.isFinish,
|
||||
this.studentCount,
|
||||
this.commitStudentCount,
|
||||
this.totalCount,
|
||||
this.finishCount,
|
||||
this.objectivePrecision,
|
||||
this.subjectivePrecision,
|
||||
this.precision,
|
||||
// this.markingTasks,
|
||||
this.createTime,
|
||||
this.markingType,
|
||||
this.taskCount,
|
||||
{this.progressPercentage = 0,
|
||||
this.markingTypeEnum = JobMarkingTypeEnum.UNUSED}) {
|
||||
try {
|
||||
progressPercentage = (finishCount / totalCount) * 100;
|
||||
if (progressPercentage.isNaN) {
|
||||
|
|
@ -76,6 +87,11 @@ class JobTaskItem extends Object {
|
|||
} catch (e) {
|
||||
progressPercentage = 0;
|
||||
}
|
||||
try {
|
||||
markingTypeEnum = JobMarkingTypeEnum.values[this.markingType];
|
||||
} catch (e) {
|
||||
markingTypeEnum = JobMarkingTypeEnum.UNUSED;
|
||||
}
|
||||
}
|
||||
|
||||
factory JobTaskItem.fromJson(Map<String, dynamic> srcJson) => _$JobTaskItemFromJson(srcJson);
|
||||
|
|
@ -91,6 +107,10 @@ class MarkingTasks extends Object {
|
|||
@JsonKey(name: 'className')
|
||||
String className;
|
||||
|
||||
int dpcSchoolId;
|
||||
|
||||
int dpcGradeId;
|
||||
|
||||
@JsonKey(name: 'teacherName')
|
||||
String teacherName;
|
||||
|
||||
|
|
@ -132,8 +152,14 @@ class MarkingTasks extends Object {
|
|||
@JsonKey(name: 'canGoReview')
|
||||
bool canGoReview; // 是否能批阅
|
||||
|
||||
/** 前端自定义字段 */
|
||||
@JsonKey(name: 'collectNumber')
|
||||
int collectNumber; // 是否能批阅
|
||||
|
||||
MarkingTasks(
|
||||
this.id,
|
||||
this.dpcSchoolId,
|
||||
this.dpcGradeId,
|
||||
this.className,
|
||||
this.teacherName,
|
||||
this.isFinish,
|
||||
|
|
@ -141,13 +167,14 @@ class MarkingTasks extends Object {
|
|||
this.commitStudentCount,
|
||||
this.totalCount,
|
||||
this.finishCount,
|
||||
this.precision,
|
||||
this.objectivePrecision,
|
||||
this.subjectivePrecision,
|
||||
this.precision,
|
||||
this.canMarking, {
|
||||
this.progressPercentage = 0,
|
||||
this.canGoReview = true,
|
||||
this.finishTime,
|
||||
this.collectNumber = 0,
|
||||
}) {
|
||||
try {
|
||||
progressPercentage = (finishCount / totalCount) * 100;
|
||||
|
|
@ -158,6 +185,11 @@ class MarkingTasks extends Object {
|
|||
} catch (e) {
|
||||
progressPercentage = 0;
|
||||
}
|
||||
try {
|
||||
precision = precision / 100;
|
||||
objectivePrecision = objectivePrecision / 100;
|
||||
subjectivePrecision = subjectivePrecision / 100;
|
||||
} catch (e) {}
|
||||
|
||||
canGoReview = totalCount > 0 && canMarking && !isFinish;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,12 +21,22 @@ class MarkingListParams extends BasePage {
|
|||
@JsonKey(name: 'PageType')
|
||||
int pageType;
|
||||
|
||||
String? startTime;
|
||||
String? endTime;
|
||||
|
||||
int? markingType; // 1 作业 2考试
|
||||
|
||||
MarkingListParams({
|
||||
required this.isFinish,
|
||||
required this.pageType,
|
||||
required page,
|
||||
required limit,
|
||||
}) : super(page, limit);
|
||||
this.markingType,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
}) : super(page, limit) {
|
||||
this.markingType ??= 1;
|
||||
}
|
||||
|
||||
factory MarkingListParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingListParamsFromJson(srcJson);
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import 'dart:async';
|
|||
|
||||
import 'package:connectivity_plus/connectivity_plus.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
|
@ -83,6 +84,28 @@ class _MyAppState extends State<MyApp> {
|
|||
title: '远轩阅卷系统',
|
||||
navigatorKey: TheGlobal.navigatorKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
||||
// supportedLocales: [
|
||||
// const Locale('zh', 'CN'), // 中文简体
|
||||
// // 其他支持的locale可以在这里添加
|
||||
// ],
|
||||
// 这里是国际化支持,确保添加flutter_localizations依赖
|
||||
supportedLocales: [
|
||||
const Locale('zh', 'CN'), // 中文简体
|
||||
// 其他支持的locale可以在这里添加
|
||||
],
|
||||
localizationsDelegates: [
|
||||
// ...其他delegates
|
||||
GlobalMaterialLocalizations.delegate,
|
||||
GlobalWidgetsLocalizations.delegate,
|
||||
GlobalCupertinoLocalizations.delegate, // 如果你使用了Cupertino风格的组件
|
||||
// ...添加其他必要的delegates
|
||||
],
|
||||
localeResolutionCallback: (locale, supportedLocales) {
|
||||
// 在这里可以实现自定义的locale解析逻辑
|
||||
// 如果需要,返回你想要的Locale对象
|
||||
return locale;
|
||||
},
|
||||
theme: ThemeData(
|
||||
primarySwatch: createMaterialColor(const Color.fromRGBO(46, 91, 255, 1)),
|
||||
// textTheme: Typography.englishLike2018.apply(fontSizeFactor: 1.sp,),
|
||||
|
|
|
|||
|
|
@ -357,29 +357,6 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap})
|
|||
isScrollable: true,
|
||||
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
||||
indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||
// labelPadding: EdgeInsets.symmetric(vertical: 0), // 设置标签的内边距
|
||||
// background: linear-gradient(270deg, #2E5BFF 30.23%, rgba(46, 91, 255, 0.00) 96.59%);
|
||||
// indicatorColor: RectangleIndicator(),
|
||||
// indicator: BoxDecoration(
|
||||
// gradient: LinearGradient(
|
||||
// begin: Alignment.centerLeft,
|
||||
// end: Alignment.centerRight,
|
||||
// colors: [
|
||||
// Color.fromRGBO(46, 91, 255, 0.00),
|
||||
// Color(0xFF2E5BFF),
|
||||
// ],
|
||||
// stops: [0.3023, 0.9659],
|
||||
// // transform: GradientRotation(3.14 / 2), //将270度转换为弧度
|
||||
// ),
|
||||
// ),
|
||||
// indicator: BoxDecoration(
|
||||
// // 设置指示器样式
|
||||
// gradient: LinearGradient(
|
||||
// colors: [Colors.yellow, Colors.green], // 设置渐变色
|
||||
// begin: Alignment.centerLeft,
|
||||
// end: Alignment.centerRight,
|
||||
// ),
|
||||
// ),
|
||||
onTap: onTap,
|
||||
tabs: const <Widget>[Tab(text: '阅卷'), Tab(text: '作业')],
|
||||
),
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
|
|
@ -18,6 +19,7 @@ import 'package:marking_app/common/config/request_config.dart';
|
|||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart';
|
||||
import 'package:marking_app/provider/review_provider.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
|
@ -25,6 +27,7 @@ import 'package:marking_app/common/model/common/base_page_data.dart';
|
|||
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/mixin/refresh_data_handle.dart';
|
||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||
|
||||
part 'index.g.dart';
|
||||
|
||||
|
|
@ -39,7 +42,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
|||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||
with
|
||||
CommonMixin,
|
||||
SingleTickerProviderStateMixin,
|
||||
TickerProviderStateMixin,
|
||||
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
||||
AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
|
|
@ -47,6 +50,8 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
|
||||
/* Tab控制器 */
|
||||
late TabController _tabController;
|
||||
late TabController _tabController2;
|
||||
|
||||
int _tabIndex = 0;
|
||||
bool completedToRefresh = true;
|
||||
|
||||
|
|
@ -95,6 +100,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
length: 2,
|
||||
vsync: this,
|
||||
);
|
||||
_tabController2 = TabController(length: 4, vsync: this);
|
||||
_refreshController1 = EasyRefreshController();
|
||||
_refreshController2 = EasyRefreshController();
|
||||
|
||||
|
|
@ -117,6 +123,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
if (_currentTaskIdListener != null) {
|
||||
_currentTaskIdListener!();
|
||||
}
|
||||
_tabController2.dispose();
|
||||
_tabController.dispose();
|
||||
_refreshController1.dispose();
|
||||
_refreshController2.dispose();
|
||||
|
|
@ -167,11 +174,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||
padding: EdgeInsets.only(bottom: 9.h, top: 4.h),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: SizedBox(),
|
||||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
|
|
@ -254,11 +259,41 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: SizedBox(),
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(context, RouterManager.jobStudentGroupPath,
|
||||
transition: getTransition());
|
||||
},
|
||||
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
||||
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
if (_tabIndex == 1)
|
||||
$CompletedJobConditionFilter(
|
||||
controller: _tabController2,
|
||||
jobType: params2.markingType ?? 1,
|
||||
customTime: _tabController2.index != 3 || (params2.startTime == null && params2.endTime == null)
|
||||
? null
|
||||
: PickerDateRange(
|
||||
params2.startTime == null ? null : DateTime.parse(params2.startTime!),
|
||||
params2.endTime == null ? null : DateTime.parse(params2.endTime!),
|
||||
),
|
||||
onJobTypeTap: (int jobTypeVal) {
|
||||
params2.markingType = jobTypeVal;
|
||||
_refreshController2.callRefresh();
|
||||
},
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
if (startTime == null && endTime == null && _tabController2.index == 3) {
|
||||
_tabController2.animateTo(0);
|
||||
}
|
||||
params2.endTime = endTime;
|
||||
params2.startTime = startTime;
|
||||
_refreshController2.callRefresh();
|
||||
},
|
||||
),
|
||||
Expanded(
|
||||
child: IndexedStack(
|
||||
index: _tabIndex,
|
||||
|
|
@ -304,6 +339,7 @@ Widget $easyRefresh({
|
|||
required int tab,
|
||||
}) {
|
||||
bool completed = tab == 2; // 是否是待批阅
|
||||
bool isPadFlag = isPad();
|
||||
return EasyRefresh(
|
||||
firstRefresh: true,
|
||||
taskIndependence: true,
|
||||
|
|
@ -313,18 +349,374 @@ Widget $easyRefresh({
|
|||
controller: controller,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
child: ListView.builder(
|
||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 16.w, right: 16.w),
|
||||
itemBuilder: (context, index) {
|
||||
return HomeworkTasksViewItem(
|
||||
completed: completed,
|
||||
jobTaskItem: data[index],
|
||||
call: () => controller.callRefresh(),
|
||||
);
|
||||
},
|
||||
itemCount: data.length,
|
||||
),
|
||||
child: completed && isPadFlag
|
||||
? GridView(
|
||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 2.2 //宽高比为1时,子widget
|
||||
),
|
||||
children: data.map((e) {
|
||||
return $ReviewedItem(jobTaskItem: e);
|
||||
}).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
padding: EdgeInsets.only(top: 11.h, bottom: 10.h, left: 12.w, right: 12.w),
|
||||
itemBuilder: (context, index) {
|
||||
return HomeworkTasksViewItem(
|
||||
completed: completed,
|
||||
jobTaskItem: data[index],
|
||||
call: () => controller.callRefresh(),
|
||||
);
|
||||
},
|
||||
itemCount: data.length,
|
||||
),
|
||||
onRefresh: () => onRefresh(controller, params, tab),
|
||||
onLoad: () => onLoad(controller, params, tab),
|
||||
);
|
||||
}
|
||||
|
||||
@swidget
|
||||
Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||
EdgeInsets padEdg = EdgeInsets.symmetric(horizontal: 10.w);
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
String url =
|
||||
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
|
||||
RouterManager.router.navigateTo(context, url, transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(210, 216, 241, 1),
|
||||
offset: Offset.zero, //阴影y轴偏移量
|
||||
blurRadius: 5.8, //阴影模糊程度
|
||||
spreadRadius: 0, //阴影扩散程度
|
||||
)
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
// 顶部任务名称
|
||||
Padding(
|
||||
padding: padEdg,
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 32.w,
|
||||
height: 18.h,
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
decoration: BoxDecoration(
|
||||
color: jobTaskItem.markingTypeEnum.name == '作业'
|
||||
? const Color.fromRGBO(104, 136, 253, 1)
|
||||
: const Color.fromRGBO(255, 175, 56, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(18.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
bottomLeft: Radius.circular(4.r),
|
||||
bottomRight: Radius.circular(4.r),
|
||||
),
|
||||
),
|
||||
margin: EdgeInsets.only(right: 4.w),
|
||||
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
||||
),
|
||||
quickText(
|
||||
jobTaskItem.title,
|
||||
size: 16.sp,
|
||||
color: Color.fromRGBO(70, 70, 70, 1),
|
||||
fontWeight: FontWeight.bold,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: padEdg,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
quickText(
|
||||
jobTaskItem.createTime.substring(0, 10),
|
||||
color: Color.fromRGBO(97, 97, 97, 1),
|
||||
size: 10.sp,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
quickText(' / ', color: Color.fromRGBO(76, 199, 147, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||
quickText(
|
||||
'参与班级:${jobTaskItem.taskCount}',
|
||||
color: Color.fromRGBO(76, 199, 147, 1),
|
||||
size: 10.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
quickText(' / ', color: Color.fromRGBO(116, 145, 253, 1), size: 10.sp, fontWeight: FontWeight.w500),
|
||||
quickText(
|
||||
'科目:' + jobTaskItem.subjectName,
|
||||
color: Color.fromRGBO(116, 145, 253, 1),
|
||||
size: 10.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.jobReportPagePath +
|
||||
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
}),
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(bottomLeft: Radius.circular(6.r), bottomRight: Radius.circular(6.r)),
|
||||
color: Colors.white,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(0, 0, 0, 0.15),
|
||||
offset: Offset(0, -0.0001), //阴影y轴偏移量
|
||||
blurRadius: 4, //阴影模糊程度
|
||||
spreadRadius: 0, //阴影扩散程度
|
||||
)
|
||||
],
|
||||
),
|
||||
child: Row(children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
alignment: Alignment.center,
|
||||
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
|
||||
),
|
||||
),
|
||||
]),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// 筛选时间
|
||||
@swidget
|
||||
Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap, PickerDateRange? customTime}) {
|
||||
var customTimeStr = '自定义';
|
||||
if (customTime != null) {
|
||||
customTimeStr = customTime.startDate?.toString().substring(0, 10) ?? '';
|
||||
if (customTime.endDate != null) {
|
||||
print(customTime.startDate!.year == customTime.endDate!.year);
|
||||
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
|
||||
customTimeStr =
|
||||
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
||||
}
|
||||
}
|
||||
}
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
child: TabBar(
|
||||
controller: controller,
|
||||
unselectedLabelStyle: TextStyle(fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Color.fromRGBO(116, 145, 253, 1),
|
||||
),
|
||||
isScrollable: true,
|
||||
labelColor: const Color.fromRGBO(45, 56, 76, 1),
|
||||
indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
||||
onTap: onTap,
|
||||
tabs: <Widget>[
|
||||
const Tab(text: '全部'),
|
||||
const Tab(text: '近一周'),
|
||||
const Tab(text: '近一月'),
|
||||
Tab(text: customTimeStr),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 已完成作业条件筛选栏
|
||||
@hwidget
|
||||
Widget $completedJobConditionFilter(BuildContext context,
|
||||
{required TabController controller,
|
||||
required int jobType,
|
||||
PickerDateRange? customTime,
|
||||
required ValueChanged<int> onJobTypeTap,
|
||||
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
||||
List<Map<String, dynamic>> jobTypes = [
|
||||
{'type': 1, 'name': '作业'},
|
||||
{'type': 2, 'name': '考试'}
|
||||
];
|
||||
var jobTypeState = useState(0);
|
||||
var customTimeState = useState<PickerDateRange?>(null);
|
||||
|
||||
useEffect(() {
|
||||
if (jobTypeState.value != jobType) jobTypeState.value = jobType;
|
||||
if (customTimeState.value != customTime) customTimeState.value = customTime;
|
||||
|
||||
return () {};
|
||||
}, []);
|
||||
|
||||
DateTime getWeekStartDate() {
|
||||
DateTime now = DateTime.now();
|
||||
int dayOfWeek = now.weekday; // 获取今天是周几(1代表周一,7代表周日)
|
||||
int diff = dayOfWeek - 1; // 计算今天距离周一的天数差
|
||||
if (diff < 0) {
|
||||
diff += 7; // 如果是周日,则需要加上一周的天数
|
||||
}
|
||||
return now.subtract(Duration(days: diff)); // 减去天数差,得到本周一的时间
|
||||
}
|
||||
|
||||
DateTime getWeekEndDate() {
|
||||
DateTime now = DateTime.now();
|
||||
int dayOfWeek = now.weekday; // 获取今天是周几
|
||||
int diff = 7 - dayOfWeek; // 计算今天距离周日的天数差
|
||||
if (diff == 0) {
|
||||
diff = 7; // 如果是周日,则加上一周的天数
|
||||
}
|
||||
return now.add(Duration(days: diff)); // 加上天数差减一,得到本周日的时间
|
||||
}
|
||||
|
||||
DateTime getMonthStartDate() {
|
||||
DateTime now = DateTime.now();
|
||||
return DateTime(now.year, now.month, 1); // 获取当前月份的第一天
|
||||
}
|
||||
|
||||
DateTime getMonthEndDate() {
|
||||
DateTime now = DateTime.now();
|
||||
int nextMonth = now.month + 1;
|
||||
if (nextMonth > 12) {
|
||||
nextMonth = 1;
|
||||
now = now.add(Duration(days: 31 - now.day)); // 跨年了,所以加到当前月的最后一天
|
||||
} else {
|
||||
now = now.add(Duration(days: DateTime(now.year, nextMonth, 0).day - now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
||||
}
|
||||
return now;
|
||||
}
|
||||
|
||||
return Container(
|
||||
height: 36.h,
|
||||
padding: EdgeInsets.only(left: 4.w, right: 12.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
border: Border(bottom: BorderSide(color: Color.fromRGBO(204, 204, 204, 1), width: 1)),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
$TheTabBar(
|
||||
controller: controller,
|
||||
customTime: customTimeState.value,
|
||||
onTap: (int val) async {
|
||||
switch (val) {
|
||||
case 0: // 全部
|
||||
onTimeFilter(null, null);
|
||||
break;
|
||||
case 1: // 近一周
|
||||
onTimeFilter(
|
||||
getWeekStartDate().toString().substring(0, 10),
|
||||
getWeekEndDate().toString().substring(0, 10),
|
||||
);
|
||||
break;
|
||||
case 2: // 近一个月
|
||||
onTimeFilter(
|
||||
getMonthStartDate().toString().substring(0, 10),
|
||||
getMonthEndDate().toString().substring(0, 10),
|
||||
);
|
||||
break;
|
||||
default: // 自定义
|
||||
// DateTimeRange? range = await showDateRangePicker(
|
||||
// // locale: const Locale('zh', 'CN'),
|
||||
// locale: const Locale('zh', 'CN'),
|
||||
// context: context,
|
||||
// confirmText: '搜索',
|
||||
// initialEntryMode: DatePickerEntryMode.calendarOnly,
|
||||
// currentDate: DateTime.now(),
|
||||
// firstDate: DateTime.now().subtract(const Duration(days: 4)),
|
||||
// lastDate: DateTime.now().add(const Duration(days: 3)),
|
||||
// );
|
||||
|
||||
var dialogData = await showDialog<PickerDateRange?>(
|
||||
context: context,
|
||||
builder: (BuildContext context1) {
|
||||
return Center(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
width: isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
||||
height: ScreenUtil().screenHeight / 2,
|
||||
child: SfDateRangePicker(
|
||||
showActionButtons: true,
|
||||
confirmText: '确定',
|
||||
cancelText: '取消',
|
||||
onSubmit: (p0) {
|
||||
print(p0);
|
||||
Navigator.of(context1).pop(p0);
|
||||
},
|
||||
onCancel: () {
|
||||
Navigator.of(context1).pop();
|
||||
},
|
||||
selectionMode: DateRangePickerSelectionMode.range,
|
||||
initialSelectedRange: customTimeState.value,
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
// startDate: 2024-03-04 18:47:00.117958, endDate: 2024-03-11 18:47:00.117986
|
||||
// if (dialogData != null && (dialogData.startDate != null || dialogData.endDate != null)) {}
|
||||
onTimeFilter(
|
||||
dialogData?.startDate?.toString().substring(0, 10),
|
||||
dialogData?.endDate?.toString().substring(0, 10),
|
||||
);
|
||||
customTimeState.value = dialogData;
|
||||
}
|
||||
},
|
||||
),
|
||||
Expanded(child: SizedBox()),
|
||||
Container(
|
||||
width: 74.r,
|
||||
margin: EdgeInsets.symmetric(vertical: 5.h),
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.elliptical(6, 6),
|
||||
bottom: Radius.elliptical(6, 6),
|
||||
),
|
||||
),
|
||||
child: DropdownButton(
|
||||
icon: Icon(Icons.expand_more_outlined),
|
||||
padding: EdgeInsets.zero,
|
||||
// value: params2.jobType ?? 1,
|
||||
value: jobType,
|
||||
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
|
||||
underline: Container(),
|
||||
isExpanded: true,
|
||||
items: jobTypes.map((e) {
|
||||
return DropdownMenuItem(
|
||||
value: e['type'],
|
||||
child: quickText(e['name'], size: 12.sp, color: Colors.black),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (dynamic value) {
|
||||
if (value != null) {
|
||||
jobTypeState.value = value;
|
||||
onJobTypeTap(value as int);
|
||||
}
|
||||
// jobTypeState
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,253 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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/job/job_level_set_params.dart';
|
||||
import 'package:marking_app/common/model/job/job_review_submission.dart';
|
||||
import 'package:marking_app/common/model/job/job_student_level.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class JobPriorityReviewSet extends StatefulWidget {
|
||||
final String groupId;
|
||||
const JobPriorityReviewSet({Key? key,required this.groupId}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<JobPriorityReviewSet> createState() => _JobPriorityReviewSetState();
|
||||
}
|
||||
|
||||
class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||
with CommonMixin,SingleTickerProviderStateMixin {
|
||||
late final EasyRefreshController refreshController;
|
||||
late TabController tabController;
|
||||
int tabIndex = 0;
|
||||
List levelList = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
refreshController = EasyRefreshController();
|
||||
tabController =
|
||||
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
||||
getReadLevel();
|
||||
}
|
||||
|
||||
void getReadLevel() async{
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobStudentLevel>> res = await _client.getJobReadLevel(widget.groupId,tabIndex == 0?1:0);
|
||||
setState(() {
|
||||
if(res.code == 200){
|
||||
levelList = res.data!;
|
||||
}else{
|
||||
levelList = [];
|
||||
}
|
||||
});
|
||||
EasyLoading.dismiss();
|
||||
refreshController.finishRefresh();
|
||||
}
|
||||
|
||||
void setJobReadLevel(int studentId,int level) async{
|
||||
RestClient _client = await getClient();
|
||||
JobLevelSetParams params = JobLevelSetParams(studentId, level);
|
||||
BaseStructureResult res = await _client.getSetJobReadLevel(params);
|
||||
if(res.code == 200){
|
||||
getReadLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
refreshController.dispose();
|
||||
tabController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isPadFlag = isPad();
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'优先批阅人配置',
|
||||
style: TextStyle(fontSize: 16.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
child: TabBar(
|
||||
onTap: (int val) {
|
||||
print(val);
|
||||
setState(() {
|
||||
tabIndex = val;
|
||||
});
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getReadLevel();
|
||||
},
|
||||
tabs: [
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
child: Tab(
|
||||
text: '优先批阅',
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 28.r) /2,
|
||||
child: Tab(
|
||||
text: '默认批阅',
|
||||
),
|
||||
)
|
||||
],
|
||||
controller: tabController,
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 14.sp, color:Color(0xFF666666)),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
isScrollable: true,
|
||||
labelColor: Color(0xFF6888FD),
|
||||
unselectedLabelColor: Color(0xFF666666),
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
labelPadding: const EdgeInsets.all(0),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child:Padding(
|
||||
padding: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r),
|
||||
child: EasyRefresh(
|
||||
firstRefresh: true,
|
||||
taskIndependence: true,
|
||||
controller: refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async{
|
||||
getReadLevel();
|
||||
},
|
||||
child: levelList.length>0?isPadFlag?GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),children: List.generate(levelList.length, (index) {
|
||||
JobStudentLevel item = levelList[index];
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 15.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),),
|
||||
tabIndex == 0?InkWell(
|
||||
onTap: (){
|
||||
setJobReadLevel(item.studentGroupDetailId,0);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),
|
||||
),
|
||||
),
|
||||
):InkWell(
|
||||
onTap: (){
|
||||
setJobReadLevel(item.studentGroupDetailId,1);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFFFFFFFF),
|
||||
border: Border.all(width: 1.r,color: Color(0xFF6888FD)),
|
||||
),
|
||||
child: Center(
|
||||
child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: Color(0xFF6888FD)),),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}),):ListView.builder(itemBuilder: (context,index){
|
||||
JobStudentLevel item = levelList[index];
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 15.r),
|
||||
margin: EdgeInsets.only(bottom: 15.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),),
|
||||
tabIndex == 0?InkWell(
|
||||
onTap: (){
|
||||
setJobReadLevel(item.studentGroupDetailId,0);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),
|
||||
),
|
||||
),
|
||||
):InkWell(
|
||||
onTap: (){
|
||||
setJobReadLevel(item.studentGroupDetailId,1);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFFFFFFFF),
|
||||
border: Border.all(width: 1.r,color: Color(0xFF6888FD)),
|
||||
),
|
||||
child: Center(
|
||||
child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: Color(0xFF6888FD)),),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},itemCount: levelList.length,):MyEmptyWidget(),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,227 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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/job/job_student_goups.dart';
|
||||
import 'package:marking_app/common/model/user/user_info.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/fast_data.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class JobStudentGroup extends StatefulWidget {
|
||||
const JobStudentGroup({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
||||
}
|
||||
|
||||
class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
||||
late final EasyRefreshController refreshController;
|
||||
late String loginName;
|
||||
List studentGroups = [];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
refreshController = EasyRefreshController();
|
||||
FastData fastData = FastData.getInstance();
|
||||
fastData.getUser().then((value) {
|
||||
if (value == null || value == '') return;
|
||||
Map<String, dynamic> userInfo = json.decode(value);
|
||||
setState(() {
|
||||
loginName = userInfo['loginName'];
|
||||
});
|
||||
getStudentGroups();
|
||||
print(userInfo);
|
||||
});
|
||||
}
|
||||
|
||||
void getStudentGroups() async {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobStudentGroups>> res =
|
||||
await _client.getJobLevelStudentGroups(loginName);
|
||||
setState(() {
|
||||
if(res.code == 200){
|
||||
studentGroups = res.data!;
|
||||
}else{
|
||||
studentGroups = [];
|
||||
}
|
||||
|
||||
});
|
||||
refreshController.finishRefresh();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
refreshController.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isPadFlag = isPad();
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'我的学生分组',
|
||||
style: TextStyle(fontSize: 16.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||
child: EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async{
|
||||
getStudentGroups();
|
||||
},
|
||||
child: studentGroups != null && studentGroups.length > 0
|
||||
? isPadFlag?GridView(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'设置',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}),
|
||||
):ListView.builder(
|
||||
itemBuilder: (context,index){
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
||||
margin: EdgeInsets.only(bottom: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 24.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'设置',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: studentGroups.length,
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:photo_view/photo_view_gallery.dart';
|
||||
|
||||
class FavoriteStudentDialog extends StatefulWidget {
|
||||
const FavoriteStudentDialog({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<FavoriteStudentDialog> createState() => _FavoriteStudentDialogState();
|
||||
}
|
||||
|
||||
class _FavoriteStudentDialogState extends State<FavoriteStudentDialog> {
|
||||
int defaultIndex = 1;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'14班 张小凡',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4E73FD)),
|
||||
),
|
||||
Expanded(child: Container()),
|
||||
Text(
|
||||
'6题',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF868686)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.r),
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
width: 22.r,
|
||||
height: 22.r,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
Navigator.pop(context);
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_dialog_close.png',
|
||||
width: 22.r,
|
||||
height: 22.r,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
Expanded(
|
||||
child: Container(
|
||||
color:Color(0xFF868686),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
/* child: PhotoViewGallery.builder(
|
||||
scrollPhysics: const BouncingScrollPhysics(),
|
||||
builder: (BuildContext context, int index) {
|
||||
return PhotoViewGalleryPageOptions(
|
||||
imageProvider: NetworkImage(widget.imageItems[index]),
|
||||
);
|
||||
},
|
||||
itemCount: 2,
|
||||
pageController:PageController(initialPage: defaultIndex),
|
||||
// onPageChanged: (){},
|
||||
scrollDirection: Axis.horizontal,
|
||||
),*/
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:EdgeInsets.symmetric(vertical: 15.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Container(
|
||||
width: (MediaQuery.of(context).size.width - 78.r)/2 - 10.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
border: Border.all(width: 1.r,color: Color(0xFFCACACA),style: BorderStyle.solid),
|
||||
),
|
||||
child: Center(child: Text('上一页',style: TextStyle(fontSize: 10.r,color: Color(0xFF505E6E)),)),
|
||||
),
|
||||
Container(
|
||||
width: (MediaQuery.of(context).size.width - 78.r)/2 - 10.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
border: Border.all(width: 1.r,color: Color(0xFFCACACA),style: BorderStyle.solid),
|
||||
),
|
||||
child: Center(child: Text('下一页',style: TextStyle(fontSize: 10.r,color: Color(0xFF505E6E)),)),
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:functional_widget_annotation/functional_widget_annotation.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/job/job_fav_student.dart';
|
||||
import 'package:marking_app/common/model/job/job_favorite_item_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
||||
import 'package:marking_app/pages/homework_correction/pages/favorite_student_dialog.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
/// 作业收藏学生名单列表
|
||||
class JobFavorite extends StatefulWidget {
|
||||
final int jobId;
|
||||
final int schoolId;
|
||||
final int gradeId;
|
||||
final String className;
|
||||
final String jobName;
|
||||
|
||||
const JobFavorite({
|
||||
required this.jobId,
|
||||
required this.schoolId,
|
||||
required this.gradeId,
|
||||
required this.className,
|
||||
required this.jobName,
|
||||
super.key,
|
||||
});
|
||||
|
||||
@override
|
||||
State<JobFavorite> createState() => _JobFavoriteState();
|
||||
}
|
||||
|
||||
class _JobFavoriteState extends State<JobFavorite> with CommonMixin {
|
||||
late Future<List<Items>?> _future;
|
||||
List<JobReportJoinClass>? involveClasses = [];
|
||||
JobReportJoinClass? classData;
|
||||
late String loginName;
|
||||
final int pageSize = 100;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
FastData fastData = FastData.getInstance();
|
||||
fastData.getUser().then((value) {
|
||||
if (value == null || value == '') return;
|
||||
Map<String, dynamic> userInfo = json.decode(value);
|
||||
setState(() {
|
||||
loginName = userInfo['loginName'];
|
||||
});
|
||||
});
|
||||
getInvolveClasses();
|
||||
_future = getData();
|
||||
}
|
||||
|
||||
Future<List<Items>> getData() async {
|
||||
var _client = await getClient();
|
||||
var result = await _client.getListOfJobFavorites(
|
||||
widget.jobId, widget.jobName, widget.className,loginName,pageSize);
|
||||
return result.data!.items;
|
||||
}
|
||||
|
||||
Future<void> toGoCancelFavorite(int jobId, int studentId) async {
|
||||
var _client = await getClient();
|
||||
var result = await _client.toJobCancelFavorite(jobId, studentId);
|
||||
if (result.success && (result.data ?? false)) {
|
||||
_future = getData();
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> getInvolveClasses() async {
|
||||
try {
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<JobReportJoinClass>> result =
|
||||
await _client.getJobReportJoinClasses(widget.jobId);
|
||||
if (result.success) {
|
||||
toUpState(setState, () {
|
||||
involveClasses = [
|
||||
JobReportJoinClass(-1, '全部', -1, '全部', '全部', '全部', -1, -1, '-1'),
|
||||
...(result.data ?? [])
|
||||
];
|
||||
involveClasses?.forEach((element) {
|
||||
if(element.className == widget.className && element.gradeId == widget.gradeId && element.schoolId == widget.schoolId){
|
||||
classData = element;
|
||||
}
|
||||
});
|
||||
}, mounted);
|
||||
}
|
||||
print('involveClasses=${involveClasses!.length}');
|
||||
_future = getData();
|
||||
} catch (e) {
|
||||
print(e);
|
||||
}
|
||||
}
|
||||
|
||||
void showStudentDialog(BuildContext context) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
insetPadding: EdgeInsets.all(25.r),
|
||||
content: FavoriteStudentDialog(),
|
||||
contentPadding: EdgeInsets.all(0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool isPadFlag = isPad();
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
// titleSpacing: 0,
|
||||
elevation: 0.0,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios),
|
||||
onPressed: () => Navigator.of(context).pop()),
|
||||
iconTheme: IconThemeData(color: Colors.black),
|
||||
title: quickText('收藏夹'),
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.white,
|
||||
),
|
||||
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<
|
||||
List<Items>>(
|
||||
context,
|
||||
_future,
|
||||
(List<Items>? datas) {
|
||||
/* if (datas == null)
|
||||
return Container(
|
||||
child: Center(
|
||||
child: quickText('请求错误'),
|
||||
),
|
||||
);*/
|
||||
print('datas${datas}');
|
||||
|
||||
List pageList = [];
|
||||
List groupList = [];
|
||||
if(datas!.length>0){
|
||||
for (var item in datas) {
|
||||
pageList.add(item.questionPage);
|
||||
}
|
||||
pageList = pageList.toSet().toList();
|
||||
|
||||
for (var page in pageList) {
|
||||
var printList = datas.where((element) => element.questionPage == page).toList();
|
||||
groupList.add({"questionPage": page, "list": printList});
|
||||
}
|
||||
}
|
||||
|
||||
return Container(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'函数A的对称性研究',
|
||||
style:
|
||||
TextStyle(fontSize: 14.sp, color: Color(0xFF3C3C3C)),
|
||||
),
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
|
||||
child: Row(
|
||||
children: [
|
||||
$classSelection(involveClasses, classData,
|
||||
call: (JobReportJoinClass _classData) {
|
||||
classData = _classData;
|
||||
if (_classData.gradeId == -1) classData = null;
|
||||
_future = getData();
|
||||
toUpState(setState, () {}, mounted);
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 1.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFCCCCCC),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: isPadFlag? Padding(
|
||||
padding: EdgeInsets.only(top: 10.r,bottom:8.r,left: 14.r,right: 14.r),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.r),
|
||||
child: Text('第六题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF2E5BFF)),),
|
||||
),
|
||||
GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 8.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: InkWell(
|
||||
onTap: (){
|
||||
showStudentDialog(context);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText('张小凡',
|
||||
color: Color(0xFF333333),
|
||||
size: 12.sp),
|
||||
Expanded(child: Container()),
|
||||
Padding(
|
||||
padding:EdgeInsets.only(right: 8.r),
|
||||
child: Text('12班',style: TextStyle(fontSize: 12.sp,color: Color(0xFF666666)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
print('删除');
|
||||
},
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 26.r,height: 26.r,),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],),
|
||||
|
||||
],
|
||||
),
|
||||
):ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
// Items item = datas[index];
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 10.r,bottom:8.r,left: 14.r,right: 14.r),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 5.r),
|
||||
child: Text('第六题',style: TextStyle(fontSize: 14.sp,color: Color(0xFF2E5BFF)),),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 10.r),
|
||||
margin: EdgeInsets.only(top: 5.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
quickText('张小凡',
|
||||
color: Color(0xFF333333),
|
||||
size: 14.sp),
|
||||
Expanded(child: Container()),
|
||||
Padding(
|
||||
padding:EdgeInsets.only(right: 8.r),
|
||||
child: Text('12班',style: TextStyle(fontSize: 14.sp,color: Color(0xFF666666)),),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () async {},
|
||||
child: Image.asset('assets/images/favorite_delete_icon.png',width: 32.r,height: 32.r,),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
// itemCount: datas.length,
|
||||
itemCount: 10,
|
||||
),
|
||||
),
|
||||
],
|
||||
));
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
/// 下拉选择框
|
||||
@swidget
|
||||
Widget $classSelection(
|
||||
List<JobReportJoinClass>? involveClasses, JobReportJoinClass? classData,
|
||||
{required Function(JobReportJoinClass) call}) {
|
||||
if (involveClasses == null)
|
||||
return Container(child: quickText('点击重试')); // 点击重试
|
||||
return Container(
|
||||
// width: 200.r,
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.vertical(
|
||||
top: Radius.elliptical(10, 10),
|
||||
bottom: Radius.elliptical(10, 10),
|
||||
)),
|
||||
child: DropdownButton(
|
||||
value: classData?.uniqueId ?? '-1',
|
||||
style: TextStyle(color: Color.fromRGBO(89, 89, 89, 1), fontSize: 12.sp),
|
||||
underline: Container(),
|
||||
// isExpanded:true,
|
||||
items: involveClasses.map((e) {
|
||||
return DropdownMenuItem(
|
||||
value: e.uniqueId!,
|
||||
child: quickText(e.uniqueId == '-1'?e.graduationYear:e.graduationYear + e.className,
|
||||
size: 12.sp, color: Colors.black),
|
||||
);
|
||||
}).toList(),
|
||||
onChanged: (String? value) {
|
||||
if (value == null) return;
|
||||
call(involveClasses.firstWhere((element) => element.uniqueId == value));
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,163 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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/job/job_data_report.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/student_kg_table.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:marking_app/utils/toast_utils.dart';
|
||||
|
||||
class QuickCheckPersonal extends StatefulWidget {
|
||||
final int jobId;
|
||||
final int studentId;
|
||||
|
||||
const QuickCheckPersonal(
|
||||
{Key? key, required this.jobId, required this.studentId})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||
}
|
||||
|
||||
class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
||||
with CommonMixin {
|
||||
StudentDetails? studentInfo;
|
||||
|
||||
void initState() {
|
||||
super.initState();
|
||||
EasyLoading.show(status: 'loading...');
|
||||
getJobPersonal();
|
||||
}
|
||||
|
||||
void getJobPersonal() async {
|
||||
RestClient _client = await getClient();
|
||||
Map<String, dynamic> params = {};
|
||||
params['jobid'] = widget.jobId;
|
||||
// params['jobid'] = '521646983660101';
|
||||
params['studentId'] = widget.studentId;
|
||||
BaseStructureResult<StudentDetails?> data =
|
||||
await _client.getJobPersonalReport(params);
|
||||
if(data.data!.studentId != null){
|
||||
setState(() {
|
||||
studentInfo = data.data;
|
||||
});
|
||||
}else{
|
||||
Navigator.pop(context);
|
||||
ToastUtils.showError('暂无数据');
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
if (studentInfo == null) {
|
||||
return Container();
|
||||
}
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
studentInfo!.studentName!,
|
||||
style: TextStyle(fontSize: 16.sp, color: Color(0xFF000000)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
//客观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'客观题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF5C5C5C)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Text(
|
||||
'${studentInfo!.kgValidRate}%',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
SizedBox(
|
||||
height: studentInfo!.kgDetails.length>8?300.r:studentInfo!.kgDetails.length * 40.r + 40.r,
|
||||
child: StudentKgTable(
|
||||
headList: ['题号', '学生答案', '标准答案'],
|
||||
bodyList: studentInfo!.kgDetails,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 15.r,),
|
||||
//主观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'主观题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF5C5C5C)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Text(
|
||||
'${studentInfo!.zgValidRate}%',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
SizedBox(
|
||||
height: studentInfo!.zgDetails.length>8?300.r:studentInfo!.zgDetails.length * 40.r + 40.r,
|
||||
child: StudentZgTable(
|
||||
headList: ['题号', '用时', '批注结果','答案','批注'],
|
||||
bodyList: studentInfo!.zgDetails,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,334 @@
|
|||
import 'package:fl_chart/fl_chart.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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/job/job_data_report.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/quick_student_data_table.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:percent_indicator/linear_percent_indicator.dart';
|
||||
|
||||
class QuickDataCheckPage extends StatefulWidget {
|
||||
final int jobId;
|
||||
final String className;
|
||||
|
||||
const QuickDataCheckPage({Key? key, required this.jobId,required this.className}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<QuickDataCheckPage> createState() => _QuickDataCheckPageState();
|
||||
}
|
||||
|
||||
class _QuickDataCheckPageState extends State<QuickDataCheckPage> with CommonMixin {
|
||||
JobDataReport? jobData;
|
||||
|
||||
void initState() {
|
||||
super.initState();
|
||||
EasyLoading.show(status:'loading...');
|
||||
getJobDataReport();
|
||||
}
|
||||
|
||||
void getJobDataReport() async {
|
||||
RestClient _client = await getClient();
|
||||
Map<String, dynamic> params = {};
|
||||
params['jobid'] = widget.jobId;
|
||||
print(widget.jobId);
|
||||
BaseStructureResult<JobDataReport?> data =
|
||||
await _client.getJobDataCenterReport(params);
|
||||
EasyLoading.dismiss();
|
||||
if(data.code == 200){
|
||||
setState(() {
|
||||
jobData = data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AnnotatedRegion(
|
||||
value: const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
systemNavigationBarIconBrightness: Brightness.light,
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
statusBarBrightness: Brightness.dark,
|
||||
),
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
||||
height: MediaQuery.of(context).size.height,
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0xFF6889FD),
|
||||
Color(0xFFF5F5F5),
|
||||
],
|
||||
stops: [
|
||||
0.09,
|
||||
0.3
|
||||
])),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
Expanded(
|
||||
child: Center(
|
||||
child: Text(
|
||||
'数据快查',
|
||||
style: TextStyle(fontSize: 16.sp, color: Colors.white),
|
||||
))),
|
||||
],
|
||||
),
|
||||
SizedBox(height:10.r),
|
||||
jobData != null?
|
||||
Expanded(child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(left: 14.r, top: 2.r),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/job_report_class_icon.png',
|
||||
width: 22.r,
|
||||
height: 22.r,
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.r,
|
||||
),
|
||||
Text(
|
||||
widget.className,
|
||||
style: TextStyle(fontSize: 14.r, color: Colors.white),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 15.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF4CC793),
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(7.r))),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.r,
|
||||
),
|
||||
Text(
|
||||
'已提交',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 35.r,
|
||||
),
|
||||
Container(
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(7.r))),
|
||||
),
|
||||
SizedBox(
|
||||
width: 6.r,
|
||||
),
|
||||
Text(
|
||||
'未提交',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF333333)),
|
||||
)
|
||||
],
|
||||
),
|
||||
//环形图
|
||||
SizedBox(
|
||||
height: MediaQuery.of(context).size.width * 0.5,
|
||||
child: PieChart(
|
||||
PieChartData(
|
||||
borderData: FlBorderData(show: false),
|
||||
sectionsSpace: 0,
|
||||
centerSpaceRadius: MediaQuery.of(context).size.width * 0.1,
|
||||
sections: [
|
||||
PieChartSectionData(
|
||||
color: Color(0xFF4CC793),
|
||||
value: jobData!.validCount/(jobData!.validCount+jobData!.noAnswerCount) * 100,
|
||||
radius: MediaQuery.of(context).size.width * 0.1 + 5,
|
||||
title: '${jobData!.validCount}人',
|
||||
titleStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
PieChartSectionData(
|
||||
color: Color(0xFF6888FD),
|
||||
value: jobData!.noAnswerCount/(jobData!.validCount+jobData!.noAnswerCount) * 100,
|
||||
radius: MediaQuery.of(context).size.width * 0.1,
|
||||
title: '${jobData!.noAnswerCount}人',
|
||||
titleStyle: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// 客观进度条
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'客观题答题进度',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
Text('${doubleToStringAsFixed(jobData!.kgValidRate)}%',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 6.r),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: LinearPercentIndicator(
|
||||
padding: EdgeInsets.zero,
|
||||
animation: true,
|
||||
lineHeight: 9.h,
|
||||
animationDuration: 2500,
|
||||
percent: jobData!.kgValidRate/100,
|
||||
progressColor: Color(0xFFFF7F22),
|
||||
backgroundColor: Color(0xFFEAEAEA),
|
||||
barRadius: Radius.circular(10.r),
|
||||
)),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.r),
|
||||
// 主观进度条
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
'主观题答题进度',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
Text(
|
||||
'${doubleToStringAsFixed(jobData!.zgValidRate)}%',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 6.r),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Expanded(
|
||||
flex: 10,
|
||||
child: LinearPercentIndicator(
|
||||
padding: EdgeInsets.zero,
|
||||
animation: true,
|
||||
lineHeight: 9.h,
|
||||
animationDuration: 2500,
|
||||
percent: jobData!.zgValidRate/100,
|
||||
progressColor: Color(0xFFFF7F22),
|
||||
backgroundColor: Color(0xFFEAEAEA),
|
||||
barRadius: Radius.circular(10.r),
|
||||
)),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r))),
|
||||
child: Column(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: (){
|
||||
jobData!.studentDetails.sort((a, b) {
|
||||
int num1 = a.kgValidRate + a.zgValidRate;
|
||||
int num2 = b.kgValidRate + b.zgValidRate;
|
||||
return num2.compareTo(num1);
|
||||
});
|
||||
setState(() {
|
||||
jobData!.studentDetails;
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
'未提交排序',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/sort_icon.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
SizedBox(
|
||||
height: jobData!.studentDetails.length>5?350.r:jobData!.studentDetails.length * 50.r + 40.r,
|
||||
child: QuickStudentDataTable(
|
||||
headList: ['学生姓名','客观题','主观题','客观题错题','主观题错题'],
|
||||
bodyList: jobData!.studentDetails,
|
||||
jobId: widget.jobId,
|
||||
fixedRows: 1,
|
||||
fixedCols: 0,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
)):Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
||||
class QuickStudentDataTable extends StatefulWidget {
|
||||
final List headList;
|
||||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final int jobId;
|
||||
|
||||
const QuickStudentDataTable({
|
||||
Key? key,
|
||||
required this.headList,
|
||||
required this.bodyList,
|
||||
required this.jobId,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<QuickStudentDataTable> createState() => _QuickStudentDataTableState();
|
||||
}
|
||||
|
||||
class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||
final ScrollController _controller = ScrollController();
|
||||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
StudentDetails item = widget.bodyList[index];
|
||||
int num = 0;
|
||||
item.kgDetails.forEach((element) {
|
||||
if (element.state == 0) {
|
||||
num = num + 1;
|
||||
}
|
||||
});
|
||||
item.zgDetails.forEach((element) {
|
||||
if (element.state == 0) {
|
||||
num = num + 1;
|
||||
}
|
||||
});
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null
|
||||
? num == 0
|
||||
? MaterialStateProperty.all(color)
|
||||
: MaterialStateProperty.all(Color(0xFFFFD79C))
|
||||
: null,
|
||||
cells: [
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.quickCheckPersonalPath +
|
||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(item.studentName!,
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
SizedBox(
|
||||
width: 5.r,
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/job_data_right_icon.png',
|
||||
width: 10.r,
|
||||
height: 10.r,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(
|
||||
'${(item.kgValidRate / 100 * item.kgValidCount).toInt()}/${item.kgValidCount}',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(
|
||||
'${(item.zgValidRate / 100 * item.zgValidCount).toInt()}/${item.zgValidCount}',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
|
||||
child: SingleChildScrollView(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.center,
|
||||
spacing: 2,
|
||||
runSpacing: 2,
|
||||
children: List.generate(item.kgDetails.length, (index) {
|
||||
KgDetails kgInfo = item.kgDetails[index];
|
||||
return Container(
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
decoration: BoxDecoration(
|
||||
color: kgInfo.state == 0
|
||||
? Color(0xFFD9D9D9)
|
||||
: kgInfo.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793),
|
||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
kgInfo.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: kgInfo.state == 0
|
||||
? Color(0xFF525252)
|
||||
: Colors.white),
|
||||
)),
|
||||
);
|
||||
})),
|
||||
),
|
||||
),
|
||||
),
|
||||
DataCell(
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 2.r, horizontal: 5.r),
|
||||
child: SingleChildScrollView(
|
||||
child: Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.center,
|
||||
spacing: 2,
|
||||
runSpacing: 2,
|
||||
children: List.generate(item.zgDetails.length, (index) {
|
||||
KgDetails kgInfo = item.zgDetails[index];
|
||||
return Container(
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
decoration: BoxDecoration(
|
||||
color: kgInfo.state == 0
|
||||
? Color(0xFFD9D9D9)
|
||||
: kgInfo.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: Color(0xFF4CC793),
|
||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
kgInfo.questionNo,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: kgInfo.state == 0
|
||||
? Color(0xFF525252)
|
||||
: Colors.white),
|
||||
)),
|
||||
);
|
||||
})),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DataTable2(
|
||||
dividerThickness: 0,
|
||||
scrollController: _controller,
|
||||
columnSpacing: 0,
|
||||
horizontalMargin: 0,
|
||||
bottomMargin: 0,
|
||||
dataRowHeight: 50.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
/* headingRowDecoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.grey[400]!,
|
||||
Colors.grey[200]!,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),*/
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
minWidth: MediaQuery.of(context).size.width,
|
||||
fixedTopRows: widget.fixedRows!,
|
||||
fixedLeftColumns: widget.fixedCols!,
|
||||
sortColumnIndex: _sortColumnIndex,
|
||||
sortAscending: _sortAscending,
|
||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
||||
columns: List.generate(widget.headList.length, (index) {
|
||||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,148 @@
|
|||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||
|
||||
class ReportTable extends StatefulWidget {
|
||||
final List headList;
|
||||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final bool? isKG;
|
||||
|
||||
const ReportTable({
|
||||
Key? key,
|
||||
required this.headList,
|
||||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
this.isKG = false,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<ReportTable> createState() => _ReportTableState();
|
||||
}
|
||||
|
||||
class _ReportTableState extends State<ReportTable> {
|
||||
final ScrollController _controller = ScrollController();
|
||||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
var item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||
cells: [
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text(item.questionNo,
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text('${item.validRate}%',
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text(item.validCount,
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
|
||||
),
|
||||
)),
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text('${item.correctRate}%',
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text(
|
||||
widget.isKG == true?'原题':item.questionAnswer,
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: widget.isKG == true?Color(0xFFFF8A00):Color(0xFF4CC793))),
|
||||
),
|
||||
)),
|
||||
DataCell( Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child:
|
||||
Text(item.priorityGeneral,
|
||||
style:
|
||||
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DataTable2(
|
||||
dividerThickness: 0,
|
||||
scrollController: _controller,
|
||||
columnSpacing: 0,
|
||||
horizontalMargin: 0,
|
||||
dataRowHeight:40.r,
|
||||
bottomMargin: 0,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
/* headingRowDecoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.grey[400]!,
|
||||
Colors.grey[200]!,
|
||||
],
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
),
|
||||
),*/
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
minWidth: widget.headList.length > 6?80.r * widget.headList.length:MediaQuery.of(context).size.width,
|
||||
fixedTopRows: widget.fixedRows!,
|
||||
fixedLeftColumns: widget.fixedCols!,
|
||||
sortColumnIndex: _sortColumnIndex,
|
||||
sortAscending: _sortAscending,
|
||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
||||
columns: List.generate(widget.headList.length, (index) {
|
||||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: index == 0 ? 40.r:widget.headList.length > 6 ?80.r:(MediaQuery.of(context).size.width)/widget.headList.length,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,103 @@
|
|||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
|
||||
class StudentKgTable extends StatefulWidget {
|
||||
final List headList;
|
||||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
|
||||
const StudentKgTable({
|
||||
Key? key,
|
||||
required this.headList,
|
||||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StudentKgTable> createState() => _StudentKgTableState();
|
||||
}
|
||||
|
||||
class _StudentKgTableState extends State<StudentKgTable> {
|
||||
final ScrollController _controller = ScrollController();
|
||||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
cells: [
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.annotateAnswers == null ?'无':item.annotateAnswers!,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DataTable2(
|
||||
dividerThickness: 0,
|
||||
scrollController: _controller,
|
||||
columnSpacing: 0,
|
||||
horizontalMargin: 0,
|
||||
bottomMargin: 0,
|
||||
dataRowHeight: 40.r,
|
||||
headingRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
minWidth: MediaQuery.of(context).size.width,
|
||||
fixedTopRows: widget.fixedRows!,
|
||||
fixedLeftColumns: widget.fixedCols!,
|
||||
sortColumnIndex: _sortColumnIndex,
|
||||
sortAscending: _sortAscending,
|
||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
||||
columns: List.generate(widget.headList.length, (index) {
|
||||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/3,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
import 'package:data_table_2/data_table_2.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
|
||||
class StudentZgTable extends StatefulWidget {
|
||||
final List headList;
|
||||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
|
||||
const StudentZgTable({
|
||||
Key? key,
|
||||
required this.headList,
|
||||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StudentZgTable> createState() => _StudentZgTableState();
|
||||
}
|
||||
|
||||
class _StudentZgTableState extends State<StudentZgTable> {
|
||||
final ScrollController _controller = ScrollController();
|
||||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
void showImgDialog(BuildContext context,String imgUrl){
|
||||
showDialog(context: context, builder: (BuildContext context){
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||
contentPadding: EdgeInsets.all(20.r),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
content: SizedBox(
|
||||
width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,
|
||||
child: Column(
|
||||
children: [
|
||||
Center(
|
||||
child: Text('批注答案',style: TextStyle(fontSize: 15.sp,color: Color(0xFF3C3C3C)),),
|
||||
),
|
||||
SizedBox(height: 10.r,),
|
||||
Image.network(imgUrl,fit: BoxFit.cover, errorBuilder: (context, error, stackTrace) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: 20.r),
|
||||
child: const MyEmptyWidget());
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
cells: [
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.useTime.toString(),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: item.state == 2?
|
||||
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):
|
||||
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: (){
|
||||
showImgDialog(context,item.studentAnswer!);
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text('查看',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: (){
|
||||
showImgDialog(context,item.annotateAnswers!);
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text('查看',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return DataTable2(
|
||||
dividerThickness: 0,
|
||||
scrollController: _controller,
|
||||
columnSpacing: 0,
|
||||
horizontalMargin: 0,
|
||||
bottomMargin: 0,
|
||||
headingRowHeight: 40.r,
|
||||
dataRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
minWidth: MediaQuery.of(context).size.width,
|
||||
fixedTopRows: widget.fixedRows!,
|
||||
fixedLeftColumns: widget.fixedCols!,
|
||||
sortColumnIndex: _sortColumnIndex,
|
||||
sortAscending: _sortAscending,
|
||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
||||
columns: List.generate(widget.headList.length, (index) {
|
||||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/5,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
||||
class TopCount extends StatelessWidget {
|
||||
final JobReportModel data;
|
||||
const TopCount(this.data,{Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
Container(
|
||||
width: 81.r,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 6.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFF4CC793),
|
||||
style: BorderStyle.solid),
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
doubleToStringAsFixed(data.finishRate),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
'%',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
data.validCount.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFB0B0B0)),
|
||||
),
|
||||
Text(
|
||||
'/',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFB0B0B0)),
|
||||
),
|
||||
Text(
|
||||
data.studentCount.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFFB0B0B0)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'完成率',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF818181)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 81.r,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 6.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFF4CC793),
|
||||
style: BorderStyle.solid),
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
doubleToStringAsFixed(data.correctRate),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
'%',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.r,
|
||||
),
|
||||
Text(
|
||||
'正确率',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF818181)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Container(
|
||||
width: 81.r,
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 10.r, horizontal: 6.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFF4CC793),
|
||||
style: BorderStyle.solid),
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.r)),
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
data.allCorrect.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
Text(
|
||||
'人',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0xFF4CC793),
|
||||
fontWeight: FontWeight.w600),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Text(
|
||||
'全对',
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp, color: Color(0xFF818181)),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 15.r,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 15.r),
|
||||
child: GridView.builder(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
childAspectRatio: 150 / 46,
|
||||
crossAxisSpacing: 2.r, //水平子 Widget 之间间距
|
||||
mainAxisSpacing: 2.r, //垂直子 Widget 之间间距
|
||||
crossAxisCount: 2, //一行的 Widget 数量
|
||||
),
|
||||
itemCount: data.overallTitles.length,
|
||||
itemBuilder: (BuildContext context, index){
|
||||
var item = data.overallTitles[index];
|
||||
Color bgColor = Color(0xFF4CC793);
|
||||
if(item.title == '优'){
|
||||
bgColor = Color(0xFF4CC793);
|
||||
}else if(item.title == '良'){
|
||||
bgColor = Color(0xFFF8700D);
|
||||
}else if(item.title == '中'){
|
||||
bgColor = Color(0xFF4CC7B8);
|
||||
}else if(item.title == '差'){
|
||||
bgColor = Color(0xFFFF6F6F);
|
||||
}
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
width: (MediaQuery.of(context).size.width - 55.r) / 2,
|
||||
color: Color(0xFFF5F5F5),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: (MediaQuery.of(context).size.width - 55.r)/4 - 20.r,
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 28.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: bgColor,
|
||||
width: 1.r,
|
||||
style: BorderStyle.solid),
|
||||
borderRadius: BorderRadius.circular(14.r)),
|
||||
child: Center(
|
||||
child: Text(
|
||||
item.title,
|
||||
style: TextStyle(
|
||||
color: bgColor, fontSize: 14.r),
|
||||
)),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 20.r,
|
||||
),
|
||||
Text(
|
||||
item.count.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 24.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF595959)),
|
||||
),
|
||||
Text(
|
||||
'人',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Color(0xFF595959)),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:marking_app/common/config/request_config.dart';
|
||||
|
|
@ -21,8 +20,6 @@ import 'package:marking_app/common/model/event_bus/marking_statistics_bus.dart';
|
|||
import 'package:marking_app/common/model/marking/marking_statistics.dart';
|
||||
import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
||||
import 'package:marking_app/provider/review_provider.dart';
|
||||
import 'package:marking_app/utils/anti_shake_throttling.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:marking_app/common/model/common/base_page_data.dart';
|
||||
import 'package:marking_app/common/model/marking/marking_item.dart';
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ class TopUserInfo extends ConsumerWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final userState = ref.watch(userProvider);
|
||||
final userState = ref.read(userProvider);
|
||||
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
|
|
|
|||
|
|
@ -14,9 +14,14 @@ import 'package:flutter/material.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/homework_correction/do_papers_job_exam.dart';
|
||||
import 'package:marking_app/pages/homework_correction/job_priority_review_set.dart';
|
||||
import 'package:marking_app/pages/homework_correction/job_report.dart';
|
||||
import 'package:marking_app/pages/homework_correction/job_student_group.dart';
|
||||
import 'package:marking_app/pages/homework_correction/pages/job_favorite.dart';
|
||||
import 'package:marking_app/pages/homework_correction/pages/job_list_participate_in_class.dart';
|
||||
import 'package:marking_app/pages/homework_correction/review_job.dart';
|
||||
|
||||
import 'package:marking_app/pages/homework_correction/quick_check_personal.dart';
|
||||
import 'package:marking_app/pages/homework_correction/quick_data_check.dart';
|
||||
import 'package:marking_app/pages/login/index.dart';
|
||||
import 'package:marking_app/pages/mainPage.dart';
|
||||
import 'package:marking_app/pages/marking/do_papers.dart';
|
||||
|
|
@ -53,12 +58,21 @@ class RouterManager {
|
|||
static const String jobReportPagePath = '/job/report/index';
|
||||
// 作业 ==> 横屏考试
|
||||
static const String jobExamPagePath = '/job/exam/index';
|
||||
// 作业 ==> 列表 ==> 参与班级
|
||||
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
||||
// 作业 ==> 收藏页面
|
||||
static const String jobFavoritePagePath = '/job/favorite/index';
|
||||
|
||||
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
||||
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
||||
static const String reportPersonalSubjectPath = 'report/details/reportPersonalSubject';
|
||||
static const String userMinePath = 'user/mine/index';
|
||||
static const String reportDetailPath = '/report_detail/index';
|
||||
static const String quickDataCheckPath = '/homework_correction/quick_data_check';
|
||||
static const String quickCheckPersonalPath = '/homework_correction/quick_check_personal';
|
||||
static const String jobPriorityReviewSetPath = '/homework_correction/job_priority_review_set';
|
||||
static const String jobStudentGroupPath = '/homework_correction/job_student_group';
|
||||
|
||||
// TheMine
|
||||
|
||||
static final FluroRouter router = FluroRouter();
|
||||
|
|
@ -173,7 +187,16 @@ class RouterManager {
|
|||
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);
|
||||
int? schoolId;
|
||||
if (params['schoolId'] != null && params['schoolId']![0] != null && params['schoolId']![0] != 'null') {
|
||||
schoolId = int.parse(params['schoolId']![0]);
|
||||
}
|
||||
int? gradeId;
|
||||
if (params['gradeId'] != null && params['gradeId']![0] != null && params['gradeId']![0] != 'null') {
|
||||
gradeId = int.parse(params['gradeId']![0]);
|
||||
}
|
||||
String? className = params['className']?[0];
|
||||
return JobReport(id: id, title: title, schoolId: schoolId, gradeId: gradeId, className: className);
|
||||
});
|
||||
|
||||
// 作业报告页面
|
||||
|
|
@ -239,6 +262,61 @@ class RouterManager {
|
|||
},
|
||||
);
|
||||
|
||||
static final _jobListParticipateInClassHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
int jobId = int.parse(params['jobId']![0]);
|
||||
String jobName = params['jobName']![0];
|
||||
String genderName = params['genderName']![0];
|
||||
// ignore: sdk_version_since
|
||||
bool completed = bool.parse(params['completed']?[0] ?? 'false');
|
||||
return JobListParticipateInClass(jobId: jobId, jobName: jobName, genderName: genderName, completed: completed);
|
||||
},
|
||||
);
|
||||
|
||||
// 数据快查
|
||||
static final _quickDataCheckPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
int jobId = int.parse(params['jobId']![0]);
|
||||
String className = params['className']![0];
|
||||
return QuickDataCheckPage(jobId: jobId, className: className);
|
||||
},
|
||||
);
|
||||
|
||||
// 数据快查-个人信息
|
||||
static final _quickCheckPersonalPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
int jobId = int.parse(params['jobId']![0]);
|
||||
int studentId = int.parse(params['studentId']![0]);
|
||||
return QuickCheckPersonal(jobId: jobId, studentId: studentId);
|
||||
},
|
||||
);
|
||||
|
||||
//优先配置
|
||||
static final _jobPriorityReviewSetPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
String groupId = params['groupId']![0];
|
||||
return JobPriorityReviewSet(groupId: groupId);
|
||||
},
|
||||
);
|
||||
|
||||
//学生分组
|
||||
static final _jobStudentGroupPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return JobStudentGroup();
|
||||
},
|
||||
);
|
||||
//作业收藏页面
|
||||
static final _jobFavoritePagePathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
int jobId = int.parse(params['jobId']![0]);
|
||||
int gradeId = int.parse(params['gradeId']![0]);
|
||||
int schoolId = int.parse(params['schoolId']![0]);
|
||||
String className = params['className']![0];
|
||||
String jobName = params['jobName']![0];
|
||||
return JobFavorite(jobId: jobId, gradeId: gradeId, schoolId: schoolId, className: className,jobName:jobName);
|
||||
},
|
||||
);
|
||||
|
||||
// 开始阅卷页面
|
||||
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
||||
|
||||
|
|
@ -273,6 +351,15 @@ class RouterManager {
|
|||
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
||||
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobListParticipateInClassPath,
|
||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||
router.define(quickCheckPersonalPath,
|
||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobPriorityReviewSetPath,
|
||||
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
||||
|
||||
// getTransition()
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ import 'dart:math';
|
|||
|
||||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/config/request_config.dart';
|
||||
|
||||
export "./colorUtils.dart";
|
||||
|
|
@ -105,6 +106,11 @@ void toPrint({required dynamic val, bool toPrintJson = false}) {
|
|||
if (printSwitch && val != null) toPrintJson ? printJson(val) : print(val);
|
||||
}
|
||||
|
||||
// 是否是平板
|
||||
bool isPad([double mobilePhoneScale = 1.2]) {
|
||||
return ScreenUtil().scaleWidth > mobilePhoneScale;
|
||||
}
|
||||
|
||||
class EUMNoScrollBehavior extends ScrollBehavior {
|
||||
@override
|
||||
Widget buildViewportChrome(BuildContext context, Widget child, AxisDirection axisDirection) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,12 @@ import 'package:marking_app/common/model/common/upload_img_secret_key.dart';
|
|||
import 'package:marking_app/common/model/job/job_collect_params.dart';
|
||||
import 'package:marking_app/common/model/job/job_concerned_with_student.dart';
|
||||
import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
|
||||
import 'package:marking_app/common/model/job/job_fav_student.dart';
|
||||
import 'package:marking_app/common/model/job/job_favorite_item_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_favorite_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_level_set_params.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_report_join_class.dart';
|
||||
|
|
@ -23,6 +28,8 @@ 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_question_deatil_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_review_submission.dart';
|
||||
import 'package:marking_app/common/model/job/job_student_goups.dart';
|
||||
import 'package:marking_app/common/model/job/job_student_level.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_params.dart';
|
||||
|
|
@ -285,4 +292,52 @@ abstract class RestClient {
|
|||
@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);
|
||||
|
||||
// 作业 => 列表 ==> 参与班级列表
|
||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks")
|
||||
Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass(
|
||||
@the_retrofit.Query("markingId") int jobId);
|
||||
|
||||
// 作业 => 作业收藏数量
|
||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/job-favorite-count-by-class")
|
||||
Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavoriteNumber(
|
||||
@the_retrofit.Query("jobid") int jobId);
|
||||
|
||||
// 作业 => 作业收藏列表
|
||||
@the_retrofit.GET("/api/jobs/fav-student-jobs")
|
||||
Future<BaseStructureResult<JobFavStudent>> getListOfJobFavorites(
|
||||
@the_retrofit.Query("JobId") int jobId,
|
||||
@the_retrofit.Query("JobName") String jobName,
|
||||
@the_retrofit.Query("className") String className,
|
||||
@the_retrofit.Query("Account") String loginName,
|
||||
@the_retrofit.Query("PageSize") int pageSize,
|
||||
);
|
||||
|
||||
// 作业 => 作业收藏列表
|
||||
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/cancel-favorite")
|
||||
Future<BaseStructureResult<bool>> toJobCancelFavorite(
|
||||
@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId);
|
||||
|
||||
// 作业 => 数据快查
|
||||
@the_retrofit.GET("/api/read/job-data-center-report")
|
||||
Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(
|
||||
@the_retrofit.Queries() Map<String, dynamic> params);
|
||||
|
||||
// 作业 => 数据快查--个人
|
||||
@the_retrofit.GET("/api/read/job-data-center-student-report")
|
||||
Future<BaseStructureResult<StudentDetails>> getJobPersonalReport(@the_retrofit.Queries() Map<String, dynamic> params);
|
||||
|
||||
// 作业 => 优先批阅,学生分组列表
|
||||
@the_retrofit.GET("/api/read/job-read-level-student-groups")
|
||||
Future<BaseStructureResult<List<JobStudentGroups>>> getJobLevelStudentGroups(
|
||||
@the_retrofit.Query("account") String account);
|
||||
|
||||
// 作业 => 优先批阅,优先批阅列表
|
||||
@the_retrofit.GET("/api/read/job-read-level")
|
||||
Future<BaseStructureResult<List<JobStudentLevel>>> getJobReadLevel(
|
||||
@the_retrofit.Query("GroupId") String groupId, @the_retrofit.Query("ReadLevel") int readLevel);
|
||||
|
||||
// 作业 => 取消/设置优先
|
||||
@the_retrofit.POST("/api/read/jc-job-read-level")
|
||||
Future<BaseStructureResult> getSetJobReadLevel(@the_retrofit.Body() JobLevelSetParams params);
|
||||
}
|
||||
|
|
|
|||