job_report_revision #2

Merged
wangyang merged 30 commits from job_report_revision into main 2024-03-13 15:11:28 +08:00
14 changed files with 331 additions and 168 deletions
Showing only changes of commit 195b6ba2b5 - Show all commits

1
.gitignore vendored
View File

@ -201,3 +201,4 @@ marking_app/lib/common/model/job/job_report_question_deatil_model.g.dart
marking_app/lib/common/model/job/job_do_marking_status_info.g.dart marking_app/lib/common/model/job/job_do_marking_status_info.g.dart
marking_app/lib/common/model/report/small_question.g.dart marking_app/lib/common/model/report/small_question.g.dart
marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.g.dart marking_app/lib/pages/homework_correction/pages/job_list_participate_in_class.g.dart
marking_app/lib/common/model/job/job_favorite_model.g.dart

View File

@ -54,6 +54,12 @@
<div class="content unicode" style="display: block;"> <div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe63e;</span>
<div class="name">Frame</div>
<div class="code-name">&amp;#xe63e;</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont">&#xe63d;</span> <span class="icon iconfont">&#xe63d;</span>
<div class="name">Frame</div> <div class="name">Frame</div>
@ -408,9 +414,9 @@
<pre><code class="language-css" <pre><code class="language-css"
>@font-face { >@font-face {
font-family: 'iconfont'; font-family: 'iconfont';
src: url('iconfont.woff2?t=1706671294868') format('woff2'), src: url('iconfont.woff2?t=1710142362036') format('woff2'),
url('iconfont.woff?t=1706671294868') format('woff'), url('iconfont.woff?t=1710142362036') format('woff'),
url('iconfont.ttf?t=1706671294868') format('truetype'); url('iconfont.ttf?t=1710142362036') format('truetype');
} }
</code></pre> </code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3> <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@ -436,6 +442,15 @@
<div class="content font-class"> <div class="content font-class">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-Frame14"></span>
<div class="name">
Frame
</div>
<div class="code-name">.icon-Frame14
</div>
</li>
<li class="dib"> <li class="dib">
<span class="icon iconfont icon-Frame13"></span> <span class="icon iconfont icon-Frame13"></span>
<div class="name"> <div class="name">
@ -967,6 +982,14 @@
<div class="content symbol"> <div class="content symbol">
<ul class="icon_lists dib-box"> <ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-Frame14"></use>
</svg>
<div class="name">Frame</div>
<div class="code-name">#icon-Frame14</div>
</li>
<li class="dib"> <li class="dib">
<svg class="icon svg-icon" aria-hidden="true"> <svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-Frame13"></use> <use xlink:href="#icon-Frame13"></use>

View File

