Compare commits

..

38 Commits

Author SHA1 Message Date
1147192855@qq.com a636819fda Merge branch 'job_new_demand'
# Conflicts:
#	marking_app/lib/routes/RouterManager.dart
#	marking_app/lib/utils/request/rest_client.dart
2024-04-28 10:38:32 +08:00
1147192855@qq.com 89e15ba672 no message 2024-04-28 09:28:57 +08:00
1147192855@qq.com 8ab319c32e no message 2024-04-26 18:08:46 +08:00
1147192855@qq.com 17738ff29e no message 2024-04-25 14:33:06 +08:00
1147192855@qq.com 919f71f28b no message 2024-04-25 10:59:37 +08:00
1147192855@qq.com 3666bea6bd no message 2024-04-24 18:24:17 +08:00
1147192855@qq.com 3a6e220f5e no message 2024-04-24 18:10:18 +08:00
machuanyu 23bd9501ff bug修改 2024-04-24 16:43:08 +08:00
1147192855@qq.com 8c10e6eb4d no message 2024-04-24 13:46:19 +08:00
1147192855@qq.com aa9dd3d83c 轨迹页面 2024-04-17 18:15:37 +08:00
machuanyu 1fbb102370 Merge branch 'mcy_revision' into job_new_demand 2024-04-17 17:13:53 +08:00
machuanyu a759583ca0 答题轨迹按作业详情 2024-04-17 17:13:24 +08:00
1147192855@qq.com 0c3b3f8719 Merge branch 'main' into job_new_demand 2024-04-17 11:00:28 +08:00
1147192855@qq.com 8b4f38558f 调整隐私政策和用户协议 2024-04-17 10:54:53 +08:00
machuanyu 1494e69b56 Merge branch 'mcy_revision' into job_new_demand 2024-04-17 09:02:07 +08:00
machuanyu fbebdbc428 答题轨迹 2024-04-17 09:01:41 +08:00
1147192855@qq.com 491cad7955 no message 2024-04-16 18:12:48 +08:00
1147192855@qq.com 1697f59d43 no message 2024-04-16 17:49:46 +08:00
1147192855@qq.com dd033fd20f Merge branch 'main' into job_new_demand
# Conflicts:
#	marking_app/lib/pages/mainPage.dart
2024-04-16 17:44:21 +08:00
machuanyu 21183f11bc Merge branch 'job_new_demand' into mcy_revision
# Conflicts:
#	marking_app/lib/pages/homework_correction/job_home.dart
2024-04-16 13:47:19 +08:00
machuanyu 0c54c16865 答题轨迹 2024-04-16 13:44:34 +08:00
1147192855@qq.com d9adbe845b no message 2024-04-16 12:05:27 +08:00
1147192855@qq.com 4c78d903a1 Merge branch 'main' into job_new_demand
# Conflicts:
#	.gitignore
2024-04-15 18:22:40 +08:00
1147192855@qq.com 727c774ea0 no message 2024-04-15 18:16:52 +08:00
1147192855@qq.com 4e812bc5c0 no message 2024-04-15 15:41:13 +08:00
1147192855@qq.com 6e2010a7cc no message 2024-04-15 14:15:48 +08:00
machuanyu 42d2e4ab39 历史作业 2024-04-15 13:47:26 +08:00
machuanyu 994ca04988 Merge branch 'job_new_demand' into mcy_revision 2024-04-12 11:23:53 +08:00
machuanyu e22d5f2655 知识点详情 2024-04-12 11:22:27 +08:00
1147192855@qq.com 326a2fe99e no message 2024-04-11 17:31:02 +08:00
machuanyu 5cdf645f86 -- 2024-04-11 17:24:00 +08:00
machuanyu 7e3c6882e9 合并代码 2024-04-11 17:19:21 +08:00
machuanyu 794e4d6cbe Merge branch 'mcy_revision' into job_new_demand
# Conflicts:
#	marking_app/lib/routes/RouterManager.dart
2024-04-11 17:18:15 +08:00
machuanyu 991ec9310e 知识点掌握 2024-04-11 17:15:27 +08:00
1147192855@qq.com f63c1ea678 Merge branch 'mcy_revision' of https://gitea.23544.com/marking/Marking.Client.Moblie into job_new_demand 2024-04-11 16:12:27 +08:00
1147192855@qq.com 74c8148305 no message 2024-04-11 15:53:31 +08:00
1147192855@qq.com ee41ad7d1b 添加作业首页 2024-04-11 15:53:04 +08:00
1147192855@qq.com 5a43ccffcf no message 2024-04-11 14:29:27 +08:00
70 changed files with 4070 additions and 619 deletions

12
.gitignore vendored
View File

@ -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_papers_submit_check_switch_bus.g.dart
marking_app/lib/common/model/event_bus/jobs/job_do_synchro_tab.g.dart marking_app/lib/common/model/event_bus/jobs/job_do_synchro_tab.g.dart
marking_app/lib/pages/homework_correction/widget/top_count.g.dart marking_app/lib/pages/homework_correction/widget/top_count.g.dart
marking_app/lib/common/model/event_bus/job_home_refresh_bus.g.dart
marking_app/lib/common/model/job/job_knowledge_points_detail.g.dart
marking_app/lib/common/model/job/job_knowledge_points.g.dart
marking_app/lib/pages/homework_correction/job_knowledge_points.g.dart marking_app/lib/pages/homework_correction/job_knowledge_points.g.dart
marking_app/lib/pages/homework_correction/job_knowledge_points_detail.g.dart
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
marking_app/lib/common/model/job/job_knowledge_detail_student.g.dart
marking_app/lib/pages/homework_correction/job_home.g.dart
marking_app/lib/common/model/marking/keyboard_assist_event.g.dart
marking_app/lib/common/model/marking/marking_history_zoom_info.g.dart
marking_app/lib/common/model/job/job_handwriting.g.dart
marking_app/lib/utils/my_time_util.g.dart
marking_app/lib/pages/homework_correction/widget/answer_handwriting.g.dart

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 467 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 724 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

View File

@ -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);
}

View File

@ -14,11 +14,30 @@ class GestureRecording {
bool scopeBox; bool scopeBox;
int intervalTime; //
GestureRecording({ GestureRecording({
required this.eraser, required this.eraser,
required this.annotationSwitch, required this.annotationSwitch,
this.data, this.data,
this.usageTime, this.usageTime,
this.scopeBox = false, this.scopeBox = false,
this.intervalTime = 0,
});
}
/**
* (稿)
*/
class GestureHandwritingRecording {
int stroke;
int usageTime; //
Offset data;
int intervalTime; //
GestureHandwritingRecording({
required this.stroke,
required this.data,
required this.usageTime,
required this.intervalTime,
}); });
} }

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);
}

View File

@ -36,12 +36,7 @@ class TestQuestionsImageInfo extends Object {
double? imageHeightOffsetend; double? imageHeightOffsetend;
TestQuestionsImageInfo( TestQuestionsImageInfo(
{required this.width, {required this.width, required this.height, required this.url, required this.boxWidth, required this.boxHeight, this.pixelRatio = 1}) {
required this.height,
required this.url,
required this.boxWidth,
required this.boxHeight,
this.pixelRatio = 1}) {
// print('图片宽度:$width'); // print('图片宽度:$width');
// print('图片高度:$height'); // 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); factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this); Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);

View File

@ -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,
};

View File

@ -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,
};

View File

@ -15,7 +15,7 @@ part 'marking_list_params.g.dart';
@JsonSerializable() @JsonSerializable()
class MarkingListParams extends BasePage { class MarkingListParams extends BasePage {
@JsonKey(name: 'isFinish') @JsonKey(name: 'isFinish')
bool isFinish; bool? isFinish;
// //
@JsonKey(name: 'PageType') @JsonKey(name: 'PageType')
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
int? markingType; // 1 2 int? markingType; // 1 2
MarkingListParams({ MarkingListParams({
required this.isFinish, this.isFinish,
required this.pageType, required this.pageType,
required page, required page,
required limit, required limit,

View File

@ -24,8 +24,7 @@ void main() {
WidgetsFlutterBinding.ensureInitialized(); WidgetsFlutterBinding.ensureInitialized();
RouterManager.initRouter(); RouterManager.initRouter();
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); //
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); //
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); //
// OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values); // OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values);
@ -81,7 +80,7 @@ class _MyAppState extends State<MyApp> {
splitScreenMode: true, splitScreenMode: true,
builder: (context1, child) { builder: (context1, child) {
return MaterialApp( return MaterialApp(
title: '远轩阅卷系统', title: '学而有道阅卷',
navigatorKey: TheGlobal.navigatorKey, navigatorKey: TheGlobal.navigatorKey,
debugShowCheckedModeBanner: false, debugShowCheckedModeBanner: false,
// locale: const Locale('zh', 'CN'), // , // locale: const Locale('zh', 'CN'), // ,

View File

@ -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)),
),
)
],
),
);
}
}

View File

@ -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(),
],
),
);
}
}

View File

@ -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)),
);
},
);
}
}

View File

