Compare commits
No commits in common. "6d7857ccefc01348437030e821b391ff8800a594" and "705945c270312c2767e5e197d7cb714b3f4e41d1" have entirely different histories.
6d7857ccef
...
705945c270
Binary file not shown.
|
Before Width: | Height: | Size: 790 B |
Binary file not shown.
|
Before Width: | Height: | Size: 273 B |
Binary file not shown.
|
Before Width: | Height: | Size: 833 B |
|
|
@ -316,7 +316,6 @@
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
|
@ -352,7 +351,7 @@
|
||||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 18;
|
CURRENT_PROJECT_VERSION = 16;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -360,7 +359,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.98;
|
MARKETING_VERSION = 1.0.96;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|
@ -396,7 +395,6 @@
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
|
@ -452,7 +450,6 @@
|
||||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
|
||||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||||
|
|
@ -490,7 +487,7 @@
|
||||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 18;
|
CURRENT_PROJECT_VERSION = 16;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -498,7 +495,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.98;
|
MARKETING_VERSION = 1.0.96;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|
@ -520,7 +517,7 @@
|
||||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CURRENT_PROJECT_VERSION = 18;
|
CURRENT_PROJECT_VERSION = 16;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -528,7 +525,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.98;
|
MARKETING_VERSION = 1.0.96;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ class RequestConfig {
|
||||||
static const devBaseUrl = "https://mhw.qwit.top"; // 基本请求
|
static const devBaseUrl = "https://mhw.qwit.top"; // 基本请求
|
||||||
static const devLoginBaseUrl = "https://mhw.qwit.top"; // 登录接口
|
static const devLoginBaseUrl = "https://mhw.qwit.top"; // 登录接口
|
||||||
static const devBaseUrlOfReport = "https://mhw.qwit.top"; // 获取报告接口
|
static const devBaseUrlOfReport = "https://mhw.qwit.top"; // 获取报告接口
|
||||||
// static const proBaseUrlOfHomework = "https://mhw.qwit.top/hw"; // 获取作业接口
|
static const proBaseUrlOfHomework = "https://mhw.qwit.top/hw"; // 获取作业接口
|
||||||
|
|
||||||
/* 正式地址 */
|
/* 正式地址 */
|
||||||
static const proBaseUrl = "https://mk-hw.23544.com"; // 基本请求
|
static const proBaseUrl = "https://mk-hw.23544.com"; // 基本请求
|
||||||
static const proLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
|
static const proLoginBaseUrl = "https://mk-hw.23544.com"; // 登录接口
|
||||||
static const proBaseUrlOfReport = "https://dc-api.23544.com"; // 获取报告接口
|
static const proBaseUrlOfReport = "https://dc-api.23544.com"; // 获取报告接口
|
||||||
static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
|
// static const proBaseUrlOfHomework = "https://mk-hw.23544.com/hw"; // 获取作业接口
|
||||||
|
|
||||||
static const hwProxyKeywords = "/hw"; // 作业代理条件关键字
|
static const hwProxyKeywords = "/hw"; // 作业代理条件关键字
|
||||||
|
|
||||||
|
|
@ -47,10 +47,7 @@ class RequestConfig {
|
||||||
|
|
||||||
// 私有化构造函数,防止外部直接实例化
|
// 私有化构造函数,防止外部直接实例化
|
||||||
// 私有化构造函数,防止外部直接实例化
|
// 私有化构造函数,防止外部直接实例化
|
||||||
RequestConfig._(
|
RequestConfig._({required this.baseUrl, required this.baseUrlOfReport, required this.loginBaseUrl});
|
||||||
{required this.baseUrl,
|
|
||||||
required this.baseUrlOfReport,
|
|
||||||
required this.loginBaseUrl});
|
|
||||||
|
|
||||||
factory RequestConfig() {
|
factory RequestConfig() {
|
||||||
if (_instance == null) {
|
if (_instance == null) {
|
||||||
|
|
@ -70,10 +67,8 @@ class RequestConfig {
|
||||||
newBaseUrlOfReport = devBaseUrlOfReport;
|
newBaseUrlOfReport = devBaseUrlOfReport;
|
||||||
newLoginBaseUrl = devLoginBaseUrl;
|
newLoginBaseUrl = devLoginBaseUrl;
|
||||||
}
|
}
|
||||||
_instance = RequestConfig._(
|
_instance =
|
||||||
baseUrl: newBaseUrl,
|
RequestConfig._(baseUrl: newBaseUrl, baseUrlOfReport: newBaseUrlOfReport, loginBaseUrl: newLoginBaseUrl);
|
||||||
baseUrlOfReport: newBaseUrlOfReport,
|
|
||||||
loginBaseUrl: newLoginBaseUrl);
|
|
||||||
}
|
}
|
||||||
return _instance!;
|
return _instance!;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,10 @@ import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
part 'job_data_report.g.dart';
|
part 'job_data_report.g.dart';
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class JobDataReport extends Object {
|
class JobDataReport extends Object {
|
||||||
|
|
||||||
@JsonKey(name: 'jobId')
|
@JsonKey(name: 'jobId')
|
||||||
int jobId;
|
int jobId;
|
||||||
|
|
||||||
|
|
@ -34,31 +36,21 @@ class JobDataReport extends Object {
|
||||||
@JsonKey(name: 'zgQuestionCount')
|
@JsonKey(name: 'zgQuestionCount')
|
||||||
int zgQuestionCount;
|
int zgQuestionCount;
|
||||||
|
|
||||||
bool sortType; // true 默认排序 ; false 未提交置顶
|
|
||||||
bool sortLevel;
|
|
||||||
bool hasUnrated;//有未批阅
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentDetails')
|
@JsonKey(name: 'studentDetails')
|
||||||
List<StudentDetails> studentDetails;
|
List<StudentDetails> studentDetails;
|
||||||
|
|
||||||
JobDataReport(this.jobId, this.jobName, this.gradeName, this.className, this.validCount, this.noAnswerCount,
|
JobDataReport(this.jobId,this.jobName,this.gradeName,this.className,this.validCount,this.noAnswerCount,this.kgValidRate,this.kgQuestionCount,this.zgValidRate,this.zgQuestionCount,this.studentDetails,);
|
||||||
this.kgValidRate, this.kgQuestionCount, this.zgValidRate, this.zgQuestionCount, this.studentDetails,
|
|
||||||
[this.sortType = true,this.sortLevel = false,this.hasUnrated = false]) {
|
|
||||||
|
|
||||||
this.studentDetails.sort((a, b) {
|
|
||||||
int num1 = a.kgValidRate + a.zgValidRate;
|
|
||||||
int num2 = b.kgValidRate + b.zgValidRate;
|
|
||||||
return num2.compareTo(num1);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
factory JobDataReport.fromJson(Map<String, dynamic> srcJson) => _$JobDataReportFromJson(srcJson);
|
factory JobDataReport.fromJson(Map<String, dynamic> srcJson) => _$JobDataReportFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobDataReportToJson(this);
|
Map<String, dynamic> toJson() => _$JobDataReportToJson(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class StudentDetails extends Object {
|
class StudentDetails extends Object {
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
@JsonKey(name: 'studentId')
|
||||||
int? studentId;
|
int? studentId;
|
||||||
|
|
||||||
|
|
@ -83,44 +75,18 @@ class StudentDetails extends Object {
|
||||||
@JsonKey(name: 'zgDetails')
|
@JsonKey(name: 'zgDetails')
|
||||||
List<KgDetails> zgDetails;
|
List<KgDetails> zgDetails;
|
||||||
|
|
||||||
@JsonKey(name: 'readLevel')
|
StudentDetails(this.studentId,this.studentName,this.kgValidCount,this.kgValidRate,this.zgValidCount,this.zgValidRate,this.kgDetails,this.zgDetails,);
|
||||||
int? readLevel;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgError')
|
|
||||||
int kgError;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgError')
|
|
||||||
int zgError;
|
|
||||||
|
|
||||||
@JsonKey(name: 'kgCorrect')
|
|
||||||
int kgCorrect;
|
|
||||||
|
|
||||||
@JsonKey(name: 'zgCorrect')
|
|
||||||
int zgCorrect;
|
|
||||||
|
|
||||||
@JsonKey(name: 'unrated')
|
|
||||||
int unrated;
|
|
||||||
|
|
||||||
StudentDetails(
|
|
||||||
this.studentId,
|
|
||||||
this.studentName,
|
|
||||||
this.kgValidCount,
|
|
||||||
this.kgValidRate,
|
|
||||||
this.zgValidCount,
|
|
||||||
this.zgValidRate,
|
|
||||||
this.kgDetails,
|
|
||||||
this.zgDetails,
|
|
||||||
this.readLevel,
|
|
||||||
[this.kgError = 0,this.kgCorrect = 0,this.zgCorrect = 0,this.zgError = 0,this.unrated = 0]
|
|
||||||
);
|
|
||||||
|
|
||||||
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
|
factory StudentDetails.fromJson(Map<String, dynamic> srcJson) => _$StudentDetailsFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$StudentDetailsToJson(this);
|
Map<String, dynamic> toJson() => _$StudentDetailsToJson(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class KgDetails extends Object {
|
class KgDetails extends Object {
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
@JsonKey(name: 'questionNo')
|
||||||
String questionNo;
|
String questionNo;
|
||||||
|
|
||||||
|
|
@ -148,19 +114,12 @@ class KgDetails extends Object {
|
||||||
@JsonKey(name: 'score')
|
@JsonKey(name: 'score')
|
||||||
double? score;
|
double? score;
|
||||||
|
|
||||||
KgDetails(
|
KgDetails(this.questionNo,this.questionId,this.partName,this.state,this.studentAnswer,this.questionAnswer,this.useTime,this.annotateAnswers,this.score,);
|
||||||
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);
|
factory KgDetails.fromJson(Map<String, dynamic> srcJson) => _$KgDetailsFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KgDetailsToJson(this);
|
Map<String, dynamic> toJson() => _$KgDetailsToJson(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -339,8 +339,8 @@ class Details extends Object {
|
||||||
@JsonKey(name: 'validCount')
|
@JsonKey(name: 'validCount')
|
||||||
String validCount;
|
String validCount;
|
||||||
|
|
||||||
/* @JsonKey(name: 'validStudentNames')
|
@JsonKey(name: 'validStudentNames')
|
||||||
List<String> validStudentNames;*/
|
List<String> validStudentNames;
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
@JsonKey(name: 'correctRate')
|
||||||
int correctRate;
|
int correctRate;
|
||||||
|
|
@ -357,13 +357,7 @@ class Details extends Object {
|
||||||
@JsonKey(name: 'priorityStudentNames')
|
@JsonKey(name: 'priorityStudentNames')
|
||||||
List<String> priorityStudentNames;
|
List<String> priorityStudentNames;
|
||||||
|
|
||||||
@JsonKey(name: 'answerNgStudentNames')
|
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,);
|
||||||
List<String> answerNgStudentNames;
|
|
||||||
|
|
||||||
@JsonKey(name: 'noAnswerStudentNames')
|
|
||||||
List<String> noAnswerStudentNames;
|
|
||||||
|
|
||||||
Details(this.questionNo,this.questionId,this.partName,this.questionType,this.validRate,this.validCount,this.correctRate,this.questionAnswer,this.questionPicture,this.priorityGeneral,this.priorityStudentNames,this.answerNgStudentNames,this.noAnswerStudentNames);
|
|
||||||
|
|
||||||
factory Details.fromJson(Map<String, dynamic> srcJson) => _$DetailsFromJson(srcJson);
|
factory Details.fromJson(Map<String, dynamic> srcJson) => _$DetailsFromJson(srcJson);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -680,25 +680,18 @@ typedef ShowStudentsCall = Future<void> Function(
|
||||||
String? className,
|
String? className,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
class FavoriteButton extends StatefulWidget {
|
/// 收藏夹按钮
|
||||||
|
class FavoriteButton extends HookWidget with CommonMixin {
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final String jobName;
|
final String jobName;
|
||||||
|
EdgeInsets? margin;
|
||||||
final bool isRow;
|
final bool isRow;
|
||||||
final EdgeInsets? margin;
|
FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
||||||
const FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<FavoriteButton> createState() => _FavoriteButtonState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
|
|
||||||
late Future<int> _future; // 考试试卷
|
|
||||||
|
|
||||||
Future<int> getInvolveClasses() async {
|
Future<int> getInvolveClasses() async {
|
||||||
print('我的收藏请求数据');
|
|
||||||
try {
|
try {
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
var result = await _client.getListOfJobFavoriteNumber(widget.jobId);
|
var result = await _client.getListOfJobFavoriteNumber(jobId);
|
||||||
|
|
||||||
if (result.success && (result.data?.isNotEmpty ?? false)) {
|
if (result.success && (result.data?.isNotEmpty ?? false)) {
|
||||||
return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
||||||
|
|
@ -711,37 +704,26 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
|
||||||
|
|
||||||
// 收藏夹
|
// 收藏夹
|
||||||
void bookmarks(BuildContext context) {
|
void bookmarks(BuildContext context) {
|
||||||
RouterManager.router
|
RouterManager.router.navigateTo(
|
||||||
.navigateTo(
|
|
||||||
context,
|
context,
|
||||||
RouterManager.jobFavoritePagePath + '?jobId=${widget.jobId}&jobName=${Uri.encodeComponent(widget.jobName)}',
|
RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
|
||||||
transition: getTransition(),
|
transition: getTransition(),
|
||||||
)
|
);
|
||||||
.then((value) {
|
|
||||||
toUpState(setState, () {}, mounted);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
// _future = getInvolveClasses();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
var margin = widget.margin ?? EdgeInsets.only(top: 15.h);
|
var favoriteNumber = useState(0);
|
||||||
return FutureBuilder<int>(
|
useEffect(() {
|
||||||
builder: (context, AsyncSnapshot<int> async) {
|
getInvolveClasses().then((value) {
|
||||||
//在这里根据快照的状态,返回相应的widget
|
var favoriteCount = favoriteNumber.value;
|
||||||
if (async.connectionState == ConnectionState.active || async.connectionState == ConnectionState.waiting) {
|
if (favoriteCount != value) favoriteNumber.value = value;
|
||||||
return Container();
|
});
|
||||||
}
|
return () {};
|
||||||
if (async.connectionState == ConnectionState.done) {
|
}, []);
|
||||||
var favoriteNumber = async.data;
|
if (favoriteNumber.value <= 0) return Container();
|
||||||
if (favoriteNumber == null || favoriteNumber <= 0) return Container();
|
margin ??= EdgeInsets.only(top: 15.h);
|
||||||
|
return isRow
|
||||||
return widget.isRow
|
|
||||||
? Row(
|
? Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -756,8 +738,8 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child:
|
child: quickText('收藏夹(${favoriteNumber.value})',
|
||||||
quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -777,105 +759,11 @@ class _FavoriteButtonState extends State<FavoriteButton> with CommonMixin {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
||||||
child: quickText('收藏夹($favoriteNumber)', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
child:
|
||||||
|
quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Container();
|
|
||||||
},
|
|
||||||
future: getInvolveClasses(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 收藏夹按钮
|
|
||||||
// class FavoriteButton extends HookWidget with CommonMixin {
|
|
||||||
// final int jobId;
|
|
||||||
// final String jobName;
|
|
||||||
// EdgeInsets? margin;
|
|
||||||
// final bool isRow;
|
|
||||||
// FavoriteButton(this.jobId, this.jobName, {this.margin, this.isRow = true, super.key});
|
|
||||||
|
|
||||||
// Future<int> getInvolveClasses() async {
|
|
||||||
// print('我的收藏请求数据');
|
|
||||||
// try {
|
|
||||||
// RestClient _client = await getClient();
|
|
||||||
// var result = await _client.getListOfJobFavoriteNumber(jobId);
|
|
||||||
|
|
||||||
// if (result.success && (result.data?.isNotEmpty ?? false)) {
|
|
||||||
// return result.data!.map((e) => e.count).reduce((value, element) => value + element);
|
|
||||||
// }
|
|
||||||
// } catch (e) {
|
|
||||||
// print(e);
|
|
||||||
// }
|
|
||||||
// return 0;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // 收藏夹
|
|
||||||
// void bookmarks(BuildContext context) {
|
|
||||||
// RouterManager.router.navigateTo(
|
|
||||||
// context,
|
|
||||||
// RouterManager.jobFavoritePagePath + '?jobId=$jobId&jobName=${Uri.encodeComponent(jobName)}',
|
|
||||||
// transition: getTransition(),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @override
|
|
||||||
// Widget build(BuildContext context) {
|
|
||||||
|
|
||||||
// var favoriteNumber = useState(0);
|
|
||||||
// useEffect(() {
|
|
||||||
// getInvolveClasses().then((value) {
|
|
||||||
// var favoriteCount = favoriteNumber.value;
|
|
||||||
// if (favoriteCount != value) favoriteNumber.value = value;
|
|
||||||
// });
|
|
||||||
// return () {};
|
|
||||||
// }, []);
|
|
||||||
// if (favoriteNumber.value <= 0) return Container();
|
|
||||||
// margin ??= EdgeInsets.only(top: 15.h);
|
|
||||||
// return isRow
|
|
||||||
// ? Row(
|
|
||||||
// children: [
|
|
||||||
// Container(
|
|
||||||
// margin: margin,
|
|
||||||
// child: Material(
|
|
||||||
// color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
// borderRadius: BorderRadius.circular(20.r),
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () => bookmarks(context),
|
|
||||||
// borderRadius: BorderRadius.circular(8.r),
|
|
||||||
// child: Container(
|
|
||||||
// alignment: Alignment.center,
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
|
||||||
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
// child: quickText('收藏夹(${favoriteNumber.value})',
|
|
||||||
// size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Expanded(child: SizedBox())
|
|
||||||
// ],
|
|
||||||
// )
|
|
||||||
// : Container(
|
|
||||||
// margin: margin,
|
|
||||||
// child: Material(
|
|
||||||
// color: Color.fromRGBO(244, 244, 244, 1),
|
|
||||||
// borderRadius: BorderRadius.circular(20.r),
|
|
||||||
// child: InkWell(
|
|
||||||
// onTap: () => bookmarks(context),
|
|
||||||
// borderRadius: BorderRadius.circular(8.r),
|
|
||||||
// child: Container(
|
|
||||||
// alignment: Alignment.center,
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 17.w),
|
|
||||||
// decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
|
|
||||||
// child:
|
|
||||||
// quickText('收藏夹(${favoriteNumber.value})', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
|
||||||
|
|
@ -356,7 +356,7 @@ Widget $easyRefresh({
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
mainAxisSpacing: 10.h,
|
mainAxisSpacing: 10.h,
|
||||||
crossAxisSpacing: 6.w,
|
crossAxisSpacing: 6.w,
|
||||||
childAspectRatio: 1.81 //宽高比为1时,子widget
|
childAspectRatio: 2.0 //宽高比为1时,子widget
|
||||||
),
|
),
|
||||||
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
|
children: data.map((e) => $ReviewedItem(jobTaskItem: e)).toList(),
|
||||||
)
|
)
|
||||||
|
|
@ -428,7 +428,8 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
child: quickText(jobTaskItem.markingTypeEnum.name, color: Colors.white, size: 10.sp),
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: quickText(jobTaskItem.title, size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2),
|
child: quickText(jobTaskItem.title,
|
||||||
|
size: 14.sp, color: Color.fromRGBO(70, 70, 70, 1), maxLines: 2, fontWeight: FontWeight.w500),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1494,7 +1494,7 @@ Widget $personnelDataOverview(BuildContext context, List<StudentAnswerInfos> stu
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: isPad() ? 290.h : 264.h,
|
height: isPad() ? 290 : 264.h,
|
||||||
margin: EdgeInsets.only(top: 20.h),
|
margin: EdgeInsets.only(top: 20.h),
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
||||||
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
|
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(10.r)),
|
||||||
|
|
|
||||||
|
|
@ -57,14 +57,11 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult<List<JobFavoriteModel>> result = await _client.getListOfJobFavoriteNumber(widget.jobId);
|
BaseStructureResult<List<JobFavoriteModel>> result = await _client.getListOfJobFavoriteNumber(widget.jobId);
|
||||||
if (result.success) {
|
if (result.success) {
|
||||||
if (result.data?.isEmpty ?? true) {
|
|
||||||
favoriteMap = {};
|
|
||||||
}
|
|
||||||
result.data?.forEach((e) {
|
result.data?.forEach((e) {
|
||||||
favoriteMap['${e.schoolId}+${e.gradeId}+${e.className}'] = e.count;
|
favoriteMap['${e.schoolId}+${e.gradeId}+${e.className}'] = e.count;
|
||||||
});
|
});
|
||||||
toUpState(setState, () {}, mounted);
|
toUpState(setState, () {}, mounted);
|
||||||
} else {}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<List<MarkingTasks>?> getData() async {
|
Future<List<MarkingTasks>?> getData() async {
|
||||||
|
|
@ -271,17 +268,12 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
|
||||||
|
|
||||||
// 收藏夹
|
// 收藏夹
|
||||||
void bookmarks(MarkingTasks task) {
|
void bookmarks(MarkingTasks task) {
|
||||||
RouterManager.router
|
RouterManager.router.navigateTo(
|
||||||
.navigateTo(
|
|
||||||
context,
|
context,
|
||||||
RouterManager.jobFavoritePagePath +
|
RouterManager.jobFavoritePagePath +
|
||||||
'?className=${Uri.encodeComponent(task.className)}&jobId=${widget.jobId}&schoolId=${task.dpcSchoolId}&gradeId=${task.dpcGradeId}&jobName=${Uri.encodeComponent(widget.jobName)}',
|
'?className=${Uri.encodeComponent(task.className)}&jobId=${widget.jobId}&schoolId=${task.dpcSchoolId}&gradeId=${task.dpcGradeId}&jobName=${Uri.encodeComponent(widget.jobName)}',
|
||||||
transition: getTransition(),
|
transition: getTransition(),
|
||||||
)
|
);
|
||||||
.then((value) async {
|
|
||||||
_future = getData()
|
|
||||||
..then((value) => getListOfJobFavoritesData().then((value) => toUpState(setState, () {}, mounted)));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 数据快查
|
// 数据快查
|
||||||
|
|
|
||||||
|
|
@ -57,37 +57,6 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
await _client.getJobDataCenterReport(params);
|
await _client.getJobDataCenterReport(params);
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
if (data.code == 200) {
|
if (data.code == 200) {
|
||||||
int totalUnrated = 0;
|
|
||||||
data.data!.studentDetails.forEach((element) {
|
|
||||||
element.kgError = 0;
|
|
||||||
element.kgCorrect = 0;
|
|
||||||
element.zgError = 0;
|
|
||||||
element.zgCorrect = 0;
|
|
||||||
|
|
||||||
element.kgDetails.forEach((item) {
|
|
||||||
if (item.state == 1) {
|
|
||||||
element.kgError = element.kgError + 1;
|
|
||||||
}
|
|
||||||
if (item.state == 2) {
|
|
||||||
element.kgCorrect = element.kgCorrect + 1;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
element.zgDetails.forEach((item) {
|
|
||||||
if (item.state == 1) {
|
|
||||||
element.zgError = element.zgError + 1;
|
|
||||||
}
|
|
||||||
if (item.state == 2) {
|
|
||||||
element.zgCorrect = element.zgCorrect + 1;
|
|
||||||
}
|
|
||||||
if (item.state == 3) {
|
|
||||||
element.unrated = element.unrated + 1;
|
|
||||||
totalUnrated = element.unrated;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
if (totalUnrated > 0) {
|
|
||||||
data.data!.hasUnrated = true;
|
|
||||||
}
|
|
||||||
setState(() {
|
setState(() {
|
||||||
jobData = data.data;
|
jobData = data.data;
|
||||||
});
|
});
|
||||||
|
|
@ -136,9 +105,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
style: TextStyle(fontSize: 14.sp, color: Colors.white),
|
||||||
)),
|
)),
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(width: 24.r,),
|
||||||
width: 24.r,
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.r),
|
SizedBox(height: 10.r),
|
||||||
|
|
@ -180,9 +147,7 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(height: 10.r,),
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -360,128 +325,41 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.all(Radius.circular(6.r))),
|
BorderRadius.all(Radius.circular(6.r))),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: (){
|
onTap: () {
|
||||||
if (jobData == null) return;
|
|
||||||
if (!jobData!.sortType) {
|
|
||||||
jobData!.studentDetails.sort((a, b) {
|
jobData!.studentDetails.sort((a, b) {
|
||||||
int num1 =
|
int num1 = a.kgValidRate + a.zgValidRate;
|
||||||
a.kgValidRate + a.zgValidRate;
|
int num2 = b.kgValidRate + b.zgValidRate;
|
||||||
int num2 =
|
|
||||||
b.kgValidRate + b.zgValidRate;
|
|
||||||
return num2.compareTo(num1);
|
return num2.compareTo(num1);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
jobData!.studentDetails.sort((a, b) {
|
|
||||||
int num1 =
|
|
||||||
a.kgValidRate + a.zgValidRate;
|
|
||||||
int num2 =
|
|
||||||
b.kgValidRate + b.zgValidRate;
|
|
||||||
return num1.compareTo(num2);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
jobData!.sortType = !jobData!.sortType;
|
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
jobData!.sortLevel = false;
|
|
||||||
jobData!.studentDetails;
|
jobData!.studentDetails;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
if(!jobData!.sortType)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/no_check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
if(jobData!.sortType)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
SizedBox(width: 5.r,),
|
|
||||||
Text(
|
Text(
|
||||||
'未提交排序',
|
'未提交排序',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF707070)),
|
color: Color(0xFF6888FD)),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 20.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
|
|
||||||
InkWell(
|
|
||||||
onTap: (){
|
|
||||||
if (jobData == null) return;
|
|
||||||
if (!jobData!.sortLevel) {
|
|
||||||
jobData!.studentDetails.sort((a, b) {
|
|
||||||
return b.readLevel!
|
|
||||||
.compareTo(a.readLevel!);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
jobData!.studentDetails.sort((a, b) {
|
|
||||||
return a.readLevel!
|
|
||||||
.compareTo(b.readLevel!);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
jobData!.sortLevel =
|
|
||||||
!jobData!.sortLevel;
|
|
||||||
setState(() {
|
|
||||||
jobData!.sortType = false;
|
|
||||||
jobData!.studentDetails;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
if(!jobData!.sortLevel)
|
|
||||||
Image.asset(
|
Image.asset(
|
||||||
'assets/images/no_check_icon.png',
|
'assets/images/sort_icon.png',
|
||||||
width: 16.r,
|
width: 14.r,
|
||||||
height: 16.r,
|
height: 14.r,
|
||||||
),
|
|
||||||
if(jobData!.sortLevel)
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/check_icon.png',
|
|
||||||
width: 16.r,
|
|
||||||
height: 16.r,
|
|
||||||
),
|
|
||||||
SizedBox(width: 5.r,),
|
|
||||||
Text(
|
|
||||||
'未批阅排序',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF707070)),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 10.r,
|
height: 10.r,
|
||||||
),
|
),
|
||||||
Text(
|
|
||||||
'注:绿色代表正确,红色代表错误,白色代表已作答未批阅,灰色代表未做',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.sp, color: Color(0xFF717171)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: jobData!.studentDetails.length > 5
|
height: jobData!.studentDetails.length > 5
|
||||||
? 350.r
|
? 350.r
|
||||||
|
|
@ -492,17 +370,13 @@ class _QuickDataCheckPageState extends State<QuickDataCheckPage>
|
||||||
'学生姓名',
|
'学生姓名',
|
||||||
'客观题',
|
'客观题',
|
||||||
'主观题',
|
'主观题',
|
||||||
'客观题详情',
|
'客观题错题',
|
||||||
'主观题详情',
|
'主观题错题'
|
||||||
'未批阅'
|
|
||||||
],
|
],
|
||||||
bodyList: jobData!.studentDetails,
|
bodyList: jobData!.studentDetails,
|
||||||
jobId: widget.jobId,
|
jobId: widget.jobId,
|
||||||
fixedRows: 1,
|
fixedRows: 1,
|
||||||
fixedCols: 0,
|
fixedCols: 0,
|
||||||
hasUnrated: jobData!.hasUnrated,
|
|
||||||
kgCount: jobData!.kgQuestionCount,
|
|
||||||
zgCount: jobData!.zgQuestionCount,
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -11,18 +11,12 @@ class QuickStudentDataTable extends StatefulWidget {
|
||||||
final int? fixedRows;
|
final int? fixedRows;
|
||||||
final int? fixedCols;
|
final int? fixedCols;
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final bool hasUnrated;
|
|
||||||
final int kgCount;
|
|
||||||
final int zgCount;
|
|
||||||
|
|
||||||
const QuickStudentDataTable({
|
const QuickStudentDataTable({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.headList,
|
required this.headList,
|
||||||
required this.bodyList,
|
required this.bodyList,
|
||||||
required this.jobId,
|
required this.jobId,
|
||||||
required this.hasUnrated,
|
|
||||||
required this.kgCount,
|
|
||||||
required this.zgCount,
|
|
||||||
this.fixedCols = 0,
|
this.fixedCols = 0,
|
||||||
this.fixedRows = 0,
|
this.fixedRows = 0,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
@ -96,39 +90,17 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Row(
|
child: Text(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
'${(item.kgValidRate / 100 * item.kgValidCount).toInt()}/${item.kgValidCount}',
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${item.kgCorrect}',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
|
|
||||||
Text(
|
|
||||||
'/',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
Text(
|
|
||||||
'${item.kgError}',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFFF7474))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Row(
|
child: Text(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
'${(item.zgValidRate / 100 * item.zgValidCount).toInt()}/${item.zgValidCount}',
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'${item.zgCorrect}',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
|
|
||||||
Text(
|
|
||||||
'/',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
Text(
|
|
||||||
'${item.zgError}',
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFFFF7474))),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(
|
DataCell(
|
||||||
|
|
@ -147,8 +119,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
height: 14.r,
|
height: 14.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kgInfo.state == 0
|
color: kgInfo.state == 0
|
||||||
? Color(0xFFD3D3D3)
|
? Colors.white
|
||||||
: kgInfo.state == 3?Colors.white:kgInfo.state == 1
|
: kgInfo.state == 1
|
||||||
? Color(0xFFFF7474)
|
? Color(0xFFFF7474)
|
||||||
: Color(0xFF4CC793),
|
: Color(0xFF4CC793),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||||
|
|
@ -182,8 +154,8 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
height: 14.r,
|
height: 14.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: kgInfo.state == 0
|
color: kgInfo.state == 0
|
||||||
? Color(0xFFD3D3D3)
|
? Colors.white
|
||||||
: kgInfo.state == 3?Colors.white:kgInfo.state == 1
|
: kgInfo.state == 1
|
||||||
? Color(0xFFFF7474)
|
? Color(0xFFFF7474)
|
||||||
: Color(0xFF4CC793),
|
: Color(0xFF4CC793),
|
||||||
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
borderRadius: BorderRadius.all(Radius.circular(7.r))),
|
||||||
|
|
@ -201,24 +173,12 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if(widget.hasUnrated)
|
|
||||||
DataCell(Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text('${item.unrated}',
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
if(!widget.hasUnrated){
|
|
||||||
widget.headList.removeLast();
|
|
||||||
}
|
|
||||||
return DataTable2(
|
return DataTable2(
|
||||||
dividerThickness: 0,
|
dividerThickness: 0,
|
||||||
scrollController: _controller,
|
scrollController: _controller,
|
||||||
|
|
@ -256,39 +216,13 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
|
||||||
// onSelectAll: (val) => setState(() => selectAll(val)),
|
// onSelectAll: (val) => setState(() => selectAll(val)),
|
||||||
columns: List.generate(widget.headList.length, (index) {
|
columns: List.generate(widget.headList.length, (index) {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return index == 1?DataColumn2(
|
return DataColumn2(
|
||||||
label: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(item,
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
|
||||||
Text('(${widget.kgCount})',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
|
||||||
):index == 2?DataColumn2(
|
|
||||||
label: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(item,
|
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
|
||||||
Text('(${widget.zgCount})',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF505767))),
|
|
||||||
]
|
|
||||||
),
|
|
||||||
// size: ColumnSize.S,
|
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
|
||||||
):DataColumn2(
|
|
||||||
label: Center(
|
label: Center(
|
||||||
child: Text(item,
|
child: Text(item,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / widget.headList.length,
|
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'package:data_table_2/data_table_2.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|
||||||
import 'package:marking_app/utils/toast_utils.dart';
|
import 'package:marking_app/utils/toast_utils.dart';
|
||||||
import 'package:photo_view/photo_view.dart';
|
import 'package:photo_view/photo_view.dart';
|
||||||
|
|
||||||
|
|
@ -31,144 +30,6 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
int? _sortColumnIndex;
|
int? _sortColumnIndex;
|
||||||
bool _sortAscending = true;
|
bool _sortAscending = true;
|
||||||
|
|
||||||
void showPeopleListDialog(
|
|
||||||
{required BuildContext context, required String title, required String questionNo,required List arr,List? dcList}) {
|
|
||||||
print(dcList);
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: SizedBox(
|
|
||||||
width: MediaQuery.of(context).size.width * 0.7,
|
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
|
||||||
child: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Center(
|
|
||||||
child: Text(
|
|
||||||
title,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 15.sp,
|
|
||||||
color: Color(0xFF3C3C3C),
|
|
||||||
fontWeight: FontWeight.w500),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 5.r,
|
|
||||||
),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
widget.isKG == true ? '主观题' : '客观题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'―',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'第$questionNo题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp, color: Color(0xFF436CFF)),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 15.r,),
|
|
||||||
dcList != null?Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(child: Text('未作答人',style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),))),
|
|
||||||
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Center(child: Text('答错人',style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),))),
|
|
||||||
],
|
|
||||||
):Padding(padding: EdgeInsets.only(left: 15.r),child: Text(title,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6A6A6A)),),),
|
|
||||||
SizedBox(height: 5.r,),
|
|
||||||
if(dcList != null)
|
|
||||||
Expanded(
|
|
||||||
child: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context,index){
|
|
||||||
var item = arr[index];
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r),
|
|
||||||
color: index.isOdd?Colors.white:Color(0xFFF0F0F0),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
flex:1,
|
|
||||||
child: Center(child: Text(item['noAnswerStudentNames'],style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),))),
|
|
||||||
Expanded(
|
|
||||||
flex:1,
|
|
||||||
child: Center(child: Text(item['answerNgStudentNames'],style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),))),
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},itemCount: arr.length,),
|
|
||||||
)
|
|
||||||
|
|
||||||
else
|
|
||||||
arr.length>0?Expanded(
|
|
||||||
child: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context,index){
|
|
||||||
var item = arr[index];
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r,horizontal: 15.r),
|
|
||||||
color: index.isOdd?Colors.white:Color(0xFFF0F0F0),
|
|
||||||
child: Text(item,style: TextStyle(fontSize: 12.sp,color: Color(0xFF323232)),),
|
|
||||||
);
|
|
||||||
},itemCount: arr.length,),
|
|
||||||
):MyEmptyWidget()
|
|
||||||
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void zdHandle( BuildContext context, String title, String questionNo,List noAnswerStudentNames,List answerNgStudentNames){
|
|
||||||
List list = [];
|
|
||||||
if(noAnswerStudentNames.length>answerNgStudentNames.length){
|
|
||||||
for(int i = 0;i<answerNgStudentNames.length;i++){
|
|
||||||
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':answerNgStudentNames[i]};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
for(int i = answerNgStudentNames.length ;i<noAnswerStudentNames.length;i++){
|
|
||||||
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':'-'};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
for(int i = 0;i<noAnswerStudentNames.length;i++){
|
|
||||||
var obj = {'noAnswerStudentNames':noAnswerStudentNames[i],'answerNgStudentNames':answerNgStudentNames[i]};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
for(int i = noAnswerStudentNames.length ;i<answerNgStudentNames.length;i++){
|
|
||||||
var obj = {'noAnswerStudentNames':'-','answerNgStudentNames':answerNgStudentNames[i]};
|
|
||||||
list.add(obj);
|
|
||||||
}
|
|
||||||
print('list.length=${list.length}');
|
|
||||||
print('noAnswerStudentNames.length=${noAnswerStudentNames.length}');
|
|
||||||
print('answerNgStudentNames.length=${answerNgStudentNames.length}');
|
|
||||||
}
|
|
||||||
|
|
||||||
showPeopleListDialog(context:context, title:title, questionNo:questionNo,arr:list,dcList:[]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void dcHandle( BuildContext context, String title, String questionNo,List arr){
|
|
||||||
showPeopleListDialog(context:context, title:title, questionNo:questionNo,arr: arr);
|
|
||||||
}
|
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
var item = widget.bodyList[index];
|
var item = widget.bodyList[index];
|
||||||
|
|
@ -190,28 +51,11 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(Center(
|
||||||
onTap: () {
|
|
||||||
zdHandle(context, '作答人数', item.questionNo,item.noAnswerStudentNames,item.answerNgStudentNames);
|
|
||||||
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Row(
|
child: Text(item.validCount,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
|
||||||
children: [
|
|
||||||
Text(item.validCount,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF4CC793))),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/green_right_icon.png',
|
|
||||||
width: 12.r,
|
|
||||||
height: 12.r,
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
|
|
@ -235,8 +79,8 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(),
|
||||||
body: PhotoView(
|
body: PhotoView(
|
||||||
imageProvider:
|
imageProvider: NetworkImage(
|
||||||
NetworkImage(item.questionPicture!)),
|
item.questionPicture!)),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
@ -256,28 +100,11 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
: Color(0xFF4CC793))),
|
: Color(0xFF4CC793))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(Center(
|
||||||
onTap: (){
|
|
||||||
List<String> parts = item.priorityGeneral.split('人');
|
|
||||||
dcHandle(context, '${parts[1]}人', item.questionNo,item.priorityStudentNames);
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Row(
|
child: Text(item.priorityGeneral,
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||||
children: [
|
|
||||||
Text(item.priorityGeneral,
|
|
||||||
style:
|
|
||||||
TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/job_data_right_icon.png',
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.questionAnswer == null ?'无':item.questionAnswer!,
|
child: Text(item.annotateAnswers == null ?'无':item.annotateAnswers!,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
||||||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||||
# Read more about iOS versioning at
|
# Read more about iOS versioning at
|
||||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||||
version: 1.0.98
|
version: 1.0.96
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.1 <3.0.0"
|
sdk: ">=2.17.1 <3.0.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue