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

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;
int intervalTime; //
GestureRecording({
required this.eraser,
required this.annotationSwitch,
this.data,
this.usageTime,
this.scopeBox = false,
this.intervalTime = 0,
});
}
/**
* (稿)
*/
class GestureHandwritingRecording {
int stroke;
int usageTime; //
Offset data;
int intervalTime; //
GestureHandwritingRecording({
required this.stroke,
required this.data,
required this.usageTime,
required this.intervalTime,
});
}

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;
TestQuestionsImageInfo(
{required this.width,
required this.height,
required this.url,
required this.boxWidth,
required this.boxHeight,
this.pixelRatio = 1}) {
{required this.width, required this.height, required this.url, required this.boxWidth, required this.boxHeight, this.pixelRatio = 1}) {
// print('图片宽度:$width');
// print('图片高度:$height');
@ -60,6 +55,14 @@ class TestQuestionsImageInfo extends Object {
}
}
//
void calculateStartAndEndHeight([double otherHeight = 0]) {
if (scaleHeight != null) {
imageHeightOffsetStart = (boxHeight - (scaleHeight! + otherHeight)) / 2;
imageHeightOffsetend = imageHeightOffsetStart! + scaleHeight!;
}
}
factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);

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()
class MarkingListParams extends BasePage {
@JsonKey(name: 'isFinish')
bool isFinish;
bool? isFinish;
//
@JsonKey(name: 'PageType')
@ -27,7 +27,7 @@ class MarkingListParams extends BasePage {
int? markingType; // 1 2
MarkingListParams({
required this.isFinish,
this.isFinish,
required this.pageType,
required page,
required limit,

View File

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

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

View File

@ -290,7 +290,11 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
var _currentTab = _useSwitchStudentAndType.currentTab.value;
var _pageIndex = _currentTab?.pageIndex;
if (_currentTab == null || _pageIndex == null) return;
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
var theLastQuestion = _currentTab.finishCount + 1 == _currentTab.total; //
_useSwitchStudentAndType
.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: theLastQuestion)
.then((value) {
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
if (_currentTab.finishCount < _currentTab.total) {
if (_currentTab.finishCount + 1 == _currentTab.total) {
@ -366,7 +370,9 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 4,
child: Container(
child: Stack(
children: [
Container(
padding: EdgeInsets.only(left: 10.w),
decoration: BoxDecoration(
color: Color.fromRGBO(244, 244, 244, 1),
@ -398,6 +404,22 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
},
),
),
Positioned(
left: 2.w,
child: Stack(
alignment: const FractionalOffset(0.52, 0.24),
children: [
Icon(
const IconData(0xe63d, fontFamily: "AlibabaIcon"),
size: 12.sp,
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1),
),
quickText('优先', size: 4.sp, color: Colors.white),
],
),
),
],
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
@ -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,7 +863,6 @@ Widget $examPaperAndScoringKeyboardView(
],
),
),
if (question.accuracy > 0)
Padding(
padding: EdgeInsets.only(bottom: 1.5.h),
child: quickText(

View File

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

View File

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

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 {
print(widget.studentId);
RestClient _client = await getClient();
BaseStructureResult<JobStudentHistory> res =
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 {
final String groupId;
final String title;
final String? page;
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title})
const JobPriorityReviewSet({Key? key, required this.groupId,required this.title,this.page = ''})
: super(key: key);
@override
@ -207,8 +208,27 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
fontSize: 12.sp,
color: Color(0xFF6888FD)),
)),
item.readLevel == 1
? InkWell(
widget.page == 'answerTrajectory'?Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
borderRadius: BorderRadius.all(Radius.circular(20.r)),
),
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
)):widget.page == 'history'?Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
color: Color(0xFF6888FD),
borderRadius: BorderRadius.all(Radius.circular(20.r))
),
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
): item.readLevel == 1
?
InkWell(
onTap: () {
setState(() {
isClicking = true;
@ -284,34 +304,6 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
),
),
),
/* SizedBox(
width: 5.r,
),
InkWell(
onTap: () {
RouterManager.router.navigateTo(context,
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
},
child: Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
color: Colors.white,
border: Border.all(
width: 1.r,
color: Color(0xFFFCA017))),
child: Center(
child: Text(
'详情',
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFFCA017)),
),
),
),
)*/
],
),
),
@ -346,7 +338,24 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
fontSize: 12.sp,
color: Color(0xFF6888FD)),
)),
item.readLevel == 1
widget.page == 'answerTrajectory'?Container(
height: 24.r,
width: 72.r,
decoration: BoxDecoration(
border: Border.all(width: 1.r,color: Color(0xFFFFA41E)),
borderRadius: BorderRadius.all(Radius.circular(20.r)),
),
child: Center(child: Text('详情',style: TextStyle(fontSize: 10.r,color: Color(0xFFFFA41E))),
)):widget.page == 'history'?Container(
height: 24.r,
width: 82.r,
decoration: BoxDecoration(
color: Color(0xFF6888FD),
borderRadius: BorderRadius.all(Radius.circular(20.r))
),
child: Center(child: Text('历史作业',style: TextStyle(fontSize: 10.r,color: Colors.white),)),
):item.readLevel == 1
? InkWell(
onTap: () {
setState(() {
@ -420,34 +429,6 @@ class _JobPriorityReviewSetState extends State<JobPriorityReviewSet>
),
),
),
/* SizedBox(
width: 5.r,
),
InkWell(
onTap: () {
RouterManager.router.navigateTo(context,
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
},
child: Container(
height: 20.r,
width: 70.r,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(
Radius.circular(20.r)),
color: Colors.white,
border: Border.all(
width: 1.r,
color: Color(0xFFFCA017))),
child: Center(
child: Text(
'详情',
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFFCA017)),
),
),
),
)*/
],
),
),

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