@ -21,12 +21,7 @@ class TrajectoryView extends StatefulHookConsumerWidget {
final double boxHeight; final double boxHeight;
final String questionNumber; final String questionNumber;
final JobNoteTakingTrajectory trajectory; final JobNoteTakingTrajectory trajectory;
const TrajectoryView( const TrajectoryView({required this.trajectory, required this.questionNumber, required this.boxHeight, required this.boxWidth, super.key});
{required this.trajectory,
required this.questionNumber,
required this.boxHeight,
required this.boxWidth,
super.key});
@override @override
TrajectoryViewState createState() => TrajectoryViewState(); TrajectoryViewState createState() => TrajectoryViewState();
@ -152,15 +147,11 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
/// ///
trajectorys trajectorys
..add(GestureRecording( ..add(GestureRecording(data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
/// ///
..add(GestureRecording( ..add(GestureRecording(
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop), data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
scopeBox: true,
annotationSwitch: false,
eraser: false))
/// ///
..add(GestureRecording( ..add(GestureRecording(
@ -171,8 +162,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
/// ///
..add(GestureRecording( ..add(GestureRecording(
data: Offset( data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
scopeBox: true, scopeBox: true,
annotationSwitch: false, annotationSwitch: false,
eraser: false)); eraser: false));
@ -181,14 +171,26 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys); ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys);
}); });
if (lattices.isNotEmpty) { if (lattices.isNotEmpty) {
Map<int, List<Lattices>> map = new Map.fromIterable(lattices, // Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
key: (key) => key.stroke, // key: (key) => key.stroke,
value: (value) { // value: (value) {
return lattices.where((item) => item.stroke == value.stroke).toList() // return lattices.where((item) => item.stroke == value.stroke).toList()
..sort((a, b) => a.time.compareTo(b.time)); // ..sort((a, b) => a.time.compareTo(b.time));
}); // });
var map = Map<int, List<Lattices>>();
for (var i = 0; i < lattices.length; i++) {
Lattices item = lattices[i];
if (!map.containsKey(item.stroke)) map[item.stroke] = [];
map[item.stroke]!.add(item); //
}
List<int> keys = map.keys.toList(); List<int> keys = map.keys.toList();
for (var i = 0; i < keys.length; i++) {
int theKey = keys[i];
map[theKey]!.sort((a, b) => a.time.compareTo(b.time));
}
for (var i = 0; i < keys.length; i++) { for (var i = 0; i < keys.length; i++) {
int theKey = keys[i]; int theKey = keys[i];
int? nextKey = i + 1 < keys.length ? keys[i + 1] : null; int? nextKey = i + 1 < keys.length ? keys[i + 1] : null;
@ -199,8 +201,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
double theX = e.x * imagInfoModel!.scale!; double theX = e.x * imagInfoModel!.scale!;
double theY = e.y * imagInfoModel!.scale! + spacingHeight; double theY = e.y * imagInfoModel!.scale! + spacingHeight;
return GestureRecording( return GestureRecording(eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
}).toList() }).toList()
..add(GestureRecording(eraser: false, annotationSwitch: false)); ..add(GestureRecording(eraser: false, annotationSwitch: false));
// //
@ -230,8 +231,7 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
if (duration2 == null && nextStrokesData != null) { if (duration2 == null && nextStrokesData != null) {
// //
Lattices minLattices = nextStrokesData.reduce((e1, e2) => e1.time < e2.time ? e1 : e2); Lattices minLattices = nextStrokesData.reduce((e1, e2) => e1.time < e2.time ? e1 : e2);
differenceInMilliseconds = differenceInMilliseconds = (Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
(Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
await Future.delayed(Duration(milliseconds: differenceInMilliseconds)); // await Future.delayed(Duration(milliseconds: differenceInMilliseconds)); //
} }
}; };

View File

@ -290,7 +290,11 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
var _currentTab = _useSwitchStudentAndType.currentTab.value; var _currentTab = _useSwitchStudentAndType.currentTab.value;
var _pageIndex = _currentTab?.pageIndex; var _pageIndex = _currentTab?.pageIndex;
if (_currentTab == null || _pageIndex == null) return; if (_currentTab == null || _pageIndex == null) return;
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
var theLastQuestion = _currentTab.finishCount + 1 == _currentTab.total; //
_useSwitchStudentAndType
.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: theLastQuestion)
.then((value) {
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex); var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
if (_currentTab.finishCount < _currentTab.total) { if (_currentTab.finishCount < _currentTab.total) {
if (_currentTab.finishCount + 1 == _currentTab.total) { if (_currentTab.finishCount + 1 == _currentTab.total) {
@ -366,37 +370,55 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
Expanded(flex: 1, child: SizedBox()), Expanded(flex: 1, child: SizedBox()),
Expanded( Expanded(
flex: 4, flex: 4,
child: Container( child: Stack(
padding: EdgeInsets.only(left: 10.w), children: [
decoration: BoxDecoration( Container(
color: Color.fromRGBO(244, 244, 244, 1), padding: EdgeInsets.only(left: 10.w),
borderRadius: BorderRadius.circular(4.r), decoration: BoxDecoration(
), color: Color.fromRGBO(244, 244, 244, 1),
child: DropdownButton( borderRadius: BorderRadius.circular(4.r),
onTap: () { ),
// child: DropdownButton(
_useSwitchStudentAndType.getDataForStudents(taskId: taskId); onTap: () {
}, //
padding: EdgeInsets.only(right: 4.w), _useSwitchStudentAndType.getDataForStudents(taskId: taskId);
icon: Icon(Icons.keyboard_arrow_down_rounded), },
value: _useSwitchStudentAndType.currentStudent.value?.studentId, padding: EdgeInsets.only(right: 4.w),
underline: Container(), icon: Icon(Icons.keyboard_arrow_down_rounded),
isExpanded: true, value: _useSwitchStudentAndType.currentStudent.value?.studentId,
items: _useSwitchStudentAndType.studentData.value.map((e) { underline: Container(),
return DropdownMenuItem( isExpanded: true,
child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp), items: _useSwitchStudentAndType.studentData.value.map((e) {
value: e.studentId, return DropdownMenuItem(
); child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp),
}).toList(), value: e.studentId,
hint: Text('请选择学生'), // );
onChanged: (value) { }).toList(),
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value; hint: Text('请选择学生'), //
if (currentStudent?.studentId == value) return; onChanged: (value) {
_useSwitchStudentAndType.studentBusInfo.value = null; // BUS通知记录 JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
_useSwitchStudentAndType.currentStudent.value = if (currentStudent?.studentId == value) return;
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value); _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()), 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( padding: EdgeInsets.only(bottom: 1.5.h),
padding: EdgeInsets.only(bottom: 1.5.h), child: quickText(
child: quickText( '正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%', size: 8.sp,
size: 8.sp, color: Colors.white,
color: Colors.white, align: TextAlign.end,
align: TextAlign.end, ),
), )
)
], ],
), ),
), ),

View File

@ -140,7 +140,7 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
return tabJob; return tabJob;
} }
} }
ToastUtils.showSuccess('最后一题提交成功'); // ToastUtils.showSuccess('最后一题提交成功');
} }
return tabJob; return tabJob;
} }

View File

@ -7,6 +7,8 @@
* @Description: * @Description:
*/ */
import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_hooks/flutter_hooks.dart'; import 'package:flutter_hooks/flutter_hooks.dart';
@ -16,7 +18,9 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart'; import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:marking_app/common/config/request_config.dart'; import 'package:marking_app/common/config/request_config.dart';
import 'package:marking_app/common/model/event_bus/job_home_refresh_bus.dart';
import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/common/model/job/job_task_item.dart';
import 'package:marking_app/pages/common/event_bus_mixin.dart';
import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart'; import 'package:marking_app/pages/homework_correction/components/new_version_of_homework/homework_tasks_view_item.dart';
import 'package:marking_app/provider/review_provider.dart'; import 'package:marking_app/provider/review_provider.dart';
import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/routes/RouterManager.dart';
@ -40,14 +44,7 @@ class HomeworkCorrection extends StatefulHookConsumerWidget {
} }
class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection> class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
with with CommonMixin, EventBusMixin, TickerProviderStateMixin, RefreshDataHandle<JobTaskItem, MarkingListParams> {
CommonMixin,
TickerProviderStateMixin,
RefreshDataHandle<JobTaskItem, MarkingListParams>,
AutomaticKeepAliveClientMixin {
@override
bool get wantKeepAlive => true;
/* Tab控制器 */ /* Tab控制器 */
late TabController _tabController; late TabController _tabController;
late TabController _tabController2; late TabController _tabController2;
@ -127,6 +124,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
_tabController.dispose(); _tabController.dispose();
_refreshController1.dispose(); _refreshController1.dispose();
_refreshController2.dispose(); _refreshController2.dispose();
eventCancel();
super.dispose(); super.dispose();
} }
@ -152,8 +150,6 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
super.build(context); //super.build(null)
return AnnotatedRegion( return AnnotatedRegion(
value: const SystemUiOverlayStyle( value: const SystemUiOverlayStyle(
systemNavigationBarColor: Color(0xFF000000), systemNavigationBarColor: Color(0xFF000000),
@ -176,7 +172,19 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
child: Row( child: Row(
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ 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( Expanded(
flex: 4, flex: 4,
child: Container( child: Container(
@ -226,9 +234,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
child: quickText( child: quickText(
'待批阅', '待批阅',
size: 14.sp, size: 14.sp,
color: _tabIndex == 0 color: _tabIndex == 0 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
? Theme.of(context).primaryColor
: const Color.fromRGBO(80, 94, 110, 1),
fontWeight: _tabIndex == 0 ? FontWeight.bold : null, fontWeight: _tabIndex == 0 ? FontWeight.bold : null,
), ),
), ),
@ -246,9 +252,7 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
child: quickText( child: quickText(
'已批阅', '已批阅',
size: 14.sp, size: 14.sp,
color: _tabIndex == 1 color: _tabIndex == 1 ? Theme.of(context).primaryColor : const Color.fromRGBO(80, 94, 110, 1),
? Theme.of(context).primaryColor
: const Color.fromRGBO(80, 94, 110, 1),
fontWeight: _tabIndex == 1 ? FontWeight.bold : null, fontWeight: _tabIndex == 1 ? FontWeight.bold : null,
), ),
), ),
@ -257,32 +261,10 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
), ),
), ),
), ),
Expanded( Expanded(flex: 1, child: SizedBox()),
flex: 1,
child: InkWell(
onTap: () {
RouterManager.router
.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
},
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
),
),
], ],
), ),
), ),
/* Row(
children: [
InkWell(
onTap: (){
},
child: Text('历史作业'),
),
],
),*/
if (_tabIndex == 1) if (_tabIndex == 1)
$CompletedJobConditionFilter( $CompletedJobConditionFilter(
controller: _tabController2, controller: _tabController2,
@ -317,6 +299,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
data: markingDatas1, data: markingDatas1,
onLoad: onMyLoad, onLoad: onMyLoad,
onRefresh: onMyRefresh, onRefresh: onMyRefresh,
eventFire: () {
eventFire(model: JobHomeRefreshBus());
},
), ),
$EasyRefresh( $EasyRefresh(
controller: _refreshController2, controller: _refreshController2,
@ -325,6 +310,9 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
data: markingDatas2, data: markingDatas2,
onLoad: onMyLoad, onLoad: onMyLoad,
onRefresh: onMyRefresh, onRefresh: onMyRefresh,
eventFire: () {
eventFire(model: JobHomeRefreshBus());
},
), ),
], ],
), ),
@ -346,6 +334,7 @@ Widget $easyRefresh({
required EasyRefreshController controller, required EasyRefreshController controller,
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh, required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onRefresh,
required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad, required Future<void> Function(EasyRefreshController controller, MarkingListParams params, int tab) onLoad,
required Function eventFire,
required MarkingListParams params, required MarkingListParams params,
required List<JobTaskItem> data, required List<JobTaskItem> data,
required int tab, required int tab,
@ -378,7 +367,10 @@ Widget $easyRefresh({
return HomeworkTasksViewItem( return HomeworkTasksViewItem(
completed: completed, completed: completed,
jobTaskItem: data[index], jobTaskItem: data[index],
call: () => controller.callRefresh(), call: () {
controller.callRefresh();
eventFire();
},
); );
}, },
itemCount: data.length, itemCount: data.length,
@ -426,9 +418,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.only(left: 2.w), padding: EdgeInsets.only(left: 2.w),
decoration: BoxDecoration( decoration: BoxDecoration(
color: jobTaskItem.markingTypeEnum.name == '作业' color: jobTaskItem.markingTypeEnum.name == '作业' ? const Color.fromRGBO(104, 136, 253, 1) : const Color.fromRGBO(255, 175, 56, 1),
? const Color.fromRGBO(104, 136, 253, 1)
: const Color.fromRGBO(255, 175, 56, 1),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(14.r), topLeft: Radius.circular(14.r),
topRight: Radius.circular(3.r), topRight: Radius.circular(3.r),
@ -489,8 +479,7 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
onTap: () => easyThrottle('go_to_homework_report', () { onTap: () => easyThrottle('go_to_homework_report', () {
RouterManager.router.navigateTo( RouterManager.router.navigateTo(
context, context,
RouterManager.jobReportPagePath + RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
transition: getTransition(), transition: getTransition(),
); );
}), }),
@ -533,8 +522,7 @@ Widget $theTabBar({required TabController controller, ValueChanged<int>? onTap,
if (customTime.endDate != null) { if (customTime.endDate != null) {
// print(customTime.startDate!.year == customTime.endDate!.year); // print(customTime.startDate!.year == customTime.endDate!.year);
if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) { if (!isPad() && customTime.startDate!.year == customTime.endDate!.year) {
customTimeStr = customTimeStr = customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
customTime.startDate.toString().substring(5, 10) + '~${customTime.endDate.toString().substring(5, 10)}';
} else { } else {
customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}'; customTimeStr += '~${customTime.endDate?.toString().substring(0, 10)}';
} }

View File

@ -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);
}
}

View File

@ -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),
],
),
),
);
}

