Compare commits
No commits in common. "1fbb102370c7cd399ec06f04ef70066c95f10441" and "d7ad4912ebcad6f6589074a91890480d1b97db2a" have entirely different histories.
1fbb102370
...
d7ad4912eb
|
|
@ -211,16 +211,3 @@ marking_app/lib/common/model/job/job_fav_student.g.dart
|
||||||
marking_app/lib/common/model/job/job_data_report.g.dart
|
marking_app/lib/common/model/job/job_data_report.g.dart
|
||||||
marking_app/lib/common/model/job/job_student_history.g.dart
|
marking_app/lib/common/model/job/job_student_history.g.dart
|
||||||
marking_app/lib/pages/homework_correction/job_personal_detail.g.dart
|
marking_app/lib/pages/homework_correction/job_personal_detail.g.dart
|
||||||
marking_app/lib/common/model/event_bus/jobs/job_do_papers_submit_check_switch_bus.g.dart
|
|
||||||
marking_app/lib/common/model/event_bus/jobs/job_do_synchro_tab.g.dart
|
|
||||||
marking_app/lib/pages/homework_correction/widget/top_count.g.dart
|
|
||||||
marking_app/lib/common/model/event_bus/job_home_refresh_bus.g.dart
|
|
||||||
marking_app/lib/common/model/job/job_knowledge_points_detail.g.dart
|
|
||||||
marking_app/lib/common/model/job/job_knowledge_points.g.dart
|
|
||||||
marking_app/lib/pages/homework_correction/job_knowledge_points.g.dart
|
|
||||||
marking_app/lib/pages/homework_correction/job_knowledge_points_detail.g.dart
|
|
||||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
|
||||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
|
||||||
marking_app/lib/pages/homework_correction/job_home.g.dart
|
|
||||||
marking_app/lib/common/model/marking/keyboard_assist_event.g.dart
|
|
||||||
marking_app/lib/common/model/marking/marking_history_zoom_info.g.dart
|
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 9.8 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 467 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 724 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 286 B |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 293 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -352,7 +352,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 = 21;
|
CURRENT_PROJECT_VERSION = 20;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -360,7 +360,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.104;
|
MARKETING_VERSION = 1.0.102;
|
||||||
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";
|
||||||
|
|
@ -490,7 +490,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 = 21;
|
CURRENT_PROJECT_VERSION = 20;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -498,7 +498,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.104;
|
MARKETING_VERSION = 1.0.102;
|
||||||
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 +520,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 = 21;
|
CURRENT_PROJECT_VERSION = 20;
|
||||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
|
|
@ -528,7 +528,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.104;
|
MARKETING_VERSION = 1.0.102;
|
||||||
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";
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_home_refresh_bus.g.dart';
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobHomeRefreshBus extends Object {
|
|
||||||
JobHomeRefreshBus();
|
|
||||||
|
|
||||||
factory JobHomeRefreshBus.fromJson(Map<String, dynamic> srcJson) => _$JobHomeRefreshBusFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobHomeRefreshBusToJson(this);
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_do_papers_submit_check_switch_bus.g.dart';
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobDoPapersSubmitCheckSwitchBus extends Object {
|
|
||||||
JobDoPapersSubmitCheckSwitchBus();
|
|
||||||
|
|
||||||
factory JobDoPapersSubmitCheckSwitchBus.fromJson(Map<String, dynamic> srcJson) => _$JobDoPapersSubmitCheckSwitchBusFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobDoPapersSubmitCheckSwitchBusToJson(this);
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
import 'package:collection/collection.dart';
|
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_page_tab.dart';
|
|
||||||
|
|
||||||
part 'job_do_synchro_tab.g.dart';
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobDoSynchroTab extends Object {
|
|
||||||
List<JobPageTab> tabs;
|
|
||||||
|
|
||||||
JobDoSynchroTab(this.tabs);
|
|
||||||
|
|
||||||
factory JobDoSynchroTab.fromJson(Map<String, dynamic> srcJson) => _$JobDoSynchroTabFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobDoSynchroTabToJson(this);
|
|
||||||
|
|
||||||
/// 当前tab下一个tab的pageIndex
|
|
||||||
int? getNextPageIndex([int? pageIndex]) {
|
|
||||||
if (pageIndex == null) return null;
|
|
||||||
var _index = tabs.indexWhere((e) => e.pageIndex == pageIndex);
|
|
||||||
if (_index == -1) return null;
|
|
||||||
|
|
||||||
return _index == tabs.length - 1 ? null : tabs[_index + 1].pageIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 当前tab上一个tab的pageIndex
|
|
||||||
int? getPreviousPageIndex([int? pageIndex]) {
|
|
||||||
if (pageIndex == null) return null;
|
|
||||||
var _index = tabs.indexWhere((e) => e.pageIndex == pageIndex);
|
|
||||||
if (_index == -1) return null;
|
|
||||||
pageIndex = _index == 0 ? null : tabs[_index - 1].pageIndex;
|
|
||||||
print('这是上一页的数据:${pageIndex}');
|
|
||||||
return pageIndex;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_knowledge_detail_student.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobKnowledgeDetailStudent extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentId')
|
|
||||||
int studentId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'studentName')
|
|
||||||
String studentName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isAnswer')
|
|
||||||
bool isAnswer;
|
|
||||||
|
|
||||||
@JsonKey(name: 'isCorrect')
|
|
||||||
bool isCorrect;
|
|
||||||
|
|
||||||
JobKnowledgeDetailStudent(this.studentId,this.studentName,this.isAnswer,this.isCorrect,);
|
|
||||||
|
|
||||||
factory JobKnowledgeDetailStudent.fromJson(Map<String, dynamic> srcJson) => _$JobKnowledgeDetailStudentFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobKnowledgeDetailStudentToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_knowledge_points.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class KnowledgePoints extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'knowledgeId')
|
|
||||||
int knowledgeId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'knowledgeName')
|
|
||||||
String knowledgeName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
@JsonKey(name: 'count')
|
|
||||||
int count;
|
|
||||||
|
|
||||||
KnowledgePoints(this.knowledgeId,this.knowledgeName,this.correctRate,this.count,);
|
|
||||||
|
|
||||||
factory KnowledgePoints.fromJson(Map<String, dynamic> srcJson) => _$KnowledgePointsFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KnowledgePointsToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_knowledge_points_detail.g.dart';
|
|
||||||
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class KnowledgePointsDetail extends Object {
|
|
||||||
|
|
||||||
@JsonKey(name: 'jobId')
|
|
||||||
int jobId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'jobName')
|
|
||||||
String jobName;
|
|
||||||
|
|
||||||
@JsonKey(name: 'publishTime')
|
|
||||||
String publishTime;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionId')
|
|
||||||
int questionId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'questionNo')
|
|
||||||
String questionNo;
|
|
||||||
|
|
||||||
@JsonKey(name: 'sectionId')
|
|
||||||
int sectionId;
|
|
||||||
|
|
||||||
@JsonKey(name: 'correctRate')
|
|
||||||
int correctRate;
|
|
||||||
|
|
||||||
KnowledgePointsDetail(this.jobId,this.jobName,this.publishTime,this.questionId,this.questionNo,this.sectionId,this.correctRate,);
|
|
||||||
|
|
||||||
factory KnowledgePointsDetail.fromJson(Map<String, dynamic> srcJson) => _$KnowledgePointsDetailFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$KnowledgePointsDetailToJson(this);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -18,20 +18,17 @@ class MarkingTextQuestionJobTabParams extends Object {
|
||||||
@JsonKey(name: 'studentId')
|
@JsonKey(name: 'studentId')
|
||||||
int? studentId;
|
int? studentId;
|
||||||
|
|
||||||
@JsonKey(name: 'defaultFirst')
|
|
||||||
bool? isDefaultFirst;
|
|
||||||
|
|
||||||
MarkingTextQuestionJobTabParams({
|
MarkingTextQuestionJobTabParams({
|
||||||
required this.taskId,
|
required this.taskId,
|
||||||
required this.pageIndex,
|
required this.pageIndex,
|
||||||
this.isDefaultFirst,
|
|
||||||
this.paperId,
|
this.paperId,
|
||||||
this.studentId,
|
this.studentId,
|
||||||
this.nextPageIndex,
|
this.nextPageIndex,
|
||||||
this.previousPageIndex,
|
this.previousPageIndex,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory MarkingTextQuestionJobTabParams.fromJson(Map<String, dynamic> srcJson) => _$MarkingTextQuestionJobTabParamsFromJson(srcJson);
|
factory MarkingTextQuestionJobTabParams.fromJson(Map<String, dynamic> srcJson) =>
|
||||||
|
_$MarkingTextQuestionJobTabParamsFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$MarkingTextQuestionJobTabParamsToJson(this);
|
Map<String, dynamic> toJson() => _$MarkingTextQuestionJobTabParamsToJson(this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'keyboard_assist_event.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
KeyboardAssistEvent _$KeyboardAssistEventFromJson(Map<String, dynamic> json) =>
|
||||||
|
KeyboardAssistEvent(
|
||||||
|
openAuxiliary: json['openAuxiliary'] as bool? ?? false,
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$KeyboardAssistEventToJson(
|
||||||
|
KeyboardAssistEvent instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'openAuxiliary': instance.openAuxiliary,
|
||||||
|
};
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||||
|
|
||||||
|
part of 'marking_history_zoom_info.dart';
|
||||||
|
|
||||||
|
// **************************************************************************
|
||||||
|
// JsonSerializableGenerator
|
||||||
|
// **************************************************************************
|
||||||
|
|
||||||
|
MarkingHistoryZoomInfo _$MarkingHistoryZoomInfoFromJson(
|
||||||
|
Map<String, dynamic> json) =>
|
||||||
|
MarkingHistoryZoomInfo(
|
||||||
|
markingUserId: json['markingUserId'] as int,
|
||||||
|
questionNum: json['questionNum'] as String,
|
||||||
|
scale: (json['scale'] as num).toDouble(),
|
||||||
|
positionY: (json['positionY'] as num).toDouble(),
|
||||||
|
positionX: (json['positionX'] as num).toDouble(),
|
||||||
|
);
|
||||||
|
|
||||||
|
Map<String, dynamic> _$MarkingHistoryZoomInfoToJson(
|
||||||
|
MarkingHistoryZoomInfo instance) =>
|
||||||
|
<String, dynamic>{
|
||||||
|
'markingUserId': instance.markingUserId,
|
||||||
|
'questionNum': instance.questionNum,
|
||||||
|
'scale': instance.scale,
|
||||||
|
'positionY': instance.positionY,
|
||||||
|
'positionX': instance.positionX,
|
||||||
|
};
|
||||||
|
|
@ -15,7 +15,7 @@ part 'marking_list_params.g.dart';
|
||||||
@JsonSerializable()
|
@JsonSerializable()
|
||||||
class MarkingListParams extends BasePage {
|
class MarkingListParams extends BasePage {
|
||||||
@JsonKey(name: 'isFinish')
|
@JsonKey(name: 'isFinish')
|
||||||
bool? isFinish;
|
bool isFinish;
|
||||||
|
|
||||||
// 阅卷类型
|
// 阅卷类型
|
||||||
@JsonKey(name: 'PageType')
|
@JsonKey(name: 'PageType')
|
||||||
|
|
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
|
||||||
int? markingType; // 1 作业 2考试
|
int? markingType; // 1 作业 2考试
|
||||||
|
|
||||||
MarkingListParams({
|
MarkingListParams({
|
||||||
this.isFinish,
|
required this.isFinish,
|
||||||
required this.pageType,
|
required this.pageType,
|
||||||
required page,
|
required page,
|
||||||
required limit,
|
required limit,
|
||||||
|
|
|
||||||
|
|
@ -1,251 +0,0 @@
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
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/config/request_config.dart';
|
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
|
||||||
import 'package:marking_app/common/model/common/base_page_data.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/job/job_task_item.dart';
|
|
||||||
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/answer_trajectory_job.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/student_group_list.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/my_text.dart';
|
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
|
||||||
|
|
||||||
class AnswerTrajectory extends StatefulWidget {
|
|
||||||
const AnswerTrajectory({Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<AnswerTrajectory> createState() => _AnswerTrajectoryState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AnswerTrajectoryState extends State<AnswerTrajectory>
|
|
||||||
with CommonMixin, SingleTickerProviderStateMixin {
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
late final EasyRefreshController refreshController2;
|
|
||||||
late String loginName;
|
|
||||||
List studentGroups = [];
|
|
||||||
List<JobTaskItem> jobList = [];
|
|
||||||
late TabController tabController;
|
|
||||||
int tabIndex = 0;
|
|
||||||
int page = 1;
|
|
||||||
int pageSize = 10;
|
|
||||||
int total = 0;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
refreshController2 = EasyRefreshController();
|
|
||||||
tabController =
|
|
||||||
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
|
||||||
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();
|
|
||||||
getWorkList();
|
|
||||||
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();
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
void goNextPage(id, title) {
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=answerTrajectory',
|
|
||||||
transition: getTransition());
|
|
||||||
}
|
|
||||||
|
|
||||||
void getWorkList() async {
|
|
||||||
final MarkingListParams params = MarkingListParams(
|
|
||||||
page: page,
|
|
||||||
limit: pageSize,
|
|
||||||
pageType: 0,
|
|
||||||
markingType: 1,
|
|
||||||
);
|
|
||||||
print('params=${params.limit}&page=${params.page}');
|
|
||||||
RestClient client = await getClient();
|
|
||||||
BaseStructureResult<BasePageData<JobTaskItem>> res =
|
|
||||||
await client.getJobsByPage(params);
|
|
||||||
List<JobTaskItem> arr = [];
|
|
||||||
if (res.success) {
|
|
||||||
if (page == 1) {
|
|
||||||
arr = res.data!.items;
|
|
||||||
} else {
|
|
||||||
arr = [...jobList, ...res.data!.items];
|
|
||||||
}
|
|
||||||
total = res.data!.total;
|
|
||||||
} else {
|
|
||||||
jobList = [];
|
|
||||||
}
|
|
||||||
jobList = arr;
|
|
||||||
setState(() {});
|
|
||||||
print('total=${res.data!.total}');
|
|
||||||
refreshController2.finishRefresh();
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
refreshController.dispose();
|
|
||||||
refreshController2.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text(
|
|
||||||
'答题轨迹',
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
|
||||||
),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: Column(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(
|
|
||||||
bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
|
||||||
child: TabBar(
|
|
||||||
onTap: (int val) {
|
|
||||||
print(val);
|
|
||||||
setState(() {
|
|
||||||
tabIndex = val;
|
|
||||||
});
|
|
||||||
/*EasyLoading.show(status: 'loading...');
|
|
||||||
if(val == 0){
|
|
||||||
getStudentGroups();
|
|
||||||
}*/
|
|
||||||
},
|
|
||||||
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.only(top: 15.r, left: 14.r, right: 14.r),
|
|
||||||
child:
|
|
||||||
tabIndex == 0
|
|
||||||
?
|
|
||||||
EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
getStudentGroups();
|
|
||||||
},
|
|
||||||
child: StudentGroupList(studentGroups, goNextPage,
|
|
||||||
rightBtn: Container(
|
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
|
||||||
height: 20.r,
|
|
||||||
width: 55.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r, color: Color(0xFFFF9800)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'详情',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp, color: Color(0xFFFF9800)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
):EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: refreshController2,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
page = 1;
|
|
||||||
setState(() {});
|
|
||||||
getWorkList();
|
|
||||||
},
|
|
||||||
onLoad: () async {
|
|
||||||
if (jobList.length < total) {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
page = page + 1;
|
|
||||||
getWorkList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child:AnswerTrajectoryJob(jobList)),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,279 +0,0 @@
|
||||||
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_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_task_item.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.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 AnswerTrajectoryJobDetail extends StatefulWidget {
|
|
||||||
final int jobId;
|
|
||||||
final String jobName;
|
|
||||||
final String genderName;
|
|
||||||
|
|
||||||
const AnswerTrajectoryJobDetail(
|
|
||||||
{Key? key,
|
|
||||||
required this.jobId,
|
|
||||||
required this.jobName,
|
|
||||||
required this.genderName})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<AnswerTrajectoryJobDetail> createState() =>
|
|
||||||
_AnswerTrajectoryJobDetailState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _AnswerTrajectoryJobDetailState extends State<AnswerTrajectoryJobDetail>
|
|
||||||
with CommonMixin {
|
|
||||||
List<MarkingTasks> markList = [];
|
|
||||||
late MarkingTasks currentClass;
|
|
||||||
List<JobConcernedWithStudent> students = [];
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getData();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getData() async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<MarkingTasks>> res =
|
|
||||||
await _client.getJobListParticipateInClass(widget.jobId);
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
markList = res.data!;
|
|
||||||
if (markList.length > 0) {
|
|
||||||
currentClass = markList[0];
|
|
||||||
getStudentList();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void getStudentList() async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<JobConcernedWithStudent>> res =
|
|
||||||
await _client.getJobWithStudents(JobConcernedWithStudentParams([currentClass.id]));
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
students = res.data!;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
refreshController.finishRefresh();
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
refreshController.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color(0xFFF5F5F5),
|
|
||||||
appBar: AppBar(
|
|
||||||
centerTitle: true,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text(
|
|
||||||
widget.jobName,
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
|
||||||
overflow: TextOverflow.ellipsis,
|
|
||||||
),
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
body: Column(
|
|
||||||
children: [
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
if (markList.length > 0)
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
SingleChildScrollView(
|
|
||||||
scrollDirection: Axis.horizontal,
|
|
||||||
child: Row(
|
|
||||||
children: List.generate(markList.length, (index) {
|
|
||||||
MarkingTasks item = markList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: (){
|
|
||||||
if(currentClass.id != item.id){
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
setState(() {
|
|
||||||
currentClass = item;
|
|
||||||
});
|
|
||||||
getStudentList();
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 5.r, horizontal: 10.r),
|
|
||||||
margin: EdgeInsets.only(
|
|
||||||
right: index < markList.length ? 8.r : 0),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'${widget.genderName}${item.className}',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: currentClass.id == item.id
|
|
||||||
? Color(0xFF6888FD)
|
|
||||||
: Color(0xFF686868)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
height: 1.r,
|
|
||||||
color: Color(0xFFCCCCCC),
|
|
||||||
),
|
|
||||||
students.length>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 {
|
|
||||||
getStudentList();
|
|
||||||
},
|
|
||||||
child: students.length > 0
|
|
||||||
? isPad()
|
|
||||||
? GridView(
|
|
||||||
gridDelegate:
|
|
||||||
SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 2,
|
|
||||||
mainAxisSpacing: 10.r,
|
|
||||||
crossAxisSpacing: 10.r,
|
|
||||||
childAspectRatio: 556 / 112,
|
|
||||||
),
|
|
||||||
children: List.generate(students.length, (index) {
|
|
||||||
var item = students[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.studentName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6888FD)),
|
|
||||||
)),
|
|
||||||
|
|
||||||
Container(
|
|
||||||
height: 20.r,
|
|
||||||
width: 70.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
|
||||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
: ListView.builder(
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
var item = students[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
|
||||||
},
|
|
||||||
child: 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: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.studentName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6888FD)),
|
|
||||||
)),
|
|
||||||
Container(
|
|
||||||
height: 24.r,
|
|
||||||
width: 72.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
|
||||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
|
||||||
)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: students.length,
|
|
||||||
)
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
):MyEmptyWidget(),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
|
||||||
|
|
||||||
import 'package:collection/collection.dart';
|
import 'package:collection/collection.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
@ -11,8 +10,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/event_bus/jobs/job_do_papers_student_bus.dart';
|
import 'package:marking_app/common/model/event_bus/jobs/job_do_papers_student_bus.dart';
|
||||||
import 'package:marking_app/common/model/event_bus/jobs/job_do_papers_submit_check_switch_bus.dart';
|
|
||||||
import 'package:marking_app/common/model/event_bus/jobs/job_do_synchro_tab.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_concerned_with_student.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_concerned_with_student_params.dart';
|
||||||
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
|
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
|
||||||
|
|
@ -25,7 +22,6 @@ import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/bottom_annotation_switch_job.dart';
|
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/bottom_annotation_switch_job.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/eventBus/marking_text_question_job_tab_params_bus.dart';
|
import 'package:marking_app/pages/homework_correction/eventBus/marking_text_question_job_tab_params_bus.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/providers/drawing_provider.dart';
|
import 'package:marking_app/pages/homework_correction/providers/drawing_provider.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
|
||||||
// utils
|
// utils
|
||||||
|
|
@ -151,6 +147,7 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
|
||||||
if (doMarkingInfo.value == null) return Container();
|
if (doMarkingInfo.value == null) return Container();
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
|
print('点击了...');
|
||||||
List<JobConcernedWithStudent>? students = await getStudents();
|
List<JobConcernedWithStudent>? students = await getStudents();
|
||||||
if (students == null) return;
|
if (students == null) return;
|
||||||
students = students..sort((e, e1) => e.studentName.compareTo(e1.studentName));
|
students = students..sort((e, e1) => e.studentName.compareTo(e1.studentName));
|
||||||
|
|
@ -231,18 +228,17 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
UseSwitchStudentAndType _useSwitchStudentAndType = UseSwitchStudentAndType.use(); // 学生和试卷状态
|
UseSwitchStudentAndType _useSwitchStudentAndType = UseSwitchStudentAndType.use(); // 学生和试卷状态
|
||||||
|
|
||||||
// 当前tab改变时
|
// 当前tab改变时
|
||||||
useValueChanged<List<JobPageTab>?, String>(_useSwitchStudentAndType.tabs.value, (_, __) {
|
useValueChanged<JobPageTab?, String>(_useSwitchStudentAndType.currentTab.value, (_, __) {
|
||||||
_useSwitchStudentAndType.eventFire(model: JobDoSynchroTab(_useSwitchStudentAndType.tabs.value));
|
|
||||||
});
|
|
||||||
|
|
||||||
// 当前tab改变时
|
|
||||||
useValueChanged<JobPageTab?, String>(_useSwitchStudentAndType.currentTab.value, (_oldValue, __) {
|
|
||||||
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
||||||
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
|
JobDoPapersStudentBus? studentBus = _useSwitchStudentAndType.studentBusInfo.value;
|
||||||
if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
if (studentBus != null && studentBus.pageIndex == thePageIndex) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
||||||
if (thePageIndex != null) {
|
if (thePageIndex != null) {
|
||||||
_useSwitchStudentAndType.getDataForStudents(taskId: taskId, pageIndex: thePageIndex);
|
_useSwitchStudentAndType.getDataForStudents(taskId: taskId, pageIndex: thePageIndex);
|
||||||
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex));
|
int indexLocated = _useSwitchStudentAndType.tabs.value.indexWhere((element) => element.pageIndex == thePageIndex);
|
||||||
|
_useSwitchStudentAndType.eventFire(
|
||||||
|
model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex,
|
||||||
|
nextPageIndex: _useSwitchStudentAndType.getNextPageIndex(indexLocated),
|
||||||
|
previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(indexLocated)));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
useValueChanged<JobConcernedWithStudent?, String>(_useSwitchStudentAndType.currentStudent.value, (oldData, __) {
|
useValueChanged<JobConcernedWithStudent?, String>(_useSwitchStudentAndType.currentStudent.value, (oldData, __) {
|
||||||
|
|
@ -251,8 +247,15 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
if (studentBus != null && studentBus.studentId == studentId) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
if (studentBus != null && studentBus.studentId == studentId) return; // 获取试卷详情数据 定位到对应学生的数据 无需再通知详情获取数据
|
||||||
|
|
||||||
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
var thePageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
||||||
if (thePageIndex != null) {
|
if (thePageIndex != null) // 通知详情数据
|
||||||
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex, studentId: studentId));
|
{
|
||||||
|
int indexLocated = _useSwitchStudentAndType.tabs.value.indexWhere((element) => element.pageIndex == thePageIndex);
|
||||||
|
_useSwitchStudentAndType.eventFire(
|
||||||
|
model: MarkingTextQuestionJobTabParamsBus(taskId, thePageIndex,
|
||||||
|
studentId: studentId,
|
||||||
|
nextPageIndex: _useSwitchStudentAndType.getNextPageIndex(indexLocated),
|
||||||
|
previousPageIndex: _useSwitchStudentAndType.getPreviousPageIndex(indexLocated)),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -286,29 +289,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
_useSwitchStudentAndType.currentTab.value =
|
_useSwitchStudentAndType.currentTab.value =
|
||||||
_useSwitchStudentAndType.tabs.value.firstWhere((element) => moldeParams.pageIndex == element.pageIndex);
|
_useSwitchStudentAndType.tabs.value.firstWhere((element) => moldeParams.pageIndex == element.pageIndex);
|
||||||
break;
|
break;
|
||||||
case JobDoPapersSubmitCheckSwitchBus: // 提交后切换试题通知
|
|
||||||
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
|
||||||
var _pageIndex = _currentTab?.pageIndex;
|
|
||||||
if (_currentTab == null || _pageIndex == null) return;
|
|
||||||
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
|
|
||||||
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
|
|
||||||
if (_currentTab.finishCount < _currentTab.total) {
|
|
||||||
if (_currentTab.finishCount + 1 == _currentTab.total) {
|
|
||||||
var _currentTabNew =
|
|
||||||
_useSwitchStudentAndType.tabs.value.firstWhereOrNull((e) => e.pageIndex != _currentTab.pageIndex && e.finishCount != e.total);
|
|
||||||
// 如果全部都已经批阅完成就不需要跳转到不必要得批阅试题
|
|
||||||
if (_currentTabNew != null) params.pageIndex = _currentTabNew.pageIndex;
|
|
||||||
}
|
|
||||||
var _theCurrentPage = _useSwitchStudentAndType.tabs.value.firstWhereOrNull((element) => element.pageIndex == _pageIndex);
|
|
||||||
if (_theCurrentPage != null) {
|
|
||||||
_theCurrentPage.finishCount += 1;
|
|
||||||
_useSwitchStudentAndType.tabs.value = _useSwitchStudentAndType.tabs.value.map((e) => JobPageTab.fromJson(e.toJson())).toList();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_useSwitchStudentAndType.eventFire(model: params);
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -317,6 +297,9 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
_useSwitchStudentAndType.eventCancel();
|
_useSwitchStudentAndType.eventCancel();
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
|
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r),
|
padding: EdgeInsets.only(bottom: 2.r, left: 12.r, right: 12.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -365,7 +348,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 5,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -401,13 +384,12 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: isPad() ? 4 : 5,
|
flex: 4,
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
if (_useSwitchStudentAndType.isFinish.value &&
|
if (_useSwitchStudentAndType.isFinish.value && _currentTab?.finishCount != _currentTab?.total)
|
||||||
_useSwitchStudentAndType.tabs.value.firstWhereOrNull((e) => e.finishCount < e.total) != null)
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
@ -419,8 +401,10 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
onTap: () => easyThrottle(
|
onTap: () => easyThrottle(
|
||||||
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
|
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
|
||||||
() {
|
() {
|
||||||
var _currentTabNew = _useSwitchStudentAndType.tabs.value.firstWhere((e) => e.finishCount < e.total);
|
var _pageIndex = _useSwitchStudentAndType.currentTab.value?.pageIndex;
|
||||||
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, _currentTabNew.pageIndex));
|
if (_pageIndex == null) return;
|
||||||
|
|
||||||
|
_useSwitchStudentAndType.eventFire(model: MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
child: quickText(
|
child: quickText(
|
||||||
|
|
@ -434,30 +418,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('DO_PAPERS_JOB_HISTORICAL_HOMEWORK', () {
|
|
||||||
JobConcernedWithStudent? _studentModel = _useSwitchStudentAndType.currentStudent.value;
|
|
||||||
if (_studentModel == null) return;
|
|
||||||
String url =
|
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${_studentModel.studentId}&studentName=${Uri.encodeComponent(_studentModel.studentName)}';
|
|
||||||
RouterManager.router.navigateTo(context, url, transition: getTransition());
|
|
||||||
}),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Icon(Icons.location_history, size: 12.sp, color: Color.fromRGBO(104, 103, 103, 1)),
|
|
||||||
SizedBox(width: 1.w),
|
|
||||||
quickText(
|
|
||||||
'历史作业',
|
|
||||||
size: 10.sp,
|
|
||||||
decoration: TextDecoration.underline,
|
|
||||||
color: Theme.of(context).primaryColor.withOpacity(0.8),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Stack(
|
Stack(
|
||||||
alignment: const FractionalOffset(0.52, 0.24),
|
alignment: const FractionalOffset(0.52, 0.24),
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -469,8 +429,49 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
quickText('优先', size: 4.sp, color: Colors.white),
|
quickText('优先', size: 4.sp, color: Colors.white),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
SizedBox(width: 1.2.w),
|
||||||
|
quickText(
|
||||||
|
'优先批阅',
|
||||||
|
size: 10.sp,
|
||||||
|
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
// InkWell(
|
||||||
|
// onTap: () => easyThrottle(
|
||||||
|
// 'prioritize_homework_review',
|
||||||
|
// () => !_useSwitchStudentAndType.isFirst.value
|
||||||
|
// ? _useSwitchStudentAndType.jobPriorityReviewJoin(jobId)
|
||||||
|
// : _useSwitchStudentAndType.jobPriorityReviewCancel(jobId)),
|
||||||
|
// child:
|
||||||
|
// Row(
|
||||||
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.start,
|
||||||
|
// children: [
|
||||||
|
// Stack(
|
||||||
|
// alignment: const FractionalOffset(0.52, 0.24),
|
||||||
|
// children: [
|
||||||
|
// Icon(
|
||||||
|
// const IconData(0xe63d, fontFamily: "AlibabaIcon"),
|
||||||
|
// size: 12.sp,
|
||||||
|
// color: _useSwitchStudentAndType.isFirst.value
|
||||||
|
// ? Color.fromRGBO(76, 199, 147, 1)
|
||||||
|
// : Color.fromRGBO(164, 164, 164, 1),
|
||||||
|
// ),
|
||||||
|
// quickText('优先', size: 4.sp, color: Colors.white),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// SizedBox(width: 1.2.w),
|
||||||
|
// quickText(
|
||||||
|
// '优先批阅',
|
||||||
|
// size: 10.sp,
|
||||||
|
// color: _useSwitchStudentAndType.isFirst.value
|
||||||
|
// ? Color.fromRGBO(76, 199, 147, 1)
|
||||||
|
// : Color.fromRGBO(164, 164, 164, 1),
|
||||||
|
// ),
|
||||||
|
// ],
|
||||||
|
// ),
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -490,9 +491,7 @@ class ExamPaperAndScoringView extends StatefulHookConsumerWidget {
|
||||||
class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringView> with EventBusMixin, CommonMixin {
|
class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringView> with EventBusMixin, CommonMixin {
|
||||||
final GlobalKey<JobPictureOverviewState> scaffoldKeyPictureOverview = GlobalKey<JobPictureOverviewState>();
|
final GlobalKey<JobPictureOverviewState> scaffoldKeyPictureOverview = GlobalKey<JobPictureOverviewState>();
|
||||||
Future<MarkingTextQuestionJob?>? _future; // 考试试卷
|
Future<MarkingTextQuestionJob?>? _future; // 考试试卷
|
||||||
MarkingTextQuestionJob? theJobData;
|
|
||||||
bool firstLoading = true;
|
bool firstLoading = true;
|
||||||
JobDoSynchroTab? synchroTabs;
|
|
||||||
late RemoveListener _doJobObtainGradingDataProviderListener; // 批注关闭监听
|
late RemoveListener _doJobObtainGradingDataProviderListener; // 批注关闭监听
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -506,30 +505,15 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
eventOn(callback: (eventVal) {
|
eventOn(callback: (eventVal) {
|
||||||
switch (eventVal.runtimeType) {
|
switch (eventVal.runtimeType) {
|
||||||
case MarkingTextQuestionJobTabParamsBus:
|
case MarkingTextQuestionJobTabParamsBus:
|
||||||
var theEventVal = eventVal as MarkingTextQuestionJobTabParamsBus;
|
MarkingTextQuestionJobTabParamsBus theEventVal = eventVal as MarkingTextQuestionJobTabParamsBus;
|
||||||
bool? isDefaultFirst;
|
|
||||||
if (theJobData != null) {
|
|
||||||
isDefaultFirst = theJobData!.pageIndex == theEventVal.pageIndex ? null : theJobData!.pageIndex < theEventVal.pageIndex;
|
|
||||||
} else {
|
|
||||||
if (synchroTabs?.tabs.isNotEmpty ?? false) {
|
|
||||||
var _theTab = synchroTabs?.tabs.firstWhereOrNull((e) => e.pageIndex == theEventVal.pageIndex);
|
|
||||||
if (_theTab != null && _theTab.finishCount == _theTab.total) {
|
|
||||||
isDefaultFirst = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ref.read(doJobObtainGradingDataProvider.notifier).setVal(MarkingTextQuestionJobTabParams(
|
ref.read(doJobObtainGradingDataProvider.notifier).setVal(MarkingTextQuestionJobTabParams(
|
||||||
pageIndex: theEventVal.pageIndex,
|
pageIndex: theEventVal.pageIndex,
|
||||||
taskId: theEventVal.taskId,
|
taskId: theEventVal.taskId,
|
||||||
studentId: theEventVal.studentId,
|
studentId: theEventVal.studentId,
|
||||||
previousPageIndex: theEventVal.previousPageIndex,
|
previousPageIndex: theEventVal.previousPageIndex,
|
||||||
nextPageIndex: theEventVal.nextPageIndex,
|
nextPageIndex: theEventVal.nextPageIndex,
|
||||||
isDefaultFirst: isDefaultFirst,
|
|
||||||
));
|
));
|
||||||
break;
|
break;
|
||||||
case JobDoSynchroTab:
|
|
||||||
synchroTabs = eventVal as JobDoSynchroTab;
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -552,10 +536,9 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
BaseStructureResult<MarkingTextQuestionJob> _result = await _client.getJobTabOfExam(params);
|
BaseStructureResult<MarkingTextQuestionJob> _result = await _client.getJobTabOfExam(params);
|
||||||
if (_result.success) {
|
if (_result.success) {
|
||||||
var jobDetails = _result.data;
|
var jobDetails = _result.data;
|
||||||
theJobData = jobDetails;
|
|
||||||
if (jobDetails != null) {
|
if (jobDetails != null) {
|
||||||
jobDetails.previousPageIndex = synchroTabs?.getPreviousPageIndex(jobDetails.pageIndex);
|
jobDetails.previousPageIndex = params.previousPageIndex;
|
||||||
jobDetails.nextPageIndex = synchroTabs?.getNextPageIndex(jobDetails.pageIndex);
|
jobDetails.nextPageIndex = params.nextPageIndex;
|
||||||
// 触发学生下拉选中
|
// 触发学生下拉选中
|
||||||
try {
|
try {
|
||||||
// 清空已有数据
|
// 清空已有数据
|
||||||
|
|
@ -594,14 +577,6 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
nextPageIndex: jobData.nextPageIndex,
|
nextPageIndex: jobData.nextPageIndex,
|
||||||
previousPageIndex: jobData.previousPageIndex,
|
previousPageIndex: jobData.previousPageIndex,
|
||||||
);
|
);
|
||||||
if (jobData.nextId == 0 && (synchroTabs?.tabs.isNotEmpty ?? false)) {
|
|
||||||
var _pageIndex = jobData.pageIndex;
|
|
||||||
var _tabIndex = synchroTabs!.tabs.indexWhere((e) => e.pageIndex == _pageIndex);
|
|
||||||
if (_tabIndex != -1 && _tabIndex + 1 <= synchroTabs!.tabs.length - 1) {
|
|
||||||
model.isDefaultFirst = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model.paperId == 0 && jobData.nextPageIndex != null) {
|
if (model.paperId == 0 && jobData.nextPageIndex != null) {
|
||||||
// 切换题型页面
|
// 切换题型页面
|
||||||
model.paperId = null;
|
model.paperId = null;
|
||||||
|
|
@ -618,15 +593,6 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
nextPageIndex: jobData.nextPageIndex,
|
nextPageIndex: jobData.nextPageIndex,
|
||||||
previousPageIndex: jobData.previousPageIndex,
|
previousPageIndex: jobData.previousPageIndex,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (jobData.prevId == 0 && (synchroTabs?.tabs.isNotEmpty ?? false)) {
|
|
||||||
var _pageIndex = jobData.pageIndex;
|
|
||||||
var _tabIndex = synchroTabs!.tabs.indexWhere((e) => e.pageIndex == _pageIndex);
|
|
||||||
if (_tabIndex != -1 && _tabIndex - 1 >= 0 && _tabIndex - 1 <= synchroTabs!.tabs.length - 1) {
|
|
||||||
model.isDefaultFirst = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model.paperId == 0 && jobData.previousPageIndex != null) {
|
if (model.paperId == 0 && jobData.previousPageIndex != null) {
|
||||||
model.paperId = null;
|
model.paperId = null;
|
||||||
model.pageIndex = jobData.previousPageIndex!;
|
model.pageIndex = jobData.previousPageIndex!;
|
||||||
|
|
@ -661,6 +627,8 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
final double containerHeight = constraints.maxHeight; // 展示区域总宽度
|
final double containerHeight = constraints.maxHeight; // 展示区域总宽度
|
||||||
|
|
||||||
if (jobData == null) return Container(); // 没有试题展示缩略图
|
if (jobData == null) return Container(); // 没有试题展示缩略图
|
||||||
|
|
||||||
|
// print('容器宽度:${containerWidth};容器高度:${containerHeight}');
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
JobPictureOverview(
|
JobPictureOverview(
|
||||||
|
|
@ -732,10 +700,12 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
|
||||||
child: (jobData?.questions ?? []).isEmpty
|
child: (jobData?.questions ?? []).isEmpty
|
||||||
? null
|
? null
|
||||||
: $ExamPaperAndScoringKeyboardView(
|
: $ExamPaperAndScoringKeyboardView(
|
||||||
data: jobData,
|
data: jobData!,
|
||||||
questions: questions,
|
questions: questions,
|
||||||
toNextQuestionCall: () => switchTestQuestions(jobData: jobData),
|
toNextQuestionCall: () => switchTestQuestions(jobData: jobData),
|
||||||
switchQuestionTypes: () => eventFire(model: JobCheckSwitchingQuestionTabBus(jobData.pageIndex)),
|
switchQuestionTypes: () {
|
||||||
|
eventFire(model: JobCheckSwitchingQuestionTabBus(jobData.pageIndex));
|
||||||
|
},
|
||||||
viewHomeworkNotes: (JobReviewQuestions subJobQuestion) {
|
viewHomeworkNotes: (JobReviewQuestions subJobQuestion) {
|
||||||
var _theBusModel =
|
var _theBusModel =
|
||||||
JobNotesViewBus(taskId: jobData.taskId, paperId: jobData.paperId, questionNo: subJobQuestion.questionNo);
|
JobNotesViewBus(taskId: jobData.taskId, paperId: jobData.paperId, questionNo: subJobQuestion.questionNo);
|
||||||
|
|
@ -786,8 +756,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 有下一道题 自动跳转下一道题
|
// 有下一道题 自动跳转下一道题
|
||||||
// toNextQuestionCall();
|
toNextQuestionCall();
|
||||||
_useDoScoring.eventFire(model: JobDoPapersSubmitCheckSwitchBus());
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -855,12 +824,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
if (question.accuracy > 0)
|
if (question.accuracy > 0)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||||
child: quickText(
|
child: quickText('正确率:${question.accuracy}%', size: 8.sp, color: Colors.white, align: TextAlign.end),
|
||||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
|
||||||
size: 8.sp,
|
|
||||||
color: Colors.white,
|
|
||||||
align: TextAlign.end,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -1063,7 +1027,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadiusGeometry? borderRadius}) {
|
Widget $materialBtn({required Widget child, Color? bgc, Color? splashColor, GestureTapCallback? onTap, BorderRadius? borderRadius}) {
|
||||||
return Material(
|
return Material(
|
||||||
color: bgc,
|
color: bgc,
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
||||||
RestClient client = await getClient();
|
RestClient client = await getClient();
|
||||||
BaseStructureResult<List<JobPageTab>> result = await client.getJobOfTabs(taskId);
|
BaseStructureResult<List<JobPageTab>> result = await client.getJobOfTabs(taskId);
|
||||||
if (result.success && result.data != null) {
|
if (result.success && result.data != null) {
|
||||||
tabs.value = result.data!;
|
|
||||||
if (synchronization) {
|
if (synchronization) {
|
||||||
|
tabs.value = result.data!;
|
||||||
currentTab.value = tabs.value.firstWhere((e) => e.finishCount < e.total, orElse: () => tabs.value[0]);
|
currentTab.value = tabs.value.firstWhere((e) => e.finishCount < e.total, orElse: () => tabs.value[0]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -99,12 +99,8 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 属性tab类型数据
|
/// 属性tab类型数据
|
||||||
Future<JobPageTab?> refreshQuestionTypeData(BuildContext context,
|
Future<JobPageTab?> refreshQuestionTypeData(BuildContext context, {required int taskId, required Function() exitCallback}) async {
|
||||||
{required int taskId, required Function() exitCallback, bool getNewData = true}) async {
|
List<JobPageTab>? tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false);
|
||||||
List<JobPageTab>? tabDatas = tabs.value;
|
|
||||||
if (getNewData) {
|
|
||||||
tabDatas = await getDataForTestpaper(taskId: taskId, synchronization: false);
|
|
||||||
}
|
|
||||||
if (tabDatas?.isNotEmpty ?? false) {
|
if (tabDatas?.isNotEmpty ?? false) {
|
||||||
JobPageTab? tabJob = tabDatas!.firstWhereOrNull((e) => e.finishCount < e.total);
|
JobPageTab? tabJob = tabDatas!.firstWhereOrNull((e) => e.finishCount < e.total);
|
||||||
if (tabJob == null && !exitPromptFlag.value) {
|
if (tabJob == null && !exitPromptFlag.value) {
|
||||||
|
|
@ -125,29 +121,61 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
||||||
exitPromptFlag.value = true;
|
exitPromptFlag.value = true;
|
||||||
return tabJob; // 不跳转
|
return tabJob; // 不跳转
|
||||||
}
|
}
|
||||||
|
|
||||||
exitCallback();
|
exitCallback();
|
||||||
} else {
|
} else {
|
||||||
// 跳转到对于位置
|
// 跳转到对于位置
|
||||||
if (!getNewData) return tabJob;
|
/**
|
||||||
|
*
|
||||||
|
var continueFlag = await showDialog<bool>(
|
||||||
|
context: context,
|
||||||
|
builder: (BuildContext context1) {
|
||||||
|
return AlertDialog(
|
||||||
|
title: quickText('页码跳转提示'),
|
||||||
|
content: Text('当前页:${currentTab.value?.pageIndex} 已批阅完成,是否跳转到页码:${tabJob.pageIndex}继续批阅?'),
|
||||||
|
actions: <Widget>[
|
||||||
|
TextButton(
|
||||||
|
child: Text('是'),
|
||||||
|
onPressed: () {
|
||||||
|
Navigator.of(context1).pop(true);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
TextButton(
|
||||||
|
child: Text('否'),
|
||||||
|
onPressed: () {
|
||||||
|
// 在这里处理删除操作
|
||||||
|
Navigator.of(context1).pop(false);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
if (continueFlag == null || !continueFlag) return tabJob; // 不跳转
|
||||||
|
*/
|
||||||
tabs.value = tabDatas;
|
tabs.value = tabDatas;
|
||||||
if (tabJob != null) currentTab.value = tabJob;
|
if (tabJob != null) currentTab.value = tabJob;
|
||||||
if (tabJob == null && exitPromptFlag.value) {
|
if (tabJob == null && exitPromptFlag.value) ToastUtils.showSuccess('最后一题提交成功');
|
||||||
var _thePageIndex = currentTab.value?.pageIndex;
|
|
||||||
if (_thePageIndex != null) {
|
|
||||||
var _theIndex = tabDatas.indexWhere((e) => e.pageIndex == _thePageIndex);
|
|
||||||
if (_theIndex != -1 && _theIndex < tabDatas.length - 1) {
|
|
||||||
currentTab.value = tabDatas[_theIndex + 1];
|
|
||||||
return tabJob;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ToastUtils.showSuccess('最后一题提交成功');
|
|
||||||
}
|
|
||||||
return tabJob;
|
return tabJob;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 当前tab下一个tab的pageIndex
|
||||||
|
int? getNextPageIndex(int? indexLocated) {
|
||||||
|
if (indexLocated == null) indexLocated = currentTab.value?.pageIndex;
|
||||||
|
if (indexLocated == null) return null;
|
||||||
|
return indexLocated == tabs.value.length - 1 ? null : tabs.value[indexLocated + 1].pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 当前tab上一个tab的pageIndex
|
||||||
|
int? getPreviousPageIndex(int? indexLocated) {
|
||||||
|
if (indexLocated == null) indexLocated = currentTab.value?.pageIndex;
|
||||||
|
if (indexLocated == null) return null;
|
||||||
|
return indexLocated == 0 ? null : tabs.value[indexLocated - 1].pageIndex;
|
||||||
|
}
|
||||||
|
|
||||||
/// 优先批阅 ==> 取消优先批阅
|
/// 优先批阅 ==> 取消优先批阅
|
||||||
Future<void> jobPriorityReviewCancel(int jobId) async {
|
Future<void> jobPriorityReviewCancel(int jobId) async {
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,6 @@
|
||||||
* @Description: 阅卷主页
|
* @Description: 阅卷主页
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import 'dart:async';
|
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||||
|
|
@ -18,9 +16,7 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:marking_app/common/config/request_config.dart';
|
import 'package:marking_app/common/config/request_config.dart';
|
||||||
import 'package:marking_app/common/model/event_bus/job_home_refresh_bus.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
import 'package:marking_app/common/model/job/job_task_item.dart';
|
||||||
import 'package:marking_app/pages/common/event_bus_mixin.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_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/provider/review_provider.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
|
|
@ -44,7 +40,14 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
with CommonMixin, EventBusMixin, TickerProviderStateMixin, RefreshDataHandle<JobTaskItem, MarkingListParams> {
|
with
|
||||||
|
CommonMixin,
|
||||||
|
TickerProviderStateMixin,
|
||||||
|
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
||||||
|
AutomaticKeepAliveClientMixin {
|
||||||
|
@override
|
||||||
|
bool get wantKeepAlive => true;
|
||||||
|
|
||||||
/* Tab控制器 */
|
/* Tab控制器 */
|
||||||
late TabController _tabController;
|
late TabController _tabController;
|
||||||
late TabController _tabController2;
|
late TabController _tabController2;
|
||||||
|
|
@ -124,7 +127,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
_tabController.dispose();
|
_tabController.dispose();
|
||||||
_refreshController1.dispose();
|
_refreshController1.dispose();
|
||||||
_refreshController2.dispose();
|
_refreshController2.dispose();
|
||||||
eventCancel();
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -150,6 +152,8 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
super.build(context); //调用super.build(返回值始终返回null,应将其忽略)
|
||||||
|
|
||||||
return AnnotatedRegion(
|
return AnnotatedRegion(
|
||||||
value: const SystemUiOverlayStyle(
|
value: const SystemUiOverlayStyle(
|
||||||
systemNavigationBarColor: Color(0xFF000000),
|
systemNavigationBarColor: Color(0xFF000000),
|
||||||
|
|
@ -172,19 +176,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('BACK_JOB_HOME', () => Navigator.of(context).pop()),
|
|
||||||
child: Icon(
|
|
||||||
Icons.arrow_back_ios_sharp,
|
|
||||||
size: 16.sp,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
|
@ -234,7 +226,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'待批阅',
|
'待批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: _tabIndex == 0 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
color: _tabIndex == 0
|
||||||
|
? Theme.of(context).primaryColor
|
||||||
|
: const Color.fromRGBO(80, 94, 110, 1),
|
||||||
fontWeight: _tabIndex == 0 ? FontWeight.bold : null,
|
fontWeight: _tabIndex == 0 ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -252,7 +246,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
child: quickText(
|
child: quickText(
|
||||||
'已批阅',
|
'已批阅',
|
||||||
size: 14.sp,
|
size: 14.sp,
|
||||||
color: _tabIndex == 1 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
|
color: _tabIndex == 1
|
||||||
|
? Theme.of(context).primaryColor
|
||||||
|
: const Color.fromRGBO(80, 94, 110, 1),
|
||||||
fontWeight: _tabIndex == 1 ? FontWeight.bold : null,
|
fontWeight: _tabIndex == 1 ? FontWeight.bold : null,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -265,15 +261,16 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
flex: 1,
|
flex: 1,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
RouterManager.router.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
RouterManager.router
|
||||||
|
.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
||||||
},
|
},
|
||||||
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"), color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
||||||
|
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
if (_tabIndex == 1)
|
if (_tabIndex == 1)
|
||||||
$CompletedJobConditionFilter(
|
$CompletedJobConditionFilter(
|
||||||
controller: _tabController2,
|
controller: _tabController2,
|
||||||
|
|
@ -308,9 +305,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
data: markingDatas1,
|
data: markingDatas1,
|
||||||
onLoad: onMyLoad,
|
onLoad: onMyLoad,
|
||||||
onRefresh: onMyRefresh,
|
onRefresh: onMyRefresh,
|
||||||
eventFire: () {
|
|
||||||
eventFire(model: JobHomeRefreshBus());
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
$EasyRefresh(
|
$EasyRefresh(
|
||||||
controller: _refreshController2,
|
controller: _refreshController2,
|
||||||
|
|
@ -319,9 +313,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
data: markingDatas2,
|
data: markingDatas2,
|
||||||
onLoad: onMyLoad,
|
onLoad: onMyLoad,
|
||||||
onRefresh: onMyRefresh,
|
onRefresh: onMyRefresh,
|
||||||
eventFire: () {
|
|
||||||
eventFire(model: JobHomeRefreshBus());
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -343,7 +334,6 @@ Widget $easyRefresh({
|
||||||
required EasyRefreshController controller,
|
required EasyRefreshController controller,
|
||||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
|
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
|
||||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
|
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
|
||||||
required Function eventFire,
|
|
||||||
required MarkingListParams params,
|
required MarkingListParams params,
|
||||||
required List<JobTaskItem> data,
|
required List<JobTaskItem> data,
|
||||||
required int tab,
|
required int tab,
|
||||||
|
|
@ -376,10 +366,7 @@ Widget $easyRefresh({
|
||||||
return HomeworkTasksViewItem(
|
return HomeworkTasksViewItem(
|
||||||
completed: completed,
|
completed: completed,
|
||||||
jobTaskItem: data[index],
|
jobTaskItem: data[index],
|
||||||
call: () {
|
call: () => controller.callRefresh(),
|
||||||
controller.callRefresh();
|
|
||||||
eventFire();
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: data.length,
|
itemCount: data.length,
|
||||||
|
|
@ -427,7 +414,9 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
padding: EdgeInsets.only(left: 2.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: jobTaskItem.markingTypeEnum.name == '作业' ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
|
color: jobTaskItem.markingTypeEnum.name == '作业'
|
||||||
|
? const Color.fromRGBO(104, 136, 253, 1)
|
||||||
|
: const Color.fromRGBO(255, 175, 56, 1),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(14.r),
|
topLeft: Radius.circular(14.r),
|
||||||
topRight: Radius.circular(3.r),
|
topRight: Radius.circular(3.r),
|
||||||
|
|
@ -488,7 +477,8 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
||||||
onTap: () => easyThrottle('go_to_homework_report', () {
|
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||||
RouterManager.router.navigateTo(
|
RouterManager.router.navigateTo(
|
||||||
context,
|
context,
|
||||||
RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
RouterManager.jobReportPagePath +
|
||||||
|
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||||
transition: getTransition(),
|
transition: getTransition(),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -531,7 +521,8 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
|
||||||
if (customTime.endDate != null) {
|
if (customTime.endDate != null) {
|
||||||
// print(customTime.startDate!.year == customTime.endDate!.year);
|
// print(customTime.startDate!.year == customTime.endDate!.year);
|
||||||
if (!isPad() && 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)}';
|
customTimeStr =
|
||||||
|
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||||
} else {
|
} else {
|
||||||
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,262 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter/services.dart';
|
|
||||||
import 'package:flutter_hooks/flutter_hooks.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/event_bus/job_home_refresh_bus.dart';
|
|
||||||
import 'package:marking_app/common/model/marking/marking_list_params.dart';
|
|
||||||
import 'package:marking_app/pages/common/event_bus_mixin.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:badges/badges.dart' as badges;
|
|
||||||
|
|
||||||
import '../../utils/my_future_builder.dart';
|
|
||||||
|
|
||||||
part 'job_home.g.dart';
|
|
||||||
|
|
||||||
class JobHome extends StatefulWidget {
|
|
||||||
const JobHome({super.key});
|
|
||||||
|
|
||||||
@override
|
|
||||||
State<JobHome> createState() => _JobHomeState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, AutomaticKeepAliveClientMixin {
|
|
||||||
@override
|
|
||||||
bool get wantKeepAlive => true;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
getData();
|
|
||||||
eventOn(callback: (JobHomeRefreshBus item) => getData());
|
|
||||||
super.initState();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
eventCancel();
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<int> getData() async {
|
|
||||||
try {
|
|
||||||
var _client = await getClient();
|
|
||||||
var _result = await _client.getJobsByPage(MarkingListParams(
|
|
||||||
isFinish: false,
|
|
||||||
page: 1,
|
|
||||||
limit: 1,
|
|
||||||
pageType: 0,
|
|
||||||
));
|
|
||||||
var data = _result.data?.total ?? 0;
|
|
||||||
eventFire(model: QuantityToBeReviewedData(data));
|
|
||||||
return data;
|
|
||||||
} catch (e) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
super.build(context);
|
|
||||||
var spaceWidth = SizedBox(height: ScreenUtil().screenWidth / 19);
|
|
||||||
return AnnotatedRegion(
|
|
||||||
value: const SystemUiOverlayStyle(
|
|
||||||
systemNavigationBarColor: Color(0xFF000000),
|
|
||||||
systemNavigationBarDividerColor: null,
|
|
||||||
statusBarColor: Colors.white,
|
|
||||||
systemNavigationBarIconBrightness: Brightness.light,
|
|
||||||
statusBarIconBrightness: Brightness.dark,
|
|
||||||
statusBarBrightness: Brightness.light,
|
|
||||||
),
|
|
||||||
child: RefreshIndicator(
|
|
||||||
onRefresh: () async => eventFire(model: JobHomeRefreshBus()),
|
|
||||||
child: ListView(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
height: 200.h,
|
|
||||||
width: double.infinity,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
image: DecorationImage(
|
|
||||||
image: AssetImage('assets/images/job_home_top_bgm.png'),
|
|
||||||
fit: BoxFit.fill, // 完全填充
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 30.h),
|
|
||||||
SlidingData([
|
|
||||||
EntranceModel(title: '作业批阅', image: 'assets/images/job_home_marking.png', navigationUrl: RouterManager.jobMainListPagePath),
|
|
||||||
EntranceModel(
|
|
||||||
title: '学生历史作业',
|
|
||||||
image: 'assets/images/job_home_history.png',
|
|
||||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=history',
|
|
||||||
),
|
|
||||||
EntranceModel(title: '知识点点掌握', image: 'assets/images/job_home_knowledge.png', navigationUrl: RouterManager.jobKnowledgePointsPath)
|
|
||||||
]),
|
|
||||||
spaceWidth,
|
|
||||||
$TermRow([
|
|
||||||
EntranceModel(title: '答题轨迹', image: 'assets/images/job_home_answer_record.png', navigationUrl: RouterManager.answerTrajectoryPath),
|
|
||||||
EntranceModel(
|
|
||||||
title: '优先批阅设定',
|
|
||||||
image: 'assets/images/job_home_youxian.png',
|
|
||||||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=set',
|
|
||||||
)
|
|
||||||
], 0),
|
|
||||||
spaceWidth,
|
|
||||||
$TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], 0),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class EntranceModel extends Object {
|
|
||||||
String title;
|
|
||||||
String image;
|
|
||||||
String navigationUrl;
|
|
||||||
EntranceModel({required this.title, required this.image, required this.navigationUrl});
|
|
||||||
}
|
|
||||||
|
|
||||||
class QuantityToBeReviewedData extends Object {
|
|
||||||
int num;
|
|
||||||
QuantityToBeReviewedData(this.num);
|
|
||||||
}
|
|
||||||
|
|
||||||
@swidget
|
|
||||||
Widget $termRow(BuildContext context, List<EntranceModel> items, int data) {
|
|
||||||
var leng = items.length;
|
|
||||||
Widget childWidget;
|
|
||||||
switch (leng) {
|
|
||||||
case 1:
|
|
||||||
childWidget = Row(children: [Expanded(child: $TermItem(items[0], data))]);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
childWidget = Row(children: [
|
|
||||||
Expanded(flex: 9, child: $TermItem(items[0], data)),
|
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
|
||||||
Expanded(flex: 9, child: $TermItem(items[1], data)),
|
|
||||||
]);
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
double _theHeight = ScreenUtil().screenWidth / 19 + 54.h * 2;
|
|
||||||
childWidget = Row(
|
|
||||||
children: [
|
|
||||||
Expanded(child: $TermItem(items[0], data, theHeight: _theHeight)),
|
|
||||||
SizedBox(width: ScreenUtil().screenWidth / 19),
|
|
||||||
Expanded(
|
|
||||||
child: SizedBox(
|
|
||||||
height: _theHeight,
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
$TermItem(items[1], data),
|
|
||||||
$TermItem(items[2], data),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
childWidget = Container();
|
|
||||||
}
|
|
||||||
|
|
||||||
return Container(padding: EdgeInsets.symmetric(horizontal: 14.w), child: childWidget);
|
|
||||||
}
|
|
||||||
|
|
||||||
@swidget
|
|
||||||
Widget $termItem(BuildContext context, EntranceModel e, int data, {double? theHeight}) {
|
|
||||||
bool isJob = e.title == '作业批阅';
|
|
||||||
|
|
||||||
return Material(
|
|
||||||
color: Colors.white,
|
|
||||||
elevation: 3.r,
|
|
||||||
shadowColor: const Color.fromRGBO(231, 231, 231, 1),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8.r)),
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () => easyThrottle('GO_TO_JOB_HOME_NAVIGATION', () {
|
|
||||||
RouterManager.router.navigateTo(context, e.navigationUrl, transition: getTransition());
|
|
||||||
}),
|
|
||||||
|
|
||||||
// splashColor: splashColor,
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8.r)),
|
|
||||||
child: badges.Badge(
|
|
||||||
showBadge: isJob && data > 0,
|
|
||||||
ignorePointer: false,
|
|
||||||
badgeContent: quickText(data, color: Colors.white, size: 10.sp),
|
|
||||||
badgeAnimation: badges.BadgeAnimation.rotation(
|
|
||||||
animationDuration: Duration(seconds: 1),
|
|
||||||
colorChangeAnimationDuration: Duration(seconds: 1),
|
|
||||||
loopAnimation: false,
|
|
||||||
curve: Curves.fastOutSlowIn,
|
|
||||||
colorChangeAnimationCurve: Curves.easeInCubic,
|
|
||||||
),
|
|
||||||
badgeStyle: badges.BadgeStyle(
|
|
||||||
badgeColor: Color.fromRGBO(255, 105, 105, 1),
|
|
||||||
shape: badges.BadgeShape.square,
|
|
||||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(10.r), topRight: Radius.circular(8.5.r), bottomRight: Radius.circular(8.5.r)),
|
|
||||||
// borderSide: BorderSide(color: Colors.white, width: 2),
|
|
||||||
elevation: 1,
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: isPad() ? 11.w : 16.w, vertical: 2.h),
|
|
||||||
),
|
|
||||||
position: badges.BadgePosition.topEnd(top: 10.r, end: 10.r),
|
|
||||||
child: Container(
|
|
||||||
height: theHeight,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 12.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(8.r)),
|
|
||||||
// boxShadow: [
|
|
||||||
// BoxShadow(
|
|
||||||
// color: const Color.fromRGBO(231, 231, 231, 1),
|
|
||||||
// offset: Offset(4.w, 6.h), //阴影y轴偏移量
|
|
||||||
// blurRadius: 8, //阴影模糊程度
|
|
||||||
// spreadRadius: 0.2, //阴影扩散程度
|
|
||||||
// )
|
|
||||||
// ],
|
|
||||||
// border: Border.all(width: 0.5.w, color: Color.fromARGB(255, 219, 226, 250)),
|
|
||||||
),
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: isJob
|
|
||||||
? Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(e.image, height: 32.r, width: 32.r, fit: BoxFit.cover),
|
|
||||||
SizedBox(height: 6.r),
|
|
||||||
quickText(e.title, size: 12.sp, color: Color.fromRGBO(79, 79, 79, 1), fontWeight: FontWeight.w500),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Image.asset(e.image, height: 32.r, width: 32.r, fit: BoxFit.cover),
|
|
||||||
SizedBox(width: 6.r),
|
|
||||||
quickText(e.title, size: 12.sp, color: Color.fromRGBO(79, 79, 79, 1), fontWeight: FontWeight.w500),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
class SlidingData extends HookWidget with EventBusMixin {
|
|
||||||
final List<EntranceModel> items;
|
|
||||||
SlidingData(this.items);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
var dataNumber = useState<QuantityToBeReviewedData?>(null);
|
|
||||||
|
|
||||||
useEffect(() {
|
|
||||||
eventOn(callback: (QuantityToBeReviewedData data) => (dataNumber.value = data));
|
|
||||||
return () {
|
|
||||||
eventCancel();
|
|
||||||
};
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return $TermRow(items, dataNumber.value?.num ?? 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,486 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:flutter_hooks/flutter_hooks.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_knowledge_points.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_student_history.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/personal_detail_topbar.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.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';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
|
|
||||||
part 'job_knowledge_points.g.dart';
|
|
||||||
|
|
||||||
class JobKnowledgePoints extends StatefulWidget {
|
|
||||||
|
|
||||||
const JobKnowledgePoints({Key? key,}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_JobKnowledgePointsState createState() => _JobKnowledgePointsState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _JobKnowledgePointsState extends State<JobKnowledgePoints> with CommonMixin, TickerProviderStateMixin {
|
|
||||||
@override
|
|
||||||
int page = 1;
|
|
||||||
int pageSize = 10;
|
|
||||||
int totalPages = 0;
|
|
||||||
late TabController tabController;
|
|
||||||
String startDataTime = CommonUtils.getWeekStartDate().toString().substring(0, 10);
|
|
||||||
String endDataTime = CommonUtils.getWeekEndDate().toString().substring(0, 10);
|
|
||||||
String customTimeStr = '自定义';
|
|
||||||
List<KnowledgePoints> dataList = [];
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
|
|
||||||
//文本输入框控制器
|
|
||||||
late final TextEditingController textController;
|
|
||||||
int studentId = 0;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
textController = TextEditingController();
|
|
||||||
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
tabController = TabController(length: 3, vsync: this);
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
tabController.dispose();
|
|
||||||
textController.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getList() async {
|
|
||||||
print('startDataTime=$startDataTime');
|
|
||||||
print('endDataTime=$endDataTime');
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<KnowledgePoints>> res =
|
|
||||||
await _client.getKnowledgeReport(startDataTime,endDataTime,textController.text);
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
if (page == 1) {
|
|
||||||
dataList = res.data!;
|
|
||||||
} else {
|
|
||||||
dataList = [...dataList, ...res.data!];
|
|
||||||
}
|
|
||||||
|
|
||||||
// totalPages = res.data!.pagedList.totalPages;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
elevation: 0,
|
|
||||||
),
|
|
||||||
body: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.all(15.r),
|
|
||||||
height: 30.r,
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.only(left: 10.r,right: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(6.r),
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFFDDDDDD)),
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: TextField(
|
|
||||||
controller: textController,
|
|
||||||
textInputAction: TextInputAction.next,
|
|
||||||
style: TextStyle(
|
|
||||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
|
||||||
fontSize: 10.sp,
|
|
||||||
),
|
|
||||||
decoration: InputDecoration(
|
|
||||||
hintText: "请输入知识点名称",
|
|
||||||
hintStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
|
||||||
labelStyle: TextStyle(fontSize: 10.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
|
||||||
border: InputBorder.none,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 10.r,),
|
|
||||||
InkWell(
|
|
||||||
onTap: (){
|
|
||||||
page = 1;
|
|
||||||
setState(() {});
|
|
||||||
getList();
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 50.r,
|
|
||||||
height: 30.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
),
|
|
||||||
child:Center(
|
|
||||||
child: Text('查询',style: TextStyle(fontSize: 12.sp,color: Colors.white),),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
jobConditionFilter(context,
|
|
||||||
controller: tabController,
|
|
||||||
customTimeStr: customTimeStr,
|
|
||||||
customTime: tabController.index != 3 ||
|
|
||||||
((endDataTime == null || endDataTime == '') && (startDataTime == null || startDataTime == ''))
|
|
||||||
? null
|
|
||||||
: PickerDateRange(
|
|
||||||
startDataTime == null || startDataTime == '' ? null : DateTime.parse(startDataTime!),
|
|
||||||
endDataTime == null || endDataTime == '' ? null : DateTime.parse(endDataTime!),
|
|
||||||
), onTimeFilter: (String? startTime, String? endTime) {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
if (startTime == null && endTime == null) {
|
|
||||||
if (tabController.index == 3) {
|
|
||||||
tabController.animateTo(0);
|
|
||||||
}
|
|
||||||
startDataTime = '';
|
|
||||||
endDataTime = '';
|
|
||||||
customTimeStr = '自定义';
|
|
||||||
} else {
|
|
||||||
startDataTime = startTime != null ? startTime : '';
|
|
||||||
endDataTime = endTime != null ? endTime : '';
|
|
||||||
}
|
|
||||||
page = 1;
|
|
||||||
setState(() {});
|
|
||||||
getList();
|
|
||||||
// _refreshController2.callRefresh();
|
|
||||||
}, refreshTime: (value) {
|
|
||||||
if (value != null && value.startDate != null) {
|
|
||||||
customTimeStr = value.startDate?.toString().substring(0, 10) ?? '';
|
|
||||||
setState(() {});
|
|
||||||
if (value.endDate != null) {
|
|
||||||
if (!isPad() && value.startDate!.year == value.endDate!.year) {
|
|
||||||
customTimeStr =
|
|
||||||
value.startDate.toString().substring(5, 10) + '~${value.endDate.toString().substring(5, 10)}';
|
|
||||||
setState(() {});
|
|
||||||
} else {
|
|
||||||
customTimeStr = '$customTimeStr~${value.endDate?.toString().substring(0, 10)}';
|
|
||||||
setState(() {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
|
||||||
child: EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
setState(() {
|
|
||||||
page = 1;
|
|
||||||
});
|
|
||||||
getList();
|
|
||||||
},
|
|
||||||
onLoad: () async {
|
|
||||||
if (page < totalPages) {
|
|
||||||
setState(() {
|
|
||||||
page += 1;
|
|
||||||
});
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: dataList.length > 0
|
|
||||||
? ListView.builder(
|
|
||||||
itemCount: dataList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
KnowledgePoints item = dataList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
RouterManager.jobKnowledgePointsDetailPath +
|
|
||||||
'?knowledgeName=${Uri.encodeComponent(item.knowledgeName)}&knowledgeId=${item.knowledgeId}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.knowledgeName,
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
|
||||||
)),
|
|
||||||
|
|
||||||
Container(
|
|
||||||
width: 49.r,
|
|
||||||
height: 22.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF6888FD)),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
'2次',
|
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
|
|
||||||
),
|
|
||||||
Image.asset('assets/images/right_icon_blue.png',width: 8.r,height: 8.r,),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.r,),
|
|
||||||
progressBar(context,
|
|
||||||
title: '正确率:',
|
|
||||||
color: Color(0xFF90E0BE),
|
|
||||||
percent: item.correctRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@swidget
|
|
||||||
Widget progressBar(
|
|
||||||
BuildContext context, {
|
|
||||||
double? fontSize,
|
|
||||||
double? lineHeight,
|
|
||||||
required String title,
|
|
||||||
required Color color,
|
|
||||||
required double percent,
|
|
||||||
required EdgeInsets padingEdg,
|
|
||||||
required EdgeInsets marginEdg,
|
|
||||||
}) {
|
|
||||||
var percentStr = '${doubleToStringAsFixed(percent * 100)}%';
|
|
||||||
fontSize ??= 10.sp;
|
|
||||||
lineHeight ??= 8.h;
|
|
||||||
return Container(
|
|
||||||
margin: marginEdg,
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
quickText(title, color: Color(0xFF8B8B8B), size: fontSize),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10.r),
|
|
||||||
/* boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: color,
|
|
||||||
spreadRadius: 0.6,
|
|
||||||
blurRadius: 3,
|
|
||||||
offset: Offset(0, 0),
|
|
||||||
),
|
|
||||||
],*/
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: lineHeight,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: percent,
|
|
||||||
/* center: Text(
|
|
||||||
percentStr,
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 4.5.sp),
|
|
||||||
),*/
|
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
|
||||||
progressColor: color,
|
|
||||||
backgroundColor: Color(0xFFE8E8E8),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
// linearGradient: LinearGradient(
|
|
||||||
// tileMode: TileMode.mirror,
|
|
||||||
// stops: [0.0, 1.0],
|
|
||||||
// colors: [color.withOpacity(0.1), color],
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 4.w),
|
|
||||||
quickText(percentStr, size: fontSize, color: Color(0xFF606060))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 已完成作业条件筛选栏
|
|
||||||
@hwidget
|
|
||||||
Widget jobConditionFilter(BuildContext context,
|
|
||||||
{required TabController controller,
|
|
||||||
PickerDateRange? customTime,
|
|
||||||
required Function refreshTime,
|
|
||||||
required String customTimeStr,
|
|
||||||
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
|
||||||
var customTimeState = PickerDateRange(null, null);
|
|
||||||
if (customTime != null) {
|
|
||||||
customTimeState = PickerDateRange(customTime!.startDate != null ? customTime!.startDate : null,
|
|
||||||
customTime!.endDate != null ? customTime!.endDate : null);
|
|
||||||
}
|
|
||||||
|
|
||||||
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: 39.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: Container(
|
|
||||||
alignment: Alignment.centerLeft,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
|
||||||
),
|
|
||||||
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: Color(0xFF6888FD),
|
|
||||||
unselectedLabelColor: Color(0xFF666666),
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
// indicatorSize: TabBarIndicatorSize.label, // 设置指示器高度和标签一样高
|
|
||||||
onTap: (int val) async {
|
|
||||||
switch (val) {
|
|
||||||
case 0: // 近一周
|
|
||||||
onTimeFilter(
|
|
||||||
CommonUtils.getWeekStartDate().toString().substring(0, 10),
|
|
||||||
CommonUtils.getWeekEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case 1: // 近一个月
|
|
||||||
onTimeFilter(
|
|
||||||
getMonthStartDate().toString().substring(0, 10),
|
|
||||||
getMonthEndDate().toString().substring(0, 10),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
default: // 自定义
|
|
||||||
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);
|
|
||||||
refreshTime(p0);
|
|
||||||
},
|
|
||||||
onCancel: () {
|
|
||||||
Navigator.of(context1).pop();
|
|
||||||
},
|
|
||||||
selectionMode: DateRangePickerSelectionMode.range,
|
|
||||||
initialSelectedRange: customTimeState,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
// 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 = dialogData!;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tabs: <Widget>[
|
|
||||||
const Tab(text: '近一周'),
|
|
||||||
const Tab(text: '近一月'),
|
|
||||||
Tab(text: customTimeStr),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,460 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|
||||||
import 'package:flutter_hooks/flutter_hooks.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_knowledge_detail_student.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_student_history.dart';
|
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/personal_detail_topbar.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.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';
|
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
|
||||||
import 'package:photo_view/photo_view.dart';
|
|
||||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
|
||||||
part 'job_knowledge_points_detail.g.dart';
|
|
||||||
class JobKnowledgePointsDetail extends StatefulWidget {
|
|
||||||
final String knowledgeName;
|
|
||||||
final int knowledgeId;
|
|
||||||
|
|
||||||
const JobKnowledgePointsDetail(
|
|
||||||
{Key? key, required this.knowledgeName, required this.knowledgeId})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
_JobKnowledgePointsDetailState createState() =>
|
|
||||||
_JobKnowledgePointsDetailState();
|
|
||||||
}
|
|
||||||
|
|
||||||
class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
|
||||||
with CommonMixin, TickerProviderStateMixin {
|
|
||||||
@override
|
|
||||||
List<KnowledgePointsDetail> dataList = [];
|
|
||||||
List<JobKnowledgeDetailStudent> studentList = [];
|
|
||||||
late final EasyRefreshController refreshController;
|
|
||||||
String paperImg = '';
|
|
||||||
|
|
||||||
int studentId = 0;
|
|
||||||
|
|
||||||
@override
|
|
||||||
void initState() {
|
|
||||||
super.initState();
|
|
||||||
refreshController = EasyRefreshController();
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
void dispose() {
|
|
||||||
super.dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
void getList() async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<KnowledgePointsDetail>> res =
|
|
||||||
await _client.getKnowledgeReportDetail(widget.knowledgeId);
|
|
||||||
if (res.success) {
|
|
||||||
setState(() {
|
|
||||||
dataList = res.data!;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
showStudent(questionid, title) async {
|
|
||||||
await getStudents(questionid);
|
|
||||||
|
|
||||||
showModalBottomSheet(
|
|
||||||
context: context,
|
|
||||||
elevation: 10,
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(20.r),
|
|
||||||
topRight: Radius.circular(20.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 2.w),
|
|
||||||
child: Column(
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 14.h),
|
|
||||||
child: quickText(
|
|
||||||
title,
|
|
||||||
size: 18.sp,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
color: Color.fromRGBO(60, 60, 60, 1),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: ListView(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w),
|
|
||||||
children: [
|
|
||||||
Wrap(
|
|
||||||
spacing: 6.r, // 主轴(水平)方向间距
|
|
||||||
runSpacing: 4.r, // 纵轴(垂直)方向间距
|
|
||||||
alignment: WrapAlignment.spaceAround, //沿主轴方向居中
|
|
||||||
children: studentList.map((e) {
|
|
||||||
return Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 4.r, horizontal: 8.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: e.isAnswer
|
|
||||||
? Color(0xFF4CC793)
|
|
||||||
: Color(0xFFE2E2E2),
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
),
|
|
||||||
child: quickText(e.studentName,
|
|
||||||
color:
|
|
||||||
e.isAnswer ? Colors.white : Color(0xFF505E6E),
|
|
||||||
size: 10.sp),
|
|
||||||
);
|
|
||||||
}).toList(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
showImg(int sectionId, String questionNo) async {
|
|
||||||
await getImg(sectionId, questionNo);
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
insetPadding: EdgeInsets.symmetric(vertical: 55.r,horizontal: 45.r),
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: Container(
|
|
||||||
width: MediaQuery.of(context).size.width,
|
|
||||||
// height: MediaQuery.of(context).size.height,
|
|
||||||
child: Image.network(paperImg),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
EasyLoading.dismiss();
|
|
||||||
}
|
|
||||||
|
|
||||||
getStudents(questionid) async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<JobKnowledgeDetailStudent>> res =
|
|
||||||
await _client.getKnowledgeStudent(questionid);
|
|
||||||
if (res.success) {
|
|
||||||
studentList = res.data!;
|
|
||||||
} else {
|
|
||||||
studentList = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getImg(int sectionId, String questionNo) async {
|
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<String> res =
|
|
||||||
await _client.getKnowledgeImg(sectionId, questionNo);
|
|
||||||
if (res.success) {
|
|
||||||
paperImg = res.data!;
|
|
||||||
} else {
|
|
||||||
paperImg = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Scaffold(
|
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
|
||||||
appBar: AppBar(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
title: Text(widget.knowledgeName,
|
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
|
||||||
centerTitle: true,
|
|
||||||
leading: IconButton(
|
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
|
||||||
),
|
|
||||||
actions: [
|
|
||||||
ReturnToHomepage(),
|
|
||||||
],
|
|
||||||
elevation: 0,
|
|
||||||
),
|
|
||||||
body: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
|
||||||
child: EasyRefresh(
|
|
||||||
firstRefresh: false,
|
|
||||||
taskIndependence: true,
|
|
||||||
controller: refreshController,
|
|
||||||
header: MaterialHeader(),
|
|
||||||
footer: TaurusFooter(),
|
|
||||||
onRefresh: () async {
|
|
||||||
getList();
|
|
||||||
},
|
|
||||||
onLoad: () async {
|
|
||||||
// getList();
|
|
||||||
},
|
|
||||||
child: dataList.length > 0
|
|
||||||
? ListView.builder(
|
|
||||||
itemCount: dataList.length,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
KnowledgePointsDetail item = dataList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
/* RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
RouterManager.quickCheckPersonalPath +
|
|
||||||
'?jobId=${item.jobName}&studentId=$studentId',
|
|
||||||
transition: getTransition(),
|
|
||||||
);*/
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.symmetric(
|
|
||||||
vertical: 5.r, horizontal: 14.r),
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 14.r, horizontal: 10.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white),
|
|
||||||
child: Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: [
|
|
||||||
Text(
|
|
||||||
item.publishTime.substring(0, 10),
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF505050)),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: Text(
|
|
||||||
item.jobName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 14.sp,
|
|
||||||
color: Color(0xFF505050)),
|
|
||||||
)),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
showImg(item.sectionId, item.questionNo);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 49.r,
|
|
||||||
height: 22.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(20.r)),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r, color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
'${item.questionNo}题',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Color(0xFF8B8B8B)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 8.h),
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment:
|
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
EasyLoading.show(status: 'loading...');
|
|
||||||
showStudent(
|
|
||||||
item.questionId, item.jobName);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(right: 6.r),
|
|
||||||
width: 56.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFD4FFED),
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(20.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: quickText('正确率 >',
|
|
||||||
color: Color(0xFF4CC793),
|
|
||||||
size: 10.sp))),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius:
|
|
||||||
BorderRadius.circular(10.r),
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: 8.h,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: item.correctRate / 100,
|
|
||||||
progressColor:
|
|
||||||
Color(0xFF90E0BE),
|
|
||||||
backgroundColor:
|
|
||||||
Color(0xFFE8E8E8),
|
|
||||||
barRadius:
|
|
||||||
Radius.circular(10.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 4.w),
|
|
||||||
quickText(
|
|
||||||
'${doubleToStringAsFixed(item.correctRate / 100 * 100)}%',
|
|
||||||
size: 10.sp,
|
|
||||||
color: Color(0xFF606060))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
/* progressBar(context,
|
|
||||||
title: '正确率 >',
|
|
||||||
color: Color(0xFF90E0BE),
|
|
||||||
percent: item.correctRate / 100,
|
|
||||||
padingEdg: EdgeInsets.zero,
|
|
||||||
marginEdg: EdgeInsets.only(top: 8.h),
|
|
||||||
studentCall:showStudent(item.questionId,item.jobName),
|
|
||||||
),*/
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@swidget
|
|
||||||
Widget progressBar(
|
|
||||||
BuildContext context, {
|
|
||||||
double? fontSize,
|
|
||||||
double? lineHeight,
|
|
||||||
required String title,
|
|
||||||
required Color color,
|
|
||||||
required double percent,
|
|
||||||
required EdgeInsets padingEdg,
|
|
||||||
required EdgeInsets marginEdg,
|
|
||||||
required Future<dynamic> studentCall,
|
|
||||||
}) {
|
|
||||||
var percentStr = '${doubleToStringAsFixed(percent * 100)}%';
|
|
||||||
fontSize ??= 10.sp;
|
|
||||||
lineHeight ??= 8.h;
|
|
||||||
return Container(
|
|
||||||
margin: marginEdg,
|
|
||||||
padding: padingEdg,
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
studentCall;
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.only(right: 6.r),
|
|
||||||
width: 56.r,
|
|
||||||
height: 20.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFFD4FFED),
|
|
||||||
borderRadius: BorderRadius.circular(20.r),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: quickText(title,
|
|
||||||
color: Color(0xFF4CC793), size: fontSize))),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
flex: 1,
|
|
||||||
child: Container(
|
|
||||||
child: Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: Container(
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(10.r),
|
|
||||||
/* boxShadow: [
|
|
||||||
BoxShadow(
|
|
||||||
color: color,
|
|
||||||
spreadRadius: 0.6,
|
|
||||||
blurRadius: 3,
|
|
||||||
offset: Offset(0, 0),
|
|
||||||
),
|
|
||||||
],*/
|
|
||||||
),
|
|
||||||
child: LinearPercentIndicator(
|
|
||||||
padding: EdgeInsets.zero,
|
|
||||||
animation: true,
|
|
||||||
lineHeight: lineHeight,
|
|
||||||
animationDuration: 2500,
|
|
||||||
percent: percent,
|
|
||||||
/* center: Text(
|
|
||||||
percentStr,
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 4.5.sp),
|
|
||||||
),*/
|
|
||||||
// linearStrokeCap: LinearStrokeCap.butt,
|
|
||||||
progressColor: color,
|
|
||||||
backgroundColor: Color(0xFFE8E8E8),
|
|
||||||
barRadius: Radius.circular(10.r),
|
|
||||||
// linearGradient: LinearGradient(
|
|
||||||
// tileMode: TileMode.mirror,
|
|
||||||
// stops: [0.0, 1.0],
|
|
||||||
// colors: [color.withOpacity(0.1), color],
|
|
||||||
// ),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(width: 4.w),
|
|
||||||
quickText(percentStr, size: fontSize, color: Color(0xFF606060))
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -60,7 +60,6 @@ class _JobPersonalDetailState extends State<JobPersonalDetail> with CommonMixin,
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getList() async {
|
||||||
print(widget.studentId);
|
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
BaseStructureResult<JobStudentHistory> res =
|
BaseStructureResult<JobStudentHistory> res =
|
||||||
await _client.getStudentJobHistory(widget.studentId, !isJob, startDataTime, endDataTime, page, pageSize);
|
await _client.getStudentJobHistory(widget.studentId, !isJob, startDataTime, endDataTime, page, pageSize);
|
||||||
|
|
|
||||||
|
|
@ -15,23 +15,17 @@ import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
|
|
||||||
class JobPriorityReviewSet extends StatefulWidget {
|
class JobPriorityReviewSet extends StatefulWidget {
|
||||||
final String groupId;
|
final String groupId;
|
||||||
final String title;
|
const JobPriorityReviewSet({Key? key,required this.groupId}) : super(key: key);
|
||||||
final String? page;
|
|
||||||
|
|
||||||
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobPriorityReviewSet> createState() => _JobPriorityReviewSetState();
|
State<JobPriorityReviewSet> createState() => _JobPriorityReviewSetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
with CommonMixin, SingleTickerProviderStateMixin {
|
with CommonMixin,SingleTickerProviderStateMixin {
|
||||||
late final EasyRefreshController refreshController;
|
late final EasyRefreshController refreshController;
|
||||||
late TabController tabController;
|
late TabController tabController;
|
||||||
int tabIndex = 0;
|
int tabIndex = 0;
|
||||||
List list1 = [];
|
|
||||||
List list2 = [];
|
|
||||||
List levelList = [];
|
List levelList = [];
|
||||||
bool isClicking = false;
|
bool isClicking = false;
|
||||||
|
|
||||||
|
|
@ -42,46 +36,31 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
refreshController = EasyRefreshController();
|
refreshController = EasyRefreshController();
|
||||||
tabController =
|
tabController =
|
||||||
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
TabController(initialIndex: tabIndex, length: 2, vsync: this);
|
||||||
getList();
|
getReadLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
void getList() async {
|
void getReadLevel() async{
|
||||||
await getReadLevel(1);
|
RestClient _client = await getClient();
|
||||||
await getReadLevel(0);
|
BaseStructureResult<List<JobStudentLevel>> res = await _client.getJobReadLevel(widget.groupId,tabIndex == 0?1:0);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
levelList = [...list1, ...list2];
|
if(res.success){
|
||||||
|
levelList = res.data!;
|
||||||
isClicking = false;
|
isClicking = false;
|
||||||
|
}else{
|
||||||
|
levelList = [];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
getReadLevel(int readLevel) async {
|
void setJobReadLevel(int studentId,int level) async{
|
||||||
RestClient _client = await getClient();
|
|
||||||
BaseStructureResult<List<JobStudentLevel>> res =
|
|
||||||
await _client.getJobReadLevel(widget.groupId, readLevel);
|
|
||||||
if (res.success) {
|
|
||||||
if (readLevel == 1) {
|
|
||||||
list1 = res.data!;
|
|
||||||
} else {
|
|
||||||
list2 = res.data!;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (readLevel == 1) {
|
|
||||||
list1 = [];
|
|
||||||
} else {
|
|
||||||
list2 = [];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void setJobReadLevel(int studentId, int level) async {
|
|
||||||
RestClient _client = await getClient();
|
RestClient _client = await getClient();
|
||||||
JobLevelSetParams params = JobLevelSetParams(studentId, level);
|
JobLevelSetParams params = JobLevelSetParams(studentId, level);
|
||||||
BaseStructureResult res = await _client.getSetJobReadLevel(params);
|
BaseStructureResult res = await _client.getSetJobReadLevel(params);
|
||||||
if (res.code == 200) {
|
if(res.code == 200){
|
||||||
getList();
|
getReadLevel();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -100,7 +79,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Colors.white,
|
||||||
title: Text(
|
title: Text(
|
||||||
widget.title,
|
'优先批阅人配置',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||||
),
|
),
|
||||||
centerTitle: true,
|
centerTitle: true,
|
||||||
|
|
@ -115,10 +94,8 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
body: Column(
|
body: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(height: 10.r,),
|
||||||
height: 10.r,
|
Container(
|
||||||
),
|
|
||||||
/* Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
border: Border(bottom: BorderSide(width: 1.r,color: Color(0xFFCCCCCC)))
|
||||||
|
|
@ -159,284 +136,171 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
indicatorSize: TabBarIndicatorSize.label,
|
indicatorSize: TabBarIndicatorSize.label,
|
||||||
labelPadding: const EdgeInsets.all(0),
|
labelPadding: const EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
),*/
|
),
|
||||||
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Padding(
|
child:Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
padding: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r),
|
||||||
child: EasyRefresh(
|
child: EasyRefresh(
|
||||||
firstRefresh: true,
|
firstRefresh: true,
|
||||||
taskIndependence: true,
|
taskIndependence: true,
|
||||||
controller: refreshController,
|
controller: refreshController,
|
||||||
header: MaterialHeader(),
|
header: MaterialHeader(),
|
||||||
footer: TaurusFooter(),
|
footer: TaurusFooter(),
|
||||||
onRefresh: () async {
|
onRefresh: () async{
|
||||||
getList();
|
getReadLevel();
|
||||||
},
|
},
|
||||||
child: levelList.length > 0
|
child: levelList.length>0?isPadFlag?GridView(gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
? isPadFlag
|
|
||||||
? GridView(
|
|
||||||
gridDelegate:
|
|
||||||
SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
mainAxisSpacing: 10.r,
|
mainAxisSpacing: 10.r,
|
||||||
crossAxisSpacing: 10.r,
|
crossAxisSpacing: 10.r,
|
||||||
childAspectRatio: 556 / 112,
|
childAspectRatio: 556 / 112,
|
||||||
),
|
),children: List.generate(levelList.length, (index) {
|
||||||
children: List.generate(levelList.length, (index) {
|
|
||||||
JobStudentLevel item = levelList[index];
|
JobStudentLevel item = levelList[index];
|
||||||
return InkWell(
|
return Container(
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(child: Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),)),
|
||||||
child: Text(
|
|
||||||
item.studentName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6888FD)),
|
|
||||||
)),
|
|
||||||
|
|
||||||
widget.page == 'answerTrajectory'?Container(
|
tabIndex == 0?InkWell(
|
||||||
height: 20.r,
|
onTap: (){
|
||||||
width: 70.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
|
||||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
|
||||||
)):widget.page == 'history'?Container(
|
|
||||||
height: 20.r,
|
|
||||||
width: 70.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
|
||||||
),
|
|
||||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
|
||||||
): item.readLevel == 1
|
|
||||||
?
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
});
|
});
|
||||||
setJobReadLevel(
|
setJobReadLevel(item.studentGroupDetailId,0);
|
||||||
item.studentGroupDetailId, 0);
|
EasyLoading.show(status: 'loading...');
|
||||||
EasyLoading.show(
|
|
||||||
status: 'loading...');
|
|
||||||
},
|
|
||||||
child:Container(
|
|
||||||
height: 20.r,
|
|
||||||
width: 70.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.all(
|
|
||||||
Radius.circular(4.r)),
|
|
||||||
color:Color(0xFFB7FFE0),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
|
||||||
child: Image.asset('assets/images/youx_icon_active.png',width: 14.r,height: 14.r,),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
|
||||||
child: Text(
|
|
||||||
'优先批阅',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
:InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
|
||||||
isClicking = true;
|
|
||||||
});
|
|
||||||
setJobReadLevel(
|
|
||||||
item.studentGroupDetailId, 1);
|
|
||||||
EasyLoading.show(
|
|
||||||
status: 'loading...');
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 70.r,
|
width: 70.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
Radius.circular(4.r)),
|
color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD),
|
||||||
color: Color(0xFFE1E1E1),
|
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Center(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
|
||||||
child: Image.asset('assets/images/youx_icon_default.png',width: 14.r,height: 14.r,),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
|
||||||
child: Text(
|
|
||||||
'优先批阅',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Color(0xFF8A9691)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
):InkWell(
|
||||||
|
onTap: (){
|
||||||
|
setState(() {
|
||||||
|
isClicking = true;
|
||||||
|
});
|
||||||
|
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: isClicking?Color(0xFF6888FD):Color(0xFFFFFFFF),
|
||||||
|
border: Border.all(width: 1.r,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)),
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child:Text('设为优先',style: TextStyle(fontSize: 10.sp,color: isClicking?Color(0xFFFFFFFF):Color(0xFF6888FD)),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 5.r,),
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 20.r,
|
||||||
|
width: 70.r,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
|
color: Colors.white,
|
||||||
|
border: Border.all(width: 1.r,color: Color(0xFFFCA017))
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text('详情',style: TextStyle(fontSize: 10.sp,color: Color(0xFFFCA017)),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}),
|
}),):ListView.builder(itemBuilder: (context,index){
|
||||||
)
|
|
||||||
: ListView.builder(
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
JobStudentLevel item = levelList[index];
|
JobStudentLevel item = levelList[index];
|
||||||
return InkWell(
|
return Container(
|
||||||
onTap: (){
|
padding: EdgeInsets.symmetric(vertical:20.r,horizontal: 15.r),
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 20.r, horizontal: 15.r),
|
|
||||||
margin: EdgeInsets.only(bottom: 15.r),
|
margin: EdgeInsets.only(bottom: 15.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
MainAxisAlignment.spaceBetween,
|
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(child: Text(item.studentName,style: TextStyle(fontSize: 12.sp,color: Color(0xFF6888FD)),)),
|
||||||
child: Text(
|
tabIndex == 0?InkWell(
|
||||||
item.studentName,
|
onTap: (){
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.sp,
|
|
||||||
color: Color(0xFF6888FD)),
|
|
||||||
)),
|
|
||||||
widget.page == 'answerTrajectory'?Container(
|
|
||||||
height: 24.r,
|
|
||||||
width: 72.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
|
||||||
|
|
||||||
),
|
|
||||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
|
||||||
)):widget.page == 'history'?Container(
|
|
||||||
height: 24.r,
|
|
||||||
width: 82.r,
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Color(0xFF6888FD),
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
|
||||||
),
|
|
||||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
|
||||||
):item.readLevel == 1
|
|
||||||
? InkWell(
|
|
||||||
onTap: () {
|
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
});
|
});
|
||||||
setJobReadLevel(
|
setJobReadLevel(item.studentGroupDetailId,0);
|
||||||
item.studentGroupDetailId, 0);
|
EasyLoading.show(status: 'loading...');
|
||||||
EasyLoading.show(
|
|
||||||
status: 'loading...');
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
width: 82.r,
|
width: 82.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
Radius.circular(4.r)),
|
color: isClicking?Color(0xFFDCE3FF):Color(0xFF6888FD),
|
||||||
color:Color(0xFFB7FFE0),
|
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Center(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
child:Text('取消优先',style: TextStyle(fontSize: 10.sp,color: Colors.white),),
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
|
||||||
child: Image.asset('assets/images/youx_icon_active.png',width: 14.r,height: 14.r,),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
|
||||||
child: Text(
|
|
||||||
'优先批阅',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
):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)),),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(width: 5.r,),
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 20.r,
|
||||||
|
width: 70.r,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
|
color: Colors.white,
|
||||||
|
border: Border.all(width: 1.r,color: Color(0xFFFCA017))
|
||||||
|
),
|
||||||
|
child: Center(
|
||||||
|
child: Text('详情',style: TextStyle(fontSize: 10.sp,color: Color(0xFFFCA017)),),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
: 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(4.r)),
|
|
||||||
color: Color(0xFFE1E1E1),
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(left: 3.r),
|
|
||||||
child: Image.asset('assets/images/youx_icon_default.png',width: 14.r,height: 14.r,),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.only(top: 2.r,left: 4.r),
|
|
||||||
child: Text(
|
|
||||||
'优先批阅',
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 10.sp,
|
|
||||||
color: Color(0xFF8A9691)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},itemCount: levelList.length,):MyEmptyWidget(),
|
||||||
itemCount: levelList.length,
|
|
||||||
)
|
|
||||||
: MyEmptyWidget(),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
@ -445,3 +309,4 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ 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/job/job_student_goups.dart';
|
||||||
import 'package:marking_app/common/model/user/user_info.dart';
|
import 'package:marking_app/common/model/user/user_info.dart';
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/widget/student_group_list.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/fast_data.dart';
|
import 'package:marking_app/utils/fast_data.dart';
|
||||||
|
|
@ -16,8 +15,7 @@ import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
|
|
||||||
class JobStudentGroup extends StatefulWidget {
|
class JobStudentGroup extends StatefulWidget {
|
||||||
final String page;
|
const JobStudentGroup({Key? key}) : super(key: key);
|
||||||
const JobStudentGroup({Key? key,required this.page}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
||||||
|
|
@ -59,10 +57,6 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
||||||
refreshController.finishRefresh();
|
refreshController.finishRefresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
void goNextPage(id,title){
|
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition());
|
|
||||||
}
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
super.dispose();
|
super.dispose();
|
||||||
|
|
@ -100,7 +94,136 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
||||||
onRefresh: () async{
|
onRefresh: () async{
|
||||||
getStudentGroups();
|
getStudentGroups();
|
||||||
},
|
},
|
||||||
child: StudentGroupList(studentGroups,goNextPage),
|
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 InkWell(
|
||||||
|
onTap: (){
|
||||||
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||||
|
},
|
||||||
|
child: 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,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
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(),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text('原稿笔迹',style: TextStyle(fontSize: 10.r,color: Color(0xFF4CC793)),),
|
child: Text('查看原稿',style: TextStyle(fontSize: 10.r,color: Color(0xFF4CC793)),),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,274 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_task_item.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|
||||||
import 'package:marking_app/utils/index.dart';
|
|
||||||
import 'package:marking_app/utils/my_text.dart';
|
|
||||||
|
|
||||||
import '../../../routes/RouterManager.dart';
|
|
||||||
|
|
||||||
class AnswerTrajectoryJob extends StatelessWidget {
|
|
||||||
final List<JobTaskItem> jobList;
|
|
||||||
|
|
||||||
const AnswerTrajectoryJob(this.jobList, {Key? key}) : super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return jobList != null && jobList.length > 0
|
|
||||||
? isPad()
|
|
||||||
? GridView(
|
|
||||||
shrinkWrap: true,
|
|
||||||
physics: ClampingScrollPhysics(),
|
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
||||||
crossAxisCount: 2, //横轴三个子widget
|
|
||||||
mainAxisSpacing: 10.h,
|
|
||||||
crossAxisSpacing: 6.w,
|
|
||||||
childAspectRatio: 2.5 //宽高比为1时,子widget
|
|
||||||
),
|
|
||||||
children: List.generate(jobList.length, (index) {
|
|
||||||
JobTaskItem item = jobList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: (){
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.answerTrajectoryJobDetailPath}?&jobId=${item.id}&jobName=${Uri.encodeComponent(item.title)}&genderName=${Uri.encodeComponent(item.genderName)}',
|
|
||||||
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: EdgeInsets.symmetric(horizontal: 6.w),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 32.w,
|
|
||||||
height: 18.h,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: const Color.fromRGBO(104, 136, 253, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(14.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: quickText(item.markingTypeEnum.name,
|
|
||||||
color: Colors.white, size: 10.sp),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: quickText(item.title,
|
|
||||||
size: 12.sp,
|
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
maxLines: 2),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 1.r, horizontal: 5.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r, color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item.subjectName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 8.r,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
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(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('详情',
|
|
||||||
color: Color(0xFFFFA115), size: 10.sp),
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/icon_back_orange.png',
|
|
||||||
width: 8.r,
|
|
||||||
height: 8.r,
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
|
||||||
physics: ClampingScrollPhysics(),
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
JobTaskItem item = jobList[index];
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
RouterManager.router.navigateTo(context,
|
|
||||||
'${RouterManager.answerTrajectoryJobDetailPath}?&jobId=${item.id}&jobName=${Uri.encodeComponent(item.title)}&genderName=${Uri.encodeComponent(item.genderName)}',
|
|
||||||
transition: getTransition());
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r),
|
|
||||||
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: EdgeInsets.symmetric(vertical:14.r,horizontal: 14.r),
|
|
||||||
child: Row(
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
width: 32.w,
|
|
||||||
height: 18.h,
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(left: 2.w),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color:
|
|
||||||
const Color.fromRGBO(104, 136, 253, 1),
|
|
||||||
borderRadius: BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(14.r),
|
|
||||||
topRight: Radius.circular(3.r),
|
|
||||||
bottomLeft: Radius.circular(4.r),
|
|
||||||
bottomRight: Radius.circular(4.r),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
margin: EdgeInsets.only(right: 4.w),
|
|
||||||
child: quickText(item.markingTypeEnum.name,
|
|
||||||
color: Colors.white, size: 10.sp),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: quickText(item.title,
|
|
||||||
size: 14.sp,
|
|
||||||
color: Color.fromRGBO(70, 70, 70, 1),
|
|
||||||
maxLines: 2),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
width: 5.r,
|
|
||||||
),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(
|
|
||||||
vertical: 1.r, horizontal: 5.r),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
|
||||||
border: Border.all(
|
|
||||||
width: 1.r, color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
item.subjectName,
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 12.r,
|
|
||||||
color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(
|
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
Container(height: 1.r,
|
|
||||||
color: Color(0xFFF5F5F5),),
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
|
||||||
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(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
child: quickText('详情',
|
|
||||||
color: Color(0xFFFFA115), size: 10.sp),
|
|
||||||
),
|
|
||||||
Image.asset(
|
|
||||||
'assets/images/icon_back_orange.png',
|
|
||||||
width: 8.r,
|
|
||||||
height: 8.r,
|
|
||||||
),
|
|
||||||
]),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
itemCount: jobList.length,
|
|
||||||
)
|
|
||||||
: MyEmptyWidget();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,161 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_student_goups.dart';
|
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|
||||||
import 'package:marking_app/utils/index.dart';
|
|
||||||
|
|
||||||
class StudentGroupList extends StatelessWidget {
|
|
||||||
final List studentGroups;
|
|
||||||
final Function goNextPage;
|
|
||||||
final Widget? rightBtn;
|
|
||||||
|
|
||||||
const StudentGroupList(this.studentGroups, this.goNextPage,
|
|
||||||
{Key? key,this.rightBtn})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return studentGroups != null && studentGroups.length > 0
|
|
||||||
? isPad()
|
|
||||||
? GridView(
|
|
||||||
shrinkWrap: true,
|
|
||||||
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 InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goNextPage(item.groupId, item.groupName);
|
|
||||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
|
||||||
},
|
|
||||||
child: 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
rightBtn != null
|
|
||||||
? rightBtn!
|
|
||||||
: 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(
|
|
||||||
shrinkWrap: true,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
JobStudentGroups item = studentGroups[index];
|
|
||||||
String classNames = item.classNames.join(" ");
|
|
||||||
return InkWell(
|
|
||||||
onTap: () {
|
|
||||||
goNextPage(item.groupId, item.groupName);
|
|
||||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
|
||||||
},
|
|
||||||
child: 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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
rightBtn != null
|
|
||||||
? rightBtn!
|
|
||||||
: 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(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -6,23 +6,25 @@ import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:marking_app/utils/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
|
||||||
part 'top_count.g.dart';
|
|
||||||
|
|
||||||
class TopCount extends StatelessWidget {
|
class TopCount extends StatelessWidget {
|
||||||
final JobReportModel data;
|
final JobReportModel data;
|
||||||
final String className;
|
final String className;
|
||||||
final int jobId;
|
final int jobId;
|
||||||
|
|
||||||
const TopCount(this.data, this.className, this.jobId, {Key? key}) : super(key: key);
|
const TopCount(this.data, this.className, this.jobId,{Key? key}) : super(key: key);
|
||||||
|
|
||||||
void showStudentListDialog({required BuildContext context, required String title, required List arr}) {
|
void showStudentListDialog(
|
||||||
|
{required BuildContext context,
|
||||||
|
required String title,
|
||||||
|
required List arr}) {
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||||
contentPadding: EdgeInsets.all(20.r),
|
contentPadding: EdgeInsets.all(20.r),
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
shape: RoundedRectangleBorder(
|
||||||
|
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||||
content: SizedBox(
|
content: SizedBox(
|
||||||
width: MediaQuery.of(context).size.width * 0.7,
|
width: MediaQuery.of(context).size.width * 0.7,
|
||||||
height: MediaQuery.of(context).size.height * 0.7,
|
height: MediaQuery.of(context).size.height * 0.7,
|
||||||
|
|
@ -32,7 +34,10 @@ class TopCount extends StatelessWidget {
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
className + title,
|
className + title,
|
||||||
style: TextStyle(fontSize: 15.sp, color: Color(0xFF3C3C3C), fontWeight: FontWeight.w500),
|
style: TextStyle(
|
||||||
|
fontSize: 15.sp,
|
||||||
|
color: Color(0xFF3C3C3C),
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -48,19 +53,24 @@ class TopCount extends StatelessWidget {
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
AnswerOkStudents item = arr[index];
|
AnswerOkStudents item = arr[index];
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: (){
|
||||||
RouterManager.router.navigateTo(
|
RouterManager.router.navigateTo(
|
||||||
context,
|
context,
|
||||||
RouterManager.quickCheckPersonalPath + '?jobId=$jobId&studentId=${item.id}',
|
RouterManager.quickCheckPersonalPath +
|
||||||
transition: getTransition(),
|
'?jobId=$jobId&studentId=${item.id}',
|
||||||
);
|
transition: getTransition(),);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 15.r),
|
padding: EdgeInsets.symmetric(
|
||||||
color: index.isOdd ? Colors.white : Color(0xFFF0F0F0),
|
vertical: 5.r, horizontal: 15.r),
|
||||||
|
color: index.isOdd
|
||||||
|
? Colors.white
|
||||||
|
: Color(0xFFF0F0F0),
|
||||||
child: Text(
|
child: Text(
|
||||||
item.name,
|
item.name,
|
||||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF323232)),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: Color(0xFF323232)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -78,8 +88,8 @@ class TopCount extends StatelessWidget {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3;
|
double leftWidth = (MediaQuery.of(context).size.width-40.r) * 0.7/3;
|
||||||
double rightWidth = (MediaQuery.of(context).size.width - 40.r) * 0.3 / 2;
|
double rightWidth = (MediaQuery.of(context).size.width-40.r) * 0.3/2;
|
||||||
return Container(
|
return Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||||
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
margin: EdgeInsets.symmetric(vertical: 10.r, horizontal: 10.r),
|
||||||
|
|
@ -94,21 +104,31 @@ class TopCount extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showStudentListDialog(context: context, title: '未提交作业学生', arr: data.noAnswerStudents!);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '未提交作业学生',
|
||||||
|
arr: data.noAnswerStudents!);
|
||||||
},
|
},
|
||||||
child: leftContainer(context, count: data.noAnswerCount, name: '未提交', nameColor: Color(0xFFD92F2F), bgColor: Color(0xFFEEEEEE)),
|
child:leftContainer(context,count: data.noAnswerCount,name: '未提交',nameColor: Color(0xFFD92F2F),bgColor: Color(0xFFEEEEEE)),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showStudentListDialog(context: context, title: '已提交作业学生', arr: data.validStudents!);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '已提交作业学生',
|
||||||
|
arr: data.validStudents!);
|
||||||
},
|
},
|
||||||
child: leftContainer(context, count: data.validCount, name: '已提交', nameColor: Color(0xFF4CC793), bgColor: Color(0xFFF5F5F5)),
|
child: leftContainer(context,count: data.validCount,name: '已提交',nameColor: Color(0xFF4CC793),bgColor: Color(0xFFF5F5F5)),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showStudentListDialog(context: context, title: '全对作业学生', arr: data.allCorrectStudents!);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '全对作业学生',
|
||||||
|
arr: data.allCorrectStudents!);
|
||||||
},
|
},
|
||||||
child: leftContainer(context, count: data.allCorrect, name: '全对', nameColor: Color(0xFFFF9800), bgColor: Color(0xFFEEEEEE)),
|
child:leftContainer(context,count: data.allCorrect,name: '全对',nameColor: Color(0xFFFF9800),bgColor: Color(0xFFEEEEEE)),
|
||||||
|
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 92.r,
|
height: 92.r,
|
||||||
|
|
@ -118,48 +138,55 @@ class TopCount extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: (){
|
||||||
showStudentListDialog(context: context, title: '优等作业学生', arr: data.overallInfos['优']!.students);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '优等作业学生',
|
||||||
|
arr: data.overallInfos['优']!.students);
|
||||||
},
|
},
|
||||||
child: rightContainer(
|
child: rightContainer(count: data.overallInfos['优']!.count,bgColor: Color(0xFF56FFB8),nameColor: Color(0xFF009254),name: '优',),
|
||||||
count: data.overallInfos['优']!.count,
|
)
|
||||||
bgColor: Color(0xFF56FFB8),
|
|
||||||
nameColor: Color(0xFF009254),
|
|
||||||
name: '优',
|
|
||||||
),
|
),
|
||||||
)),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: (){
|
||||||
showStudentListDialog(context: context, title: '中等作业学生', arr: data.overallInfos['中']!.students);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '中等作业学生',
|
||||||
|
arr: data.overallInfos['中']!.students);
|
||||||
},
|
},
|
||||||
child:
|
child: rightContainer(count: data.overallInfos['中']!.count,bgColor: Color(0xFFD3FF93),nameColor: Color(0xFF3F6605),name: '中'),
|
||||||
rightContainer(count: data.overallInfos['中']!.count, bgColor: Color(0xFFD3FF93), nameColor: Color(0xFF3F6605), name: '中'),
|
)
|
||||||
)),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 92.r,
|
height: 92.r,
|
||||||
width: rightWidth,
|
width:rightWidth,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: (){
|
||||||
showStudentListDialog(context: context, title: '良等作业学生', arr: data.overallInfos['良']!.students);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '良等作业学生',
|
||||||
|
arr: data.overallInfos['良']!.students);
|
||||||
},
|
},
|
||||||
child:
|
child: rightContainer(count: data.overallInfos['良']!.count,bgColor: Color(0xFFFFC38C),nameColor: Color(0xFFD36500),name: '良' ),
|
||||||
rightContainer(count: data.overallInfos['良']!.count, bgColor: Color(0xFFFFC38C), nameColor: Color(0xFFD36500), name: '良'),
|
)
|
||||||
)),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: (){
|
||||||
showStudentListDialog(context: context, title: '差等作业学生', arr: data.overallInfos['差']!.students);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: '差等作业学生',
|
||||||
|
arr: data.overallInfos['差']!.students);
|
||||||
},
|
},
|
||||||
child:
|
child: rightContainer(count: data.overallInfos['差']!.count,bgColor: Color(0xFFFF9D94),nameColor: Color(0xFFD12616),name: '差' ),
|
||||||
rightContainer(count: data.overallInfos['差']!.count, bgColor: Color(0xFFFF9D94), nameColor: Color(0xFFD12616), name: '差'),
|
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -338,7 +365,7 @@ class TopCount extends StatelessWidget {
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 15.r,
|
height: 15.r,
|
||||||
),
|
),*/
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 15.r),
|
padding: EdgeInsets.symmetric(horizontal: 15.r),
|
||||||
child: GridView.builder(
|
child: GridView.builder(
|
||||||
|
|
@ -364,7 +391,10 @@ class TopCount extends StatelessWidget {
|
||||||
}
|
}
|
||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showStudentListDialog(context: context, title: item.title + '等作业学生', arr: item.studentNames);
|
showStudentListDialog(
|
||||||
|
context: context,
|
||||||
|
title: item.title + '等作业学生',
|
||||||
|
arr: item.studentNames);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
|
|
@ -384,12 +414,16 @@ class TopCount extends StatelessWidget {
|
||||||
height: 28.r,
|
height: 28.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
color: Colors.white,
|
||||||
border: Border.all(color: bgColor, width: 1.r, style: BorderStyle.solid),
|
border: Border.all(
|
||||||
|
color: bgColor,
|
||||||
|
width: 1.r,
|
||||||
|
style: BorderStyle.solid),
|
||||||
borderRadius: BorderRadius.circular(14.r)),
|
borderRadius: BorderRadius.circular(14.r)),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
item.title,
|
item.title,
|
||||||
style: TextStyle(color: bgColor, fontSize: 12.r),
|
style:
|
||||||
|
TextStyle(color: bgColor, fontSize: 12.r),
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
@ -400,11 +434,13 @@ class TopCount extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
item.count.toString(),
|
item.count.toString(),
|
||||||
style: TextStyle(fontSize: 20.sp, color: Color(0xFF595959)),
|
style: TextStyle(
|
||||||
|
fontSize: 20.sp, color: Color(0xFF595959)),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'人',
|
'人',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF595959)),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Color(0xFF595959)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -412,7 +448,7 @@ class TopCount extends StatelessWidget {
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),*/
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -420,12 +456,13 @@ class TopCount extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget leftContainer(context, {required int count, required String name, required Color nameColor, required Color bgColor}) {
|
Widget leftContainer(context,{required int count,required String name,required Color nameColor,required Color bgColor}){
|
||||||
double leftWidth = (MediaQuery.of(context).size.width - 40.r) * 0.7 / 3;
|
double leftWidth = (MediaQuery.of(context).size.width-40.r) * 0.7/3;
|
||||||
return Container(
|
return Container(
|
||||||
width: leftWidth,
|
width: leftWidth,
|
||||||
height: 92.r,
|
height: 92.r,
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r, horizontal: 6.r),
|
padding:
|
||||||
|
EdgeInsets.symmetric(vertical: 10.r, horizontal: 6.r),
|
||||||
color: bgColor,
|
color: bgColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
|
@ -439,11 +476,17 @@ Widget leftContainer(context, {required int count, required String name, require
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
count.toString(),
|
count.toString(),
|
||||||
style: TextStyle(fontSize: 18.sp, color: Color(0xFF595959), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 18.sp,
|
||||||
|
color: Color(0xFF595959),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'人',
|
'人',
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF595959), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 10.sp,
|
||||||
|
color: Color(0xFF595959),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -452,7 +495,10 @@ Widget leftContainer(context, {required int count, required String name, require
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
name,
|
name,
|
||||||
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w500),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: nameColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -460,9 +506,9 @@ Widget leftContainer(context, {required int count, required String name, require
|
||||||
}
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget rightContainer({required int count, required Color bgColor, required Color nameColor, required String name}) {
|
Widget rightContainer({required int count,required Color bgColor,required Color nameColor,required String name}){
|
||||||
return Container(
|
return Container(
|
||||||
color: bgColor,
|
color:bgColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -474,11 +520,17 @@ Widget rightContainer({required int count, required Color bgColor, required Colo
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
count.toString(),
|
count.toString(),
|
||||||
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: nameColor,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'人',
|
'人',
|
||||||
style: TextStyle(fontSize: 8.sp, color: nameColor, fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 8.sp,
|
||||||
|
color: nameColor,
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -487,7 +539,10 @@ Widget rightContainer({required int count, required Color bgColor, required Colo
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
name,
|
name,
|
||||||
style: TextStyle(fontSize: 12.sp, color: nameColor, fontWeight: FontWeight.w500),
|
style: TextStyle(
|
||||||
|
fontSize: 12.sp,
|
||||||
|
color: nameColor,
|
||||||
|
fontWeight: FontWeight.w500),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,6 @@ import 'package:marking_app/common/model/user/user_login.dart';
|
||||||
import 'package:marking_app/common/model/user/user_login_params.dart';
|
import 'package:marking_app/common/model/user/user_login_params.dart';
|
||||||
import 'package:marking_app/provider/user_provider.dart';
|
import 'package:marking_app/provider/user_provider.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/sys_protocol.dart';
|
|
||||||
|
|
||||||
class TheLogin extends StatefulHookConsumerWidget {
|
class TheLogin extends StatefulHookConsumerWidget {
|
||||||
const TheLogin({Key? key}) : super(key: key);
|
const TheLogin({Key? key}) : super(key: key);
|
||||||
|
|
@ -72,7 +71,6 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
Future.delayed(Duration(seconds: 2), () => sysProtocol(context));
|
|
||||||
Future(() {
|
Future(() {
|
||||||
// 延迟更新 Provider
|
// 延迟更新 Provider
|
||||||
ref.read(userTokenProvider.notifier).clean(); // 进入登录页先清空信息
|
ref.read(userTokenProvider.notifier).clean(); // 进入登录页先清空信息
|
||||||
|
|
@ -389,7 +387,8 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
try {
|
try {
|
||||||
BaseStructureResult<dynamic> resultData = await client.toLogin(UserLoginParams(userName, userPwdMd5));
|
BaseStructureResult<dynamic> resultData = await client.toLogin(UserLoginParams(userName, userPwdMd5));
|
||||||
UserLogin? userData = resultData.code == 200 && resultData.data != null ? UserLogin.fromJson(resultData.data) : null;
|
UserLogin? userData =
|
||||||
|
resultData.code == 200 && resultData.data != null ? UserLogin.fromJson(resultData.data) : null;
|
||||||
if (resultData.code != 200 || userData?.accessToken == null || userData?.accessToken == '') {
|
if (resultData.code != 200 || userData?.accessToken == null || userData?.accessToken == '') {
|
||||||
return toMsg(resultData.message ?? '登录失败,请重试');
|
return toMsg(resultData.message ?? '登录失败,请重试');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,11 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
import 'package:marking_app/common/mixin/common.dart';
|
||||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||||
import 'package:marking_app/common/model/user/user_info.dart';
|
import 'package:marking_app/common/model/user/user_info.dart';
|
||||||
|
import 'package:marking_app/pages/homework_correction/index.dart';
|
||||||
import 'package:marking_app/pages/reports/index.dart';
|
import 'package:marking_app/pages/reports/index.dart';
|
||||||
import 'package:marking_app/provider/do_marking_provider.dart';
|
import 'package:marking_app/provider/do_marking_provider.dart';
|
||||||
import 'package:marking_app/provider/upload_file_provider.dart';
|
import 'package:marking_app/provider/upload_file_provider.dart';
|
||||||
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
import 'package:marking_app/utils/app_upgrade/UpdateDialog.dart';
|
import 'package:marking_app/utils/app_upgrade/UpdateDialog.dart';
|
||||||
import 'package:marking_app/utils/app_upgrade/model/UpdateAppEvent.dart';
|
import 'package:marking_app/utils/app_upgrade/model/UpdateAppEvent.dart';
|
||||||
import 'package:marking_app/common/model/sys/system_version.dart';
|
import 'package:marking_app/common/model/sys/system_version.dart';
|
||||||
|
|
@ -29,8 +31,6 @@ import 'package:marking_app/utils/index.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
import 'package:package_info/package_info.dart';
|
import 'package:package_info/package_info.dart';
|
||||||
|
|
||||||
import 'homework_correction/job_home.dart';
|
|
||||||
|
|
||||||
class TheMainPage extends StatefulHookConsumerWidget {
|
class TheMainPage extends StatefulHookConsumerWidget {
|
||||||
const TheMainPage({Key? key}) : super(key: key);
|
const TheMainPage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
|
@ -49,8 +49,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
||||||
final List<Widget> _bodyList = [
|
final List<Widget> _bodyList = [
|
||||||
const TheHomePage(),
|
const TheHomePage(),
|
||||||
const TheMarking(),
|
const TheMarking(),
|
||||||
// const HomeworkCorrection(),
|
const HomeworkCorrection(),
|
||||||
const JobHome(),
|
|
||||||
const TheReport()
|
const TheReport()
|
||||||
];
|
];
|
||||||
int tabIndex = 0;
|
int tabIndex = 0;
|
||||||
|
|
@ -131,8 +130,14 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
||||||
// String buildNumber = packageInfo.buildNumber; //小版本号
|
// String buildNumber = packageInfo.buildNumber; //小版本号
|
||||||
|
|
||||||
SystemVersion data = result.data!;
|
SystemVersion data = result.data!;
|
||||||
Map json = {'downloadPath': data.apkUrl, 'version': data.version, 'systemType': deviceType, 'description': data.description};
|
Map json = {
|
||||||
UpdateAppEvent updateAppEvent = UpdateAppEvent.fromJson(json, localVersion, deviceInfo, appName, packageName, typeName: 'systemType');
|
'downloadPath': data.apkUrl,
|
||||||
|
'version': data.version,
|
||||||
|
'systemType': deviceType,
|
||||||
|
'description': data.description
|
||||||
|
};
|
||||||
|
UpdateAppEvent updateAppEvent =
|
||||||
|
UpdateAppEvent.fromJson(json, localVersion, deviceInfo, appName, packageName, typeName: 'systemType');
|
||||||
if (updateAppEvent.upgrade) {
|
if (updateAppEvent.upgrade) {
|
||||||
await UpdateDialog.showUpdateDialog(context, updateAppEvent);
|
await UpdateDialog.showUpdateDialog(context, updateAppEvent);
|
||||||
}
|
}
|
||||||
|
|
@ -155,8 +160,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: PageView(
|
body: PageView(
|
||||||
controller: _pageController,
|
controller: _pageController,
|
||||||
// physics: const BouncingScrollPhysics(),
|
physics: const BouncingScrollPhysics(),
|
||||||
physics: NeverScrollableScrollPhysics(),
|
|
||||||
onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted),
|
onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted),
|
||||||
children: _bodyList,
|
children: _bodyList,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -13,12 +13,7 @@ import 'package:fluro/fluro.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
||||||
import 'package:marking_app/pages/common/startUpPage.dart';
|
import 'package:marking_app/pages/common/startUpPage.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/answer_trajectory.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/answer_trajectory_job_detail.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart';
|
import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/index.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/job_knowledge_points.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/job_knowledge_points_detail.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/job_personal_detail.dart';
|
import 'package:marking_app/pages/homework_correction/job_personal_detail.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/job_priority_review_set.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_report.dart';
|
||||||
|
|
@ -69,8 +64,6 @@ class RouterManager {
|
||||||
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
||||||
// 作业 ==> 收藏页面
|
// 作业 ==> 收藏页面
|
||||||
static const String jobFavoritePagePath = '/job/favorite/index';
|
static const String jobFavoritePagePath = '/job/favorite/index';
|
||||||
// 作业 ==> 列表页面
|
|
||||||
static const String jobMainListPagePath = '/job/mainList/index';
|
|
||||||
|
|
||||||
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
||||||
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
||||||
|
|
@ -84,10 +77,7 @@ class RouterManager {
|
||||||
static const String jobPersonalDetailPath = '/homework_correction/job_personal_detail';
|
static const String jobPersonalDetailPath = '/homework_correction/job_personal_detail';
|
||||||
static const String reportCardDialogPath = '/report_detail/widgets/report_card_dialog';
|
static const String reportCardDialogPath = '/report_detail/widgets/report_card_dialog';
|
||||||
static const String reportHistoryPath = '/report_detail/report_history';
|
static const String reportHistoryPath = '/report_detail/report_history';
|
||||||
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
|
|
||||||
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
|
||||||
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
|
||||||
static const String answerTrajectoryJobDetailPath = '/homework_correction/answer_trajectory_job_detail';
|
|
||||||
// TheMine
|
// TheMine
|
||||||
|
|
||||||
static final FluroRouter router = FluroRouter();
|
static final FluroRouter router = FluroRouter();
|
||||||
|
|
@ -319,17 +309,14 @@ class RouterManager {
|
||||||
static final _jobPriorityReviewSetPageHandler = Handler(
|
static final _jobPriorityReviewSetPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
String groupId = params['groupId']![0];
|
String groupId = params['groupId']![0];
|
||||||
String title = params['title']![0];
|
return JobPriorityReviewSet(groupId: groupId);
|
||||||
String? page = params['page']?[0];
|
|
||||||
return JobPriorityReviewSet(groupId: groupId,title:title,page:page);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
//学生分组
|
//学生分组
|
||||||
static final _jobStudentGroupPageHandler = Handler(
|
static final _jobStudentGroupPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
String page = params['page']![0];
|
return JobStudentGroup();
|
||||||
return JobStudentGroup(page:page);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//作业收藏页面
|
//作业收藏页面
|
||||||
|
|
@ -359,11 +346,6 @@ class RouterManager {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// 优先配置个人详情
|
|
||||||
static final _jobMainListPathHandler = Handler(
|
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => HomeworkCorrection(),
|
|
||||||
);
|
|
||||||
|
|
||||||
// 学生报告详情
|
// 学生报告详情
|
||||||
static final _reportCardDialogPathHandler = Handler(
|
static final _reportCardDialogPathHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
|
|
@ -380,41 +362,6 @@ class RouterManager {
|
||||||
return ReportHistory();
|
return ReportHistory();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// 知识点掌握
|
|
||||||
static final _jobKnowledgePointsPathHandler = Handler(
|
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
/* String studentName = params['studentName']![0];
|
|
||||||
int studentId = int.parse(params['studentId']![0]);*/
|
|
||||||
return JobKnowledgePoints();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
// 知识点掌握详情
|
|
||||||
static final _jobKnowledgePointsDetailPathHandler = Handler(
|
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
String knowledgeName = params['knowledgeName']![0];
|
|
||||||
int knowledgeId = int.parse(params['knowledgeId']![0]);
|
|
||||||
return JobKnowledgePointsDetail(knowledgeName:knowledgeName,knowledgeId:knowledgeId);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
//答题轨迹
|
|
||||||
static final _answerTrajectoryPathHandler = Handler(
|
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
|
||||||
return AnswerTrajectory();
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|
||||||
//答题轨迹按作业详情
|
|
||||||
static final _answerTrajectoryJobDetailPathHandler = 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];
|
|
||||||
return AnswerTrajectoryJobDetail(jobId:jobId,jobName:jobName,genderName:genderName);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
// 开始阅卷页面
|
// 开始阅卷页面
|
||||||
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
|
||||||
|
|
||||||
|
|
@ -461,11 +408,6 @@ class RouterManager {
|
||||||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
|
||||||
router.define(answerTrajectoryJobDetailPath, handler: _answerTrajectoryJobDetailPathHandler, transitionType: TransitionType.material);
|
|
||||||
|
|
||||||
// getTransition()
|
// getTransition()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@ class CommonUtils {
|
||||||
}
|
}
|
||||||
/// 秒转时分秒
|
/// 秒转时分秒
|
||||||
static String second2HMS(int sec, {bool isEasy = false}) {
|
static String second2HMS(int sec, {bool isEasy = false}) {
|
||||||
String hms = "0";
|
String hms = "00:00:00";
|
||||||
if (!isEasy) hms = "0秒";
|
if (!isEasy) hms = "00时00分00秒";
|
||||||
if (sec > 0) {
|
if (sec > 0) {
|
||||||
int h = sec ~/ 3600;
|
int h = sec ~/ 3600;
|
||||||
int m = (sec % 3600) ~/ 60;
|
int m = (sec % 3600) ~/ 60;
|
||||||
|
|
@ -45,26 +45,4 @@ class CommonUtils {
|
||||||
}
|
}
|
||||||
return hms;
|
return hms;
|
||||||
}
|
}
|
||||||
|
|
||||||
static 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)); // 减去天数差,得到本周一的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
static 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)); // 加上天数差减一,得到本周日的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,9 +39,6 @@ class FastData {
|
||||||
static const String _MARKING_PREFERENCES_WORK = "APP:MARKING:PREFERENCES:WORK";
|
static const String _MARKING_PREFERENCES_WORK = "APP:MARKING:PREFERENCES:WORK";
|
||||||
// 键盘引导页 ==》 作业
|
// 键盘引导页 ==》 作业
|
||||||
static const String _INPUT_KEYBOARD_GUIDE_PAGE_WORK = "APP:MARKING:GUIDE_PAGE:WORK";
|
static const String _INPUT_KEYBOARD_GUIDE_PAGE_WORK = "APP:MARKING:GUIDE_PAGE:WORK";
|
||||||
// 系统协议确认
|
|
||||||
static const String _SYS_PROTOCOL = "APP:SYS:PROTOCOL";
|
|
||||||
static const String _SYS_PROTOCOL_SHOW = "APP:SYS:PROTOCOL_SHOW";
|
|
||||||
|
|
||||||
static SharedPreferences? _prefs;
|
static SharedPreferences? _prefs;
|
||||||
|
|
||||||
|
|
@ -271,35 +268,4 @@ class FastData {
|
||||||
SharedPreferences thePrefs = await getSharedInstance();
|
SharedPreferences thePrefs = await getSharedInstance();
|
||||||
thePrefs.remove(_MARKING_ZOOM_SCALE_AND_POSITION);
|
thePrefs.remove(_MARKING_ZOOM_SCALE_AND_POSITION);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 阅卷 ==> 缩放组件历史位置 */
|
|
||||||
Future<bool> setSysProtocol(bool val) async {
|
|
||||||
SharedPreferences thePrefs = await getSharedInstance();
|
|
||||||
return await thePrefs.setBool(_SYS_PROTOCOL, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<bool?> getSysProtocol([SharedPreferences? thePrefs]) async {
|
|
||||||
if (thePrefs == null) thePrefs = await getSharedInstance();
|
|
||||||
return thePrefs.getBool(_SYS_PROTOCOL);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cleanSysProtocol() async {
|
|
||||||
SharedPreferences thePrefs = await getSharedInstance();
|
|
||||||
thePrefs.remove(_SYS_PROTOCOL);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<bool> setSysProtocolShow(bool val) async {
|
|
||||||
SharedPreferences thePrefs = await getSharedInstance();
|
|
||||||
return await thePrefs.setBool(_SYS_PROTOCOL_SHOW, val);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<bool?> getSysProtocolShow([SharedPreferences? thePrefs]) async {
|
|
||||||
if (thePrefs == null) thePrefs = await getSharedInstance();
|
|
||||||
return thePrefs.getBool(_SYS_PROTOCOL_SHOW);
|
|
||||||
}
|
|
||||||
|
|
||||||
void cleanSysProtocolShow() async {
|
|
||||||
SharedPreferences thePrefs = await getSharedInstance();
|
|
||||||
thePrefs.remove(_SYS_PROTOCOL_SHOW);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,8 @@ import 'package:marking_app/common/model/job/job_concerned_with_student_params.d
|
||||||
import 'package:marking_app/common/model/job/job_data_report.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_do_marking_status_info.dart';
|
||||||
import 'package:marking_app/common/model/job/job_fav_student.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_favorite_model.dart';
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_detail_student.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
|
|
||||||
import 'package:marking_app/common/model/job/job_level_set_params.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_note_taking_trajectory.dart';
|
||||||
import 'package:marking_app/common/model/job/job_page_tab.dart';
|
import 'package:marking_app/common/model/job/job_page_tab.dart';
|
||||||
|
|
@ -35,6 +33,7 @@ import 'package:marking_app/common/model/job/job_student_history.dart';
|
||||||
import 'package:marking_app/common/model/job/job_student_level.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/job_task_item.dart';
|
||||||
import 'package:marking_app/common/model/job/marking_text_question_job.dart';
|
import 'package:marking_app/common/model/job/marking_text_question_job.dart';
|
||||||
|
import 'package:marking_app/common/model/job/marking_text_question_job_params.dart';
|
||||||
import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart';
|
import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart';
|
||||||
import 'package:marking_app/common/model/job/review_again_list_params.dart';
|
import 'package:marking_app/common/model/job/review_again_list_params.dart';
|
||||||
import 'package:marking_app/common/model/job/upload_file_interface_config.dart';
|
import 'package:marking_app/common/model/job/upload_file_interface_config.dart';
|
||||||
|
|
@ -358,30 +357,5 @@ abstract class RestClient {
|
||||||
@the_retrofit.Query("PageSize") int pageSize,
|
@the_retrofit.Query("PageSize") int pageSize,
|
||||||
);
|
);
|
||||||
|
|
||||||
// 作业 => 知识点掌握
|
|
||||||
@the_retrofit.GET("/api/jobs/knowledge-report")
|
|
||||||
Future<BaseStructureResult<List<KnowledgePoints>>> getKnowledgeReport(
|
|
||||||
@the_retrofit.Query("dateStart") String? dateStart,
|
|
||||||
@the_retrofit.Query("dateEnd") String? dateEnd,
|
|
||||||
@the_retrofit.Query("knowledgeName") String? knowledgeName,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 作业 => 知识点掌握详情
|
|
||||||
@the_retrofit.GET("/api/jobs/knowledge-detail-report")
|
|
||||||
Future<BaseStructureResult<List<KnowledgePointsDetail>>> getKnowledgeReportDetail(
|
|
||||||
@the_retrofit.Query("KnowledgeId") int knowledgeId,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 作业 => 知识点掌握详情人员名单
|
|
||||||
@the_retrofit.GET("/api/jobs/knowledge-question-detail/{questionid}")
|
|
||||||
Future<BaseStructureResult<List<JobKnowledgeDetailStudent>>> getKnowledgeStudent(
|
|
||||||
@the_retrofit.Path("questionid") int questionid,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 作业 => 知识点掌握详情原卷图
|
|
||||||
@the_retrofit.GET("/api/jobs/question-paper-img/{sectionid}/{questionno}")
|
|
||||||
Future<BaseStructureResult<String>> getKnowledgeImg(
|
|
||||||
@the_retrofit.Path("sectionid") int questionid,
|
|
||||||
@the_retrofit.Path("questionno") String questionno,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
import 'dart:io';
|
|
||||||
|
|
||||||
import 'package:flutter/gestures.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
|
||||||
import 'package:marking_app/utils/const_text.dart';
|
|
||||||
|
|
||||||
import 'index.dart';
|
|
||||||
import 'my_text.dart';
|
|
||||||
|
|
||||||
class Protocol extends Dialog {
|
|
||||||
final BuildContext context;
|
|
||||||
const Protocol(this.context);
|
|
||||||
|
|
||||||
@override
|
|
||||||
Widget build(BuildContext context) {
|
|
||||||
return Center(
|
|
||||||
child: Container(
|
|
||||||
width: isPad() ? 200.w : 260.w,
|
|
||||||
height: 400.h,
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
borderRadius: BorderRadius.circular(12.r),
|
|
||||||
),
|
|
||||||
child: Column(
|
|
||||||
children: <Widget>[
|
|
||||||
quickText('用户协议与隐私政策', size: 15.sp, color: Color.fromRGBO(37, 37, 37, 1), fontWeight: FontWeight.bold),
|
|
||||||
Expanded(
|
|
||||||
child: ListView(
|
|
||||||
physics: const BouncingScrollPhysics(),
|
|
||||||
padding: EdgeInsets.fromLTRB(16.w, 14.h, 16.w, 10.h),
|
|
||||||
children: [
|
|
||||||
Text.rich(TextSpan(children: [
|
|
||||||
TextSpan(
|
|
||||||
text: '感谢您选择学而有道APP ! 我们非常重视您的个人信息和隐私保护。为了更好地保障您的个人权益,在您使用我们的产品前,请务必审慎阅读',
|
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(51, 51, 51, 1)),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: '《隐私政策》',
|
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(233, 85, 119, 1)),
|
|
||||||
recognizer: TapGestureRecognizer()
|
|
||||||
..onTap = () async {
|
|
||||||
RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: '和',
|
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(51, 51, 51, 1)),
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text: '《用户协议》',
|
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(233, 85, 119, 1)),
|
|
||||||
recognizer: TapGestureRecognizer()
|
|
||||||
..onTap = () async {
|
|
||||||
RouterManager.router.navigateTo(
|
|
||||||
context,
|
|
||||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
TextSpan(
|
|
||||||
text:
|
|
||||||
'内的所有条款,尤其是:1.我们对您的个人信息的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;2.约定我们的限制责任、免责条款;3.其他以颜色或加粗进行标识的重要条款。如您对以上协议有任何疑问,可通过人工客服或发邮件至xrydyj@outlook.com与我们联系。您点击"同意并继续”的行为即表示您已阅读完毕并同意以上协议的全部内容。如您同意以上协议内容,请点击"同意并继续”,开始使用我们的产品和服务!',
|
|
||||||
style: TextStyle(fontSize: 13.sp, color: Color.fromRGBO(51, 51, 51, 1)),
|
|
||||||
),
|
|
||||||
])),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
SizedBox(height: 10.h),
|
|
||||||
Row(
|
|
||||||
children: [
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
exit(0);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(top: 15.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(
|
|
||||||
top: BorderSide(width: 0.5.r, color: Color.fromRGBO(238, 238, 238, 1)),
|
|
||||||
right: BorderSide(width: 0.5.r, color: Color.fromRGBO(238, 238, 238, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: quickText('不同意', size: 14.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Expanded(
|
|
||||||
child: InkWell(
|
|
||||||
onTap: () {
|
|
||||||
FastData.getInstance().setSysProtocol(true);
|
|
||||||
Navigator.of(context).pop(true);
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
alignment: Alignment.center,
|
|
||||||
padding: EdgeInsets.only(top: 15.h),
|
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border(
|
|
||||||
top: BorderSide(width: 0.5.r, color: Color.fromRGBO(238, 238, 238, 1)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: quickText('同意并继续', color: Color.fromRGBO(206, 97, 126, 1), size: 14.sp),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 系统协议
|
|
||||||
Future<void> sysProtocol(BuildContext context) async {
|
|
||||||
bool? _sysProtocol = await FastData.getInstance().getSysProtocol();
|
|
||||||
if (_sysProtocol == null || !_sysProtocol) {
|
|
||||||
print('进来这里....');
|
|
||||||
bool? _sysProtocolShow = await FastData.getInstance().getSysProtocolShow();
|
|
||||||
if (_sysProtocolShow != true) {
|
|
||||||
try {
|
|
||||||
await FastData.getInstance().setSysProtocolShow(true);
|
|
||||||
return showDialog(
|
|
||||||
context: context,
|
|
||||||
barrierDismissible: false,
|
|
||||||
// useRootNavigator: false,
|
|
||||||
builder: (ctx) => Protocol(ctx),
|
|
||||||
);
|
|
||||||
} catch (e) {
|
|
||||||
FastData.getInstance().cleanSysProtocol();
|
|
||||||
} finally {
|
|
||||||
FastData.getInstance().cleanSysProtocolShow();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -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.104
|
version: 1.0.102
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.1 <3.0.0"
|
sdk: ">=2.17.1 <3.0.0"
|
||||||
|
|
|
||||||