@ -1,8 +1,8 @@
@font-face { @font-face {
font-family: "iconfont"; /* Project id 3423846 */ font-family: "iconfont"; /* Project id 3423846 */
src: url('iconfont.woff2?t=1706671294868') format('woff2'), src: url('iconfont.woff2?t=1710142362036') format('woff2'),
url('iconfont.woff?t=1706671294868') format('woff'), url('iconfont.woff?t=1710142362036') format('woff'),
url('iconfont.ttf?t=1706671294868') format('truetype'); url('iconfont.ttf?t=1710142362036') format('truetype');
} }
.iconfont { .iconfont {
@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-Frame14:before {
content: "\e63e";
}
.icon-Frame13:before { .icon-Frame13:before {
content: "\e63d"; content: "\e63d";
} }

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,13 @@
"css_prefix_text": "icon-", "css_prefix_text": "icon-",
"description": "", "description": "",
"glyphs": [ "glyphs": [
{
"icon_id": "39483566",
"name": "Frame",
"font_class": "Frame14",
"unicode": "e63e",
"unicode_decimal": 58942
},
{ {
"icon_id": "39175701", "icon_id": "39175701",
"name": "Frame", "name": "Frame",

View File

@ -0,0 +1,33 @@
import 'package:json_annotation/json_annotation.dart';
part 'job_favorite_model.g.dart';
@JsonSerializable()
class JobFavoriteModel extends Object {
@JsonKey(name: 'schoolId')
int schoolId;
@JsonKey(name: 'gradeId')
int gradeId;
@JsonKey(name: 'graduationYear')
String graduationYear;
@JsonKey(name: 'className')
String className;
@JsonKey(name: 'count')
int count;
JobFavoriteModel(
this.schoolId,
this.gradeId,
this.graduationYear,
this.className,
this.count,
);
factory JobFavoriteModel.fromJson(Map<String, dynamic> srcJson) => _$JobFavoriteModelFromJson(srcJson);
Map<String, dynamic> toJson() => _$JobFavoriteModelToJson(this);
}

View File

@ -107,6 +107,10 @@ class MarkingTasks extends Object {
@JsonKey(name: 'className') @JsonKey(name: 'className')
String className; String className;
int dpcSchoolId;
int dpcGradeId;
@JsonKey(name: 'teacherName') @JsonKey(name: 'teacherName')
String teacherName; String teacherName;
@ -148,8 +152,14 @@ class MarkingTasks extends Object {
@JsonKey(name: 'canGoReview') @JsonKey(name: 'canGoReview')
bool canGoReview; // bool canGoReview; //
/** 前端自定义字段 */
@JsonKey(name: 'collectNumber')
int collectNumber; //
MarkingTasks( MarkingTasks(
this.id, this.id,
this.dpcSchoolId,
this.dpcGradeId,
this.className, this.className,
this.teacherName, this.teacherName,
this.isFinish, this.isFinish,
@ -157,13 +167,14 @@ class MarkingTasks extends Object {
this.commitStudentCount, this.commitStudentCount,
this.totalCount, this.totalCount,
this.finishCount, this.finishCount,
this.precision,
this.objectivePrecision, this.objectivePrecision,
this.subjectivePrecision, this.subjectivePrecision,
this.precision,
this.canMarking, { this.canMarking, {
this.progressPercentage = 0, this.progressPercentage = 0,
this.canGoReview = true, this.canGoReview = true,
this.finishTime, this.finishTime,
this.collectNumber = 0,
}) { }) {
try { try {
progressPercentage = (finishCount / totalCount) * 100; progressPercentage = (finishCount / totalCount) * 100;
@ -174,6 +185,11 @@ class MarkingTasks extends Object {
} catch (e) { } catch (e) {
progressPercentage = 0; progressPercentage = 0;
} }
try {
precision = precision / 100;
objectivePrecision = objectivePrecision / 100;
subjectivePrecision = subjectivePrecision / 100;
} catch (e) {}
canGoReview = totalCount > 0 && canMarking && !isFinish; canGoReview = totalCount > 0 && canMarking && !isFinish;
} }

View File

@ -249,7 +249,14 @@ Widget $completedHomeworkView(BuildContext context,
child: Row(children: [ child: Row(children: [
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () => easyThrottle('go_to_homework_report', () => {}), onTap: () => easyThrottle('go_to_homework_report', () {
RouterManager.router.navigateTo(
context,
RouterManager.jobReportPagePath +
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
transition: getTransition(),
);
}),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp), child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 12.sp),

View File

@ -261,9 +261,11 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
flex: 1, flex: 1,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
RouterManager.router.navigateTo(context, RouterManager.jobPriorityReviewSetPath,transition: getTransition()); RouterManager.router.navigateTo(context, RouterManager.jobPriorityReviewSetPath,
transition: getTransition());
}, },
child: Icon(Icons.settings_outlined, color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp), child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"),
color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
), ),
), ),
], ],
@ -466,7 +468,12 @@ Widget $reviewedItem(BuildContext context, {required JobTaskItem jobTaskItem}) {
), ),
GestureDetector( GestureDetector(
onTap: () => easyThrottle('go_to_homework_report', () { onTap: () => easyThrottle('go_to_homework_report', () {
print('子级点击方法'); RouterManager.router.navigateTo(
context,
RouterManager.jobReportPagePath +
'?title=${Uri.encodeComponent(jobTaskItem.title)}&id=${jobTaskItem.id}',
transition: getTransition(),
);
}), }),
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 6.h), padding: EdgeInsets.symmetric(vertical: 6.h),

View File

@ -4,6 +4,9 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:functional_widget_annotation/functional_widget_annotation.dart'; import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:marking_app/common/mixin/common.dart'; import 'package:marking_app/common/mixin/common.dart';
import 'package:marking_app/common/model/common/base_structure_result.dart'; import 'package:marking_app/common/model/common/base_structure_result.dart';
import 'package:marking_app/common/model/job/job_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_favorite_model.dart';
import 'package:marking_app/common/model/job/job_task_item.dart'; import 'package:marking_app/common/model/job/job_task_item.dart';
import 'package:marking_app/routes/RouterManager.dart'; import 'package:marking_app/routes/RouterManager.dart';
import 'package:marking_app/utils/index.dart'; import 'package:marking_app/utils/index.dart';
@ -27,14 +30,16 @@ class JobListParticipateInClass extends StatefulWidget {
class _JobListParticipateInClassState extends State<JobListParticipateInClass> with CommonMixin { class _JobListParticipateInClassState extends State<JobListParticipateInClass> with CommonMixin {
late Future<List<MarkingTasks>?> _future; late Future<List<MarkingTasks>?> _future;
Map<String, int> favoriteMap = {};
bool isRefresh = false; bool isRefresh = false;
@override @override
void initState() { void initState() {
// TODO: implement initState // TODO: implement initState
super.initState(); super.initState();
getListOfJobFavoritesData();
_future = getData(); _future = getData();
Future.delayed(Duration.zero, () { Future.delayed(Duration.zero, () {
print(ScreenUtil().scaleWidth); print(ScreenUtil().scaleWidth);
print(MediaQuery.of(context).devicePixelRatio); print(MediaQuery.of(context).devicePixelRatio);
@ -47,6 +52,17 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
super.dispose(); super.dispose();
} }
Future<void> getListOfJobFavoritesData() async {
RestClient _client = await getClient();
BaseStructureResult<List<JobFavoriteModel>> result = await _client.getListOfJobFavorites(widget.jobId);
if (result.success) {
result.data?.forEach((e) {
favoriteMap['${e.schoolId}+${e.gradeId}+${e.className}'] = e.count;
});
toUpState(setState, () {}, mounted);
}
}
Future<List<MarkingTasks>?> getData() async { Future<List<MarkingTasks>?> getData() async {
RestClient _client = await getClient(); RestClient _client = await getClient();
BaseStructureResult<List<MarkingTasks>> _result = await _client.getJobListParticipateInClass(widget.jobId); BaseStructureResult<List<MarkingTasks>> _result = await _client.getJobListParticipateInClass(widget.jobId);
@ -175,6 +191,7 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
} }
} }
///
void endReview(MarkingTasks task) async { void endReview(MarkingTasks task) async {
/// ///
if (!task.canMarking) return ToastUtils.showInfo('此任务非该账号任务'); if (!task.canMarking) return ToastUtils.showInfo('此任务非该账号任务');
@ -252,13 +269,102 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
void bookmarks(MarkingTasks task) {} void bookmarks(MarkingTasks task) {}
// //
void quickDataCheck(MarkingTasks task) {} void quickDataCheck(MarkingTasks task) {
RouterManager.router.navigateTo(
context,
RouterManager.quickDataCheckPath + '?className=${Uri.encodeComponent(task.className)}&jobId=${widget.jobId}',
transition: getTransition(),
);
}
// //
void jobViewReport(MarkingTasks task) {} void jobViewReport(MarkingTasks task) {
// RouterManager.router.navigateTo(
// context,
// RouterManager.jobReportPagePath + '?title=${Uri.encodeComponent(task.title)}&id=${task.id}',
// transition: getTransition(),
// );
}
/// ///
void showStudentList([bool submitted = false]) {} /// @name showStudentList
/// @param {List<int>} taskId ID集合
/// @param {bool} className
/// @param {bool} submitted ()
void showStudentList(List<int> taskIds, [String? className, bool submitted = false]) async {
ToastUtils.showLoading();
List<JobConcernedWithStudent> students = [];
try {
RestClient _client = await getClient();
BaseStructureResult<List<JobConcernedWithStudent>> _result =
await _client.getJobWithStudents(JobConcernedWithStudentParams(taskIds, isCommit: submitted));
if (!_result.success) {
return ToastUtils.showError(_result.message ?? '获取学生列表失败');
}
if (_result.data?.isEmpty ?? true) {
return ToastUtils.showError('获取到的学生列表为空');
}
students = _result.data!;
} catch (e) {
return ToastUtils.showError('获取学生列表失败');
} finally {
ToastUtils.dismiss();
}
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, bottom: 10.h),
child: quickText(
'${className ?? ''} ${submitted ? '已提交' : '未提交'}作业学生',
size: isPad() ? 15.sp : 15.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.0, // ()
runSpacing: 4.0, //
alignment: WrapAlignment.spaceAround, //沿
children: students.map((e) {
return Chip(
backgroundColor: Color.fromRGBO(239, 242, 255, 1),
avatar: CircleAvatar(
backgroundColor: Colors.white,
child: quickText(e.studentName.substring(0, 1),
size: 12.sp, color: Theme.of(context).primaryColor),
),
label: quickText(e.studentName, color: Color.fromRGBO(80, 94, 110, 1), size: 12.sp),
);
}).toList(),
),
],
),
)
],
),
);
},
);
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
@ -276,6 +382,9 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
), ),
body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) { body: MyFutureBuilder.buildFutureBuilderOfSingleInstance<List<MarkingTasks>?>(context, _future, (value) {
if (value == null) return Container(); if (value == null) return Container();
value.forEach((e) {
e.collectNumber = favoriteMap['${e.dpcSchoolId}+${e.dpcGradeId}+${e.className}'] ?? 0;
});
bool thePadTerminal = isPad(); bool thePadTerminal = isPad();
if (widget.completed) { if (widget.completed) {
// //
@ -286,6 +395,7 @@ class _JobListParticipateInClassState extends State<JobListParticipateInClass> w
bookmarks: bookmarks, bookmarks: bookmarks,
jobViewReport: jobViewReport, jobViewReport: jobViewReport,
quickDataCheck: quickDataCheck, quickDataCheck: quickDataCheck,
showStudentList: showStudentList,
); );
// //
@ -385,6 +495,7 @@ class TabletEndCompleted extends StatelessWidget {
final Bookmarks bookmarks; // final Bookmarks bookmarks; //
final JobViewReport jobViewReport; final JobViewReport jobViewReport;
final QuickDataCheck quickDataCheck; // final QuickDataCheck quickDataCheck; //
final ShowStudentList showStudentList; //
const TabletEndCompleted({ const TabletEndCompleted({
required this.genderName, required this.genderName,
required this.data, required this.data,
@ -393,6 +504,7 @@ class TabletEndCompleted extends StatelessWidget {
required this.bookmarks, required this.bookmarks,
required this.jobViewReport, required this.jobViewReport,
required this.quickDataCheck, required this.quickDataCheck,
required this.showStudentList,
super.key, super.key,
}); });
@ -467,7 +579,8 @@ class TabletEndCompleted extends StatelessWidget {
color: Color.fromRGBO(104, 136, 253, 1), color: Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.circular(16.r), borderRadius: BorderRadius.circular(16.r),
child: InkWell( child: InkWell(
onTap: () => easyThrottle('OneClickReview', () {}), onTap: () => easyThrottle(
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className)),
borderRadius: BorderRadius.circular(8.r), borderRadius: BorderRadius.circular(8.r),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -475,7 +588,27 @@ class TabletEndCompleted extends StatelessWidget {
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.r), borderRadius: BorderRadius.circular(20.r),
), ),
child: quickText('已提交(${taskItem.commitStudentCount})', size: 8.sp, color: Colors.white), child: quickText('已提交:${taskItem.commitStudentCount}', size: 8.sp, color: Colors.white),
),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () => easyThrottle(
'OneClickReview', () => showStudentList([taskItem.id], taskItem.className, false)),
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('未提交:${taskItem.totalCount - taskItem.commitStudentCount}',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
), ),
@ -493,25 +626,8 @@ class TabletEndCompleted extends StatelessWidget {
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h), padding: EdgeInsets.symmetric(vertical: 4.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('数据快查', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), child: quickText('收藏夹(${taskItem.collectNumber})',
), size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () async {},
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
)), )),
@ -573,7 +689,7 @@ class MobileEndCompleted extends StatelessWidget {
final Bookmarks bookmarks; // final Bookmarks bookmarks; //
final JobViewReport jobViewReport; // final JobViewReport jobViewReport; //
final QuickDataCheck quickDataCheck; // final QuickDataCheck quickDataCheck; //
final ShowStudentList showStudentList; final ShowStudentList showStudentList; //
const MobileEndCompleted({ const MobileEndCompleted({
required this.genderName, required this.genderName,
@ -595,152 +711,25 @@ class MobileEndCompleted extends StatelessWidget {
children: data.map((task) { children: data.map((task) {
return Container( return Container(
padding: EdgeInsets.only(top: 11.h), padding: EdgeInsets.only(top: 11.h),
margin: EdgeInsets.only(bottom: 18.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
borderRadius: BorderRadiusDirectional.circular(10.r), borderRadius: BorderRadiusDirectional.circular(10.r),
boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.15), blurRadius: 10)], boxShadow: [BoxShadow(color: Color.fromRGBO(0, 0, 0, 0.15), blurRadius: 10)],
// border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 1.r)),
), ),
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Padding( Container(
padding: padingEdg, padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 5.h),
child: Row( alignment: Alignment.centerLeft,
children: [
quickText(genderName + task.className, color: Color.fromRGBO(0, 0, 0, 1), size: 14.sp),
Expanded(child: SizedBox()),
quickText('已交:${task.commitStudentCount}', color: Color.fromRGBO(104, 136, 253, 1), size: 12.sp),
SizedBox(width: 16.w),
quickText('未交:${task.studentCount - task.commitStudentCount}',
color: Color.fromRGBO(255, 86, 86, 1), size: 12.sp),
],
),
),
SizedBox(height: 13.h),
Padding(
padding: padingEdg,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: task.isFinish
? [
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () async {},
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
)),
Expanded(flex: 1, child: SizedBox()),
Expanded(flex: 3, child: SizedBox()),
Expanded(flex: 1, child: SizedBox()),
Expanded(flex: 3, child: SizedBox()),
]
: [
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.circular(16.r),
child: InkWell(
onTap: () => easyThrottle('OneClickReview', () {}),
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.r), border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)),
),
child: quickText('一键批阅', size: 10.sp, color: Colors.white),
),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () async {},
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('数据快查', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () async {},
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
)),
],
),
),
SizedBox(height: 13.h),
Padding(
padding: padingEdg,
child: Row(
children: [
Expanded(
child: LinearPercentIndicator(
padding: EdgeInsets.zero,
animation: true,
lineHeight: 8.h,
animationDuration: 2500,
percent: task.progressPercentage / 100,
// center: Text(
// '${getDoubleRemoveZero(jobTaskClassItem.progressPercentage)}%',
// style: TextStyle(color: Colors.white, fontSize: 8.sp),
// ),
linearGradient: LinearGradient(
tileMode: TileMode.mirror,
stops: [0.0, 1.0],
colors: task.progressPercentage / 100 != 1
? [Theme.of(context).primaryColor.withOpacity(0.1), Theme.of(context).primaryColor]
: [
Color.fromRGBO(144, 224, 190, 1).withOpacity(0.1),
Color.fromRGBO(144, 224, 190, 1),
],
),
// linearStrokeCap: LinearStrokeCap.butt,
// progressColor: Theme.of(context).primaryColor,
backgroundColor: Color.fromRGBO(232, 232, 232, 1),
barRadius: Radius.circular(10.r),
),
),
SizedBox(width: 7.w),
quickText('${getDoubleRemoveZero(task.progressPercentage)}%',
size: 10.sp, color: Color.fromRGBO(70, 70, 70, 1))
],
), ),
child: quickText(task.className, color: Color.fromRGBO(104, 136, 253, 1), size: 14.sp),
), ),
SizedBox(height: 4.h),
if (task.isFinish) if (task.isFinish)
$CompletedHomeworkProgressBar( $CompletedHomeworkProgressBar(
color: Color.fromRGBO(76, 199, 147, 1), color: Color.fromRGBO(76, 199, 147, 1),
@ -766,6 +755,73 @@ class MobileEndCompleted extends StatelessWidget {
marginEdg: EdgeInsets.only(top: 8.h), marginEdg: EdgeInsets.only(top: 8.h),
), ),
SizedBox(height: 13.h), SizedBox(height: 13.h),
Padding(
padding: padingEdg,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(104, 136, 253, 1),
borderRadius: BorderRadius.circular(16.r),
child: InkWell(
onTap: () =>
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className)),
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.r),
),
child: quickText('已提交:${task.commitStudentCount}', size: 10.sp, color: Colors.white),
),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () =>
easyThrottle('OneClickReview', () => showStudentList([task.id], task.className, false)),
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('未提交:${task.totalCount - task.commitStudentCount}',
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
),
Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 3,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () async {},
borderRadius: BorderRadius.circular(8.r),
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹(${task.collectNumber}',
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
)),
],
),
),
SizedBox(height: 13.h),
Container( Container(
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
@ -794,7 +850,7 @@ class MobileEndCompleted extends StatelessWidget {
), ),
), ),
), ),
Container(width: 1.w, height: 32.h, color: Color.fromRGBO(221, 221, 221, 1)), Container(width: 1.w, height: 34.h, color: Color.fromRGBO(221, 221, 221, 1)),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () => easyThrottle('go_to_end_review_homework', () => jobViewReport(task)), onTap: () => easyThrottle('go_to_end_review_homework', () => jobViewReport(task)),
@ -938,7 +994,8 @@ Widget $itemDataViewOfPad(
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 3.h), padding: EdgeInsets.symmetric(vertical: 3.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), child: quickText('收藏夹(${task.collectNumber})',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
)), )),
@ -974,7 +1031,7 @@ Widget $itemDataViewOfPad(
color: Color.fromRGBO(244, 244, 244, 1), color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r), borderRadius: BorderRadius.circular(20.r),
child: InkWell( child: InkWell(
onTap: () async {}, onTap: () => quickDataCheck(task),
borderRadius: BorderRadius.circular(8.r), borderRadius: BorderRadius.circular(8.r),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -998,7 +1055,8 @@ Widget $itemDataViewOfPad(
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 3.h), padding: EdgeInsets.symmetric(vertical: 3.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)), child: quickText('收藏夹(${task.collectNumber})',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
)), )),
@ -1188,7 +1246,8 @@ Widget $itemDataView(
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h), padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)), child: quickText('收藏夹(${task.collectNumber})',
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
)), )),
@ -1224,7 +1283,7 @@ Widget $itemDataView(
color: Color.fromRGBO(244, 244, 244, 1), color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r), borderRadius: BorderRadius.circular(20.r),
child: InkWell( child: InkWell(
onTap: () async {}, onTap: () => quickDataCheck(task),
borderRadius: BorderRadius.circular(8.r), borderRadius: BorderRadius.circular(8.r),
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
@ -1248,7 +1307,8 @@ Widget $itemDataView(
alignment: Alignment.center, alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 5.h), padding: EdgeInsets.symmetric(vertical: 5.h),
decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)), decoration: BoxDecoration(borderRadius: BorderRadius.circular(20.r)),
child: quickText('收藏夹2', size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)), child: quickText('收藏夹(${task.collectNumber})',
size: 10.sp, color: Color.fromRGBO(102, 102, 102, 1)),
), ),
), ),
)), )),
@ -1477,7 +1537,7 @@ typedef Bookmarks = void Function(MarkingTasks);
typedef JobViewReport = void Function(MarkingTasks); typedef JobViewReport = void Function(MarkingTasks);
/// ///
typedef ShowStudentList = void Function([bool submitted]); typedef ShowStudentList = void Function(List<int> taskIds, [String? className, bool submitted]);
/// ///
// void showStudentList([bool submitted = false]) { // void showStudentList([bool submitted = false]) {

