Compare commits
No commits in common. "a636819fda492d9e411860afe27023ba9e3f4eda" and "8d1de06f147f6b12a32cc0e35d5c7990665a23da" have entirely different histories.
a636819fda
...
8d1de06f14
|
|
@ -214,16 +214,4 @@ 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_papers_submit_check_switch_bus.g.dart
|
||||||
marking_app/lib/common/model/event_bus/jobs/job_do_synchro_tab.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/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.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
|
|
||||||
marking_app/lib/common/model/job/job_handwriting.g.dart
|
|
||||||
marking_app/lib/utils/my_time_util.g.dart
|
|
||||||
marking_app/lib/pages/homework_correction/widget/answer_handwriting.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: 303 B |
|
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 |
|
|
@ -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);
|
|
||||||
}
|
|
||||||
|
|
@ -14,30 +14,11 @@ class GestureRecording {
|
||||||
|
|
||||||
bool scopeBox;
|
bool scopeBox;
|
||||||
|
|
||||||
int intervalTime; // 间隔时间
|
|
||||||
|
|
||||||
GestureRecording({
|
GestureRecording({
|
||||||
required this.eraser,
|
required this.eraser,
|
||||||
required this.annotationSwitch,
|
required this.annotationSwitch,
|
||||||
this.data,
|
this.data,
|
||||||
this.usageTime,
|
this.usageTime,
|
||||||
this.scopeBox = false,
|
this.scopeBox = false,
|
||||||
this.intervalTime = 0,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 手势记录(原稿笔记还原)
|
|
||||||
*/
|
|
||||||
class GestureHandwritingRecording {
|
|
||||||
int stroke;
|
|
||||||
int usageTime; // 用时
|
|
||||||
Offset data;
|
|
||||||
int intervalTime; // 间隔时间
|
|
||||||
GestureHandwritingRecording({
|
|
||||||
required this.stroke,
|
|
||||||
required this.data,
|
|
||||||
required this.usageTime,
|
|
||||||
required this.intervalTime,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'job_handwriting.g.dart';
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class JobHandwriting extends Object {
|
|
||||||
@JsonKey(name: 'lattices')
|
|
||||||
List<Lattices> lattices;
|
|
||||||
|
|
||||||
@JsonKey(name: 'paperPicture')
|
|
||||||
String paperPicture;
|
|
||||||
|
|
||||||
@JsonKey(name: 'pageNum')
|
|
||||||
int pageNum;
|
|
||||||
|
|
||||||
@JsonKey(name: 'pageCount')
|
|
||||||
int pageCount;
|
|
||||||
|
|
||||||
JobHandwriting(this.lattices, this.paperPicture, this.pageNum, this.pageCount);
|
|
||||||
|
|
||||||
factory JobHandwriting.fromJson(Map<String, dynamic> srcJson) => _$JobHandwritingFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$JobHandwritingToJson(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class Lattices extends Object {
|
|
||||||
@JsonKey(name: 'stroke')
|
|
||||||
int stroke;
|
|
||||||
|
|
||||||
@JsonKey(name: 'x')
|
|
||||||
double x;
|
|
||||||
|
|
||||||
@JsonKey(name: 'y')
|
|
||||||
double y;
|
|
||||||
|
|
||||||
@JsonKey(name: 'time')
|
|
||||||
int time;
|
|
||||||
|
|
||||||
@JsonKey(name: 'intervalTime')
|
|
||||||
int intervalTime;
|
|
||||||
|
|
||||||
Lattices(this.stroke, this.x, this.y, this.time, [this.intervalTime = 0]);
|
|
||||||
|
|
||||||
factory Lattices.fromJson(Map<String, dynamic> srcJson) => _$LatticesFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$LatticesToJson(this);
|
|
||||||
}
|
|
||||||
|
|
@ -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);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -36,7 +36,12 @@ class TestQuestionsImageInfo extends Object {
|
||||||
double? imageHeightOffsetend;
|
double? imageHeightOffsetend;
|
||||||
|
|
||||||
TestQuestionsImageInfo(
|
TestQuestionsImageInfo(
|
||||||
{required this.width, required this.height, required this.url, required this.boxWidth, required this.boxHeight, this.pixelRatio = 1}) {
|
{required this.width,
|
||||||
|
required this.height,
|
||||||
|
required this.url,
|
||||||
|
required this.boxWidth,
|
||||||
|
required this.boxHeight,
|
||||||
|
this.pixelRatio = 1}) {
|
||||||
// print('图片宽度:$width');
|
// print('图片宽度:$width');
|
||||||
// print('图片高度:$height');
|
// print('图片高度:$height');
|
||||||
|
|
||||||
|
|
@ -55,14 +60,6 @@ class TestQuestionsImageInfo extends Object {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重新计算
|
|
||||||
void calculateStartAndEndHeight([double otherHeight = 0]) {
|
|
||||||
if (scaleHeight != null) {
|
|
||||||
imageHeightOffsetStart = (boxHeight - (scaleHeight! + otherHeight)) / 2;
|
|
||||||
imageHeightOffsetend = imageHeightOffsetStart! + scaleHeight!;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
|
factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);
|
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(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,
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ void main() {
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
WidgetsFlutterBinding.ensureInitialized();
|
||||||
RouterManager.initRouter();
|
RouterManager.initRouter();
|
||||||
|
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||||
|
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏
|
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏
|
||||||
// OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values);
|
// OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values);
|
||||||
|
|
||||||
|
|
@ -80,7 +81,7 @@ class _MyAppState extends State<MyApp> {
|
||||||
splitScreenMode: true,
|
splitScreenMode: true,
|
||||||
builder: (context1, child) {
|
builder: (context1, child) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
title: '学而有道阅卷',
|
title: '远轩阅卷系统',
|
||||||
navigatorKey: TheGlobal.navigatorKey,
|
navigatorKey: TheGlobal.navigatorKey,
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
||||||
|
|
|
||||||
|
|
@ -1,249 +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();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
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(() {});
|
|
||||||
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,291 +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.quickCheckPersonalPath +
|
|
||||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);
|
|
||||||
// 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.quickCheckPersonalPath +
|
|
||||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
|
||||||
transition: getTransition(),
|
|
||||||
);
|
|
||||||
// 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,25 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
|
|
||||||
class ImageDialog{
|
|
||||||
static void showImgDialog(BuildContext context,String imgUrl) {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (BuildContext context) {
|
|
||||||
return AlertDialog(
|
|
||||||
// insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
|
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
contentPadding: EdgeInsets.all(0),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
|
||||||
content: Container(
|
|
||||||
width: MediaQuery.of(context).size.width - 48.r,
|
|
||||||
// height: MediaQuery.of(context).size.height * 0.4,
|
|
||||||
color: Colors.white,
|
|
||||||
// child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
|
|
||||||
child: Image.network(imgUrl)),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -21,7 +21,12 @@ class TrajectoryView extends StatefulHookConsumerWidget {
|
||||||
final double boxHeight;
|
final double boxHeight;
|
||||||
final String questionNumber;
|
final String questionNumber;
|
||||||
final JobNoteTakingTrajectory trajectory;
|
final JobNoteTakingTrajectory trajectory;
|
||||||
const TrajectoryView({required this.trajectory, required this.questionNumber, required this.boxHeight, required this.boxWidth, super.key});
|
const TrajectoryView(
|
||||||
|
{required this.trajectory,
|
||||||
|
required this.questionNumber,
|
||||||
|
required this.boxHeight,
|
||||||
|
required this.boxWidth,
|
||||||
|
super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
TrajectoryViewState createState() => TrajectoryViewState();
|
TrajectoryViewState createState() => TrajectoryViewState();
|
||||||
|
|
@ -147,11 +152,15 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
||||||
|
|
||||||
/// 试题范围框左上角
|
/// 试题范围框左上角
|
||||||
trajectorys
|
trajectorys
|
||||||
..add(GestureRecording(data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
..add(GestureRecording(
|
||||||
|
data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
||||||
|
|
||||||
/// 右上角
|
/// 右上角
|
||||||
..add(GestureRecording(
|
..add(GestureRecording(
|
||||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop),
|
||||||
|
scopeBox: true,
|
||||||
|
annotationSwitch: false,
|
||||||
|
eraser: false))
|
||||||
|
|
||||||
/// 左下角
|
/// 左下角
|
||||||
..add(GestureRecording(
|
..add(GestureRecording(
|
||||||
|
|
@ -162,7 +171,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
||||||
|
|
||||||
/// 右下角
|
/// 右下角
|
||||||
..add(GestureRecording(
|
..add(GestureRecording(
|
||||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
data: Offset(
|
||||||
|
imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
||||||
scopeBox: true,
|
scopeBox: true,
|
||||||
annotationSwitch: false,
|
annotationSwitch: false,
|
||||||
eraser: false));
|
eraser: false));
|
||||||
|
|
@ -171,26 +181,14 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
||||||
ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys);
|
ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys);
|
||||||
});
|
});
|
||||||
if (lattices.isNotEmpty) {
|
if (lattices.isNotEmpty) {
|
||||||
// Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
||||||
// key: (key) => key.stroke,
|
key: (key) => key.stroke,
|
||||||
// value: (value) {
|
value: (value) {
|
||||||
// return lattices.where((item) => item.stroke == value.stroke).toList()
|
return lattices.where((item) => item.stroke == value.stroke).toList()
|
||||||
// ..sort((a, b) => a.time.compareTo(b.time));
|
..sort((a, b) => a.time.compareTo(b.time));
|
||||||
// });
|
});
|
||||||
|
|
||||||
var map = Map<int, List<Lattices>>();
|
|
||||||
for (var i = 0; i < lattices.length; i++) {
|
|
||||||
Lattices item = lattices[i];
|
|
||||||
if (!map.containsKey(item.stroke)) map[item.stroke] = [];
|
|
||||||
map[item.stroke]!.add(item); // 添加笔画数据
|
|
||||||
}
|
|
||||||
|
|
||||||
List<int> keys = map.keys.toList();
|
List<int> keys = map.keys.toList();
|
||||||
for (var i = 0; i < keys.length; i++) {
|
|
||||||
int theKey = keys[i];
|
|
||||||
map[theKey]!.sort((a, b) => a.time.compareTo(b.time));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (var i = 0; i < keys.length; i++) {
|
for (var i = 0; i < keys.length; i++) {
|
||||||
int theKey = keys[i];
|
int theKey = keys[i];
|
||||||
int? nextKey = i + 1 < keys.length ? keys[i + 1] : null;
|
int? nextKey = i + 1 < keys.length ? keys[i + 1] : null;
|
||||||
|
|
@ -201,7 +199,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
||||||
double theX = e.x * imagInfoModel!.scale!;
|
double theX = e.x * imagInfoModel!.scale!;
|
||||||
double theY = e.y * imagInfoModel!.scale! + spacingHeight;
|
double theY = e.y * imagInfoModel!.scale! + spacingHeight;
|
||||||
|
|
||||||
return GestureRecording(eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
|
return GestureRecording(
|
||||||
|
eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
|
||||||
}).toList()
|
}).toList()
|
||||||
..add(GestureRecording(eraser: false, annotationSwitch: false));
|
..add(GestureRecording(eraser: false, annotationSwitch: false));
|
||||||
// 原始轨迹展示
|
// 原始轨迹展示
|
||||||
|
|
@ -231,7 +230,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
||||||
if (duration2 == null && nextStrokesData != null) {
|
if (duration2 == null && nextStrokesData != null) {
|
||||||
// 此时最后一个笔画完成了 停止时间是在下一个笔画开始时间之差
|
// 此时最后一个笔画完成了 停止时间是在下一个笔画开始时间之差
|
||||||
Lattices minLattices = nextStrokesData.reduce((e1, e2) => e1.time < e2.time ? e1 : e2);
|
Lattices minLattices = nextStrokesData.reduce((e1, e2) => e1.time < e2.time ? e1 : e2);
|
||||||
differenceInMilliseconds = (Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
|
differenceInMilliseconds =
|
||||||
|
(Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
|
||||||
await Future.delayed(Duration(milliseconds: differenceInMilliseconds)); // 一个笔画完成进行下一个笔画的等待时间
|
await Future.delayed(Duration(milliseconds: differenceInMilliseconds)); // 一个笔画完成进行下一个笔画的等待时间
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -290,11 +290,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
||||||
var _pageIndex = _currentTab?.pageIndex;
|
var _pageIndex = _currentTab?.pageIndex;
|
||||||
if (_currentTab == null || _pageIndex == null) return;
|
if (_currentTab == null || _pageIndex == null) return;
|
||||||
|
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
|
||||||
var theLastQuestion = _currentTab.finishCount + 1 == _currentTab.total; // 当前提交的题是最后一题
|
|
||||||
_useSwitchStudentAndType
|
|
||||||
.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: theLastQuestion)
|
|
||||||
.then((value) {
|
|
||||||
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
|
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
|
||||||
if (_currentTab.finishCount < _currentTab.total) {
|
if (_currentTab.finishCount < _currentTab.total) {
|
||||||
if (_currentTab.finishCount + 1 == _currentTab.total) {
|
if (_currentTab.finishCount + 1 == _currentTab.total) {
|
||||||
|
|
@ -370,9 +366,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 4,
|
||||||
child: Stack(
|
child: Container(
|
||||||
children: [
|
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color.fromRGBO(244, 244, 244, 1),
|
color: Color.fromRGBO(244, 244, 244, 1),
|
||||||
|
|
@ -404,22 +398,6 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Positioned(
|
|
||||||
left: 2.w,
|
|
||||||
child: 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),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
|
|
@ -480,6 +458,17 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
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),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -863,6 +852,7 @@ Widget $examPaperAndScoringKeyboardView(
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
if (question.accuracy > 0)
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||||
child: quickText(
|
child: quickText(
|
||||||
|
|
|
||||||
|
|
@ -140,7 +140,7 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
||||||
return tabJob;
|
return tabJob;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// ToastUtils.showSuccess('最后一题提交成功');
|
ToastUtils.showSuccess('最后一题提交成功');
|
||||||
}
|
}
|
||||||
return tabJob;
|
return tabJob;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -261,10 +257,32 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Expanded(flex: 1, child: SizedBox()),
|
Expanded(
|
||||||
|
flex: 1,
|
||||||
|
child: InkWell(
|
||||||
|
onTap: () {
|
||||||
|
RouterManager.router
|
||||||
|
.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
||||||
|
},
|
||||||
|
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
|
||||||
|
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* Row(
|
||||||
|
children: [
|
||||||
|
InkWell(
|
||||||
|
onTap: (){
|
||||||
|
|
||||||
|
},
|
||||||
|
child: Text('历史作业'),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),*/
|
||||||
|
|
||||||
if (_tabIndex == 1)
|
if (_tabIndex == 1)
|
||||||
$CompletedJobConditionFilter(
|
$CompletedJobConditionFilter(
|
||||||
controller: _tabController2,
|
controller: _tabController2,
|
||||||
|
|
@ -299,9 +317,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,
|
||||||
|
|
@ -310,9 +325,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||||
data: markingDatas2,
|
data: markingDatas2,
|
||||||
onLoad: onMyLoad,
|
onLoad: onMyLoad,
|
||||||
onRefresh: onMyRefresh,
|
onRefresh: onMyRefresh,
|
||||||
eventFire: () {
|
|
||||||
eventFire(model: JobHomeRefreshBus());
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
@ -334,7 +346,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,
|
||||||
|
|
@ -367,10 +378,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,
|
||||||
|
|
@ -418,7 +426,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),
|
||||||
|
|
@ -479,7 +489,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(),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -522,7 +533,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,265 +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(
|
|
||||||
constraints: BoxConstraints(
|
|
||||||
minHeight: 200.h,
|
|
||||||
maxWidth: double.infinity,
|
|
||||||
),
|
|
||||||
// decoration: BoxDecoration(
|
|
||||||
// image: DecorationImage(
|
|
||||||
// image: AssetImage('assets/images/job_home_top_bgm.png'),
|
|
||||||
// fit: BoxFit.fitWidth, // 完全填充
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
child: Image.asset('assets/images/job_home_top_bgm.png', fit: BoxFit.fitWidth),
|
|
||||||
),
|
|
||||||
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(
|
|
||||||
'${item.count}次',
|
|
||||||
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,465 +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: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
quickText('正确率',
|
|
||||||
color: Color(0xFF4CC793),
|
|
||||||
size: 10.sp),
|
|
||||||
Image.asset('assets/images/icon_back_green.png',width: 8.r,height: 8.r,)
|
|
||||||
],
|
|
||||||
)),
|
|
||||||
),
|
|
||||||
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);
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,8 @@ 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;
|
final String title;
|
||||||
final String? page;
|
|
||||||
|
|
||||||
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
|
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title})
|
||||||
: super(key: key);
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -208,27 +207,8 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
|
item.readLevel == 1
|
||||||
widget.page == 'answerTrajectory'?Container(
|
? InkWell(
|
||||||
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))),
|
|
||||||
)):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: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
isClicking = true;
|
isClicking = true;
|
||||||
|
|
@ -304,6 +284,34 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
/* 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)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -338,24 +346,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
fontSize: 12.sp,
|
fontSize: 12.sp,
|
||||||
color: Color(0xFF6888FD)),
|
color: Color(0xFF6888FD)),
|
||||||
)),
|
)),
|
||||||
widget.page == 'answerTrajectory'?Container(
|
item.readLevel == 1
|
||||||
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(
|
? InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
@ -429,6 +420,34 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
/* 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)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
||||||
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
|
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
|
||||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/report_table.dart';
|
import 'package:marking_app/pages/homework_correction/widget/report_table.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/widget/top_count.dart';
|
import 'package:marking_app/pages/homework_correction/widget/top_count.dart';
|
||||||
import 'package:marking_app/pages/mainPage.dart';
|
import 'package:marking_app/pages/mainPage.dart';
|
||||||
|
|
@ -1446,7 +1445,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
|
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
|
||||||
/* Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (_) {
|
MaterialPageRoute(builder: (_) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -1454,8 +1453,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
||||||
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
|
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);*/
|
);
|
||||||
ImageDialog.showImgDialog(context,_qpm.questionPicture!);
|
|
||||||
},
|
},
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,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();
|
||||||
|
|
@ -60,7 +59,7 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
||||||
}
|
}
|
||||||
|
|
||||||
void goNextPage(id,title){
|
void goNextPage(id,title){
|
||||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition());
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition());
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
/// 原稿作业回显
|
|
||||||
// 回显批注轨迹
|
|
||||||
|
|
||||||
import 'package:marking_app/common/model/job/gesture_recording.dart';
|
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
|
||||||
import 'package:marking_app/common/mixin/common.dart';
|
|
||||||
|
|
||||||
final jobHandwritingDrawingTrajectoryProvider =
|
|
||||||
StateNotifierProvider<JobHandwritingDrawingTrajectoryProviderHandle, List<GestureHandwritingRecording>>(
|
|
||||||
(ref) => JobHandwritingDrawingTrajectoryProviderHandle([]));
|
|
||||||
|
|
||||||
class JobHandwritingDrawingTrajectoryProviderHandle extends StateNotifier<List<GestureHandwritingRecording>> with CommonMixin {
|
|
||||||
JobHandwritingDrawingTrajectoryProviderHandle(List<GestureHandwritingRecording> progress) : super(progress);
|
|
||||||
|
|
||||||
setVal(List<GestureHandwritingRecording> val) {
|
|
||||||
state = val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
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/job/job_data_report.dart';
|
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||||
|
|
@ -9,23 +8,24 @@ import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/widget/student_kg_table.dart';
|
import 'package:marking_app/pages/homework_correction/widget/student_kg_table.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
|
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
|
||||||
import 'package:marking_app/routes/RouterManager.dart';
|
import 'package:marking_app/routes/RouterManager.dart';
|
||||||
|
import 'package:marking_app/utils/common_utils.dart';
|
||||||
import 'package:marking_app/utils/request/rest_client.dart';
|
import 'package:marking_app/utils/request/rest_client.dart';
|
||||||
import 'package:marking_app/utils/toast_utils.dart';
|
import 'package:marking_app/utils/toast_utils.dart';
|
||||||
|
|
||||||
import 'providers/handwriting_drawing_trajectory_provider.dart';
|
class QuickCheckPersonal extends StatefulWidget {
|
||||||
import 'widget/answer_handwriting.dart';
|
|
||||||
|
|
||||||
class QuickCheckPersonal extends StatefulHookConsumerWidget {
|
|
||||||
final int jobId;
|
final int jobId;
|
||||||
final int studentId;
|
final int studentId;
|
||||||
|
|
||||||
const QuickCheckPersonal({Key? key, required this.jobId, required this.studentId}) : super(key: key);
|
const QuickCheckPersonal(
|
||||||
|
{Key? key, required this.jobId, required this.studentId})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ConsumerState<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with CommonMixin {
|
class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
||||||
|
with CommonMixin {
|
||||||
StudentDetails? studentInfo;
|
StudentDetails? studentInfo;
|
||||||
|
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -40,7 +40,8 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
params['jobid'] = widget.jobId;
|
params['jobid'] = widget.jobId;
|
||||||
// params['jobid'] = '521646983660101';
|
// params['jobid'] = '521646983660101';
|
||||||
params['studentId'] = widget.studentId;
|
params['studentId'] = widget.studentId;
|
||||||
BaseStructureResult<StudentDetails?> data = await _client.getJobPersonalReport(params);
|
BaseStructureResult<StudentDetails?> data =
|
||||||
|
await _client.getJobPersonalReport(params);
|
||||||
if(data.data!.studentId != null){
|
if(data.data!.studentId != null){
|
||||||
setState(() {
|
setState(() {
|
||||||
studentInfo = data.data;
|
studentInfo = data.data;
|
||||||
|
|
@ -50,6 +51,7 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
ToastUtils.showError('暂无数据');
|
ToastUtils.showError('暂无数据');
|
||||||
}
|
}
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -87,8 +89,10 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
),
|
),
|
||||||
),*/
|
),*/
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
|
@ -98,8 +102,7 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
children: [
|
children: [
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
RouterManager.router.navigateTo(context,
|
RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}');
|
||||||
'${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}');
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
|
|
@ -109,23 +112,12 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text('历史查询',style: TextStyle(fontSize: 10.r,color: Color(0xFF2080F7)),),
|
||||||
'历史作业',
|
|
||||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
SizedBox(width: 10.r,),
|
||||||
SizedBox(
|
/*Container(
|
||||||
width: 10.r,
|
|
||||||
),
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId).then((value) {
|
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
child: Container(
|
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
height: 28.r,
|
height: 28.r,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -133,13 +125,9 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text('原稿笔迹',style: TextStyle(fontSize: 10.r,color: Color(0xFF4CC793)),),
|
||||||
'原稿笔迹',
|
|
||||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF4CC793)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),*/
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -159,38 +147,31 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题',
|
'客观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${studentInfo!.kgValidRate}%',
|
'${studentInfo!.kgValidRate}%',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 10.r,),
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: studentInfo!.kgDetails.length>8?300.r:studentInfo!.kgDetails.length * 40.r + 40.r,
|
height: studentInfo!.kgDetails.length>8?300.r:studentInfo!.kgDetails.length * 40.r + 40.r,
|
||||||
child: StudentKgTable(
|
child: StudentKgTable(
|
||||||
headList: ['题号', '学生答案', '标准答案'],
|
headList: ['题号', '学生答案', '标准答案'],
|
||||||
bodyList: studentInfo!.kgDetails,
|
bodyList: studentInfo!.kgDetails,
|
||||||
questionNumCall: (no) {
|
|
||||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 15.r,),
|
||||||
height: 15.r,
|
|
||||||
),
|
|
||||||
//主观题
|
//主观题
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||||
|
|
@ -207,30 +188,25 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'主观题',
|
'主观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
Text(
|
Text(
|
||||||
'${studentInfo!.zgValidRate}%',
|
'${studentInfo!.zgValidRate}%',
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(height: 10.r,),
|
||||||
height: 10.r,
|
|
||||||
),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: studentInfo!.zgDetails.length>8?300.r:studentInfo!.zgDetails.length * 40.r + 40.r,
|
height: studentInfo!.zgDetails.length>8?300.r:studentInfo!.zgDetails.length * 40.r + 40.r,
|
||||||
child: StudentZgTable(
|
child: StudentZgTable(
|
||||||
headList: ['题号', '用时', '学生答案','批注结果','批注'],
|
headList: ['题号', '用时', '学生答案','批注结果','批注'],
|
||||||
bodyList: studentInfo!.zgDetails,
|
bodyList: studentInfo!.zgDetails,
|
||||||
questionNumCall: (no) {
|
|
||||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -1,286 +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.4 //宽高比为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,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
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)),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 6.r),
|
|
||||||
child: Text('时间:${item.createTime.substring(0,10)}',style: TextStyle(fontSize: 10.sp),),
|
|
||||||
),
|
|
||||||
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,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
|
||||||
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: 5.r,
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
|
||||||
child: Text('时间:${item.createTime.substring(0,10)}',style: TextStyle(fontSize: 10.sp),),
|
|
||||||
),
|
|
||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.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/index.dart';
|
import 'package:marking_app/utils/index.dart';
|
||||||
|
|
@ -360,7 +359,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (item.questionPicture == null)
|
if (item.questionPicture == null)
|
||||||
return ToastUtils.showInfo('当前试题没有原题');
|
return ToastUtils.showInfo('当前试题没有原题');
|
||||||
/* Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (_) {
|
MaterialPageRoute(builder: (_) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
|
@ -370,8 +369,7 @@ class _ReportTableState extends State<ReportTable> {
|
||||||
NetworkImage(item.questionPicture!)),
|
NetworkImage(item.questionPicture!)),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);*/
|
);
|
||||||
ImageDialog.showImgDialog(context,item.questionPicture!);
|
|
||||||
},
|
},
|
||||||
child: Text('原题',
|
child: Text('原题',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,12 @@ import 'package:marking_app/utils/index.dart';
|
||||||
class StudentGroupList extends StatelessWidget {
|
class StudentGroupList extends StatelessWidget {
|
||||||
final List studentGroups;
|
final List studentGroups;
|
||||||
final Function goNextPage;
|
final Function goNextPage;
|
||||||
final Widget? rightBtn;
|
const StudentGroupList(this.studentGroups,this.goNextPage,{Key? key}) : super(key: key);
|
||||||
|
|
||||||
const StudentGroupList(this.studentGroups, this.goNextPage,
|
|
||||||
{Key? key,this.rightBtn})
|
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return studentGroups != null && studentGroups.length > 0
|
return studentGroups != null && studentGroups.length > 0
|
||||||
? isPad()
|
? isPad()?GridView(
|
||||||
? GridView(
|
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisCount: 2,
|
crossAxisCount: 2,
|
||||||
|
|
@ -61,9 +56,7 @@ class StudentGroupList extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
rightBtn != null
|
Container(
|
||||||
? rightBtn!
|
|
||||||
: Container(
|
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
margin: EdgeInsets.only(left: 5.r),
|
||||||
height: 20.r,
|
height: 20.r,
|
||||||
width: 55.r,
|
width: 55.r,
|
||||||
|
|
@ -85,20 +78,13 @@ class StudentGroupList extends StatelessWidget {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
)
|
):ListView.builder(
|
||||||
: ListView.builder(
|
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
itemBuilder: (context,index){
|
itemBuilder: (context,index){
|
||||||
JobStudentGroups item = studentGroups[index];
|
JobStudentGroups item = studentGroups[index];
|
||||||
String classNames = item.classNames.join(" ");
|
String classNames = item.classNames.join(" ");
|
||||||
return InkWell(
|
return Container(
|
||||||
onTap: () {
|
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
||||||
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),
|
margin: EdgeInsets.only(bottom: 10.r),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||||
|
|
@ -126,9 +112,12 @@ class StudentGroupList extends StatelessWidget {
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
rightBtn != null
|
InkWell(
|
||||||
? rightBtn!
|
onTap: (){
|
||||||
: Container(
|
goNextPage(item.groupId,item.groupName);
|
||||||
|
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
margin: EdgeInsets.only(left: 5.r),
|
margin: EdgeInsets.only(left: 5.r),
|
||||||
height: 24.r,
|
height: 24.r,
|
||||||
width: 55.r,
|
width: 55.r,
|
||||||
|
|
@ -144,17 +133,16 @@ class StudentGroupList extends StatelessWidget {
|
||||||
fontSize: 10.sp, color: Colors.white),
|
fontSize: 10.sp, color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: studentGroups.length,
|
itemCount: studentGroups.length,
|
||||||
)
|
)
|
||||||
: Padding(
|
: Padding(
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
||||||
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
|
||||||
child: MyEmptyWidget(),
|
child: MyEmptyWidget(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,6 @@ class StudentKgTable extends StatefulWidget {
|
||||||
final List bodyList;
|
final List bodyList;
|
||||||
final int? fixedRows;
|
final int? fixedRows;
|
||||||
final int? fixedCols;
|
final int? fixedCols;
|
||||||
final Function(String)? questionNumCall;
|
|
||||||
|
|
||||||
const StudentKgTable({
|
const StudentKgTable({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
|
@ -16,7 +15,6 @@ class StudentKgTable extends StatefulWidget {
|
||||||
required this.bodyList,
|
required this.bodyList,
|
||||||
this.fixedCols = 0,
|
this.fixedCols = 0,
|
||||||
this.fixedRows = 0,
|
this.fixedRows = 0,
|
||||||
this.questionNumCall,
|
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -31,7 +29,6 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
||||||
String sortString(String str) {
|
String sortString(String str) {
|
||||||
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
||||||
}
|
}
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
KgDetails item = widget.bodyList[index];
|
KgDetails item = widget.bodyList[index];
|
||||||
|
|
@ -39,43 +36,27 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
||||||
index: index,
|
index: index,
|
||||||
color: color != null ? MaterialStateProperty.all(color): null,
|
color: color != null ? MaterialStateProperty.all(color): null,
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(
|
|
||||||
InkWell(
|
|
||||||
onTap: () {
|
|
||||||
if (widget.questionNumCall != null) {
|
|
||||||
widget.questionNumCall!(item.questionNo);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
|
||||||
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(
|
child: Text(item.questionNo,
|
||||||
item.studentAnswer == null ? '未作答' : item.studentAnswer!,
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||||
style: TextStyle(
|
),
|
||||||
fontSize: 12.sp,
|
)),
|
||||||
color: item.studentAnswer == null
|
DataCell(Center(
|
||||||
? Color(0xFF525252)
|
child: Padding(
|
||||||
: item.state == 2
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
? Color(0xFF4CC793)
|
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
|
||||||
: item.state == 1
|
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252):
|
||||||
? Color(0xFFFF7474)
|
item.state == 2?Color(0xFF4CC793):
|
||||||
: item.state == 0
|
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white),
|
||||||
? Color(0xFFD3D3D3)
|
|
||||||
: Colors.white),
|
|
||||||
),
|
),
|
||||||
))),
|
))),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.questionAnswer == null ? '无' : item.questionAnswer!, style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
child: Text(item.questionAnswer == null ?'无':item.questionAnswer!,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
|
|
@ -93,10 +74,14 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
||||||
dataRowHeight: 40.r,
|
dataRowHeight: 40.r,
|
||||||
headingRowHeight: 40.r,
|
headingRowHeight: 40.r,
|
||||||
border: TableBorder(
|
border: TableBorder(
|
||||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
horizontalInside: BorderSide(
|
||||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
bottom: BorderSide(
|
||||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
|
verticalInside: BorderSide(
|
||||||
|
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||||
|
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||||
|
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||||
fixedCornerColor: Colors.grey[400],
|
fixedCornerColor: Colors.grey[400],
|
||||||
|
|
@ -110,12 +95,14 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return DataColumn2(
|
return DataColumn2(
|
||||||
label: Center(
|
label: Center(
|
||||||
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
child: Text(item,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/3,
|
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/3,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
|
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||||
|
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ import 'package:data_table_2/data_table_2.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
|
|
||||||
import 'package:marking_app/pages/homework_correction/widget/answer_handwriting.dart';
|
|
||||||
import 'package:marking_app/utils/common_utils.dart';
|
import 'package:marking_app/utils/common_utils.dart';
|
||||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||||
import 'package:photo_view/photo_view.dart';
|
import 'package:photo_view/photo_view.dart';
|
||||||
|
|
@ -13,7 +11,6 @@ class StudentZgTable extends StatefulWidget {
|
||||||
final List bodyList;
|
final List bodyList;
|
||||||
final int? fixedRows;
|
final int? fixedRows;
|
||||||
final int? fixedCols;
|
final int? fixedCols;
|
||||||
final Function(String)? questionNumCall;
|
|
||||||
|
|
||||||
const StudentZgTable({
|
const StudentZgTable({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
|
@ -21,7 +18,6 @@ class StudentZgTable extends StatefulWidget {
|
||||||
required this.bodyList,
|
required this.bodyList,
|
||||||
this.fixedCols = 0,
|
this.fixedCols = 0,
|
||||||
this.fixedRows = 0,
|
this.fixedRows = 0,
|
||||||
this.questionNumCall,
|
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
@ -33,22 +29,22 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
||||||
int? _sortColumnIndex;
|
int? _sortColumnIndex;
|
||||||
bool _sortAscending = true;
|
bool _sortAscending = true;
|
||||||
|
|
||||||
/*void showImgDialog(BuildContext context,String imgUrl){
|
void showImgDialog(BuildContext context,String imgUrl){
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(builder: (_) {
|
MaterialPageRoute(builder: (_) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(),
|
appBar: AppBar(),
|
||||||
body: SizedBox(
|
body: SizedBox(
|
||||||
*/ /* width: MediaQuery.of(context).size.width * 0.6,
|
/* width: MediaQuery.of(context).size.width * 0.6,
|
||||||
height: MediaQuery.of(context).size.height * 0.6,*/ /*
|
height: MediaQuery.of(context).size.height * 0.6,*/
|
||||||
child: PhotoView(
|
child: PhotoView(
|
||||||
imageProvider:
|
imageProvider:
|
||||||
NetworkImage(imgUrl)),
|
NetworkImage(imgUrl)),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
);*/
|
);
|
||||||
/* showDialog(context: context, builder: (BuildContext context){
|
/* showDialog(context: 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),
|
||||||
|
|
@ -66,7 +62,7 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});*/
|
});*/
|
||||||
// }
|
}
|
||||||
|
|
||||||
DataRow _getRow(int index, [Color? color]) {
|
DataRow _getRow(int index, [Color? color]) {
|
||||||
assert(index >= 0);
|
assert(index >= 0);
|
||||||
|
|
@ -75,66 +71,55 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
||||||
index: index,
|
index: index,
|
||||||
color: color != null ? MaterialStateProperty.all(color): null,
|
color: color != null ? MaterialStateProperty.all(color): null,
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(InkWell(
|
DataCell(Center(
|
||||||
onTap: () {
|
|
||||||
if (widget.questionNumCall != null) {
|
|
||||||
widget.questionNumCall!(item.questionNo);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
child: Center(
|
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
child: Text(item.questionNo,
|
||||||
),
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(CommonUtils.second2HMS(item.useTime!), style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
child: Text(CommonUtils.second2HMS(item.useTime!),
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
if(item.state != 0){
|
if(item.state != 0){
|
||||||
ImageDialog.showImgDialog(context, item.studentAnswer!);
|
showImgDialog(context,item.studentAnswer!);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.state != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
child: Text(item.state!=0 ?'查看':'--',
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(Center(
|
DataCell(Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: item.state == 2
|
child: item.state == 2?
|
||||||
? Image.asset(
|
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):item.state == 1?
|
||||||
'assets/images/job_personal_correct_icon.png',
|
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,):Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||||
width: 18.r,
|
|
||||||
height: 18.r,
|
|
||||||
)
|
|
||||||
: item.state == 1
|
|
||||||
? Image.asset(
|
|
||||||
'assets/images/job_personal_error_icon.png',
|
|
||||||
width: 10.r,
|
|
||||||
height: 10.r,
|
|
||||||
)
|
|
||||||
: Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
DataCell(InkWell(
|
DataCell(InkWell(
|
||||||
onTap: (){
|
onTap: (){
|
||||||
if(item.state==1 || item.state==2){
|
if(item.state==1 || item.state==2){
|
||||||
ImageDialog.showImgDialog(context, item.annotateAnswers!);
|
showImgDialog(context,item.annotateAnswers!);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||||
child: Text(item.state == 1 || item.state == 2 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
child: Text(item.state==1 || item.state==2?'查看':'--',
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
@ -153,10 +138,14 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
||||||
headingRowHeight: 40.r,
|
headingRowHeight: 40.r,
|
||||||
dataRowHeight: 40.r,
|
dataRowHeight: 40.r,
|
||||||
border: TableBorder(
|
border: TableBorder(
|
||||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
horizontalInside: BorderSide(
|
||||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
bottom: BorderSide(
|
||||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||||
|
verticalInside: BorderSide(
|
||||||
|
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||||
|
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||||
|
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||||
fixedCornerColor: Colors.grey[400],
|
fixedCornerColor: Colors.grey[400],
|
||||||
|
|
@ -170,12 +159,14 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
||||||
var item = widget.headList[index];
|
var item = widget.headList[index];
|
||||||
return DataColumn2(
|
return DataColumn2(
|
||||||
label: Center(
|
label: Center(
|
||||||
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
child: Text(item,
|
||||||
|
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||||
),
|
),
|
||||||
// size: ColumnSize.S,
|
// size: ColumnSize.S,
|
||||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/5,
|
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/5,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
|
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||||
|
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ 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';
|
||||||
|
|
@ -29,8 +30,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);
|
||||||
|
|
||||||
|
|
@ -46,13 +45,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
||||||
Timer? _timer;
|
Timer? _timer;
|
||||||
bool showUpgrade = false;
|
bool showUpgrade = false;
|
||||||
|
|
||||||
final List<Widget> _bodyList = [
|
final List<Widget> _bodyList = [const TheHomePage(), const TheMarking(), const HomeworkCorrection(), const TheReport()];
|
||||||
const TheHomePage(),
|
|
||||||
const TheMarking(),
|
|
||||||
// const HomeworkCorrection(),
|
|
||||||
const JobHome(),
|
|
||||||
const TheReport()
|
|
||||||
];
|
|
||||||
int tabIndex = 0;
|
int tabIndex = 0;
|
||||||
|
|
||||||
/// 获取项目 icon
|
/// 获取项目 icon
|
||||||
|
|
@ -106,7 +99,9 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
||||||
void getAppUpgrade(UserInfo user) async {
|
void getAppUpgrade(UserInfo user) async {
|
||||||
try {
|
try {
|
||||||
showUpgrade = true;
|
showUpgrade = true;
|
||||||
if (['18888888888'].contains(user.loginName)) return;
|
// if (user.loginName == '18888888888') return;
|
||||||
|
// if (user.loginName == 'u0001') return;
|
||||||
|
if (user.loginName == '13350366646') return;
|
||||||
// 获取设备信息
|
// 获取设备信息
|
||||||
String deviceInfo;
|
String deviceInfo;
|
||||||
int deviceType;
|
int deviceType;
|
||||||
|
|
@ -156,8 +151,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,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -6,16 +6,14 @@
|
||||||
* @FilePath: \marking_app\lib\routes\RouterManager.dart
|
* @FilePath: \marking_app\lib\routes\RouterManager.dart
|
||||||
* @Description: 路由
|
* @Description: 路由
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:fluro/fluro.dart';
|
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';
|
||||||
|
|
@ -68,8 +66,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';
|
||||||
|
|
@ -85,10 +81,6 @@ class RouterManager {
|
||||||
static const String reportHistoryPath = '/report_detail/report_history';
|
static const String reportHistoryPath = '/report_detail/report_history';
|
||||||
static const String registerPath = '/register/index';
|
static const String registerPath = '/register/index';
|
||||||
static const String logOffPath = '/mine/log_off';
|
static const String logOffPath = '/mine/log_off';
|
||||||
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();
|
||||||
|
|
@ -111,14 +103,18 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 启动页
|
// 启动页
|
||||||
static final _startUpPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
static final _startUpPageHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
|
||||||
// 主页
|
// 主页
|
||||||
static final _mainPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
static final _mainPageHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
|
||||||
// 登录页
|
// 登录页
|
||||||
static final _loginPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
static final _loginPageHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
|
||||||
// 阅卷进度页面
|
// 阅卷进度页面
|
||||||
static final _progressPageHandler = Handler(
|
static final _progressPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
||||||
|
Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
|
||||||
// 回评页面
|
// 回评页面
|
||||||
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int markingUserId = int.parse(params['markingUserId']![0]);
|
int markingUserId = int.parse(params['markingUserId']![0]);
|
||||||
|
|
@ -137,8 +133,11 @@ class RouterManager {
|
||||||
|
|
||||||
// 回评异常页面
|
// 回评异常页面
|
||||||
static final _reviewAbnormalPageHandler = Handler(
|
static final _reviewAbnormalPageHandler = Handler(
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => ProgressAbnormal(
|
||||||
ProgressAbnormal(int.parse(params['examSubjectId']![0]), params['markingId']![0], params['name']![0], params['questionNum']![0]));
|
int.parse(params['examSubjectId']![0]),
|
||||||
|
params['markingId']![0],
|
||||||
|
params['name']![0],
|
||||||
|
params['questionNum']![0]));
|
||||||
// 阅卷页面
|
// 阅卷页面
|
||||||
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -180,7 +179,8 @@ class RouterManager {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// 批阅作业页面
|
// 批阅作业页面
|
||||||
static final _markingHomeworkDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _markingHomeworkDoPageHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
try {
|
try {
|
||||||
int taskId = int.parse(params['taskId']![0]);
|
int taskId = int.parse(params['taskId']![0]);
|
||||||
int jobId = int.parse(params['jobId']![0]);
|
int jobId = int.parse(params['jobId']![0]);
|
||||||
|
|
@ -224,7 +224,8 @@ class RouterManager {
|
||||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
|
||||||
);
|
);
|
||||||
|
|
||||||
static final _reportClassTeacherPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
static final _reportClassTeacherPageHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
int examId = int.parse(params['examId']![0]);
|
int examId = int.parse(params['examId']![0]);
|
||||||
|
|
||||||
return ReportClassTeacher(examId: examId);
|
return ReportClassTeacher(examId: examId);
|
||||||
|
|
@ -312,16 +313,14 @@ class RouterManager {
|
||||||
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];
|
String title = params['title']![0];
|
||||||
String? page = params['page']?[0];
|
return JobPriorityReviewSet(groupId: groupId,title:title);
|
||||||
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);
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
//作业收藏页面
|
//作业收藏页面
|
||||||
|
|
@ -351,11 +350,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) {
|
||||||
|
|
@ -374,45 +368,13 @@ class RouterManager {
|
||||||
);
|
);
|
||||||
|
|
||||||
// 注册页
|
// 注册页
|
||||||
static final _registerPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const Register());
|
static final _registerPathHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const Register());
|
||||||
|
|
||||||
// 注销页
|
// 注销页
|
||||||
static final _logOffPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const LogOff());
|
static final _logOffPathHandler =
|
||||||
|
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const LogOff());
|
||||||
|
|
||||||
// 知识点掌握
|
|
||||||
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());
|
||||||
|
|
||||||
|
|
@ -430,22 +392,30 @@ class RouterManager {
|
||||||
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(markingHomeworkDoPath, handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
router.define(markingHomeworkDoPath,
|
||||||
router.define(markingReviewAbnormalPath, handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
||||||
|
router.define(markingReviewAbnormalPath,
|
||||||
|
handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
||||||
|
|
||||||
router.define(reportClassTeacherPath, handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
router.define(reportClassTeacherPath,
|
||||||
router.define(reportSubjectTeacherPath, handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportPersonalSubjectPath, handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
router.define(reportSubjectTeacherPath,
|
||||||
|
handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
||||||
|
router.define(reportPersonalSubjectPath,
|
||||||
|
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
|
||||||
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
||||||
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobListParticipateInClassPath, handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
router.define(jobListParticipateInClassPath,
|
||||||
|
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
router.define(quickCheckPersonalPath,
|
||||||
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||||
|
router.define(jobPriorityReviewSetPath,
|
||||||
|
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
||||||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||||
|
|
@ -453,11 +423,7 @@ class RouterManager {
|
||||||
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
||||||
router.define(registerPath, handler: _registerPathHandler,transitionType: TransitionType.material);
|
router.define(registerPath, handler: _registerPathHandler,transitionType: TransitionType.material);
|
||||||
router.define(logOffPath, handler: _logOffPathHandler,transitionType: TransitionType.material);
|
router.define(logOffPath, handler: _logOffPathHandler,transitionType: TransitionType.material);
|
||||||
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
// getTransition()
|
||||||
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);
|
|
||||||
|
|
||||||
router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||||
toPrint(val: "ROUTE WAS NOT FOUND !!!");
|
toPrint(val: "ROUTE WAS NOT FOUND !!!");
|
||||||
|
|
|
||||||
|
|
@ -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)); // 加上天数差减一,得到本周日的时间
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
|
||||||
|
|
||||||
part 'my_time_util.g.dart';
|
|
||||||
|
|
||||||
// 毫秒转小时、分钟、秒的函数
|
|
||||||
TimeUnitModel? convertMilliseconds(int milliseconds) {
|
|
||||||
try {
|
|
||||||
int hours = milliseconds ~/ (1000 * 60 * 60);
|
|
||||||
int minutes = (milliseconds % (1000 * 60 * 60)) ~/ (1000 * 60);
|
|
||||||
int seconds = (milliseconds % (1000 * 60)) ~/ 1000;
|
|
||||||
|
|
||||||
if ((milliseconds % 1000) > 500) seconds += 1;
|
|
||||||
|
|
||||||
return TimeUnitModel(hours, minutes, seconds);
|
|
||||||
} catch (e) {
|
|
||||||
print('时间转换报错');
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 毫秒转小时、分钟、秒的函数
|
|
||||||
TimeUnitModel? convertSeconds(int totalSeconds) {
|
|
||||||
try {
|
|
||||||
int hours = totalSeconds ~/ 3600; // 整除3600得到小时数
|
|
||||||
int remainingSeconds = totalSeconds % 3600; // 取模3600得到剩余的秒数
|
|
||||||
int minutes = remainingSeconds ~/ 60; // 整除60得到分钟数
|
|
||||||
int seconds = remainingSeconds % 60; // 取模60得到最终的秒数
|
|
||||||
|
|
||||||
return TimeUnitModel(hours, minutes, seconds);
|
|
||||||
} catch (e) {
|
|
||||||
print('时间转换报错');
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@JsonSerializable()
|
|
||||||
class TimeUnitModel extends Object {
|
|
||||||
int hours;
|
|
||||||
int minutes;
|
|
||||||
int seconds;
|
|
||||||
TimeUnitModel(this.hours, this.minutes, this.seconds);
|
|
||||||
|
|
||||||
factory TimeUnitModel.fromJson(Map<String, dynamic> srcJson) => _$TimeUnitModelFromJson(srcJson);
|
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$TimeUnitModelToJson(this);
|
|
||||||
|
|
||||||
@override
|
|
||||||
String toString() {
|
|
||||||
var timeStr = '';
|
|
||||||
if (hours > 0) {
|
|
||||||
timeStr += '${hours > 9 ? hours : '0' + hours.toString()} ';
|
|
||||||
}
|
|
||||||
if (minutes > 0) {
|
|
||||||
timeStr += '${minutes > 9 ? minutes : '0' + minutes.toString()}';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (timeStr.length > 0) {
|
|
||||||
timeStr += ':${seconds > 9 ? seconds : '0' + seconds.toString()}';
|
|
||||||
} else {
|
|
||||||
timeStr += '00:${seconds > 9 ? seconds : '0' + seconds.toString()}';
|
|
||||||
}
|
|
||||||
|
|
||||||
return timeStr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -18,11 +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_handwriting.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';
|
||||||
|
|
@ -36,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';
|
||||||
|
|
@ -75,7 +73,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 最新版本
|
// 最新版本
|
||||||
@the_retrofit.GET("/api/version/latest?mobileTypeEnum={mobileTypeEnum}")
|
@the_retrofit.GET("/api/version/latest?mobileTypeEnum={mobileTypeEnum}")
|
||||||
Future<BaseStructureResult<SystemVersion>> getLatestVersion(@the_retrofit.Path("mobileTypeEnum") int mobileTypeEnum); // 1 安卓 2 ios
|
Future<BaseStructureResult<SystemVersion>> getLatestVersion(
|
||||||
|
@the_retrofit.Path("mobileTypeEnum") int mobileTypeEnum); // 1 安卓 2 ios
|
||||||
|
|
||||||
// 用户登录 /auth/login/exam-marking/user-mobile
|
// 用户登录 /auth/login/exam-marking/user-mobile
|
||||||
@the_retrofit.POST("/auth/login/exam-marking/user")
|
@the_retrofit.POST("/auth/login/exam-marking/user")
|
||||||
|
|
@ -91,7 +90,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 阅卷列表 => 分页获取
|
// 阅卷列表 => 分页获取
|
||||||
@the_retrofit.GET("/api/marking/list")
|
@the_retrofit.GET("/api/marking/list")
|
||||||
Future<BaseStructureResult<BasePageData<MarkingItem>>> getMarkingsByPage(@the_retrofit.Queries() MarkingListParams params);
|
Future<BaseStructureResult<BasePageData<MarkingItem>>> getMarkingsByPage(
|
||||||
|
@the_retrofit.Queries() MarkingListParams params);
|
||||||
|
|
||||||
// /api/marking/list
|
// /api/marking/list
|
||||||
|
|
||||||
|
|
@ -116,11 +116,13 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 阅卷 => 获取考试试题
|
// 阅卷 => 获取考试试题
|
||||||
@the_retrofit.GET("/api/marking/question")
|
@the_retrofit.GET("/api/marking/question")
|
||||||
Future<BaseStructureResult<MarkingTextQuestion>> getTestQuestionsOfExam(@the_retrofit.Queries() MarkingTextQuestionParams params);
|
Future<BaseStructureResult<MarkingTextQuestion>> getTestQuestionsOfExam(
|
||||||
|
@the_retrofit.Queries() MarkingTextQuestionParams params);
|
||||||
|
|
||||||
// 阅卷 => 获取考试tab(试题批次)
|
// 阅卷 => 获取考试tab(试题批次)
|
||||||
@the_retrofit.GET("/api/marking/{markingUserId}/tab")
|
@the_retrofit.GET("/api/marking/{markingUserId}/tab")
|
||||||
Future<BaseStructureResult<List<MarkingTextQuestionTab>>> getTestQuestionsOfTab(@the_retrofit.Path("markingUserId") int markingUserId);
|
Future<BaseStructureResult<List<MarkingTextQuestionTab>>> getTestQuestionsOfTab(
|
||||||
|
@the_retrofit.Path("markingUserId") int markingUserId);
|
||||||
|
|
||||||
// 阅卷 => 单个试题Tag阅卷详情
|
// 阅卷 => 单个试题Tag阅卷详情
|
||||||
@the_retrofit.GET("/api/marking/{markingUserId}/progress")
|
@the_retrofit.GET("/api/marking/{markingUserId}/progress")
|
||||||
|
|
@ -134,15 +136,16 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 阅卷 => 获取考试tab下某次试题
|
// 阅卷 => 获取考试tab下某次试题
|
||||||
@the_retrofit.GET("/api/marking/{markingUserId}/detail")
|
@the_retrofit.GET("/api/marking/{markingUserId}/detail")
|
||||||
Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(
|
Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(@the_retrofit.Path("markingUserId") int markingUserId,
|
||||||
@the_retrofit.Path("markingUserId") int markingUserId, @the_retrofit.Queries() MarkingTextQuestionTabParams params);
|
@the_retrofit.Queries() MarkingTextQuestionTabParams params);
|
||||||
|
|
||||||
// 阅卷 => 提交考试试题
|
// 阅卷 => 提交考试试题
|
||||||
@the_retrofit.PUT("/api/marking")
|
@the_retrofit.PUT("/api/marking")
|
||||||
Future<BaseStructureResult<bool>> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params);
|
Future<BaseStructureResult<bool>> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params);
|
||||||
|
|
||||||
@the_retrofit.PUT("/api/marking/error")
|
@the_retrofit.PUT("/api/marking/error")
|
||||||
Future<BaseStructureResult<bool>> submitTestQuestionsOfExamAbnormal(@the_retrofit.Body() SubmitExamAbnormalParams params);
|
Future<BaseStructureResult<bool>> submitTestQuestionsOfExamAbnormal(
|
||||||
|
@the_retrofit.Body() SubmitExamAbnormalParams params);
|
||||||
|
|
||||||
// 阅卷 => 提交考试试题
|
// 阅卷 => 提交考试试题
|
||||||
@the_retrofit.PUT("/api/marking/review")
|
@the_retrofit.PUT("/api/marking/review")
|
||||||
|
|
@ -154,7 +157,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 阅卷 => 结束阅卷
|
// 阅卷 => 结束阅卷
|
||||||
@the_retrofit.GET("/api/marking/original-paper")
|
@the_retrofit.GET("/api/marking/original-paper")
|
||||||
Future<BaseStructureResult<List<String>>> getViewOriginalVolume(@the_retrofit.Query("markingUserDetailId") String markingUserDetailId);
|
Future<BaseStructureResult<List<String>>> getViewOriginalVolume(
|
||||||
|
@the_retrofit.Query("markingUserDetailId") String markingUserDetailId);
|
||||||
|
|
||||||
// 阅卷 => 查看答案
|
// 阅卷 => 查看答案
|
||||||
@the_retrofit.GET("/api/marking/answer")
|
@the_retrofit.GET("/api/marking/answer")
|
||||||
|
|
@ -180,21 +184,25 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 阅卷 => 获取异常详细信息
|
// 阅卷 => 获取异常详细信息
|
||||||
@the_retrofit.GET("/api/marking/error-info")
|
@the_retrofit.GET("/api/marking/error-info")
|
||||||
Future<BaseStructureResult<ExceptionInfo>> getMarkingQuestionsErrorInfo(@the_retrofit.Query("markingUserDetailId") int id);
|
Future<BaseStructureResult<ExceptionInfo>> getMarkingQuestionsErrorInfo(
|
||||||
|
@the_retrofit.Query("markingUserDetailId") int id);
|
||||||
|
|
||||||
// 阅卷 => 获取仲裁详细信息
|
// 阅卷 => 获取仲裁详细信息
|
||||||
@the_retrofit.GET("/api/marking/history-score")
|
@the_retrofit.GET("/api/marking/history-score")
|
||||||
Future<BaseStructureResult<List<HistoricalScoring>>> getArbitrateOfHistoryScore(@the_retrofit.Query("markingUserDetailId") int id);
|
Future<BaseStructureResult<List<HistoricalScoring>>> getArbitrateOfHistoryScore(
|
||||||
|
@the_retrofit.Query("markingUserDetailId") int id);
|
||||||
|
|
||||||
// 阅卷 => 获取仲裁详细信息
|
// 阅卷 => 获取仲裁详细信息
|
||||||
@the_retrofit.GET("/api/marking/rating-info")
|
@the_retrofit.GET("/api/marking/rating-info")
|
||||||
Future<BaseStructureResult<List<RatingProgressModel>>> getMarkingRatingInfo(@the_retrofit.Query("markingUserId") int id);
|
Future<BaseStructureResult<List<RatingProgressModel>>> getMarkingRatingInfo(
|
||||||
|
@the_retrofit.Query("markingUserId") int id);
|
||||||
|
|
||||||
// ------------------------------------------ 作业 ------------------------------------------
|
// ------------------------------------------ 作业 ------------------------------------------
|
||||||
|
|
||||||
// 作业 => 作业列表
|
// 作业 => 作业列表
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task")
|
||||||
Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage(@the_retrofit.Queries() MarkingListParams params);
|
Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage(
|
||||||
|
@the_retrofit.Queries() MarkingListParams params);
|
||||||
|
|
||||||
// 作业 => 批改获取tabs
|
// 作业 => 批改获取tabs
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs")
|
||||||
|
|
@ -202,11 +210,13 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 批改获取tabs
|
// 作业 => 批改获取tabs
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/students")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/students")
|
||||||
Future<BaseStructureResult<List<JobConcernedWithStudent>>> getJobWithStudents(@the_retrofit.Queries() JobConcernedWithStudentParams params);
|
Future<BaseStructureResult<List<JobConcernedWithStudent>>> getJobWithStudents(
|
||||||
|
@the_retrofit.Queries() JobConcernedWithStudentParams params);
|
||||||
|
|
||||||
// 作业 => 获取考试tab下某次试题
|
// 作业 => 获取考试tab下某次试题
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/detail")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/detail")
|
||||||
Future<BaseStructureResult<MarkingTextQuestionJob>> getJobTabOfExam(@the_retrofit.Queries() MarkingTextQuestionJobTabParams params);
|
Future<BaseStructureResult<MarkingTextQuestionJob>> getJobTabOfExam(
|
||||||
|
@the_retrofit.Queries() MarkingTextQuestionJobTabParams params);
|
||||||
|
|
||||||
// 作业 => 提交
|
// 作业 => 提交
|
||||||
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Task")
|
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Task")
|
||||||
|
|
@ -218,7 +228,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 获取考试tab下某次试题
|
// 作业 => 获取考试tab下某次试题
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/questions")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/questions")
|
||||||
Future<BaseStructureResult<BasePageData<ReviewItem>>> toGoreviewAgainPage(@the_retrofit.Queries() ReviewAgainListParams params);
|
Future<BaseStructureResult<BasePageData<ReviewItem>>> toGoreviewAgainPage(
|
||||||
|
@the_retrofit.Queries() ReviewAgainListParams params);
|
||||||
|
|
||||||
// 作业 => 获取参考答案
|
// 作业 => 获取参考答案
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/answer")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/answer")
|
||||||
|
|
@ -229,7 +240,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 上传图片请求参数
|
// 作业 => 上传图片请求参数
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Upload")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Upload")
|
||||||
Future<BaseStructureResult<UploadFileInterfaceConfig>> getUploadFile(@the_retrofit.Queries() UploadFileInterfaceConfigParams params);
|
Future<BaseStructureResult<UploadFileInterfaceConfig>> getUploadFile(
|
||||||
|
@the_retrofit.Queries() UploadFileInterfaceConfigParams params);
|
||||||
|
|
||||||
// 作业 => 获取参考答案
|
// 作业 => 获取参考答案
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/studentAnswerHandwriting")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/studentAnswerHandwriting")
|
||||||
|
|
@ -238,16 +250,18 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 查询作业是否收藏
|
// 作业 => 查询作业是否收藏
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
||||||
Future<BaseStructureResult<bool>> getJobCollect(
|
Future<BaseStructureResult<bool>> getJobCollect(@the_retrofit.Query("taskId") int taskId,
|
||||||
@the_retrofit.Query("taskId") int taskId, @the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
@the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
||||||
|
|
||||||
// 作业 => 作业优先批阅取消
|
// 作业 => 作业优先批阅取消
|
||||||
@the_retrofit.POST("/api/read/cancel-job-read-level")
|
@the_retrofit.POST("/api/read/cancel-job-read-level")
|
||||||
Future<BaseStructureResult<bool>> jobPriorityReviewCancel(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
|
Future<BaseStructureResult<bool>> jobPriorityReviewCancel(
|
||||||
|
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
|
||||||
|
|
||||||
// 作业 => 作业优先批阅加入
|
// 作业 => 作业优先批阅加入
|
||||||
@the_retrofit.POST("/api/read/join-read-level")
|
@the_retrofit.POST("/api/read/join-read-level")
|
||||||
Future<BaseStructureResult> jobPriorityReviewJoin(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
|
Future<BaseStructureResult> jobPriorityReviewJoin(
|
||||||
|
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
|
||||||
|
|
||||||
// 作业 => 查询作业是否收藏
|
// 作业 => 查询作业是否收藏
|
||||||
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
||||||
|
|
@ -282,11 +296,13 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 列表 ==> 参与班级列表
|
// 作业 => 列表 ==> 参与班级列表
|
||||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks")
|
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks")
|
||||||
Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass(@the_retrofit.Query("markingId") int jobId);
|
Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass(
|
||||||
|
@the_retrofit.Query("markingId") int jobId);
|
||||||
|
|
||||||
// 作业 => 作业收藏数量
|
// 作业 => 作业收藏数量
|
||||||
@the_retrofit.GET("/dpc-api/api/read/job-favorite-count-by-class")
|
@the_retrofit.GET("/dpc-api/api/read/job-favorite-count-by-class")
|
||||||
Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavoriteNumber(@the_retrofit.Query("jobid") int jobId);
|
Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavoriteNumber(
|
||||||
|
@the_retrofit.Query("jobid") int jobId);
|
||||||
|
|
||||||
// 作业 => 作业收藏列表
|
// 作业 => 作业收藏列表
|
||||||
@the_retrofit.GET("/api/jobs/fav-student-jobs")
|
@the_retrofit.GET("/api/jobs/fav-student-jobs")
|
||||||
|
|
@ -299,11 +315,13 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 作业收藏列表
|
// 作业 => 作业收藏列表
|
||||||
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/cancel-favorite")
|
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/cancel-favorite")
|
||||||
Future<BaseStructureResult<bool>> toJobCancelFavorite(@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId);
|
Future<BaseStructureResult<bool>> toJobCancelFavorite(
|
||||||
|
@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId);
|
||||||
|
|
||||||
// 作业 => 数据快查
|
// 作业 => 数据快查
|
||||||
@the_retrofit.GET("/api/read/job-data-center-report")
|
@the_retrofit.GET("/api/read/job-data-center-report")
|
||||||
Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(@the_retrofit.Queries() Map<String, dynamic> params);
|
Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(
|
||||||
|
@the_retrofit.Queries() Map<String, dynamic> params);
|
||||||
|
|
||||||
// 作业 => 数据快查--个人
|
// 作业 => 数据快查--个人
|
||||||
@the_retrofit.GET("/api/read/job-data-center-student-report")
|
@the_retrofit.GET("/api/read/job-data-center-student-report")
|
||||||
|
|
@ -311,7 +329,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 优先批阅,学生分组列表
|
// 作业 => 优先批阅,学生分组列表
|
||||||
@the_retrofit.GET("/api/read/job-read-level-student-groups")
|
@the_retrofit.GET("/api/read/job-read-level-student-groups")
|
||||||
Future<BaseStructureResult<List<JobStudentGroups>>> getJobLevelStudentGroups(@the_retrofit.Query("account") String account);
|
Future<BaseStructureResult<List<JobStudentGroups>>> getJobLevelStudentGroups(
|
||||||
|
@the_retrofit.Query("account") String account);
|
||||||
|
|
||||||
// 作业 => 优先批阅,优先批阅列表
|
// 作业 => 优先批阅,优先批阅列表
|
||||||
@the_retrofit.GET("/api/read/job-read-level")
|
@the_retrofit.GET("/api/read/job-read-level")
|
||||||
|
|
@ -324,8 +343,8 @@ abstract class RestClient {
|
||||||
|
|
||||||
// 作业 => 取消收藏
|
// 作业 => 取消收藏
|
||||||
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
||||||
Future<BaseStructureResult> getJobDeFavorites(
|
Future<BaseStructureResult> getJobDeFavorites(@the_retrofit.Field("jobId") int jobId,
|
||||||
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
@the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
||||||
|
|
||||||
// 作业 => 学生作业详情历史
|
// 作业 => 学生作业详情历史
|
||||||
@the_retrofit.GET("/api/read/student-job-history")
|
@the_retrofit.GET("/api/read/student-job-history")
|
||||||
|
|
@ -338,42 +357,6 @@ 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,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 作业 => 获取学生原稿笔记
|
|
||||||
@the_retrofit.GET("/api/jobs/student-paper-handwriting")
|
|
||||||
Future<BaseStructureResult<JobHandwriting>?> getHandwriting(
|
|
||||||
@the_retrofit.Query("jobId") int jobId,
|
|
||||||
@the_retrofit.Query("studentId") int studentId,
|
|
||||||
@the_retrofit.Query("questionNo") int? questionNo,
|
|
||||||
@the_retrofit.Query("pageNum") int? pageNum,
|
|
||||||
);
|
|
||||||
|
|
||||||
// 注册
|
// 注册
|
||||||
@the_retrofit.POST("/auth/login/reg")
|
@the_retrofit.POST("/auth/login/reg")
|
||||||
Future<BaseStructureResult<dynamic>> toRegister(@the_retrofit.Body() UserLoginParams params);
|
Future<BaseStructureResult<dynamic>> toRegister(@the_retrofit.Body() UserLoginParams params);
|
||||||
|
|
@ -389,4 +372,5 @@ abstract class RestClient {
|
||||||
// 注销账号
|
// 注销账号
|
||||||
@the_retrofit.POST("/auth/login/lg")
|
@the_retrofit.POST("/auth/login/lg")
|
||||||
Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName);
|
Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||