View File

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

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_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:marking_app/common/mixin/common.dart';
import 'package:marking_app/common/model/common/base_structure_result.dart';
import 'package:marking_app/common/model/job/job_data_report.dart';
@ -8,24 +9,23 @@ import 'package:marking_app/components/ReturnToHomepage.dart';
import 'package:marking_app/pages/homework_correction/widget/student_kg_table.dart';
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/common_utils.dart';
import 'package:marking_app/utils/request/rest_client.dart';
import 'package:marking_app/utils/toast_utils.dart';
class QuickCheckPersonal extends StatefulWidget {
import 'providers/handwriting_drawing_trajectory_provider.dart';
import 'widget/answer_handwriting.dart';
class QuickCheckPersonal extends StatefulHookConsumerWidget {
final int jobId;
final int studentId;
const QuickCheckPersonal(
{Key? key, required this.jobId, required this.studentId})
: super(key: key);
const QuickCheckPersonal({Key? key, required this.jobId, required this.studentId}) : super(key: key);
@override
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
ConsumerState<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
}
class _QuickCheckPersonalState extends State<QuickCheckPersonal>
with CommonMixin {
class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with CommonMixin {
StudentDetails? studentInfo;
void initState() {
@ -40,8 +40,7 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
params['jobid'] = widget.jobId;
// params['jobid'] = '521646983660101';
params['studentId'] = widget.studentId;
BaseStructureResult<StudentDetails?> data =
await _client.getJobPersonalReport(params);
BaseStructureResult<StudentDetails?> data = await _client.getJobPersonalReport(params);
if (data.data!.studentId != null) {
setState(() {
studentInfo = data.data;
@ -51,7 +50,6 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
ToastUtils.showError('暂无数据');
}
EasyLoading.dismiss();
}
@override
@ -89,10 +87,8 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
alignment: Alignment.center,
),
),*/
],
),
body: SingleChildScrollView(
child: Column(
children: [
@ -102,7 +98,8 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
children: [
InkWell(
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(
width: 93.r,
@ -112,12 +109,23 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
borderRadius: BorderRadius.circular(4.r),
),
child: Center(
child: Text('历史查询',style: TextStyle(fontSize: 10.r,color: Color(0xFF2080F7)),),
child: Text(
'历史作业',
style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)),
),
),
),
SizedBox(width: 10.r,),
/*Container(
),
SizedBox(
width: 10.r,
),
InkWell(
onTap: () {
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});
},
child: Container(
width: 93.r,
height: 28.r,
decoration: BoxDecoration(
@ -125,9 +133,13 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
borderRadius: BorderRadius.circular(4.r),
),
child: Center(
child: Text('原稿笔迹',style: TextStyle(fontSize: 10.r,color: Color(0xFF4CC793)),),
child: Text(
'原稿笔迹',
style: TextStyle(fontSize: 10.r, color: Color(0xFF4CC793)),
),
),
),
),
),*/
],
),
),
@ -147,31 +159,38 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
children: [
Text(
'客观题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
),
Text(
'${studentInfo!.kgValidRate}%',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
),
],
),
SizedBox(height: 10.r,),
SizedBox(
height: 10.r,
),
SizedBox(
height: studentInfo!.kgDetails.length > 8 ? 300.r : studentInfo!.kgDetails.length * 40.r + 40.r,
child: StudentKgTable(
headList: ['题号', '学生答案', '标准答案'],
bodyList: studentInfo!.kgDetails,
questionNumCall: (no) {
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});
},
),
)
],
),
),
SizedBox(height: 15.r,),
SizedBox(
height: 15.r,
),
//
Container(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
@ -188,25 +207,30 @@ class _QuickCheckPersonalState extends State<QuickCheckPersonal>
children: [
Text(
'主观题',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF5C5C5C),fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
),
Text(
'${studentInfo!.zgValidRate}%',
style: TextStyle(
fontSize: 14.sp, color: Color(0xFF6888FD),fontWeight: FontWeight.w600),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD), fontWeight: FontWeight.w600),
),
],
),
SizedBox(height: 10.r,),
SizedBox(
height: 10.r,
),
SizedBox(
height: studentInfo!.zgDetails.length > 8 ? 300.r : studentInfo!.zgDetails.length * 40.r + 40.r,
child: StudentZgTable(
headList: ['题号', '用时', '学生答案', '批注结果', '批注'],
bodyList: studentInfo!.zgDetails,
questionNumCall: (no) {
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});
},
),
)
],

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