View File

@ -17,6 +17,7 @@ import 'package:marking_app/common/model/job/job_concerned_with_student.dart';
import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart'; import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart';
import 'package:marking_app/common/model/job/job_data_report.dart'; import 'package:marking_app/common/model/job/job_data_report.dart';
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart'; import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
import 'package:marking_app/common/model/job/job_favorite_model.dart';
import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart'; import 'package:marking_app/common/model/job/job_note_taking_trajectory.dart';
import 'package:marking_app/common/model/job/job_page_tab.dart'; import 'package:marking_app/common/model/job/job_page_tab.dart';
import 'package:marking_app/common/model/job/job_report_join_class.dart'; import 'package:marking_app/common/model/job/job_report_join_class.dart';
@ -292,12 +293,16 @@ abstract class RestClient {
Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass( Future<BaseStructureResult<List<MarkingTasks>>> getJobListParticipateInClass(
@the_retrofit.Query("markingId") int jobId); @the_retrofit.Query("markingId") int jobId);
// =>
@the_retrofit.GET("${RequestConfig.hwProxyKeywords}/dpc-api/api/read/job-favorite-count-by-class")
Future<BaseStructureResult<List<JobFavoriteModel>>> getListOfJobFavorites(@the_retrofit.Query("jobid") int jobId);
// => // =>
@the_retrofit.GET("/api/read/job-data-center-report") @the_retrofit.GET("/api/read/job-data-center-report")
Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(@the_retrofit.Queries() Map<String, dynamic> params); Future<BaseStructureResult<JobDataReport>> getJobDataCenterReport(
@the_retrofit.Queries() Map<String, dynamic> params);
// => -- // => --
@the_retrofit.GET("/api/read/job-data-center-student-report") @the_retrofit.GET("/api/read/job-data-center-student-report")
Future<BaseStructureResult<StudentDetails>> getJobPersonalReport(@the_retrofit.Queries() Map<String, dynamic> params); Future<BaseStructureResult<StudentDetails>> getJobPersonalReport(@the_retrofit.Queries() Map<String, dynamic> params);
} }