View File

@ -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))
],
),
),
),
],
),
);
}

View File

@ -60,6 +60,7 @@ class _JobPersonalDetailState extends State<JobPersonalDetail> with CommonMixin,
} }
void getList() async { void getList() async {
print(widget.studentId);
RestClient _client = await getClient(); RestClient _client = await getClient();
BaseStructureResult<JobStudentHistory> res = BaseStructureResult<JobStudentHistory> res =
await _client.getStudentJobHistory(widget.studentId, !isJob, startDataTime, endDataTime, page, pageSize); await _client.getStudentJobHistory(widget.studentId, !isJob, startDataTime, endDataTime, page, pageSize);

View File

@ -16,8 +16,9 @@ import 'package:marking_app/utils/request/rest_client.dart';
class JobPriorityReviewSet extends StatefulWidget { class JobPriorityReviewSet extends StatefulWidget {
final String groupId; final String groupId;
final String title; final String title;
final String? page;
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title}) const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
: super(key: key); : super(key: key);
@override @override
@ -207,8 +208,27 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF6888FD)), 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: () { onTap: () {
setState(() { setState(() {
isClicking = true; isClicking = true;
@ -218,7 +238,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child:Container(
height: 20.r, height: 20.r,
width: 70.r, width: 70.r,
decoration: BoxDecoration( decoration: BoxDecoration(
@ -246,7 +266,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
), ),
), ),
) )
: InkWell( :InkWell(
onTap: () { onTap: () {
setState(() { setState(() {
isClicking = true; isClicking = true;
@ -256,7 +276,7 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child: Container(
height: 20.r, height: 20.r,
width: 70.r, width: 70.r,
decoration: BoxDecoration( 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, fontSize: 12.sp,
color: Color(0xFF6888FD)), 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( ? InkWell(
onTap: () { onTap: () {
setState(() { 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)),
),
),
),
)*/
], ],
), ),
), ),

View File

@ -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_knowledge_model.dart';
import 'package:marking_app/common/model/job/job_report_model.dart'; import 'package:marking_app/common/model/job/job_report_model.dart';
import 'package:marking_app/components/ReturnToHomepage.dart'; import 'package:marking_app/components/ReturnToHomepage.dart';
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
import 'package:marking_app/pages/homework_correction/widget/report_table.dart'; import 'package:marking_app/pages/homework_correction/widget/report_table.dart';
import 'package:marking_app/pages/homework_correction/widget/top_count.dart'; import 'package:marking_app/pages/homework_correction/widget/top_count.dart';
import 'package:marking_app/pages/mainPage.dart'; import 'package:marking_app/pages/mainPage.dart';
@ -1445,7 +1446,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
// return; // return;
// } // }
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题'); if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
Navigator.push( /* Navigator.push(
context, context,
MaterialPageRoute(builder: (_) { MaterialPageRoute(builder: (_) {
return Scaffold( return Scaffold(
@ -1453,7 +1454,8 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)), body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
); );
}), }),
); );*/
ImageDialog.showImgDialog(context,_qpm.questionPicture!);
}, },
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,

View File

@ -16,7 +16,8 @@ import 'package:marking_app/utils/index.dart';
import 'package:marking_app/utils/request/rest_client.dart'; import 'package:marking_app/utils/request/rest_client.dart';
class JobStudentGroup extends StatefulWidget { class JobStudentGroup extends StatefulWidget {
const JobStudentGroup({Key? key}) : super(key: key); final String page;
const JobStudentGroup({Key? key,required this.page}) : super(key: key);
@override @override
State<JobStudentGroup> createState() => _JobStudentGroupState(); State<JobStudentGroup> createState() => _JobStudentGroupState();
@ -59,7 +60,7 @@ class _JobStudentGroupState extends State<JobStudentGroup> with CommonMixin {
} }
void goNextPage(id,title){ void goNextPage(id,title){
RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}',transition: getTransition()); RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=$id&title=${Uri.encodeComponent(title)}&page=${widget.page}',transition: getTransition());
} }
@override @override

View File

@ -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;
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart'; import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:marking_app/common/mixin/common.dart'; import 'package:marking_app/common/mixin/common.dart';
import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/common/base_structure_result.dart';
import 'package:marking_app/common/model/job/job_data_report.dart'; import 'package:marking_app/common/model/job/job_data_report.dart';
@ -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_kg_table.dart';
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart'; import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/common_utils.dart';
import 'package:marking_app/utils/request/rest_client.dart'; import 'package:marking_app/utils/request/rest_client.dart';
import 'package:marking_app/utils/toast_utils.dart'; import 'package:marking_app/utils/toast_utils.dart';
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 jobId;
final int studentId; final int studentId;
const QuickCheckPersonal( const QuickCheckPersonal({Key? key, required this.jobId, required this.studentId}) : super(key: key);
{Key? key, required this.jobId, required this.studentId})
: super(key: key);
@override @override
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState(); ConsumerState<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
} }
class _QuickCheckPersonalState extends State<QuickCheckPersonal> class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with CommonMixin {
with CommonMixin {
StudentDetails? studentInfo; StudentDetails? studentInfo;
void initState() { void initState() {
@ -40,18 +40,16 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
params['jobid'] = widget.jobId; params['jobid'] = widget.jobId;
// params['jobid'] = '521646983660101'; // params['jobid'] = '521646983660101';
params['studentId'] = widget.studentId; params['studentId'] = widget.studentId;
BaseStructureResult<StudentDetails?> data = BaseStructureResult<StudentDetails?> data = await _client.getJobPersonalReport(params);
await _client.getJobPersonalReport(params); if (data.data!.studentId != null) {
if(data.data!.studentId != null){
setState(() { setState(() {
studentInfo = data.data; studentInfo = data.data;
}); });
}else{ } else {
Navigator.pop(context); Navigator.pop(context);
ToastUtils.showError('暂无数据'); ToastUtils.showError('暂无数据');
} }
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
@override @override
@ -74,7 +72,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
), ),
actions: [ actions: [
ReturnToHomepage(), ReturnToHomepage(),
/* Title( /* Title(
color: Color(0xFF6888FD), color: Color(0xFF6888FD),
child: Container( child: Container(
child: InkWell( child: InkWell(
@ -89,20 +87,19 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
alignment: Alignment.center, alignment: Alignment.center,
), ),
),*/ ),*/
], ],
), ),
body: SingleChildScrollView( body: SingleChildScrollView(
child: Column( child: Column(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.only(top: 14.r,left: 14.r), padding: EdgeInsets.only(top: 14.r, left: 14.r),
child: Row( child: Row(
children: [ children: [
InkWell( InkWell(
onTap: (){ onTap: () {
RouterManager.router.navigateTo(context, '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}'); RouterManager.router.navigateTo(context,
'${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(studentInfo!.studentName!)}');
}, },
child: Container( child: Container(
width: 93.r, width: 93.r,
@ -112,22 +109,37 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
borderRadius: BorderRadius.circular(4.r), borderRadius: BorderRadius.circular(4.r),
), ),
child: Center( child: Center(
child: Text('历史查询',style: TextStyle(fontSize: 10.r,color: Color(0xFF2080F7)),), child: Text(
'历史作业',
style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)),
),
), ),
), ),
), ),
SizedBox(width: 10.r,), SizedBox(
/*Container( width: 10.r,
width: 93.r, ),
height: 28.r, InkWell(
decoration: BoxDecoration( onTap: () {
color: Color(0xFFEDFFF7), showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId).then((value) {
borderRadius: BorderRadius.circular(4.r), 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: [ children: [
Text( Text(
'客观题', '客观题',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
width: 10.r, width: 10.r,
), ),
Text( Text(
'${studentInfo!.kgValidRate}%', '${studentInfo!.kgValidRate}%',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
), ),
], ],
), ),
SizedBox(height: 10.r,),
SizedBox( 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( child: StudentKgTable(
headList: ['题号', '学生答案', '标准答案'], headList: ['题号', '学生答案', '标准答案'],
bodyList: studentInfo!.kgDetails, bodyList: studentInfo!.kgDetails,
questionNumCall: (no) {
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});
},
), ),
) )
], ],
), ),
), ),
SizedBox(height: 15.r,), SizedBox(
height: 15.r,
),
// //
Container( Container(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
@ -188,25 +207,30 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
children: [ children: [
Text( Text(
'主观题', '主观题',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
), ),
SizedBox( SizedBox(
width: 10.r, width: 10.r,
), ),
Text( Text(
'${studentInfo!.zgValidRate}%', '${studentInfo!.zgValidRate}%',
style: TextStyle( style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
), ),
], ],
), ),
SizedBox(height: 10.r,),
SizedBox( 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( child: StudentZgTable(
headList: ['题号', '用时', '学生答案','批注结果','批注'], headList: ['题号', '用时', '学生答案', '批注结果', '批注'],
bodyList: studentInfo!.zgDetails, bodyList: studentInfo!.zgDetails,
questionNumCall: (no) {
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});
},
), ),
) )
], ],

File diff suppressed because it is too large Load Diff

View File

@ -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 //1widget
),
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();
}
}

View File

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart'; import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
import 'package:marking_app/common/model/job/job_report_model.dart'; import 'package:marking_app/common/model/job/job_report_model.dart';
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart'; import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
import 'package:marking_app/utils/index.dart'; import 'package:marking_app/utils/index.dart';
@ -359,7 +360,7 @@ class _ReportTableState extends State<ReportTable> {
onTap: () { onTap: () {
if (item.questionPicture == null) if (item.questionPicture == null)
return ToastUtils.showInfo('当前试题没有原题'); return ToastUtils.showInfo('当前试题没有原题');
Navigator.push( /* Navigator.push(
context, context,
MaterialPageRoute(builder: (_) { MaterialPageRoute(builder: (_) {
return Scaffold( return Scaffold(
@ -369,7 +370,8 @@ class _ReportTableState extends State<ReportTable> {
NetworkImage(item.questionPicture!)), NetworkImage(item.questionPicture!)),
); );
}), }),
); );*/
ImageDialog.showImgDialog(context,item.questionPicture!);
}, },
child: Text('原题', child: Text('原题',
style: TextStyle( style: TextStyle(

View File

@ -7,143 +7,155 @@ import 'package:marking_app/utils/index.dart';
class StudentGroupList extends StatelessWidget { class StudentGroupList extends StatelessWidget {
final List studentGroups; final List studentGroups;
final Function goNextPage; final Function goNextPage;
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 @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return studentGroups != null && studentGroups.length > 0 return studentGroups != null && studentGroups.length > 0
? isPad()?GridView( ? isPad()
shrinkWrap: true, ? GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( shrinkWrap: true,
crossAxisCount: 2, gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
mainAxisSpacing: 10.r, crossAxisCount: 2,
crossAxisSpacing: 10.r, mainAxisSpacing: 10.r,
childAspectRatio: 556 / 112, crossAxisSpacing: 10.r,
), childAspectRatio: 556 / 112,
children: List.generate(studentGroups.length, (index) {
JobStudentGroups item = studentGroups[index];
String classNames = item.classNames.join(" ");
return InkWell(
onTap: (){
goNextPage(item.groupId,item.groupName);
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
},
child: Container(
padding: EdgeInsets.symmetric(horizontal: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)),
color: Colors.white,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(right: 8.r),
child: Text(
item.groupName,
style: TextStyle(
fontSize: 10.sp, color: Color(0xFF6888FD)),
),
), ),
Expanded( children: List.generate(studentGroups.length, (index) {
child: Text( JobStudentGroups item = studentGroups[index];
classNames, String classNames = item.classNames.join(" ");
style: TextStyle( return InkWell(
fontSize: 10.sp, onTap: () {
color: Color(0xFF999999), goNextPage(item.groupId, item.groupName);
overflow: TextOverflow.ellipsis, // 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( : ListView.builder(
margin: EdgeInsets.only(left: 5.r), shrinkWrap: true,
height: 20.r, itemBuilder: (context, index) {
width: 55.r, JobStudentGroups item = studentGroups[index];
decoration: BoxDecoration( String classNames = item.classNames.join(" ");
borderRadius: return InkWell(
BorderRadius.all(Radius.circular(20.r)), onTap: () {
color: Color(0xFF6888FD), goNextPage(item.groupId, item.groupName);
), // RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
child: Center( },
child: Text( child: Container(
'详情', padding:
style: TextStyle( EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
fontSize: 10.sp, color: Colors.white), 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(
):ListView.builder( padding: EdgeInsets.only(right: 8.r),
shrinkWrap: true, child: Text(
itemBuilder: (context,index){ item.groupName,
JobStudentGroups item = studentGroups[index]; style: TextStyle(
String classNames = item.classNames.join(" "); fontSize: 14.sp, color: Color(0xFF6888FD)),
return Container( ),
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r), ),
margin: EdgeInsets.only(bottom: 10.r), Expanded(
decoration: BoxDecoration( child: Text(
borderRadius: BorderRadius.all(Radius.circular(10.r)), classNames,
color: Colors.white, style: TextStyle(
), fontSize: 12.sp,
child: Row( color: Color(0xFF999999),
mainAxisAlignment: MainAxisAlignment.start, overflow: TextOverflow.ellipsis,
children: [ ),
Padding( textAlign: TextAlign.end,
padding: EdgeInsets.only(right: 8.r), ),
child: Text( ),
item.groupName, rightBtn != null
style: TextStyle( ? rightBtn!
fontSize: 14.sp, color: Color(0xFF6888FD)), : Container(
), margin: EdgeInsets.only(left: 5.r),
), height: 24.r,
Expanded( width: 55.r,
child: Text( decoration: BoxDecoration(
classNames, borderRadius:
style: TextStyle( BorderRadius.all(Radius.circular(20.r)),
fontSize: 12.sp, color: Color(0xFF6888FD),
color: Color(0xFF999999), ),
overflow: TextOverflow.ellipsis, child: Center(
), child: Text(
textAlign: TextAlign.end, '详情',
), style: TextStyle(
), fontSize: 10.sp, color: Colors.white),
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, itemCount: studentGroups.length,
decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(20.r)),
color: Color(0xFF6888FD),
),
child: Center(
child: Text(
'详情',
style: TextStyle(
fontSize: 10.sp, color: Colors.white),
),
),
),
) )
],
),
);
},
itemCount: studentGroups.length,
)
: Padding( : Padding(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r), padding: EdgeInsets.only(
child: MyEmptyWidget(), top: MediaQuery.of(context).size.height / 2 - 200.r),
); child: MyEmptyWidget(),
);
} }
} }

View File

@ -8,6 +8,7 @@ class StudentKgTable extends StatefulWidget {
final List bodyList; final List bodyList;
final int? fixedRows; final int? fixedRows;
final int? fixedCols; final int? fixedCols;
final Function(String)? questionNumCall;
const StudentKgTable({ const StudentKgTable({
Key? key, Key? key,
@ -15,6 +16,7 @@ class StudentKgTable extends StatefulWidget {
required this.bodyList, required this.bodyList,
this.fixedCols = 0, this.fixedCols = 0,
this.fixedRows = 0, this.fixedRows = 0,
this.questionNumCall,
}) : super(key: key); }) : super(key: key);
@override @override
@ -29,34 +31,51 @@ class _StudentKgTableState extends State<StudentKgTable> {
String sortString(String str) { String sortString(String str) {
return String.fromCharCodes(str.codeUnits.toList()..sort()); return String.fromCharCodes(str.codeUnits.toList()..sort());
} }
DataRow _getRow(int index, [Color? color]) { DataRow _getRow(int index, [Color? color]) {
assert(index >= 0); assert(index >= 0);
KgDetails item = widget.bodyList[index]; KgDetails item = widget.bodyList[index];
return DataRow2.byIndex( return DataRow2.byIndex(
index: index, index: index,
color: color != null ? MaterialStateProperty.all(color): null, color: color != null ? MaterialStateProperty.all(color) : null,
cells: [ cells: [
DataCell(Center( DataCell(
child: Padding( InkWell(
padding: EdgeInsets.symmetric(horizontal: 5.r), onTap: () {
child: Text(item.questionNo, if (widget.questionNumCall != null) {
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))), widget.questionNumCall!(item.questionNo);
}
},
child: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
),
),
), ),
)), ),
DataCell(Center( DataCell(Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!, child: Text(
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252): item.studentAnswer == null ? '未作答' : item.studentAnswer!,
item.state == 2?Color(0xFF4CC793): style: TextStyle(
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white), 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( DataCell(Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionAnswer == null ?'':item.questionAnswer!, child: Text(item.questionAnswer == null ? '' : item.questionAnswer!, style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
), ),
)), )),
], ],
@ -74,14 +93,10 @@ class _StudentKgTableState extends State<StudentKgTable> {
dataRowHeight: 40.r, dataRowHeight: 40.r,
headingRowHeight: 40.r, headingRowHeight: 40.r,
border: TableBorder( border: TableBorder(
horizontalInside: BorderSide( horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
width: 1, color: Colors.white, style: BorderStyle.solid), bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide( verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
width: 1, color: Colors.white, style: BorderStyle.solid), headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
verticalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) =>
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)), headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6), fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400], fixedCornerColor: Colors.grey[400],
@ -95,14 +110,12 @@ class _StudentKgTableState extends State<StudentKgTable> {
var item = widget.headList[index]; var item = widget.headList[index];
return DataColumn2( return DataColumn2(
label: Center( label: Center(
child: Text(item, child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
), ),
// size: ColumnSize.S, // size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/3, fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 3,
); );
}), }),
rows: List<DataRow>.generate(widget.bodyList.length, rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
(index) => _getRow(index, Color(0xFFF5F5F5))));
} }
} }

View File

@ -2,6 +2,8 @@ import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:marking_app/common/model/job/job_data_report.dart'; import 'package:marking_app/common/model/job/job_data_report.dart';
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
import 'package:marking_app/pages/homework_correction/widget/answer_handwriting.dart';
import 'package:marking_app/utils/common_utils.dart'; import 'package:marking_app/utils/common_utils.dart';
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart'; import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
import 'package:photo_view/photo_view.dart'; import 'package:photo_view/photo_view.dart';
@ -11,6 +13,7 @@ class StudentZgTable extends StatefulWidget {
final List bodyList; final List bodyList;
final int? fixedRows; final int? fixedRows;
final int? fixedCols; final int? fixedCols;
final Function(String)? questionNumCall;
const StudentZgTable({ const StudentZgTable({
Key? key, Key? key,
@ -18,6 +21,7 @@ class StudentZgTable extends StatefulWidget {
required this.bodyList, required this.bodyList,
this.fixedCols = 0, this.fixedCols = 0,
this.fixedRows = 0, this.fixedRows = 0,
this.questionNumCall,
}) : super(key: key); }) : super(key: key);
@override @override
@ -29,22 +33,22 @@ class _StudentZgTableState extends State<StudentZgTable> {
int? _sortColumnIndex; int? _sortColumnIndex;
bool _sortAscending = true; bool _sortAscending = true;
void showImgDialog(BuildContext context,String imgUrl){ /*void showImgDialog(BuildContext context,String imgUrl){
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute(builder: (_) { MaterialPageRoute(builder: (_) {
return Scaffold( return Scaffold(
appBar: AppBar(), appBar: AppBar(),
body: SizedBox( body: SizedBox(
/* width: MediaQuery.of(context).size.width * 0.6, */ /* width: MediaQuery.of(context).size.width * 0.6,
height: MediaQuery.of(context).size.height * 0.6,*/ height: MediaQuery.of(context).size.height * 0.6,*/ /*
child: PhotoView( child: PhotoView(
imageProvider: imageProvider:
NetworkImage(imgUrl)), NetworkImage(imgUrl)),
), ),
); );
}), }),
); );*/
/* showDialog(context: context, builder: (BuildContext context){ /* showDialog(context: context, builder: (BuildContext context){
return AlertDialog( return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r), // insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
@ -62,64 +66,75 @@ class _StudentZgTableState extends State<StudentZgTable> {
), ),
); );
});*/ });*/
} // }
DataRow _getRow(int index, [Color? color]) { DataRow _getRow(int index, [Color? color]) {
assert(index >= 0); assert(index >= 0);
KgDetails item = widget.bodyList[index]; KgDetails item = widget.bodyList[index];
return DataRow2.byIndex( return DataRow2.byIndex(
index: index, index: index,
color: color != null ? MaterialStateProperty.all(color): null, color: color != null ? MaterialStateProperty.all(color) : null,
cells: [ 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( DataCell(InkWell(
onTap: (){ onTap: () {
if(item.state != 0){ if (widget.questionNumCall != null) {
showImgDialog(context,item.studentAnswer!); widget.questionNumCall!(item.questionNo);
} }
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.state!=0 ?'查看':'--', child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
), ),
), ),
)), )),
DataCell(Center( DataCell(Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: item.state == 2? child: Text(CommonUtils.second2HMS(item.useTime!), style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
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( DataCell(InkWell(
onTap: (){ onTap: () {
if(item.state==1 || item.state==2){ if (item.state != 0) {
showImgDialog(context,item.annotateAnswers!); ImageDialog.showImgDialog(context, item.studentAnswer!);
} }
}, },
child: Center( child: Center(
child: Padding( child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r), padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.state==1 || item.state==2?'查看':'--', child: Text(item.state != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
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, headingRowHeight: 40.r,
dataRowHeight: 40.r, dataRowHeight: 40.r,
border: TableBorder( border: TableBorder(
horizontalInside: BorderSide( horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
width: 1, color: Colors.white, style: BorderStyle.solid), bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide( verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
width: 1, color: Colors.white, style: BorderStyle.solid), headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
verticalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) =>
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)), headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6), fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400], fixedCornerColor: Colors.grey[400],
@ -159,14 +170,12 @@ class _StudentZgTableState extends State<StudentZgTable> {
var item = widget.headList[index]; var item = widget.headList[index];
return DataColumn2( return DataColumn2(
label: Center( label: Center(
child: Text(item, child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
), ),
// size: ColumnSize.S, // size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/5, fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
); );
}), }),
rows: List<DataRow>.generate(widget.bodyList.length, rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
(index) => _getRow(index, Color(0xFFF5F5F5))));
} }
} }

View File

@ -16,7 +16,6 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:marking_app/common/mixin/common.dart'; import 'package:marking_app/common/mixin/common.dart';
import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/common/base_structure_result.dart';
import 'package:marking_app/common/model/user/user_info.dart'; import 'package:marking_app/common/model/user/user_info.dart';
import 'package:marking_app/pages/homework_correction/index.dart';
import 'package:marking_app/pages/reports/index.dart'; import 'package:marking_app/pages/reports/index.dart';
import 'package:marking_app/provider/do_marking_provider.dart'; import 'package:marking_app/provider/do_marking_provider.dart';
import 'package:marking_app/provider/upload_file_provider.dart'; import 'package:marking_app/provider/upload_file_provider.dart';
@ -30,6 +29,8 @@ import 'package:marking_app/utils/index.dart';
import 'package:marking_app/utils/request/rest_client.dart'; import 'package:marking_app/utils/request/rest_client.dart';
import 'package:package_info/package_info.dart'; import 'package:package_info/package_info.dart';
import 'homework_correction/job_home.dart';
class TheMainPage extends StatefulHookConsumerWidget { class TheMainPage extends StatefulHookConsumerWidget {
const TheMainPage({Key? key}) : super(key: key); const TheMainPage({Key? key}) : super(key: key);
@ -45,7 +46,13 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
Timer? _timer; Timer? _timer;
bool showUpgrade = false; 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; int tabIndex = 0;
/// icon /// icon
@ -79,7 +86,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
if (!value) { if (!value) {
return toLoginPage(context); return toLoginPage(context);
} }
if(ref.read(userProvider).id == '540117143121989') return; if (ref.read(userProvider).id == '540117143121989') return;
ref.read(userReportProvider.notifier).initUserReport(); // ref.read(userReportProvider.notifier).initUserReport(); //
}); // token }); // token
// //
@ -99,9 +106,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
void getAppUpgrade(UserInfo user) async { void getAppUpgrade(UserInfo user) async {
try { try {
showUpgrade = true; showUpgrade = true;
// if (user.loginName == '18888888888') return; if (['18888888888'].contains(user.loginName)) return;
// if (user.loginName == 'u0001') return;
if (user.loginName == '13350366646') return;
// //
String deviceInfo; String deviceInfo;
int deviceType; int deviceType;
@ -151,7 +156,8 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
child: Scaffold( child: Scaffold(
body: PageView( body: PageView(
controller: _pageController, controller: _pageController,
physics: const BouncingScrollPhysics(), // physics: const BouncingScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted), onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted),
children: _bodyList, children: _bodyList,
), ),

View File

@ -6,14 +6,16 @@
* @FilePath: \marking_app\lib\routes\RouterManager.dart * @FilePath: \marking_app\lib\routes\RouterManager.dart
* @Description: * @Description:
*/ */
import 'dart:convert';
import 'package:fluro/fluro.dart'; import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:marking_app/common/model/enum/marking_list_type.dart'; import 'package:marking_app/common/model/enum/marking_list_type.dart';
import 'package:marking_app/pages/common/startUpPage.dart'; import 'package:marking_app/pages/common/startUpPage.dart';
import 'package:marking_app/pages/homework_correction/answer_trajectory.dart';
import 'package:marking_app/pages/homework_correction/answer_trajectory_job_detail.dart';
import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart'; import 'package:marking_app/pages/homework_correction/do_papers_job_exam.dart';
import 'package:marking_app/pages/homework_correction/index.dart';
import 'package:marking_app/pages/homework_correction/job_knowledge_points.dart';
import 'package:marking_app/pages/homework_correction/job_knowledge_points_detail.dart';
import 'package:marking_app/pages/homework_correction/job_personal_detail.dart'; import 'package:marking_app/pages/homework_correction/job_personal_detail.dart';
import 'package:marking_app/pages/homework_correction/job_priority_review_set.dart'; import 'package:marking_app/pages/homework_correction/job_priority_review_set.dart';
import 'package:marking_app/pages/homework_correction/job_report.dart'; import 'package:marking_app/pages/homework_correction/job_report.dart';
@ -66,6 +68,8 @@ class RouterManager {
static const String jobListParticipateInClassPath = '/job/list/participateInClass'; static const String jobListParticipateInClassPath = '/job/list/participateInClass';
// ==> // ==>
static const String jobFavoritePagePath = '/job/favorite/index'; static const String jobFavoritePagePath = '/job/favorite/index';
// ==>
static const String jobMainListPagePath = '/job/mainList/index';
static const String reportClassTeacherPath = 'report/details/reportClassTeacher'; static const String reportClassTeacherPath = 'report/details/reportClassTeacher';
static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher'; static const String reportSubjectTeacherPath = 'report/details/reportSubjectTeacher';
@ -81,6 +85,10 @@ class RouterManager {
static const String reportHistoryPath = '/report_detail/report_history'; static const String reportHistoryPath = '/report_detail/report_history';
static const String registerPath = '/register/index'; static const String registerPath = '/register/index';
static const String logOffPath = '/mine/log_off'; static const String logOffPath = '/mine/log_off';
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
static const String answerTrajectoryJobDetailPath = '/homework_correction/answer_trajectory_job_detail';
// TheMine // TheMine
static final FluroRouter router = FluroRouter(); static final FluroRouter router = FluroRouter();
@ -103,18 +111,14 @@ class RouterManager {
} }
// //
static final _startUpPageHandler = static final _startUpPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const StartUpPage());
// //
static final _mainPageHandler = static final _mainPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheMainPage());
// //
static final _loginPageHandler = static final _loginPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const TheLogin());
// //
static final _progressPageHandler = Handler( static final _progressPageHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => handlerFunc: (BuildContext? context, Map<String, List<String>> params) => Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
Progress(int.parse(params['examSubjectId']![0]), params['name']![0]));
// //
static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) { static final _reviewPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
int markingUserId = int.parse(params['markingUserId']![0]); int markingUserId = int.parse(params['markingUserId']![0]);
@ -133,11 +137,8 @@ class RouterManager {
// //
static final _reviewAbnormalPageHandler = Handler( static final _reviewAbnormalPageHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => ProgressAbnormal( handlerFunc: (BuildContext? context, Map<String, List<String>> params) =>
int.parse(params['examSubjectId']![0]), ProgressAbnormal(int.parse(params['examSubjectId']![0]), params['markingId']![0], params['name']![0], params['questionNum']![0]));
params['markingId']![0],
params['name']![0],
params['questionNum']![0]));
// //
static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) { static final _markingDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
try { try {
@ -179,8 +180,7 @@ class RouterManager {
} }
}); });
// //
static final _markingHomeworkDoPageHandler = static final _markingHomeworkDoPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
try { try {
int taskId = int.parse(params['taskId']![0]); int taskId = int.parse(params['taskId']![0]);
int jobId = int.parse(params['jobId']![0]); int jobId = int.parse(params['jobId']![0]);
@ -224,8 +224,7 @@ class RouterManager {
handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(), handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const OhterPage(),
); );
static final _reportClassTeacherPageHandler = static final _reportClassTeacherPageHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
int examId = int.parse(params['examId']![0]); int examId = int.parse(params['examId']![0]);
return ReportClassTeacher(examId: examId); return ReportClassTeacher(examId: examId);
@ -295,7 +294,7 @@ class RouterManager {
if (params['gradeId'] != null && params['gradeId']?[0] != null && params['gradeId']![0] != 'null') { if (params['gradeId'] != null && params['gradeId']?[0] != null && params['gradeId']![0] != 'null') {
gradeId = int.parse(params['gradeId']![0]); 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) { handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
String groupId = params['groupId']![0]; String groupId = params['groupId']![0];
String title = params['title']![0]; String title = params['title']![0];
return JobPriorityReviewSet(groupId: groupId,title:title); String? page = params['page']?[0];
return JobPriorityReviewSet(groupId: groupId, title: title, page: page);
}, },
); );
// //
static final _jobStudentGroupPageHandler = Handler( static final _jobStudentGroupPageHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) { handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
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') { if (params['gradeId'] != null && params['gradeId']?[0] != null && params['gradeId']![0] != 'null') {
gradeId = int.parse(params['gradeId']![0]); 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) { 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]); 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( static final _reportCardDialogPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) { 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]); int studentId = int.parse(params['studentId']![0]);
return ReportCardDialog(studentId: studentId,studentName:studentName);*/ return ReportCardDialog(studentId: studentId,studentName:studentName);*/
}, },
@ -361,20 +367,52 @@ class RouterManager {
// //
static final _reportHistoryPathHandler = Handler( static final _reportHistoryPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) { 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]);*/ int studentId = int.parse(params['studentId']![0]);*/
return ReportHistory(); return ReportHistory();
}, },
); );
// //
static final _registerPathHandler = static final _registerPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const Register());
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const Register());
// //
static final _logOffPathHandler = static final _logOffPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const LogOff());
Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const LogOff());
//
static final _jobKnowledgePointsPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
/* String studentName = params['studentName']![0];
int studentId = int.parse(params['studentId']![0]);*/
return JobKnowledgePoints();
},
);
//
static final _jobKnowledgePointsDetailPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
String knowledgeName = params['knowledgeName']![0];
int knowledgeId = int.parse(params['knowledgeId']![0]);
return JobKnowledgePointsDetail(knowledgeName: knowledgeName, knowledgeId: knowledgeId);
},
);
//
static final _answerTrajectoryPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
return AnswerTrajectory();
},
);
//
static final _answerTrajectoryJobDetailPathHandler = Handler(
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
int jobId = int.parse(params['jobId']![0]);
String jobName = params['jobName']![0];
String genderName = params['genderName']![0];
return AnswerTrajectoryJobDetail(jobId: jobId, jobName: jobName, genderName: genderName);
},
);
// //
// static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers()); // static final _doMarkingPapers = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => MarkingPapers());
@ -392,38 +430,34 @@ class RouterManager {
router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material); router.define(markingReviewPath, handler: _reviewPageHandler, transitionType: TransitionType.material);
router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material); router.define(markingJobReviewPath, handler: _reviewJobPageHandler, transitionType: TransitionType.material);
router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material); router.define(markingDoPath, handler: _markingDoPageHandler, transitionType: TransitionType.material);
router.define(markingHomeworkDoPath, router.define(markingHomeworkDoPath, handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material);
handler: _markingHomeworkDoPageHandler, transitionType: TransitionType.material); router.define(markingReviewAbnormalPath, handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
router.define(markingReviewAbnormalPath,
handler: _reviewAbnormalPageHandler, transitionType: TransitionType.material);
router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material); router.define(agreementPath, handler: _agreementPageHandler, transitionType: TransitionType.material);
router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material); router.define(ohterMainPagePath, handler: _ohterMainPageHandler, transitionType: TransitionType.material);
router.define(reportClassTeacherPath, router.define(reportClassTeacherPath, handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material);
handler: _reportClassTeacherPageHandler, transitionType: TransitionType.material); router.define(reportSubjectTeacherPath, handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
router.define(reportSubjectTeacherPath, router.define(reportPersonalSubjectPath, handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
handler: _reportSubjectTeacherPageHandler, transitionType: TransitionType.material);
router.define(reportPersonalSubjectPath,
handler: _reportPersonalSubjectPageHandler, transitionType: TransitionType.material);
router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material); router.define(userMinePath, handler: _userMinePageHandler, transitionType: TransitionType.material);
router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material); router.define(reportDetailPath, handler: _reportDetailPath, transitionType: TransitionType.material);
router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material); router.define(jobReportPagePath, handler: _jobReportPageHandler, transitionType: TransitionType.material);
router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material); router.define(jobExamPagePath, handler: _jobExamPageHandler, transitionType: TransitionType.material);
router.define(jobListParticipateInClassPath, router.define(jobListParticipateInClassPath, handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
handler: _jobListParticipateInClassHandler, transitionType: TransitionType.material);
router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material); router.define(quickDataCheckPath, handler: _quickDataCheckPageHandler, transitionType: TransitionType.material);
router.define(quickCheckPersonalPath, router.define(quickCheckPersonalPath, handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material);
handler: _quickCheckPersonalPageHandler, transitionType: TransitionType.material); router.define(jobPriorityReviewSetPath, handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
router.define(jobPriorityReviewSetPath,
handler: _jobPriorityReviewSetPageHandler, transitionType: TransitionType.material);
router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material); router.define(jobStudentGroupPath, handler: _jobStudentGroupPageHandler, transitionType: TransitionType.material);
router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material); router.define(jobFavoritePagePath, handler: _jobFavoritePagePathHandler, transitionType: TransitionType.material);
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material); router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material); router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material); router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
router.define(registerPath, handler: _registerPathHandler,transitionType: TransitionType.material); router.define(registerPath, handler: _registerPathHandler, transitionType: TransitionType.material);
router.define(logOffPath, handler: _logOffPathHandler,transitionType: TransitionType.material); router.define(logOffPath, handler: _logOffPathHandler, transitionType: TransitionType.material);
// getTransition() 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) { router.notFoundHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
toPrint(val: "ROUTE WAS NOT FOUND !!!"); toPrint(val: "ROUTE WAS NOT FOUND !!!");