View File

@ -7,12 +7,17 @@ import 'package:marking_app/utils/index.dart';
class StudentGroupList extends StatelessWidget {
final List studentGroups;
final Function goNextPage;
const StudentGroupList(this.studentGroups,this.goNextPage,{Key? key}) : super(key: key);
final Widget? rightBtn;
const StudentGroupList(this.studentGroups, this.goNextPage,
{Key? key,this.rightBtn})
: super(key: key);
@override
Widget build(BuildContext context) {
return studentGroups != null && studentGroups.length > 0
? isPad()?GridView(
? isPad()
? GridView(
shrinkWrap: true,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
@ -56,7 +61,9 @@ class StudentGroupList extends StatelessWidget {
textAlign: TextAlign.end,
),
),
Container(
rightBtn != null
? rightBtn!
: Container(
margin: EdgeInsets.only(left: 5.r),
height: 20.r,
width: 55.r,
@ -78,13 +85,20 @@ class StudentGroupList extends StatelessWidget {
),
);
}),
):ListView.builder(
)
: ListView.builder(
shrinkWrap: true,
itemBuilder: (context, index) {
JobStudentGroups item = studentGroups[index];
String classNames = item.classNames.join(" ");
return Container(
padding: EdgeInsets.symmetric(vertical:15.r,horizontal: 10.r),
return InkWell(
onTap: () {
goNextPage(item.groupId, item.groupName);
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
},
child: Container(
padding:
EdgeInsets.symmetric(vertical: 15.r, horizontal: 10.r),
margin: EdgeInsets.only(bottom: 10.r),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(10.r)),
@ -112,12 +126,9 @@ class StudentGroupList extends StatelessWidget {
textAlign: TextAlign.end,
),
),
InkWell(
onTap: (){
goNextPage(item.groupId,item.groupName);
// RouterManager.router.navigateTo(context, '${RouterManager.jobPriorityReviewSetPath}?&groupId=${item.groupId}',transition: getTransition());
},
child: Container(
rightBtn != null
? rightBtn!
: Container(
margin: EdgeInsets.only(left: 5.r),
height: 24.r,
width: 55.r,
@ -133,16 +144,17 @@ class StudentGroupList extends StatelessWidget {
fontSize: 10.sp, color: Colors.white),
),
),
),
)
],
),
),
);
},
itemCount: studentGroups.length,
)
: Padding(
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height/2 - 200.r),
padding: EdgeInsets.only(
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 int? fixedRows;
final int? fixedCols;
final Function(String)? questionNumCall;
const StudentKgTable({
Key? key,
@ -15,6 +16,7 @@ class StudentKgTable extends StatefulWidget {
required this.bodyList,
this.fixedCols = 0,
this.fixedRows = 0,
this.questionNumCall,
}) : super(key: key);
@override
@ -29,6 +31,7 @@ class _StudentKgTableState extends State<StudentKgTable> {
String sortString(String str) {
return String.fromCharCodes(str.codeUnits.toList()..sort());
}
DataRow _getRow(int index, [Color? color]) {
assert(index >= 0);
KgDetails item = widget.bodyList[index];
@ -36,27 +39,43 @@ class _StudentKgTableState extends State<StudentKgTable> {
index: index,
color: color != null ? MaterialStateProperty.all(color) : null,
cells: [
DataCell(Center(
DataCell(
InkWell(
onTap: () {
if (widget.questionNumCall != null) {
widget.questionNumCall!(item.questionNo);
}
},
child: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionNo,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
),
),
),
),
)),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252):
item.state == 2?Color(0xFF4CC793):
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white),
child: Text(
item.studentAnswer == null ? '未作答' : item.studentAnswer!,
style: TextStyle(
fontSize: 12.sp,
color: item.studentAnswer == null
? Color(0xFF525252)
: item.state == 2
? Color(0xFF4CC793)
: item.state == 1
? Color(0xFFFF7474)
: item.state == 0
? Color(0xFFD3D3D3)
: Colors.white),
),
))),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionAnswer == null ?'':item.questionAnswer!,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
child: Text(item.questionAnswer == null ? '' : item.questionAnswer!, style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
],
@ -74,14 +93,10 @@ class _StudentKgTableState extends State<StudentKgTable> {
dataRowHeight: 40.r,
headingRowHeight: 40.r,
border: TableBorder(
horizontalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid),
verticalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) =>
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400],
@ -95,14 +110,12 @@ class _StudentKgTableState extends State<StudentKgTable> {
var item = widget.headList[index];
return DataColumn2(
label: Center(
child: Text(item,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
),
// size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 3,
);
}),
rows: List<DataRow>.generate(widget.bodyList.length,
(index) => _getRow(index, Color(0xFFF5F5F5))));
rows: List<DataRow>.generate(widget.bodyList.length, (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_screenutil/flutter_screenutil.dart';
import 'package:marking_app/common/model/job/job_data_report.dart';
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
import 'package:marking_app/pages/homework_correction/widget/answer_handwriting.dart';
import 'package:marking_app/utils/common_utils.dart';
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
import 'package:photo_view/photo_view.dart';
@ -11,6 +13,7 @@ class StudentZgTable extends StatefulWidget {
final List bodyList;
final int? fixedRows;
final int? fixedCols;
final Function(String)? questionNumCall;
const StudentZgTable({
Key? key,
@ -18,6 +21,7 @@ class StudentZgTable extends StatefulWidget {
required this.bodyList,
this.fixedCols = 0,
this.fixedRows = 0,
this.questionNumCall,
}) : super(key: key);
@override
@ -29,22 +33,22 @@ class _StudentZgTableState extends State<StudentZgTable> {
int? _sortColumnIndex;
bool _sortAscending = true;
void showImgDialog(BuildContext context,String imgUrl){
/*void showImgDialog(BuildContext context,String imgUrl){
Navigator.push(
context,
MaterialPageRoute(builder: (_) {
return Scaffold(
appBar: AppBar(),
body: SizedBox(
/* width: MediaQuery.of(context).size.width * 0.6,
height: MediaQuery.of(context).size.height * 0.6,*/
*/ /* width: MediaQuery.of(context).size.width * 0.6,
height: MediaQuery.of(context).size.height * 0.6,*/ /*
child: PhotoView(
imageProvider:
NetworkImage(imgUrl)),
),
);
}),
);
);*/
/* showDialog(context: context, builder: (BuildContext context){
return AlertDialog(
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
@ -62,7 +66,7 @@ class _StudentZgTableState extends State<StudentZgTable> {
),
);
});*/
}
// }
DataRow _getRow(int index, [Color? color]) {
assert(index >= 0);
@ -71,55 +75,66 @@ class _StudentZgTableState extends State<StudentZgTable> {
index: index,
color: color != null ? MaterialStateProperty.all(color) : null,
cells: [
DataCell(Center(
DataCell(InkWell(
onTap: () {
if (widget.questionNumCall != null) {
widget.questionNumCall!(item.questionNo);
}
},
child: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.questionNo,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
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))),
child: Text(CommonUtils.second2HMS(item.useTime!), style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
),
)),
DataCell(InkWell(
onTap: () {
if (item.state != 0) {
showImgDialog(context,item.studentAnswer!);
ImageDialog.showImgDialog(context, item.studentAnswer!);
}
},
child: Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: Text(item.state!=0 ?'查看':'--',
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
child: Text(item.state != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
),
),
)),
DataCell(Center(
child: Padding(
padding: EdgeInsets.symmetric(horizontal: 5.r),
child: item.state == 2?
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):item.state == 1?
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,):Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
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) {
showImgDialog(context,item.annotateAnswers!);
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))),
child: Text(item.state == 1 || item.state == 2 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
),
),
)),
@ -138,14 +153,10 @@ class _StudentZgTableState extends State<StudentZgTable> {
headingRowHeight: 40.r,
dataRowHeight: 40.r,
border: TableBorder(
horizontalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid),
verticalInside: BorderSide(
width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) =>
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
fixedColumnsColor: Color(0xFFE6E6E6),
fixedCornerColor: Colors.grey[400],
@ -159,14 +170,12 @@ class _StudentZgTableState extends State<StudentZgTable> {
var item = widget.headList[index];
return DataColumn2(
label: Center(
child: Text(item,
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
),
// size: ColumnSize.S,
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
);
}),
rows: List<DataRow>.generate(widget.bodyList.length,
(index) => _getRow(index, Color(0xFFF5F5F5))));
rows: List<DataRow>.generate(widget.bodyList.length, (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/model/common/base_structure_result.dart';
import 'package:marking_app/common/model/user/user_info.dart';
import 'package:marking_app/pages/homework_correction/index.dart';
import 'package:marking_app/pages/reports/index.dart';
import 'package:marking_app/provider/do_marking_provider.dart';
import 'package:marking_app/provider/upload_file_provider.dart';
@ -30,6 +29,8 @@ import 'package:marking_app/utils/index.dart';
import 'package:marking_app/utils/request/rest_client.dart';
import 'package:package_info/package_info.dart';
import 'homework_correction/job_home.dart';
class TheMainPage extends StatefulHookConsumerWidget {
const TheMainPage({Key? key}) : super(key: key);
@ -45,7 +46,13 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
Timer? _timer;
bool showUpgrade = false;
final List<Widget> _bodyList = [const TheHomePage(), const TheMarking(), const HomeworkCorrection(), const TheReport()];
final List<Widget> _bodyList = [
const TheHomePage(),
const TheMarking(),
// const HomeworkCorrection(),
const JobHome(),
const TheReport()
];
int tabIndex = 0;
/// icon
@ -99,9 +106,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
void getAppUpgrade(UserInfo user) async {
try {
showUpgrade = true;
// if (user.loginName == '18888888888') return;
// if (user.loginName == 'u0001') return;
if (user.loginName == '13350366646') return;
if (['18888888888'].contains(user.loginName)) return;
//
String deviceInfo;
int deviceType;
@ -151,7 +156,8 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
child: Scaffold(
body: PageView(
controller: _pageController,
physics: const BouncingScrollPhysics(),
// physics: const BouncingScrollPhysics(),
physics: NeverScrollableScrollPhysics(),
onPageChanged: (index) => toUpState(setState, () => tabIndex = index, mounted),
children: _bodyList,
),

View File

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

View File

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