Compare commits
38 Commits
8d1de06f14
...
a636819fda
| Author | SHA1 | Date |
|---|---|---|
|
|
a636819fda | |
|
|
89e15ba672 | |
|
|
8ab319c32e | |
|
|
17738ff29e | |
|
|
919f71f28b | |
|
|
3666bea6bd | |
|
|
3a6e220f5e | |
|
|
23bd9501ff | |
|
|
8c10e6eb4d | |
|
|
aa9dd3d83c | |
|
|
1fbb102370 | |
|
|
a759583ca0 | |
|
|
0c3b3f8719 | |
|
|
8b4f38558f | |
|
|
1494e69b56 | |
|
|
fbebdbc428 | |
|
|
491cad7955 | |
|
|
1697f59d43 | |
|
|
dd033fd20f | |
|
|
21183f11bc | |
|
|
0c54c16865 | |
|
|
d9adbe845b | |
|
|
4c78d903a1 | |
|
|
727c774ea0 | |
|
|
4e812bc5c0 | |
|
|
6e2010a7cc | |
|
|
42d2e4ab39 | |
|
|
994ca04988 | |
|
|
e22d5f2655 | |
|
|
326a2fe99e | |
|
|
5cdf645f86 | |
|
|
7e3c6882e9 | |
|
|
794e4d6cbe | |
|
|
991ec9310e | |
|
|
f63c1ea678 | |
|
|
74c8148305 | |
|
|
ee41ad7d1b | |
|
|
5a43ccffcf |
|
|
@ -214,4 +214,16 @@ marking_app/lib/pages/homework_correction/job_personal_detail.g.dart
|
|||
marking_app/lib/common/model/event_bus/jobs/job_do_papers_submit_check_switch_bus.g.dart
|
||||
marking_app/lib/common/model/event_bus/jobs/job_do_synchro_tab.g.dart
|
||||
marking_app/lib/pages/homework_correction/widget/top_count.g.dart
|
||||
marking_app/lib/common/model/event_bus/job_home_refresh_bus.g.dart
|
||||
marking_app/lib/common/model/job/job_knowledge_points_detail.g.dart
|
||||
marking_app/lib/common/model/job/job_knowledge_points.g.dart
|
||||
marking_app/lib/pages/homework_correction/job_knowledge_points.g.dart
|
||||
marking_app/lib/pages/homework_correction/job_knowledge_points_detail.g.dart
|
||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
||||
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
|
||||
marking_app/lib/pages/homework_correction/job_home.g.dart
|
||||
marking_app/lib/common/model/marking/keyboard_assist_event.g.dart
|
||||
marking_app/lib/common/model/marking/marking_history_zoom_info.g.dart
|
||||
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
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 467 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 34 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 724 KiB |
|
After Width: | Height: | Size: 30 KiB |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 286 B |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 293 B |
|
|
@ -0,0 +1,12 @@
|
|||
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,11 +14,30 @@ class GestureRecording {
|
|||
|
||||
bool scopeBox;
|
||||
|
||||
int intervalTime; // 间隔时间
|
||||
|
||||
GestureRecording({
|
||||
required this.eraser,
|
||||
required this.annotationSwitch,
|
||||
this.data,
|
||||
this.usageTime,
|
||||
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,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,48 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
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,12 +36,7 @@ class TestQuestionsImageInfo extends Object {
|
|||
double? imageHeightOffsetend;
|
||||
|
||||
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('图片高度:$height');
|
||||
|
||||
|
|
@ -60,6 +55,14 @@ 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);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
// 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,
|
||||
};
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
// 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()
|
||||
class MarkingListParams extends BasePage {
|
||||
@JsonKey(name: 'isFinish')
|
||||
bool isFinish;
|
||||
bool? isFinish;
|
||||
|
||||
// 阅卷类型
|
||||
@JsonKey(name: 'PageType')
|
||||
|
|
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
|
|||
int? markingType; // 1 作业 2考试
|
||||
|
||||
MarkingListParams({
|
||||
required this.isFinish,
|
||||
this.isFinish,
|
||||
required this.pageType,
|
||||
required page,
|
||||
required limit,
|
||||
|
|
|
|||
|
|
@ -24,8 +24,7 @@ void main() {
|
|||
WidgetsFlutterBinding.ensureInitialized();
|
||||
RouterManager.initRouter();
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏
|
||||
// OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values);
|
||||
|
||||
|
|
@ -81,7 +80,7 @@ class _MyAppState extends State<MyApp> {
|
|||
splitScreenMode: true,
|
||||
builder: (context1, child) {
|
||||
return MaterialApp(
|
||||
title: '远轩阅卷系统',
|
||||
title: '学而有道阅卷',
|
||||
navigatorKey: TheGlobal.navigatorKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,249 @@
|
|||
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)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,291 @@
|
|||
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(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
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,12 +21,7 @@ class TrajectoryView extends StatefulHookConsumerWidget {
|
|||
final double boxHeight;
|
||||
final String questionNumber;
|
||||
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
|
||||
TrajectoryViewState createState() => TrajectoryViewState();
|
||||
|
|
@ -152,15 +147,11 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
|
||||
/// 试题范围框左上角
|
||||
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(
|
||||
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(
|
||||
|
|
@ -171,8 +162,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
|
||||
/// 右下角
|
||||
..add(GestureRecording(
|
||||
data: Offset(
|
||||
imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
||||
scopeBox: true,
|
||||
annotationSwitch: false,
|
||||
eraser: false));
|
||||
|
|
@ -181,14 +171,26 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys);
|
||||
});
|
||||
if (lattices.isNotEmpty) {
|
||||
Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
||||
key: (key) => key.stroke,
|
||||
value: (value) {
|
||||
return lattices.where((item) => item.stroke == value.stroke).toList()
|
||||
..sort((a, b) => a.time.compareTo(b.time));
|
||||
});
|
||||
// Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
||||
// key: (key) => key.stroke,
|
||||
// value: (value) {
|
||||
// return lattices.where((item) => item.stroke == value.stroke).toList()
|
||||
// ..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();
|
||||
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++) {
|
||||
int theKey = keys[i];
|
||||
int? nextKey = i + 1 < keys.length ? keys[i + 1] : null;
|
||||
|
|
@ -199,8 +201,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
double theX = e.x * imagInfoModel!.scale!;
|
||||
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()
|
||||
..add(GestureRecording(eraser: false, annotationSwitch: false));
|
||||
// 原始轨迹展示
|
||||
|
|
@ -230,8 +231,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
if (duration2 == null && nextStrokesData != null) {
|
||||
// 此时最后一个笔画完成了 停止时间是在下一个笔画开始时间之差
|
||||
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)); // 一个笔画完成进行下一个笔画的等待时间
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -290,7 +290,11 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
|||
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
||||
var _pageIndex = _currentTab?.pageIndex;
|
||||
if (_currentTab == null || _pageIndex == null) return;
|
||||
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
|
||||
|
||||
var theLastQuestion = _currentTab.finishCount + 1 == _currentTab.total; // 当前提交的题是最后一题
|
||||
_useSwitchStudentAndType
|
||||
.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: theLastQuestion)
|
||||
.then((value) {
|
||||
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
|
||||
if (_currentTab.finishCount < _currentTab.total) {
|
||||
if (_currentTab.finishCount + 1 == _currentTab.total) {
|
||||
|
|
@ -366,37 +370,55 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
|||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: DropdownButton(
|
||||
onTap: () {
|
||||
// 打开的时候请求刷新学生
|
||||
_useSwitchStudentAndType.getDataForStudents(taskId: taskId);
|
||||
},
|
||||
padding: EdgeInsets.only(right: 4.w),
|
||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
||||
value: _useSwitchStudentAndType.currentStudent.value?.studentId,
|
||||
underline: Container(),
|
||||
isExpanded: true,
|
||||
items: _useSwitchStudentAndType.studentData.value.map((e) {
|
||||
return DropdownMenuItem(
|
||||
child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp),
|
||||
value: e.studentId,
|
||||
);
|
||||
}).toList(),
|
||||
hint: Text('请选择学生'), // 锚点的显示文本
|
||||
onChanged: (value) {
|
||||
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
|
||||
if (currentStudent?.studentId == value) return;
|
||||
_useSwitchStudentAndType.studentBusInfo.value = null; // 置空BUS通知记录
|
||||
_useSwitchStudentAndType.currentStudent.value =
|
||||
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value);
|
||||
},
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: DropdownButton(
|
||||
onTap: () {
|
||||
// 打开的时候请求刷新学生
|
||||
_useSwitchStudentAndType.getDataForStudents(taskId: taskId);
|
||||
},
|
||||
padding: EdgeInsets.only(right: 4.w),
|
||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
||||
value: _useSwitchStudentAndType.currentStudent.value?.studentId,
|
||||
underline: Container(),
|
||||
isExpanded: true,
|
||||
items: _useSwitchStudentAndType.studentData.value.map((e) {
|
||||
return DropdownMenuItem(
|
||||
child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp),
|
||||
value: e.studentId,
|
||||
);
|
||||
}).toList(),
|
||||
hint: Text('请选择学生'), // 锚点的显示文本
|
||||
onChanged: (value) {
|
||||
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
|
||||
if (currentStudent?.studentId == value) return;
|
||||
_useSwitchStudentAndType.studentBusInfo.value = null; // 置空BUS通知记录
|
||||
_useSwitchStudentAndType.currentStudent.value =
|
||||
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value);
|
||||
},
|
||||
),
|
||||
),
|
||||
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()),
|
||||
|
|
@ -458,17 +480,6 @@ 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),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -852,16 +863,15 @@ Widget $examPaperAndScoringKeyboardView(
|
|||
],
|
||||
),
|
||||
),
|
||||
if (question.accuracy > 0)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||
child: quickText(
|
||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
||||
size: 8.sp,
|
||||
color: Colors.white,
|
||||
align: TextAlign.end,
|
||||
),
|
||||
)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||
child: quickText(
|
||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
||||
size: 8.sp,
|
||||
color: Colors.white,
|
||||
align: TextAlign.end,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
|||
return tabJob;
|
||||
}
|
||||
}
|
||||
ToastUtils.showSuccess('最后一题提交成功');
|
||||
// ToastUtils.showSuccess('最后一题提交成功');
|
||||
}
|
||||
return tabJob;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
* @Description: 阅卷主页
|
||||
*/
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
|
|
@ -16,7 +18,9 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
|
|||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.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/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/provider/review_provider.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
|
|
@ -40,14 +44,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
|
|||
}
|
||||
|
||||
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
||||
with
|
||||
CommonMixin,
|
||||
TickerProviderStateMixin,
|
||||
RefreshDataHandle<JobTaskItem, MarkingListParams>,
|
||||
AutomaticKeepAliveClientMixin {
|
||||
@override
|
||||
bool get wantKeepAlive => true;
|
||||
|
||||
with CommonMixin, EventBusMixin, TickerProviderStateMixin, RefreshDataHandle<JobTaskItem, MarkingListParams> {
|
||||
/* Tab控制器 */
|
||||
late TabController _tabController;
|
||||
late TabController _tabController2;
|
||||
|
|
@ -127,6 +124,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
_tabController.dispose();
|
||||
_refreshController1.dispose();
|
||||
_refreshController2.dispose();
|
||||
eventCancel();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
|
|
@ -152,8 +150,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
super.build(context); //调用super.build(返回值始终返回null,应将其忽略)
|
||||
|
||||
return AnnotatedRegion(
|
||||
value: const SystemUiOverlayStyle(
|
||||
systemNavigationBarColor: Color(0xFF000000),
|
||||
|
|
@ -176,7 +172,19 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
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(
|
||||
flex: 4,
|
||||
child: Container(
|
||||
|
|
@ -226,9 +234,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
child: quickText(
|
||||
'待批阅',
|
||||
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,
|
||||
),
|
||||
),
|
||||
|
|
@ -246,9 +252,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
child: quickText(
|
||||
'已批阅',
|
||||
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,
|
||||
),
|
||||
),
|
||||
|
|
@ -257,32 +261,10 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
),
|
||||
),
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
/* Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: (){
|
||||
|
||||
},
|
||||
child: Text('历史作业'),
|
||||
),
|
||||
],
|
||||
),*/
|
||||
|
||||
if (_tabIndex == 1)
|
||||
$CompletedJobConditionFilter(
|
||||
controller: _tabController2,
|
||||
|
|
@ -317,6 +299,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
data: markingDatas1,
|
||||
onLoad: onMyLoad,
|
||||
onRefresh: onMyRefresh,
|
||||
eventFire: () {
|
||||
eventFire(model: JobHomeRefreshBus());
|
||||
},
|
||||
),
|
||||
$EasyRefresh(
|
||||
controller: _refreshController2,
|
||||
|
|
@ -325,6 +310,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
data: markingDatas2,
|
||||
onLoad: onMyLoad,
|
||||
onRefresh: onMyRefresh,
|
||||
eventFire: () {
|
||||
eventFire(model: JobHomeRefreshBus());
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
@ -346,6 +334,7 @@ Widget $easyRefresh({
|
|||
required EasyRefreshController controller,
|
||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
|
||||
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
|
||||
required Function eventFire,
|
||||
required MarkingListParams params,
|
||||
required List<JobTaskItem> data,
|
||||
required int tab,
|
||||
|
|
@ -378,7 +367,10 @@ Widget $easyRefresh({
|
|||
return HomeworkTasksViewItem(
|
||||
completed: completed,
|
||||
jobTaskItem: data[index],
|
||||
call: () => controller.callRefresh(),
|
||||
call: () {
|
||||
controller.callRefresh();
|
||||
eventFire();
|
||||
},
|
||||
);
|
||||
},
|
||||
itemCount: data.length,
|
||||
|
|
@ -426,9 +418,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.only(left: 2.w),
|
||||
decoration: BoxDecoration(
|
||||
color: jobTaskItem.markingTypeEnum.name == '作业'
|
||||
? const Color.fromRGBO(104, 136, 253, 1)
|
||||
: const Color.fromRGBO(255, 175, 56, 1),
|
||||
color: jobTaskItem.markingTypeEnum.name == '作业' ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(14.r),
|
||||
topRight: Radius.circular(3.r),
|
||||
|
|
@ -489,8 +479,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
|
|||
onTap: () => easyThrottle('go_to_homework_report', () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.jobReportPagePath +
|
||||
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||
RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
}),
|
||||
|
|
@ -533,8 +522,7 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
|
|||
if (customTime.endDate != null) {
|
||||
// print(customTime.startDate!.year == customTime.endDate!.year);
|
||||
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
|
||||
customTimeStr =
|
||||
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||
customTimeStr = customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
|
||||
} else {
|
||||
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,265 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,486 @@
|
|||
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),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -0,0 +1,465 @@
|
|||
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,6 +60,7 @@ class _JobPersonalDetailState extends State<JobPersonalDetail> with CommonMixin,
|
|||
}
|
||||
|
||||
void getList() async {
|
||||
print(widget.studentId);
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<JobStudentHistory> res =
|
||||
await _client.getStudentJobHistory(widget.studentId, !isJob, startDataTime, endDataTime, page, pageSize);
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ import 'package:marking_app/utils/request/rest_client.dart';
|
|||
class JobPriorityReviewSet extends StatefulWidget {
|
||||
final String groupId;
|
||||
final String title;
|
||||
final String? page;
|
||||
|
||||
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title})
|
||||
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -207,8 +208,27 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
item.readLevel == 1
|
||||
? InkWell(
|
||||
|
||||
widget.page == 'answerTrajectory'?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))),
|
||||
)):widget.page == 'history'?Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
): item.readLevel == 1
|
||||
?
|
||||
InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isClicking = true;
|
||||
|
|
@ -218,7 +238,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
child:Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -246,7 +266,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
:InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
isClicking = true;
|
||||
|
|
@ -256,7 +276,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -284,34 +304,6 @@ 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)),
|
||||
),
|
||||
),
|
||||
),
|
||||
)*/
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -346,7 +338,24 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
|
|||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
item.readLevel == 1
|
||||
widget.page == 'answerTrajectory'?Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
|
||||
),
|
||||
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
|
||||
)):widget.page == 'history'?Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r))
|
||||
),
|
||||
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
|
||||
):item.readLevel == 1
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
|
|
@ -420,34 +429,6 @@ 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,6 +9,7 @@ import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
|||
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||
import 'package:marking_app/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/top_count.dart';
|
||||
import 'package:marking_app/pages/mainPage.dart';
|
||||
|
|
@ -1445,7 +1446,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
|||
// return;
|
||||
// }
|
||||
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
|
||||
Navigator.push(
|
||||
/* Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
|
|
@ -1453,7 +1454,8 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
|||
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
|
||||
);
|
||||
}),
|
||||
);
|
||||
);*/
|
||||
ImageDialog.showImgDialog(context,_qpm.questionPicture!);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ import 'package:marking_app/utils/index.dart';
|
|||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class JobStudentGroup extends StatefulWidget {
|
||||
const JobStudentGroup({Key? key}) : super(key: key);
|
||||
final String page;
|
||||
const JobStudentGroup({Key? key,required this.page}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<JobStudentGroup> createState() => _JobStudentGroupState();
|
||||
|
|
@ -59,7 +60,7 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
|
|||
}
|
||||
|
||||
void goNextPage(id,title){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition());
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition());
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
/// 原稿作业回显
|
||||
// 回显批注轨迹
|
||||
|
||||
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,6 +1,7 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.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/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
|
|
@ -8,24 +9,23 @@ 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_zg_table.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/toast_utils.dart';
|
||||
|
||||
class QuickCheckPersonal extends StatefulWidget {
|
||||
import 'providers/handwriting_drawing_trajectory_provider.dart';
|
||||
import 'widget/answer_handwriting.dart';
|
||||
|
||||
class QuickCheckPersonal extends StatefulHookConsumerWidget {
|
||||
final int jobId;
|
||||
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
|
||||
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||
ConsumerState<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||
}
|
||||
|
||||
class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
||||
with CommonMixin {
|
||||
class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with CommonMixin {
|
||||
StudentDetails? studentInfo;
|
||||
|
||||
void initState() {
|
||||
|
|
@ -40,18 +40,16 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
params['jobid'] = widget.jobId;
|
||||
// params['jobid'] = '521646983660101';
|
||||
params['studentId'] = widget.studentId;
|
||||
BaseStructureResult<StudentDetails?> data =
|
||||
await _client.getJobPersonalReport(params);
|
||||
if(data.data!.studentId != null){
|
||||
BaseStructureResult<StudentDetails?> data = await _client.getJobPersonalReport(params);
|
||||
if (data.data!.studentId != null) {
|
||||
setState(() {
|
||||
studentInfo = data.data;
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
Navigator.pop(context);
|
||||
ToastUtils.showError('暂无数据');
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -74,7 +72,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
),
|
||||
actions: [
|
||||
ReturnToHomepage(),
|
||||
/* Title(
|
||||
/* Title(
|
||||
color: Color(0xFF6888FD),
|
||||
child: Container(
|
||||
child: InkWell(
|
||||
|
|
@ -89,20 +87,19 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
alignment: Alignment.center,
|
||||
),
|
||||
),*/
|
||||
|
||||
],
|
||||
),
|
||||
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 14.r,left: 14.r),
|
||||
padding: EdgeInsets.only(top: 14.r, left: 14.r),
|
||||
child: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}');
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(context,
|
||||
'${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}');
|
||||
},
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
|
|
@ -112,22 +109,37 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('历史查询',style: TextStyle(fontSize: 10.r,color: Color(0xFF2080F7)),),
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(width: 10.r,),
|
||||
/*Container(
|
||||
width: 93.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFEDFFF7),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
SizedBox(
|
||||
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,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFEDFFF7),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'原稿笔迹',
|
||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('原稿笔迹',style: TextStyle(fontSize: 10.r,color: Color(0xFF4CC793)),),
|
||||
),
|
||||
),*/
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -147,31 +159,38 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
children: [
|
||||
Text(
|
||||
'客观题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Text(
|
||||
'${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(height: 10.r,),
|
||||
SizedBox(
|
||||
height: studentInfo!.kgDetails.length>8?300.r:studentInfo!.kgDetails.length * 40.r + 40.r,
|
||||
height: 10.r,
|
||||
),
|
||||
SizedBox(
|
||||
height: studentInfo!.kgDetails.length > 8 ? 300.r : studentInfo!.kgDetails.length * 40.r + 40.r,
|
||||
child: StudentKgTable(
|
||||
headList: ['题号', '学生答案', '标准答案'],
|
||||
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(height: 15.r,),
|
||||
SizedBox(
|
||||
height: 15.r,
|
||||
),
|
||||
//主观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
|
|
@ -188,25 +207,30 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
|
|||
children: [
|
||||
Text(
|
||||
'主观题',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Text(
|
||||
'${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(height: 10.r,),
|
||||
SizedBox(
|
||||
height: studentInfo!.zgDetails.length>8?300.r:studentInfo!.zgDetails.length * 40.r + 40.r,
|
||||
height: 10.r,
|
||||
),
|
||||
SizedBox(
|
||||
height: studentInfo!.zgDetails.length > 8 ? 300.r : studentInfo!.zgDetails.length * 40.r + 40.r,
|
||||
child: StudentZgTable(
|
||||
headList: ['题号', '用时', '学生答案','批注结果','批注'],
|
||||
headList: ['题号', '用时', '学生答案', '批注结果', '批注'],
|
||||
bodyList: studentInfo!.zgDetails,
|
||||
questionNumCall: (no) {
|
||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
|
|||
|
|
@ -0,0 +1,286 @@
|
|||
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,6 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||
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/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
|
@ -359,7 +360,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
onTap: () {
|
||||
if (item.questionPicture == null)
|
||||
return ToastUtils.showInfo('当前试题没有原题');
|
||||
Navigator.push(
|
||||
/* Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
|
|
@ -369,7 +370,8 @@ class _ReportTableState extends State<ReportTable> {
|
|||
NetworkImage(item.questionPicture!)),
|
||||
);
|
||||
}),
|
||||
);
|
||||
);*/
|
||||
ImageDialog.showImgDialog(context,item.questionPicture!);
|
||||
},
|
||||
child: Text('原题',
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -7,143 +7,155 @@ import 'package:marking_app/utils/index.dart';
|
|||
class StudentGroupList extends StatelessWidget {
|
||||
final List studentGroups;
|
||||
final Function goNextPage;
|
||||
const StudentGroupList(this.studentGroups,this.goNextPage,{Key? key}) : super(key: key);
|
||||
final Widget? rightBtn;
|
||||
|
||||
const StudentGroupList(this.studentGroups, this.goNextPage,
|
||||
{Key? key,this.rightBtn})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return studentGroups != null && studentGroups.length > 0
|
||||
? isPad()?GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
goNextPage(item.groupId,item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
? isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
children: List.generate(studentGroups.length, (index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
goNextPage(item.groupId, item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
rightBtn != null
|
||||
? rightBtn!
|
||||
: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 20.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
):ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context,index){
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
|
||||
margin: EdgeInsets.only(bottom: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
goNextPage(item.groupId,item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 24.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
itemBuilder: (context, index) {
|
||||
JobStudentGroups item = studentGroups[index];
|
||||
String classNames = item.classNames.join(" ");
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
goNextPage(item.groupId, item.groupName);
|
||||
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
|
||||
},
|
||||
child: Container(
|
||||
padding:
|
||||
EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.only(bottom: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.r)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(right: 8.r),
|
||||
child: Text(
|
||||
item.groupName,
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
classNames,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF999999),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
),
|
||||
rightBtn != null
|
||||
? rightBtn!
|
||||
: Container(
|
||||
margin: EdgeInsets.only(left: 5.r),
|
||||
height: 24.r,
|
||||
width: 55.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(20.r)),
|
||||
color: Color(0xFF6888FD),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: studentGroups.length,
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: studentGroups.length,
|
||||
)
|
||||
: Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
);
|
||||
padding: EdgeInsets.only(
|
||||
top: MediaQuery.of(context).size.height / 2 - 200.r),
|
||||
child: MyEmptyWidget(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class StudentKgTable extends StatefulWidget {
|
|||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final Function(String)? questionNumCall;
|
||||
|
||||
const StudentKgTable({
|
||||
Key? key,
|
||||
|
|
@ -15,6 +16,7 @@ class StudentKgTable extends StatefulWidget {
|
|||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
this.questionNumCall,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -29,34 +31,51 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
String sortString(String str) {
|
||||
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||
cells: [
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
DataCell(
|
||||
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(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
|
||||
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252):
|
||||
item.state == 2?Color(0xFF4CC793):
|
||||
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(
|
||||
item.studentAnswer == null ? '未作答' : item.studentAnswer!,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: item.studentAnswer == null
|
||||
? Color(0xFF525252)
|
||||
: item.state == 2
|
||||
? Color(0xFF4CC793)
|
||||
: item.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: item.state == 0
|
||||
? Color(0xFFD3D3D3)
|
||||
: Colors.white),
|
||||
),
|
||||
))),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
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))),
|
||||
),
|
||||
)),
|
||||
],
|
||||
|
|
@ -74,14 +93,10 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
dataRowHeight: 40.r,
|
||||
headingRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
|
|
@ -95,14 +110,12 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
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,
|
||||
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,6 +2,8 @@ import 'package:data_table_2/data_table_2.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/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/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
|
@ -11,6 +13,7 @@ class StudentZgTable extends StatefulWidget {
|
|||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final Function(String)? questionNumCall;
|
||||
|
||||
const StudentZgTable({
|
||||
Key? key,
|
||||
|
|
@ -18,6 +21,7 @@ class StudentZgTable extends StatefulWidget {
|
|||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
this.questionNumCall,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -28,23 +32,23 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
final ScrollController _controller = ScrollController();
|
||||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
void showImgDialog(BuildContext context,String imgUrl){
|
||||
|
||||
/*void showImgDialog(BuildContext context,String imgUrl){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: SizedBox(
|
||||
/* width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,*/
|
||||
*/ /* width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,*/ /*
|
||||
child: PhotoView(
|
||||
imageProvider:
|
||||
NetworkImage(imgUrl)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);
|
||||
);*/
|
||||
/* showDialog(context: context, builder: (BuildContext context){
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||
|
|
@ -62,64 +66,75 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
),
|
||||
);
|
||||
});*/
|
||||
}
|
||||
// }
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||
cells: [
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(CommonUtils.second2HMS(item.useTime!),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: (){
|
||||
if(item.state != 0){
|
||||
showImgDialog(context,item.studentAnswer!);
|
||||
}
|
||||
|
||||
onTap: () {
|
||||
if (widget.questionNumCall != null) {
|
||||
widget.questionNumCall!(item.questionNo);
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.state!=0 ?'查看':'--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: item.state == 2?
|
||||
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):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))),
|
||||
child: Text(CommonUtils.second2HMS(item.useTime!), style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: (){
|
||||
if(item.state==1 || item.state==2){
|
||||
showImgDialog(context,item.annotateAnswers!);
|
||||
onTap: () {
|
||||
if (item.state != 0) {
|
||||
ImageDialog.showImgDialog(context, item.studentAnswer!);
|
||||
}
|
||||
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
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 != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: item.state == 2
|
||||
? Image.asset(
|
||||
'assets/images/job_personal_correct_icon.png',
|
||||
width: 18.r,
|
||||
height: 18.r,
|
||||
)
|
||||
: 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(
|
||||
onTap: () {
|
||||
if (item.state == 1 || item.state == 2) {
|
||||
ImageDialog.showImgDialog(context, item.annotateAnswers!);
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.state == 1 || item.state == 2 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
|
@ -138,14 +153,10 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
headingRowHeight: 40.r,
|
||||
dataRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
|
|
@ -159,14 +170,12 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
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,
|
||||
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,7 +16,6 @@ import 'package:hooks_riverpod/hooks_riverpod.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/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/provider/do_marking_provider.dart';
|
||||
import 'package:marking_app/provider/upload_file_provider.dart';
|
||||
|
|
@ -30,6 +29,8 @@ import 'package:marking_app/utils/index.dart';
|
|||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
|
||||
import 'homework_correction/job_home.dart';
|
||||
|
||||
class TheMainPage extends StatefulHookConsumerWidget {
|
||||
const TheMainPage({Key? key}) : super(key: key);
|
||||
|
||||
|
|
@ -45,7 +46,13 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
Timer? _timer;
|
||||
bool showUpgrade = false;
|
||||
|
||||
final List<Widget> _bodyList = [const TheHomePage(), const TheMarking(), const HomeworkCorrection(), const TheReport()];
|
||||
final List<Widget> _bodyList = [
|
||||
const TheHomePage(),
|
||||
const TheMarking(),
|
||||
// const HomeworkCorrection(),
|
||||
const JobHome(),
|
||||
const TheReport()
|
||||
];
|
||||
int tabIndex = 0;
|
||||
|
||||
/// 获取项目 icon
|
||||
|
|
@ -79,7 +86,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
if (!value) {
|
||||
return toLoginPage(context);
|
||||
}
|
||||
if(ref.read(userProvider).id == '540117143121989') return;
|
||||
if (ref.read(userProvider).id == '540117143121989') return;
|
||||
ref.read(userReportProvider.notifier).initUserReport(); // 初始化报告页面用户身份职位
|
||||
}); // 定值token
|
||||
// 初始化偏好设置
|
||||
|
|
@ -99,9 +106,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
void getAppUpgrade(UserInfo user) async {
|
||||
try {
|
||||
showUpgrade = true;
|
||||
// if (user.loginName == '18888888888') return;
|
||||
// if (user.loginName == 'u0001') return;
|
||||
if (user.loginName == '13350366646') return;
|
||||
if (['18888888888'].contains(user.loginName)) return;
|
||||
// 获取设备信息
|
||||
String deviceInfo;
|
||||
int deviceType;
|
||||
|
|
@ -151,7 +156,8 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
child: Scaffold(
|
||||
body: PageView(
|
||||
controller: _pageController,
|
||||
physics: const BouncingScrollPhysics(),
|
||||
// physics: const BouncingScrollPhysics(),
|
||||
physics: NeverScrollableScrollPhysics(),
|
||||
onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted),
|
||||
children: _bodyList,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -6,14 +6,16 @@
|
|||
* @FilePath: \marking_app\lib\routes\RouterManager.dart
|
||||
* @Description: 路由
|
||||
*/
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
||||
import 'package:marking_app/pages/common/startUpPage.dart';
|
||||
import 'package:marking_app/pages/homework_correction/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/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_priority_review_set.dart';
|
||||
import 'package:marking_app/pages/homework_correction/job_report.dart';
|
||||
|
|
@ -66,6 +68,8 @@ class RouterManager {
|
|||
static const String jobListParticipateInClassPath = '/job/list/participateInClass';
|
||||
// 作业 ==> 收藏页面
|
||||
static const String jobFavoritePagePath = '/job/favorite/index';
|
||||
// 作业 ==> 列表页面
|
||||
static const String jobMainListPagePath = '/job/mainList/index';
|
||||
|
||||
static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
|
||||
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
|
||||
|
|
@ -81,6 +85,10 @@ class RouterManager {
|
|||
static const String reportHistoryPath = '/report_detail/report_history';
|
||||
static const String registerPath = '/register/index';
|
||||
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
|
||||
|
||||
static final FluroRouter router = FluroRouter();
|
||||
|
|
@ -103,18 +111,14 @@ 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(
|
||||
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) {
|
||||
int markingUserId = int.parse(params['markingUserId']![0]);
|
||||
|
|
@ -133,11 +137,8 @@ class RouterManager {
|
|||
|
||||
// 回评异常页面
|
||||
static final _reviewAbnormalPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => ProgressAbnormal(
|
||||
int.parse(params['examSubjectId']![0]),
|
||||
params['markingId']![0],
|
||||
params['name']![0],
|
||||
params['questionNum']![0]));
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
|
||||
ProgressAbnormal(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) {
|
||||
try {
|
||||
|
|
@ -179,8 +180,7 @@ 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 {
|
||||
int taskId = int.parse(params['taskId']![0]);
|
||||
int jobId = int.parse(params['jobId']![0]);
|
||||
|
|
@ -224,8 +224,7 @@ class RouterManager {
|
|||
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]);
|
||||
|
||||
return ReportClassTeacher(examId: examId);
|
||||
|
|
@ -295,7 +294,7 @@ class RouterManager {
|
|||
if (params['gradeId'] != null && params['gradeId']?[0] != null && params['gradeId']![0] != 'null') {
|
||||
gradeId = int.parse(params['gradeId']![0]);
|
||||
}
|
||||
return QuickDataCheckPage(jobId: jobId, className: className,gradeName:gradeName,schoolId:schoolId,gradeId:gradeId);
|
||||
return QuickDataCheckPage(jobId: jobId, className: className, gradeName: gradeName, schoolId: schoolId, gradeId: gradeId);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -313,14 +312,16 @@ class RouterManager {
|
|||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
String groupId = params['groupId']![0];
|
||||
String title = params['title']![0];
|
||||
return JobPriorityReviewSet(groupId: groupId,title:title);
|
||||
String? page = params['page']?[0];
|
||||
return JobPriorityReviewSet(groupId: groupId, title: title, page: page);
|
||||
},
|
||||
);
|
||||
|
||||
//学生分组
|
||||
static final _jobStudentGroupPageHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
return JobStudentGroup();
|
||||
String page = params['page']![0];
|
||||
return JobStudentGroup(page: page);
|
||||
},
|
||||
);
|
||||
//作业收藏页面
|
||||
|
|
@ -337,7 +338,7 @@ class RouterManager {
|
|||
if (params['gradeId'] != null && params['gradeId']?[0] != null && params['gradeId']![0] != 'null') {
|
||||
gradeId = int.parse(params['gradeId']![0]);
|
||||
}
|
||||
return JobFavorite(jobId: jobId, gradeId: gradeId, schoolId: schoolId, className: className,jobName:jobName);
|
||||
return JobFavorite(jobId: jobId, gradeId: gradeId, schoolId: schoolId, className: className, jobName: jobName);
|
||||
},
|
||||
);
|
||||
|
||||
|
|
@ -346,14 +347,19 @@ class RouterManager {
|
|||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
String studentName = params['studentName']![0];
|
||||
int studentId = int.parse(params['studentId']![0]);
|
||||
return JobPersonalDetail(studentId: studentId,studentName:studentName);
|
||||
return JobPersonalDetail(studentId: studentId, studentName: studentName);
|
||||
},
|
||||
);
|
||||
|
||||
// 优先配置个人详情
|
||||
static final _jobMainListPathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => HomeworkCorrection(),
|
||||
);
|
||||
|
||||
// 学生报告详情
|
||||
static final _reportCardDialogPathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
/* String studentName = params['studentName']![0];
|
||||
/* String studentName = params['studentName']![0];
|
||||
int studentId = int.parse(params['studentId']![0]);
|
||||
return ReportCardDialog(studentId: studentId,studentName:studentName);*/
|
||||
},
|
||||
|
|
@ -361,20 +367,52 @@ class RouterManager {
|
|||
// 学生历史报告
|
||||
static final _reportHistoryPathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
/* String studentName = params['studentName']![0];
|
||||
/* String studentName = params['studentName']![0];
|
||||
int studentId = int.parse(params['studentId']![0]);*/
|
||||
return ReportHistory();
|
||||
},
|
||||
);
|
||||
|
||||
// 注册页
|
||||
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());
|
||||
|
||||
|
|
@ -392,38 +430,34 @@ class RouterManager {
|
|||
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingHomeworkDoPath,
|
||||
handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingReviewAbnormalPath,
|
||||
handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingHomeworkDoPath, handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
|
||||
router.define(markingReviewAbnormalPath, handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
|
||||
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
|
||||
|
||||
router.define(reportClassTeacherPath,
|
||||
handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
|
||||
router.define(reportSubjectTeacherPath,
|
||||
handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
|
||||
router.define(reportPersonalSubjectPath,
|
||||
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
|
||||
router.define(reportClassTeacherPath, handler: _reportClassTeacherPageHandler, 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(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
|
||||
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobListParticipateInClassPath,
|
||||
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||
router.define(jobListParticipateInClassPath, handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
|
||||
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
|
||||
router.define(quickCheckPersonalPath,
|
||||
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobPriorityReviewSetPath,
|
||||
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||
router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
|
||||
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
||||
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
||||
router.define(registerPath, handler: _registerPathHandler,transitionType: TransitionType.material);
|
||||
router.define(logOffPath, handler: _logOffPathHandler,transitionType: TransitionType.material);
|
||||
// getTransition()
|
||||
router.define(registerPath, handler: _registerPathHandler, transitionType: TransitionType.material);
|
||||
router.define(logOffPath, handler: _logOffPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
||||
router.define(answerTrajectoryPath, handler: _answerTrajectoryPathHandler, transitionType: TransitionType.material);
|
||||
router.define(answerTrajectoryJobDetailPath, handler: _answerTrajectoryJobDetailPathHandler, transitionType: TransitionType.material);
|
||||
|
||||
router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
toPrint(val: "ROUTE WAS NOT FOUND !!!");
|
||||
|
|
|
|||
|
|
@ -45,4 +45,26 @@ class CommonUtils {
|
|||
}
|
||||
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)); // 加上天数差减一,得到本周日的时间
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,65 @@
|
|||
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,8 +18,11 @@ 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_do_marking_status_info.dart';
|
||||
import 'package:marking_app/common/model/job/job_fav_student.dart';
|
||||
import 'package:marking_app/common/model/job/job_favorite_item_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_favorite_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_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_note_taking_trajectory.dart';
|
||||
import 'package:marking_app/common/model/job/job_page_tab.dart';
|
||||
|
|
@ -33,7 +36,6 @@ 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_task_item.dart';
|
||||
import 'package:marking_app/common/model/job/marking_text_question_job.dart';
|
||||
import 'package:marking_app/common/model/job/marking_text_question_job_params.dart';
|
||||
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/upload_file_interface_config.dart';
|
||||
|
|
@ -73,8 +75,7 @@ abstract class RestClient {
|
|||
|
||||
// 最新版本
|
||||
@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
|
||||
@the_retrofit.POST("/auth/login/exam-marking/user")
|
||||
|
|
@ -90,8 +91,7 @@ abstract class RestClient {
|
|||
|
||||
// 阅卷列表 => 分页获取
|
||||
@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
|
||||
|
||||
|
|
@ -116,13 +116,11 @@ abstract class RestClient {
|
|||
|
||||
// 阅卷 => 获取考试试题
|
||||
@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(试题批次)
|
||||
@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阅卷详情
|
||||
@the_retrofit.GET("/api/marking/{markingUserId}/progress")
|
||||
|
|
@ -136,16 +134,15 @@ abstract class RestClient {
|
|||
|
||||
// 阅卷 => 获取考试tab下某次试题
|
||||
@the_retrofit.GET("/api/marking/{markingUserId}/detail")
|
||||
Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(@the_retrofit.Path("markingUserId") int markingUserId,
|
||||
@the_retrofit.Queries() MarkingTextQuestionTabParams params);
|
||||
Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(
|
||||
@the_retrofit.Path("markingUserId") int markingUserId, @the_retrofit.Queries() MarkingTextQuestionTabParams params);
|
||||
|
||||
// 阅卷 => 提交考试试题
|
||||
@the_retrofit.PUT("/api/marking")
|
||||
Future<BaseStructureResult<bool>> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params);
|
||||
|
||||
@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")
|
||||
|
|
@ -157,8 +154,7 @@ abstract class RestClient {
|
|||
|
||||
// 阅卷 => 结束阅卷
|
||||
@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")
|
||||
|
|
@ -184,25 +180,21 @@ abstract class RestClient {
|
|||
|
||||
// 阅卷 => 获取异常详细信息
|
||||
@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")
|
||||
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")
|
||||
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")
|
||||
Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage(
|
||||
@the_retrofit.Queries() MarkingListParams params);
|
||||
Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage(@the_retrofit.Queries() MarkingListParams params);
|
||||
|
||||
// 作业 => 批改获取tabs
|
||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs")
|
||||
|
|
@ -210,13 +202,11 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 批改获取tabs
|
||||
@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下某次试题
|
||||
@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")
|
||||
|
|
@ -228,8 +218,7 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 获取考试tab下某次试题
|
||||
@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")
|
||||
|
|
@ -240,8 +229,7 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 上传图片请求参数
|
||||
@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")
|
||||
|
|
@ -250,18 +238,16 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 查询作业是否收藏
|
||||
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
|
||||
Future<BaseStructureResult<bool>> getJobCollect(@the_retrofit.Query("taskId") int taskId,
|
||||
@the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
||||
Future<BaseStructureResult<bool>> getJobCollect(
|
||||
@the_retrofit.Query("taskId") int taskId, @the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId);
|
||||
|
||||
// 作业 => 作业优先批阅取消
|
||||
@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")
|
||||
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")
|
||||
|
|
@ -296,13 +282,11 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 列表 ==> 参与班级列表
|
||||
@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")
|
||||
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")
|
||||
|
|
@ -315,13 +299,11 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 作业收藏列表
|
||||
@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")
|
||||
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")
|
||||
|
|
@ -329,8 +311,7 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 优先批阅,学生分组列表
|
||||
@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")
|
||||
|
|
@ -343,19 +324,55 @@ abstract class RestClient {
|
|||
|
||||
// 作业 => 取消收藏
|
||||
@the_retrofit.POST("/api/jobs/de-fav-student-job")
|
||||
Future<BaseStructureResult> getJobDeFavorites(@the_retrofit.Field("jobId") int jobId,
|
||||
@the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
||||
Future<BaseStructureResult> getJobDeFavorites(
|
||||
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage);
|
||||
|
||||
// 作业 => 学生作业详情历史
|
||||
@the_retrofit.GET("/api/read/student-job-history")
|
||||
Future<BaseStructureResult<JobStudentHistory>> getStudentJobHistory(
|
||||
@the_retrofit.Query("StudentId") int studentId,
|
||||
@the_retrofit.Query("IsPaper") bool isPaper,
|
||||
@the_retrofit.Query("DateStart") String? dateStart,
|
||||
@the_retrofit.Query("DateEnd") String? dateEnd,
|
||||
@the_retrofit.Query("Page") int page,
|
||||
@the_retrofit.Query("PageSize") int pageSize,
|
||||
);
|
||||
@the_retrofit.Query("StudentId") int studentId,
|
||||
@the_retrofit.Query("IsPaper") bool isPaper,
|
||||
@the_retrofit.Query("DateStart") String? dateStart,
|
||||
@the_retrofit.Query("DateEnd") String? dateEnd,
|
||||
@the_retrofit.Query("Page") int page,
|
||||
@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")
|
||||
|
|
@ -372,5 +389,4 @@ abstract class RestClient {
|
|||
// 注销账号
|
||||
@the_retrofit.POST("/auth/login/lg")
|
||||
Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName);
|
||||
|
||||
}
|
||||
|
|
|
|||