View File

@ -45,4 +45,26 @@ class CommonUtils {
} }
return hms; return hms;
} }
static DateTime getWeekStartDate() {
DateTime now = DateTime.now();
int dayOfWeek = now.weekday; // 17
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)); //
}
} }

View File

@ -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;
}
}

View File

@ -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_data_report.dart';
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart'; import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
import 'package:marking_app/common/model/job/job_fav_student.dart'; import 'package:marking_app/common/model/job/job_fav_student.dart';
import 'package:marking_app/common/model/job/job_favorite_item_model.dart';
import 'package:marking_app/common/model/job/job_favorite_model.dart'; import 'package:marking_app/common/model/job/job_favorite_model.dart';
import 'package:marking_app/common/model/job/job_handwriting.dart';
import 'package:marking_app/common/model/job/job_knowledge_detail_student.dart';
import 'package:marking_app/common/model/job/job_knowledge_points.dart';
import 'package:marking_app/common/model/job/job_knowledge_points_detail.dart';
import 'package:marking_app/common/model/job/job_level_set_params.dart'; import 'package:marking_app/common/model/job/job_level_set_params.dart';
import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart'; import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart';
import 'package:marking_app/common/model/job/job_page_tab.dart'; import 'package:marking_app/common/model/job/job_page_tab.dart';
@ -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_student_level.dart';
import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/common/model/job/job_task_item.dart';
import 'package:marking_app/common/model/job/marking_text_question_job.dart'; import 'package:marking_app/common/model/job/marking_text_question_job.dart';
import 'package:marking_app/common/model/job/marking_text_question_job_params.dart';
import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart'; import 'package:marking_app/common/model/job/marking_text_question_job_tab_params.dart';
import 'package:marking_app/common/model/job/review_again_list_params.dart'; import 'package:marking_app/common/model/job/review_again_list_params.dart';
import 'package:marking_app/common/model/job/upload_file_interface_config.dart'; import 'package:marking_app/common/model/job/upload_file_interface_config.dart';
@ -73,8 +75,7 @@ abstract class RestClient {
// //
@the_retrofit.GET("/api/version/latest?mobileTypeEnum={mobileTypeEnum}") @the_retrofit.GET("/api/version/latest?mobileTypeEnum={mobileTypeEnum}")
Future<BaseStructureResult<SystemVersion>> getLatestVersion( Future<BaseStructureResult<SystemVersion>> getLatestVersion(@the_retrofit.Path("mobileTypeEnum") int mobileTypeEnum); // 1 2 ios
@the_retrofit.Path("mobileTypeEnum") int mobileTypeEnum); // 1 2 ios
// /auth/login/exam-marking/user-mobile // /auth/login/exam-marking/user-mobile
@the_retrofit.POST("/auth/login/exam-marking/user") @the_retrofit.POST("/auth/login/exam-marking/user")
@ -90,8 +91,7 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/marking/list") @the_retrofit.GET("/api/marking/list")
Future<BaseStructureResult<BasePageData<MarkingItem>>> getMarkingsByPage( Future<BaseStructureResult<BasePageData<MarkingItem>>> getMarkingsByPage(@the_retrofit.Queries() MarkingListParams params);
@the_retrofit.Queries() MarkingListParams params);
// /api/marking/list // /api/marking/list
@ -116,13 +116,11 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/marking/question") @the_retrofit.GET("/api/marking/question")
Future<BaseStructureResult<MarkingTextQuestion>> getTestQuestionsOfExam( Future<BaseStructureResult<MarkingTextQuestion>> getTestQuestionsOfExam(@the_retrofit.Queries() MarkingTextQuestionParams params);
@the_retrofit.Queries() MarkingTextQuestionParams params);
// => tab // => tab
@the_retrofit.GET("/api/marking/{markingUserId}/tab") @the_retrofit.GET("/api/marking/{markingUserId}/tab")
Future<BaseStructureResult<List<MarkingTextQuestionTab>>> getTestQuestionsOfTab( Future<BaseStructureResult<List<MarkingTextQuestionTab>>> getTestQuestionsOfTab(@the_retrofit.Path("markingUserId") int markingUserId);
@the_retrofit.Path("markingUserId") int markingUserId);
// => Tag阅卷详情 // => Tag阅卷详情
@the_retrofit.GET("/api/marking/{markingUserId}/progress") @the_retrofit.GET("/api/marking/{markingUserId}/progress")
@ -136,16 +134,15 @@ abstract class RestClient {
// => tab下某次试题 // => tab下某次试题
@the_retrofit.GET("/api/marking/{markingUserId}/detail") @the_retrofit.GET("/api/marking/{markingUserId}/detail")
Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(@the_retrofit.Path("markingUserId") int markingUserId, Future<BaseStructureResult<MarkingTextQuestion>> getTabOfExam(
@the_retrofit.Queries() MarkingTextQuestionTabParams params); @the_retrofit.Path("markingUserId") int markingUserId, @the_retrofit.Queries() MarkingTextQuestionTabParams params);
// => // =>
@the_retrofit.PUT("/api/marking") @the_retrofit.PUT("/api/marking")
Future<BaseStructureResult<bool>> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params); Future<BaseStructureResult<bool>> submitTestQuestionsOfExam(@the_retrofit.Body() SubmitExamParams params);
@the_retrofit.PUT("/api/marking/error") @the_retrofit.PUT("/api/marking/error")
Future<BaseStructureResult<bool>> submitTestQuestionsOfExamAbnormal( Future<BaseStructureResult<bool>> submitTestQuestionsOfExamAbnormal(@the_retrofit.Body() SubmitExamAbnormalParams params);
@the_retrofit.Body() SubmitExamAbnormalParams params);
// => // =>
@the_retrofit.PUT("/api/marking/review") @the_retrofit.PUT("/api/marking/review")
@ -157,8 +154,7 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/marking/original-paper") @the_retrofit.GET("/api/marking/original-paper")
Future<BaseStructureResult<List<String>>> getViewOriginalVolume( Future<BaseStructureResult<List<String>>> getViewOriginalVolume(@the_retrofit.Query("markingUserDetailId") String markingUserDetailId);
@the_retrofit.Query("markingUserDetailId") String markingUserDetailId);
// => // =>
@the_retrofit.GET("/api/marking/answer") @the_retrofit.GET("/api/marking/answer")
@ -184,25 +180,21 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/marking/error-info") @the_retrofit.GET("/api/marking/error-info")
Future<BaseStructureResult<ExceptionInfo>> getMarkingQuestionsErrorInfo( Future<BaseStructureResult<ExceptionInfo>> getMarkingQuestionsErrorInfo(@the_retrofit.Query("markingUserDetailId") int id);
@the_retrofit.Query("markingUserDetailId") int id);
// => // =>
@the_retrofit.GET("/api/marking/history-score") @the_retrofit.GET("/api/marking/history-score")
Future<BaseStructureResult<List<HistoricalScoring>>> getArbitrateOfHistoryScore( Future<BaseStructureResult<List<HistoricalScoring>>> getArbitrateOfHistoryScore(@the_retrofit.Query("markingUserDetailId") int id);
@the_retrofit.Query("markingUserDetailId") int id);
// => // =>
@the_retrofit.GET("/api/marking/rating-info") @the_retrofit.GET("/api/marking/rating-info")
Future<BaseStructureResult<List<RatingProgressModel>>> getMarkingRatingInfo( Future<BaseStructureResult<List<RatingProgressModel>>> getMarkingRatingInfo(@the_retrofit.Query("markingUserId") int id);
@the_retrofit.Query("markingUserId") int id);
// ------------------------------------------ ------------------------------------------ // ------------------------------------------ ------------------------------------------
// => // =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task")
Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage( Future<BaseStructureResult<BasePageData<JobTaskItem>>> getJobsByPage(@the_retrofit.Queries() MarkingListParams params);
@the_retrofit.Queries() MarkingListParams params);
// => tabs // => tabs
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tabs")
@ -210,13 +202,11 @@ abstract class RestClient {
// => tabs // => tabs
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/students") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Marking/students")
Future<BaseStructureResult<List<JobConcernedWithStudent>>> getJobWithStudents( Future<BaseStructureResult<List<JobConcernedWithStudent>>> getJobWithStudents(@the_retrofit.Queries() JobConcernedWithStudentParams params);
@the_retrofit.Queries() JobConcernedWithStudentParams params);
// => tab下某次试题 // => tab下某次试题
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/detail") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/detail")
Future<BaseStructureResult<MarkingTextQuestionJob>> getJobTabOfExam( Future<BaseStructureResult<MarkingTextQuestionJob>> getJobTabOfExam(@the_retrofit.Queries() MarkingTextQuestionJobTabParams params);
@the_retrofit.Queries() MarkingTextQuestionJobTabParams params);
// => // =>
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Task") @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Task")
@ -228,8 +218,7 @@ abstract class RestClient {
// => tab下某次试题 // => tab下某次试题
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/questions") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/questions")
Future<BaseStructureResult<BasePageData<ReviewItem>>> toGoreviewAgainPage( Future<BaseStructureResult<BasePageData<ReviewItem>>> toGoreviewAgainPage(@the_retrofit.Queries() ReviewAgainListParams params);
@the_retrofit.Queries() ReviewAgainListParams params);
// => // =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/answer") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/answer")
@ -240,8 +229,7 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Upload") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Upload")
Future<BaseStructureResult<UploadFileInterfaceConfig>> getUploadFile( Future<BaseStructureResult<UploadFileInterfaceConfig>> getUploadFile(@the_retrofit.Queries() UploadFileInterfaceConfigParams params);
@the_retrofit.Queries() UploadFileInterfaceConfigParams params);
// => // =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/studentAnswerHandwriting") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/studentAnswerHandwriting")
@ -250,18 +238,16 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
Future<BaseStructureResult<bool>> getJobCollect(@the_retrofit.Query("taskId") int taskId, Future<BaseStructureResult<bool>> getJobCollect(
@the_retrofit.Query("studentId") int studentId, @the_retrofit.Query("paperId") int paperId); @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") @the_retrofit.POST("/api/read/cancel-job-read-level")
Future<BaseStructureResult<bool>> jobPriorityReviewCancel( Future<BaseStructureResult<bool>> jobPriorityReviewCancel(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
// => // =>
@the_retrofit.POST("/api/read/join-read-level") @the_retrofit.POST("/api/read/join-read-level")
Future<BaseStructureResult> jobPriorityReviewJoin( Future<BaseStructureResult> jobPriorityReviewJoin(@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
@the_retrofit.Field("jobId") int jobId, @the_retrofit.Field("studentId") int studentId);
// => // =>
@the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Dpc/collect") @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/api/Dpc/collect")
@ -296,13 +282,11 @@ abstract class RestClient {
// => ==> // => ==>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks") @the_retrofit.GET("${RequestConfig.hwProxyKeywords}/api/Task/tasks")
Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass( Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass(@the_retrofit.Query("markingId") int jobId);
@the_retrofit.Query("markingId") int jobId);
// => // =>
@the_retrofit.GET("/dpc-api/api/read/job-favorite-count-by-class") @the_retrofit.GET("/dpc-api/api/read/job-favorite-count-by-class")
Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavoriteNumber( Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavoriteNumber(@the_retrofit.Query("jobid") int jobId);
@the_retrofit.Query("jobid") int jobId);
// => // =>
@the_retrofit.GET("/api/jobs/fav-student-jobs") @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") @the_retrofit.POST("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/cancel-favorite")
Future<BaseStructureResult<bool>> toJobCancelFavorite( Future<BaseStructureResult<bool>> toJobCancelFavorite(@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId);
@the_retrofit.Field() int jobId, @the_retrofit.Field() int studentId);
// => // =>
@the_retrofit.GET("/api/read/job-data-center-report") @the_retrofit.GET("/api/read/job-data-center-report")
Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport( Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(@the_retrofit.Queries() Map<String, dynamic> params);
@the_retrofit.Queries() Map<String, dynamic> params);
// => -- // => --
@the_retrofit.GET("/api/read/job-data-center-student-report") @the_retrofit.GET("/api/read/job-data-center-student-report")
@ -329,8 +311,7 @@ abstract class RestClient {
// => // =>
@the_retrofit.GET("/api/read/job-read-level-student-groups") @the_retrofit.GET("/api/read/job-read-level-student-groups")
Future<BaseStructureResult<List<JobStudentGroups>>> getJobLevelStudentGroups( Future<BaseStructureResult<List<JobStudentGroups>>> getJobLevelStudentGroups(@the_retrofit.Query("account") String account);
@the_retrofit.Query("account") String account);
// => // =>
@the_retrofit.GET("/api/read/job-read-level") @the_retrofit.GET("/api/read/job-read-level")
@ -343,19 +324,55 @@ abstract class RestClient {
// => // =>
@the_retrofit.POST("/api/jobs/de-fav-student-job") @the_retrofit.POST("/api/jobs/de-fav-student-job")
Future<BaseStructureResult> getJobDeFavorites(@the_retrofit.Field("jobId") int jobId, Future<BaseStructureResult> getJobDeFavorites(
@the_retrofit.Field("studentId") int studentId, @the_retrofit.Field("questionPage") int questionPage); @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") @the_retrofit.GET("/api/read/student-job-history")
Future<BaseStructureResult<JobStudentHistory>> getStudentJobHistory( Future<BaseStructureResult<JobStudentHistory>> getStudentJobHistory(
@the_retrofit.Query("StudentId") int studentId, @the_retrofit.Query("StudentId") int studentId,
@the_retrofit.Query("IsPaper") bool isPaper, @the_retrofit.Query("IsPaper") bool isPaper,
@the_retrofit.Query("DateStart") String? dateStart, @the_retrofit.Query("DateStart") String? dateStart,
@the_retrofit.Query("DateEnd") String? dateEnd, @the_retrofit.Query("DateEnd") String? dateEnd,
@the_retrofit.Query("Page") int page, @the_retrofit.Query("Page") int page,
@the_retrofit.Query("PageSize") int pageSize, @the_retrofit.Query("PageSize") int pageSize,
); );
// =>
@the_retrofit.GET("/api/jobs/knowledge-report")
Future<BaseStructureResult<List<KnowledgePoints>>> getKnowledgeReport(
@the_retrofit.Query("dateStart") String? dateStart,
@the_retrofit.Query("dateEnd") String? dateEnd,
@the_retrofit.Query("knowledgeName") String? knowledgeName,
);
// =>
@the_retrofit.GET("/api/jobs/knowledge-detail-report")
Future<BaseStructureResult<List<KnowledgePointsDetail>>> getKnowledgeReportDetail(
@the_retrofit.Query("KnowledgeId") int knowledgeId,
);
// =>
@the_retrofit.GET("/api/jobs/knowledge-question-detail/{questionid}")
Future<BaseStructureResult<List<JobKnowledgeDetailStudent>>> getKnowledgeStudent(
@the_retrofit.Path("questionid") int questionid,
);
// =>
@the_retrofit.GET("/api/jobs/question-paper-img/{sectionid}/{questionno}")
Future<BaseStructureResult<String>> getKnowledgeImg(
@the_retrofit.Path("sectionid") int questionid,
@the_retrofit.Path("questionno") String questionno,
);
// => 稿
@the_retrofit.GET("/api/jobs/student-paper-handwriting")
Future<BaseStructureResult<JobHandwriting>?> getHandwriting(
@the_retrofit.Query("jobId") int jobId,
@the_retrofit.Query("studentId") int studentId,
@the_retrofit.Query("questionNo") int? questionNo,
@the_retrofit.Query("pageNum") int? pageNum,
);
// //
@the_retrofit.POST("/auth/login/reg") @the_retrofit.POST("/auth/login/reg")
@ -372,5 +389,4 @@ abstract class RestClient {
// //
@the_retrofit.POST("/auth/login/lg") @the_retrofit.POST("/auth/login/lg")
Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName); Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName);
} }