知识点掌握

This commit is contained in:
machuanyu 2024-05-27 17:42:22 +08:00
parent aef50dd53b
commit e349922528
26 changed files with 453 additions and 48 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

View File

@ -7,6 +7,8 @@ import 'package:school_asignment_app/common/job/common/base_app_version.dart';
import 'package:school_asignment_app/common/job/common/base_page_data.dart'; import 'package:school_asignment_app/common/job/common/base_page_data.dart';
import 'package:school_asignment_app/common/job/enum_subject.dart'; import 'package:school_asignment_app/common/job/enum_subject.dart';
import 'package:school_asignment_app/common/job/homework_details.dart'; import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/job/knowledge_points_grasp.dart';
import 'package:school_asignment_app/common/job/knowledge_report_detail.dart';
import 'package:school_asignment_app/common/job/student_history.dart'; import 'package:school_asignment_app/common/job/student_history.dart';
import 'package:school_asignment_app/common/job/student_history_params.dart'; import 'package:school_asignment_app/common/job/student_history_params.dart';
import 'package:school_asignment_app/common/job/student_item.dart'; import 'package:school_asignment_app/common/job/student_item.dart';
@ -78,4 +80,16 @@ abstract class RetrofitClient {
@GET("/api/hms/HmsReport/GetStudentHomework") @GET("/api/hms/HmsReport/GetStudentHomework")
Future<StudentPersonalInfo> getStudentHomework(@Query('HomeworkId') String homeworkId,@Query('StudentId') int studentId); Future<StudentPersonalInfo> getStudentHomework(@Query('HomeworkId') String homeworkId,@Query('StudentId') int studentId);
//
@GET("/api/hms/HmsReport/GetKnowledgeReport")
Future<List<KnowledgePointsGrasp>> getKnowledgeReport(@Query('DateStart') String dateStart,@Query('DateEnd') String dateEnd,@Query('KnowledgeName') String knowledgeName);
//
@GET("/api/hms/HmsReport/GetKnowledgeReportDetail")
Future<List<KnowledgeReportDetail>> getKnowledgeReportDetail(@Query('DateStart') String dateStart,@Query('DateEnd') String dateEnd,@Query('KnowledgeId') int knowledgeId);
//
@GET("/api/hms/HmsReport/GetQuestionStudentState")
Future<List<Students>> getQuestionStudentState(@Query('HomeworkId') String homeworkId,@Query('TemplateId') int templateId,@Query('QuestionNo') int questionNo);
} }

View File

@ -57,7 +57,18 @@ class AnnotatedClass extends Object {
@JsonKey(name: 'noCommitStudentCount') @JsonKey(name: 'noCommitStudentCount')
int? noCommitStudentCount; int? noCommitStudentCount;
AnnotatedClass(this.schoolName,this.grade,this.classId,this.className,this.finishTime,this.questionCount,this.answerCount,this.answerRate,this.unAnnotateCount,this.annotateRate,this.students,this.homeworkFavs,this.kgtCorrectRate,this.zgtCorrectRate,this.correctRate,this.commitStudentCount,this.noCommitStudentCount); @JsonKey(name: 'commitStudent')
List<AnnotatedStudents>? commitStudent;
@JsonKey(name: 'noCommitStudent')
List<AnnotatedStudents>? noCommitStudent;
AnnotatedClass(this.schoolName,this.grade,this.classId,this.className,this.finishTime,this.questionCount,this.answerCount,this.answerRate,this.unAnnotateCount,this.annotateRate,this.students,this.homeworkFavs,this.kgtCorrectRate,this.zgtCorrectRate,this.correctRate,this.commitStudentCount,this.noCommitStudentCount,this.commitStudent,this.noCommitStudent){
commitStudent = [];
noCommitStudent = [];
commitStudent = students.where((w) => w.state != 0).toList();
noCommitStudent = students.where((w) => w.state == 0).toList();
}
factory AnnotatedClass.fromJson(Map<String, dynamic> srcJson) => _$AnnotatedClassFromJson(srcJson); factory AnnotatedClass.fromJson(Map<String, dynamic> srcJson) => _$AnnotatedClassFromJson(srcJson);

View File

@ -131,7 +131,7 @@ class Students extends Object {
int state; int state;
@JsonKey(name: 'priorityAnnotate') @JsonKey(name: 'priorityAnnotate')
bool priorityAnnotate; bool? priorityAnnotate;
@JsonKey(name: 'kgtStu') @JsonKey(name: 'kgtStu')
List<Dtls>? kgtStu; List<Dtls>? kgtStu;

View File

@ -0,0 +1,29 @@
import 'package:json_annotation/json_annotation.dart';
part 'knowledge_points_grasp.g.dart';
@JsonSerializable()
class KnowledgePointsGrasp extends Object {
@JsonKey(name: 'knowledgeId')
int knowledgeId;
@JsonKey(name: 'knowledgeName')
String knowledgeName;
@JsonKey(name: 'correctRate')
int correctRate;
@JsonKey(name: 'count')
int count;
KnowledgePointsGrasp(this.knowledgeId,this.knowledgeName,this.correctRate,this.count,);
factory KnowledgePointsGrasp.fromJson(Map<String, dynamic> srcJson) => _$KnowledgePointsGraspFromJson(srcJson);
Map<String, dynamic> toJson() => _$KnowledgePointsGraspToJson(this);
}

View File

@ -0,0 +1,41 @@
import 'package:json_annotation/json_annotation.dart';
part 'knowledge_report_detail.g.dart';
@JsonSerializable()
class KnowledgeReportDetail extends Object {
@JsonKey(name: 'homeworkId')
String homeworkId;
@JsonKey(name: 'homeworkName')
String homeworkName;
@JsonKey(name: 'publishTime')
String publishTime;
@JsonKey(name: 'templateId')
int templateId;
@JsonKey(name: 'questionNo')
int questionNo;
@JsonKey(name: 'questionType')
int questionType;
@JsonKey(name: 'questionPicture')
String? questionPicture;
@JsonKey(name: 'correctRate')
int correctRate;
KnowledgeReportDetail(this.homeworkId,this.homeworkName,this.publishTime,this.templateId,this.questionNo,this.questionType,this.correctRate,this.questionPicture);
factory KnowledgeReportDetail.fromJson(Map<String, dynamic> srcJson) => _$KnowledgeReportDetailFromJson(srcJson);
Map<String, dynamic> toJson() => _$KnowledgeReportDetailToJson(this);
}

View File

@ -94,7 +94,7 @@ class Utils{
dataCount.zgtOkRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!); dataCount.zgtOkRate = Utils.calcRate(dataCount.zgtOkCount!, dataCount.zgtDtlCount!);
dataCount.zgtCount = data.questions.where((w) => w.questionType == 2).length; dataCount.zgtCount = data.questions.where((w) => w.questionType == 2).length;
dataCount.studentCount = data.students.length; dataCount.studentCount = data.students.length;
dataCount.priorityStudents = data.students.where((w) => w.priorityAnnotate).toList(); dataCount.priorityStudents = data.students.where((w) => w.priorityAnnotate!).toList();
for(var que in data.questions){ for(var que in data.questions){

View File

@ -0,0 +1,74 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class ShowStudentList extends StatelessWidget {
final String title;
final String homeworkId;
final List<dynamic> studentList;
const ShowStudentList({Key? key,required this.title,required this.studentList,required this.homeworkId}) : super(key: key);
@override
Widget build(BuildContext context) {
return AlertDialog(
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(20.r)),
),
content: Container(
width: Get.width * 0.8,
height: Get.height * 0.7,
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 InkWell(
onTap: (){
Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':e.studentId,'homeworkId':homeworkId});
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 4.r, horizontal: 8.r),
decoration: BoxDecoration(
color: e.state == 3
? Color(0xFF4CC793)
: Color(0xFFE2E2E2),
borderRadius: BorderRadius.circular(4.r),
),
child: quickText(e.studentName,
color:
e.state == 3 ? Colors.white : Color(0xFF505E6E),
size: 10.sp),
),
);
}).toList(),
),
],
),
)
],
),
),
);
}
}

View File

@ -1,6 +1,9 @@
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:get_storage/get_storage.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart'; import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart'; import 'package:school_asignment_app/common/mixins/request_tool_mixin.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
import 'annotate_class_state.dart'; import 'annotate_class_state.dart';
@ -13,7 +16,8 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin{
state.homeworkId.value = Get.arguments['id']??''; state.homeworkId.value = Get.arguments['id']??'';
state.name.value = Get.arguments['name']??''; state.name.value = Get.arguments['name']??'';
state.grade = Get.arguments['grade']; state.grade = Get.arguments['grade'];
state.completed.value = Get.arguments['completed']??false;
EasyLoading.show(status: 'loading...');
getList(); getList();
} }
@ -35,7 +39,17 @@ class AnnotateClassLogic extends GetxController with RequestToolMixin{
element.noCommitStudentCount = noCommitStudentCount; element.noCommitStudentCount = noCommitStudentCount;
} }
EasyLoading.dismiss();
} }
void goQuickDataCheck(item){
Get.toNamed(Routes.quickDataCheckPage,arguments: {'homeworkId':state.homeworkId.value,'classId':item.classId,'grade':state.grade,'className':item.className
});
}
void gojobReport(item){
Get.toNamed(Routes.jobReportPage,arguments: {'title':state.name.value,'homeworkId':state.homeworkId.value,'grade':state.grade,'className':item.className});
}
} }

View File

@ -9,5 +9,6 @@ class AnnotateClassState {
late RxString name = ''.obs; late RxString name = ''.obs;
late RxList<AnnotatedClass> classList = RxList(); late RxList<AnnotatedClass> classList = RxList();
late RxString homeworkId = ''.obs; late RxString homeworkId = ''.obs;
late RxBool completed = false.obs;
late int grade; late int grade;
} }

View File

@ -11,6 +11,7 @@ import 'package:school_asignment_app/page/home_page/children/annotate_class/widg
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart'; import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
import 'package:school_asignment_app/routes/app_pages.dart'; import 'package:school_asignment_app/routes/app_pages.dart';
import 'annotate_class_logic.dart'; import 'annotate_class_logic.dart';
import 'widget/completed_annotate_item.dart';
class AnnotateClassPage extends StatefulWidget { class AnnotateClassPage extends StatefulWidget {
const AnnotateClassPage({Key? key}) : super(key: key); const AnnotateClassPage({Key? key}) : super(key: key);
@ -25,6 +26,7 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
appBar: AppBar( appBar: AppBar(
@ -47,6 +49,23 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: Obx(() { child: Obx(() {
return return
state.completed.value? Utils.isPad()?GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, //widget
mainAxisSpacing: 10.h,
crossAxisSpacing: 6.w,
childAspectRatio: 1.48 //1widget
),
children: state.classList.map((taskItem) {
return CompletedAnnotateItem(taskItem:taskItem,logic: logic,);
}).toList(),
):ListView.builder(
itemCount: state.classList.length,
itemBuilder: (context, index) {
AnnotatedClass taskItem = state.classList[index];
return CompletedAnnotateItem(taskItem:taskItem,logic: logic,);
}):
Utils.isPad()?MasonryGridView.count( Utils.isPad()?MasonryGridView.count(
crossAxisCount: 2, // crossAxisCount: 2, //
mainAxisSpacing: 4.w, // mainAxisSpacing: 4.w, //
@ -54,14 +73,14 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
itemCount: state.classList.length, itemCount: state.classList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
AnnotatedClass item = state.classList[index]; AnnotatedClass item = state.classList[index];
return AnnotateItem(item: item,font: 8.sp,state: state,name: state.name.value,); return AnnotateItem(item: item,font: 8.sp,name: state.name.value,logic: logic,);
}, },
): ):
ListView.builder( ListView.builder(
itemCount: state.classList.length, itemCount: state.classList.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
AnnotatedClass item = state.classList[index]; AnnotatedClass item = state.classList[index];
return AnnotateItem(item: item,font: 12.sp,state: state,name: state.name.value,); return AnnotateItem(item: item,font: 12.sp,name: state.name.value,logic: logic,);
}); });
}), }),
), ),

View File

@ -5,6 +5,7 @@ import 'package:percent_indicator/percent_indicator.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart'; import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/utils/enum_untils.dart'; import 'package:school_asignment_app/common/utils/enum_untils.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart'; import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_logic.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_state.dart'; import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_state.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/item_btn.dart'; import 'package:school_asignment_app/page/home_page/children/annotate_class/widget/item_btn.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart'; import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
@ -13,9 +14,9 @@ import 'package:school_asignment_app/routes/app_pages.dart';
class AnnotateItem extends StatefulWidget { class AnnotateItem extends StatefulWidget {
final AnnotatedClass item; final AnnotatedClass item;
final double font; final double font;
final AnnotateClassState state;
final String name; final String name;
const AnnotateItem({Key? key, required this.item,required this.font,required this.state,required this.name}) : super(key: key); final AnnotateClassLogic logic;
const AnnotateItem({Key? key, required this.item,required this.font,required this.name,required this.logic}) : super(key: key);
@override @override
State<AnnotateItem> createState() => _AnnotateItemState(); State<AnnotateItem> createState() => _AnnotateItemState();
@ -97,8 +98,7 @@ class _AnnotateItemState extends State<AnnotateItem> {
Expanded( Expanded(
flex:4, flex:4,
child: ItemBtn(title: "数据快查",font: widget.font - 2.sp,clickFunction: (){ child: ItemBtn(title: "数据快查",font: widget.font - 2.sp,clickFunction: (){
Get.toNamed(Routes.quickDataCheckPage,arguments: {'homeworkId':widget.state.homeworkId.value,'classId':widget.item.classId,'grade':widget.state.grade,'className':widget.item.className widget.logic.goQuickDataCheck(widget.item);
});
},), },),
), ),
const Expanded(flex: 1,child: Text(''),), const Expanded(flex: 1,child: Text(''),),
@ -190,7 +190,9 @@ class _AnnotateItemState extends State<AnnotateItem> {
[ [
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () {}, onTap: () {
widget.logic.goQuickDataCheck(widget.item);
},
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText('数据快查', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font), child: quickText('数据快查', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),
@ -200,7 +202,9 @@ class _AnnotateItemState extends State<AnnotateItem> {
Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)), Container(width: 1.w, height: 30.h, color: const Color.fromRGBO(221, 221, 221, 1)),
Expanded( Expanded(
child: InkWell( child: InkWell(
onTap: () {}, onTap: () {
widget.logic.gojobReport(widget.item);
},
child: Container( child: Container(
alignment: Alignment.center, alignment: Alignment.center,
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font), child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: widget.font),

View File

@ -0,0 +1,197 @@
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/page/global_widget/show_student_list.dart';
import 'package:school_asignment_app/page/home_page/children/annotate_class/annotate_class_logic.dart';
import 'package:school_asignment_app/page/home_page/widget/progress_bar.dart';
class CompletedAnnotateItem extends StatelessWidget {
final AnnotatedClass taskItem;
final AnnotateClassLogic logic;
const CompletedAnnotateItem({Key? key,required this.taskItem,required this.logic}) : super(key: key);
void showStudentList(context,List<AnnotatedStudents> students,[bool submitted = false]) async {
showDialog(
context: context,
builder: (BuildContext context) {
return ShowStudentList(title:'${taskItem.className ?? ''} ${submitted ? '已提交' : '未提交'}作业学生',studentList:students,homeworkId: logic.state.homeworkId.value,);
},
);
EasyLoading.dismiss();
}
@override
Widget build(BuildContext context) {
return Container(
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(6.r)),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 10.w, vertical: 6.h),
alignment: Alignment.centerLeft,
decoration: BoxDecoration(
border: Border(bottom: BorderSide(color: Color.fromRGBO(238, 238, 238, 1), width: 0.5.r)),
),
child: quickText(taskItem.className, color: Color.fromRGBO(104, 136, 253, 1), size: 12.sp),
),
Column(
mainAxisSize: MainAxisSize.min,
children: [
ProgressBar(
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.kgtCorrectRate/100,
title: '客观题正确率:',
padingEdg: EdgeInsets.only(left: 10.w, right: 10.w),
fontSize: 8.sp,
lineHeight: 5.h,
marginEdg: EdgeInsets.only(top: 5.h),
),
ProgressBar(
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.zgtCorrectRate / 100,
title: '主观题正确率:',
fontSize: 8.sp,
lineHeight: 5.h,
padingEdg: EdgeInsets.only(left: 10.w, right: 10.w),
marginEdg: EdgeInsets.only(top: 5.h),
),
ProgressBar(
color: Color.fromRGBO(76, 199, 147, 1),
percent: taskItem.correctRate / 100,
title: '总正确率:',
fontSize: 8.sp,
lineHeight: 5.h,
padingEdg: EdgeInsets.only(left: 10.w, right: 10.w),
marginEdg: EdgeInsets.only(top: 5.h),
),
],
),
SizedBox(height: Utils.isPad()?4.h:10.h),
Padding(
padding: EdgeInsets.only(left: 10.w, right: 10.w),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 4,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(16.r),
child: InkWell(
onTap: (){
EasyLoading.show(status: 'loading...');
showStudentList(context,taskItem.commitStudent!,true);
},
borderRadius: BorderRadius.circular(8.r),
splashColor: Theme.of(context).primaryColor,
child: Container(
alignment: Alignment.center,
padding: EdgeInsets.symmetric(vertical: 4.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20.r),
),
child: quickText('已提交:${taskItem.commitStudentCount}',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
),
const Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 4,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
showStudentList(context,taskItem.noCommitStudent!);
},
splashColor: Theme.of(context).primaryColor,
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.noCommitStudentCount}',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
),
),
const Expanded(flex: 1, child: SizedBox()),
Expanded(
flex: 4,
child: Material(
color: Color.fromRGBO(244, 244, 244, 1),
borderRadius: BorderRadius.circular(20.r),
child: InkWell(
onTap: () {
},
splashColor: Theme.of(context).primaryColor,
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('收藏夹',
size: 8.sp, color: Color.fromRGBO(102, 102, 102, 1)),
),
),
)),
],
),
),
SizedBox(height: Utils.isPad()?4.h:10.h),
Container(
decoration: BoxDecoration(
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(10.r),
bottomRight: Radius.circular(10.r),
),
color: Colors.white,
boxShadow: const [
BoxShadow(
color: Color.fromRGBO(0, 0, 0, 0.15),
offset: Offset(0, -0.0001), //y轴偏移量
blurRadius: 5, //
spreadRadius: 0, //
)
],
),
child: Row(children: [
Expanded(
child: InkWell(
onTap: () {
logic.goQuickDataCheck(taskItem);
},
child: Container(
alignment: Alignment.center,
child: quickText('数据快查', color: Color.fromRGBO(118, 118, 118, 1), size: 11.sp),
),
),
),
Container(width: 1.w, height: 26.h, color: Color.fromRGBO(221, 221, 221, 1)),
Expanded(
child: InkWell(
onTap: (){
logic.gojobReport(taskItem);
},
child: Container(
alignment: Alignment.center,
child: quickText('查看报告', color: Color.fromRGBO(118, 118, 118, 1), size: 10.sp),
),
)),
]),
),
],
),
);
}
}

View File

@ -21,6 +21,6 @@ class JobReportState {
late RxList<Knows> knowsList = RxList(); late RxList<Knows> knowsList = RxList();
late HomeworkDetails homeData; late HomeworkDetails homeData;
late RxList<AnnotatedClass> involveClasses = RxList(); late RxList<AnnotatedClass> involveClasses = RxList();
late AnnotatedClass defaultClass = AnnotatedClass('',-1,'-1','','',-1,-1,-1,-1,-1,[],[],-1,-1,-1,-1,-1); late AnnotatedClass defaultClass = AnnotatedClass('',-1,'-1','','',-1,-1,-1,-1,-1,[],[],-1,-1,-1,-1,-1,[],[]);
late Rx<AnnotatedClass> classData = defaultClass.obs; late Rx<AnnotatedClass> classData = defaultClass.obs;
} }

View File

@ -91,7 +91,7 @@ class _JobReportPageState extends State<JobReportPage> {
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10.r), margin: EdgeInsets.symmetric(horizontal: 10.r),
child: KnowledgePoint( child: KnowledgePoint(
knowsList:state.knowsList,data:state.homeData,className: state.className.value,)), knowsList:state.knowsList,data:state.homeData,className: state.classData.value.className,homeworkId:state.homeworkId.value)),
// //
/* Container( /* Container(
margin: EdgeInsets.symmetric(horizontal: 10.r), margin: EdgeInsets.symmetric(horizontal: 10.r),

View File

@ -6,12 +6,14 @@ import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/utils/utils.dart'; import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart'; import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/my_text.dart'; import 'package:school_asignment_app/page/global_widget/my_text.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class KnowledgePoint extends StatefulWidget { class KnowledgePoint extends StatefulWidget {
final RxList<Knows> knowsList; final RxList<Knows> knowsList;
final HomeworkDetails data; final HomeworkDetails data;
final String className; final String className;
KnowledgePoint({Key? key,required this.knowsList,required this.data,required this.className}) : super(key: key); final String homeworkId;
KnowledgePoint({Key? key,required this.knowsList,required this.data,required this.className,required this.homeworkId}) : super(key: key);
@override @override
State<KnowledgePoint> createState() => _KnowledgePointState(); State<KnowledgePoint> createState() => _KnowledgePointState();
@ -19,6 +21,12 @@ class KnowledgePoint extends StatefulWidget {
class _KnowledgePointState extends State<KnowledgePoint> { class _KnowledgePointState extends State<KnowledgePoint> {
void goQuickCheckPersonalPath(studentId) {
if (studentId != null) {
Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':studentId,'homeworkId':widget.homeworkId});
}
}
void showPeopleListDialog( void showPeopleListDialog(
{required BuildContext context, {required BuildContext context,
required String title, required String title,
@ -112,8 +120,8 @@ class _KnowledgePointState extends State<KnowledgePoint> {
flex: 2, flex: 2,
child: InkWell( child: InkWell(
onTap: () { onTap: () {
/* goQuickCheckPersonalPath( goQuickCheckPersonalPath(
item['noAnswerStudents'].id);*/ item.studentId);
}, },
child: Center( child: Center(
child: Text( child: Text(
@ -127,7 +135,7 @@ class _KnowledgePointState extends State<KnowledgePoint> {
flex: 1, flex: 1,
child: Center( child: Center(
child: Text( child: Text(
widget.className, widget.className == ''?'全部': widget.className,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF323232)), color: Color(0xFF323232)),

View File

@ -29,7 +29,7 @@ class _QuickDataCheckBottomState extends State<QuickDataCheckBottom> {
super.initState(); super.initState();
showList.value = widget.jobData!; showList.value = widget.jobData!;
for (var e in widget.jobData!) { for (var e in widget.jobData!) {
if(e.priorityAnnotate){ if(e.priorityAnnotate!){
followList.add(e); followList.add(e);
} }
} }

View File

@ -50,12 +50,6 @@ class _QuickStudentDataTableState extends State<QuickStudentDataTable> {
cells: [ cells: [
DataCell(InkWell( DataCell(InkWell(
onTap: () { onTap: () {
/*RouterManager.router.navigateTo(
context,
RouterManager.quickCheckPersonalPath +
'?jobId=${widget.jobId}&studentId=${item.studentId}',
transition: getTransition(),
);*/
Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':item.studentId,'homeworkId':widget.jobId}); Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':item.studentId,'homeworkId':widget.jobId});
}, },
child: Center( child: Center(

View File

@ -1,12 +1,14 @@
import 'package:data_table_2/data_table_2.dart'; import 'package:data_table_2/data_table_2.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:school_asignment_app/common/job/annotated_class.dart'; import 'package:school_asignment_app/common/job/annotated_class.dart';
import 'package:school_asignment_app/common/job/homework_details.dart'; import 'package:school_asignment_app/common/job/homework_details.dart';
import 'package:school_asignment_app/common/utils/toast_utils.dart'; import 'package:school_asignment_app/common/utils/toast_utils.dart';
import 'package:school_asignment_app/common/utils/utils.dart'; import 'package:school_asignment_app/common/utils/utils.dart';
import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart'; import 'package:school_asignment_app/page/global_widget/MyEmptyWidget.dart';
import 'package:school_asignment_app/page/global_widget/imgDialog.dart'; import 'package:school_asignment_app/page/global_widget/imgDialog.dart';
import 'package:school_asignment_app/routes/app_pages.dart';
class ReportTable extends StatefulWidget { class ReportTable extends StatefulWidget {
@ -152,7 +154,7 @@ class _ReportTableState extends State<ReportTable> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
goQuickCheckPersonalPath( goQuickCheckPersonalPath(
item['noAnswerStudents'].id); item['noAnswerStudents'].studentId);
}, },
child: Center( child: Center(
child: Text( child: Text(
@ -166,7 +168,7 @@ class _ReportTableState extends State<ReportTable> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
goQuickCheckPersonalPath( goQuickCheckPersonalPath(
item['answerOkStudents'].id); item['answerOkStudents'].studentId);
}, },
child: Center( child: Center(
child: Text( child: Text(
@ -180,7 +182,7 @@ class _ReportTableState extends State<ReportTable> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
goQuickCheckPersonalPath( goQuickCheckPersonalPath(
item['answerNgStudents'].id); item['answerNgStudents'].studentId);
}, },
child: Center( child: Center(
child: Text( child: Text(
@ -205,7 +207,7 @@ class _ReportTableState extends State<ReportTable> {
Dtls item = arr[index]; Dtls item = arr[index];
return InkWell( return InkWell(
onTap: () { onTap: () {
goQuickCheckPersonalPath(item.id); goQuickCheckPersonalPath(item.studentId);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@ -234,13 +236,8 @@ class _ReportTableState extends State<ReportTable> {
} }
void goQuickCheckPersonalPath(id) { void goQuickCheckPersonalPath(id) {
if (id) { if (id != null) {
/*RouterManager.router.navigateTo( Get.toNamed(Routes.studentPersonalPage,arguments: {'studentId':id,'homeworkId':widget.jobId});
context,
RouterManager.quickCheckPersonalPath +
'?jobId=${widget.jobId}&studentId=$id',
transition: getTransition(),
);*/
} }
} }

View File

@ -345,10 +345,7 @@ Widget $reviewedItem(
return InkWell( return InkWell(
onTap: () { onTap: () {
/* String url = Get.toNamed(Routes.annotateClassPage,arguments: {'id':jobTaskItem.id,'name':jobTaskItem.name,'grade':jobTaskItem.grade,'completed':true});
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
RouterManager.router.navigateTo(context, url, transition: getTransition());*/
Get.toNamed(Routes.annotateClassPage,arguments: {'id':jobTaskItem.id,'name':jobTaskItem.name,'grade':jobTaskItem.grade});
}, },
child: Container( child: Container(
padding: EdgeInsets.only(top: 10.h), padding: EdgeInsets.only(top: 10.h),
@ -449,7 +446,6 @@ Widget $reviewedItem(
GestureDetector( GestureDetector(
onTap: () { onTap: () {
Get.toNamed(Routes.jobReportPage,arguments: {'title':jobTaskItem.name,'homeworkId':jobTaskItem.id,'grade':jobTaskItem.grade}); Get.toNamed(Routes.jobReportPage,arguments: {'title':jobTaskItem.name,'homeworkId':jobTaskItem.id,'grade':jobTaskItem.grade});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 6.h), padding: EdgeInsets.symmetric(vertical: 6.h),

View File

@ -27,9 +27,7 @@ class _TaskListItemState extends State<TaskListItem> {
return widget.completed return widget.completed
? InkWell( ? InkWell(
onTap: () { onTap: () {
/*String url = Get.toNamed(Routes.annotateClassPage,arguments: {'id': widget.jobTaskItem.id,'name': widget.jobTaskItem.name,'grade': widget.jobTaskItem.grade,'completed':true});
'${RouterManager.jobListParticipateInClassPath}?&jobId=${jobTaskItem.id}&genderName=${Uri.encodeComponent(jobTaskItem.genderName)}&jobName=${Uri.encodeComponent(jobTaskItem.title)}&completed=${true}';
RouterManager.router.navigateTo(context, url, transition: getTransition());*/
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,

View File

@ -75,12 +75,12 @@ class _JobConditionFilterState extends State<JobConditionFilter> {
onTap: (int val) async { onTap: (int val) async {
if(val == 0 && widget.hasAll == true){ if(val == 0 && widget.hasAll == true){
widget.onTimeFilter(null, null); widget.onTimeFilter(null, null);
}else if(val == 1 || (val == 0 && widget.hasAll == false)){ }else if((val == 1 && widget.hasAll == true) || (val == 0 && widget.hasAll == false)){
widget.onTimeFilter( widget.onTimeFilter(
Utils.getWeekStartDate().toString().substring(0, 10), Utils.getWeekStartDate().toString().substring(0, 10),
Utils.getWeekEndDate().toString().substring(0, 10), Utils.getWeekEndDate().toString().substring(0, 10),
); );
}else if(val == 2 || (val == 1 && widget.hasAll == false)){ }else if((val == 2 && widget.hasAll == true) || (val == 1 && widget.hasAll == false)){
widget.onTimeFilter( widget.onTimeFilter(
getMonthStartDate().toString().substring(0, 10), getMonthStartDate().toString().substring(0, 10),
getMonthEndDate().toString().substring(0, 10), getMonthEndDate().toString().substring(0, 10),

View File

@ -73,7 +73,7 @@ class _HomePageState extends State<HomePage>
EntranceModel( EntranceModel(
title: '知识点点掌握', title: '知识点点掌握',
image: 'assets/images/job_home_knowledge.png', image: 'assets/images/job_home_knowledge.png',
navigationUrl: '') navigationUrl: Routes.knowledgePointsGraspPage)
], ],
state.readOver.value); state.readOver.value);
}), }),

View File

@ -7,6 +7,10 @@ import 'package:school_asignment_app/page/home_page/children/class_student/class
import 'package:school_asignment_app/page/home_page/children/class_student/class_student_view.dart'; import 'package:school_asignment_app/page/home_page/children/class_student/class_student_view.dart';
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_binding.dart'; import 'package:school_asignment_app/page/home_page/children/job_report/job_report_binding.dart';
import 'package:school_asignment_app/page/home_page/children/job_report/job_report_view.dart'; import 'package:school_asignment_app/page/home_page/children/job_report/job_report_view.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_binding.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp/knowledge_points_grasp_view.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_binding.dart';
import 'package:school_asignment_app/page/home_page/children/knowledge_points_grasp_detail/knowledge_points_grasp_detail_view.dart';
import 'package:school_asignment_app/page/home_page/children/my_info.dart'; import 'package:school_asignment_app/page/home_page/children/my_info.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_binding.dart'; import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_binding.dart';
import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_view.dart'; import 'package:school_asignment_app/page/home_page/children/quick_data_check/quick_data_check_view.dart';
@ -44,6 +48,8 @@ abstract class AppPages {
GetPage(name: Routes.jobReportPage, page: () => const JobReportPage(), binding: JobReportBinding(), transition: Transition.noTransition), GetPage(name: Routes.jobReportPage, page: () => const JobReportPage(), binding: JobReportBinding(), transition: Transition.noTransition),
GetPage(name: Routes.studentPersonalPage, page: () => const StudentPersonalPage(), binding: StudentPersonalBinding(), transition: Transition.noTransition), GetPage(name: Routes.studentPersonalPage, page: () => const StudentPersonalPage(), binding: StudentPersonalBinding(), transition: Transition.noTransition),
GetPage(name: Routes.studentWorkDetailPage, page: () => const StudentWorkDetailPage(), binding: StudentWorkDetailBinding(), transition: Transition.noTransition), GetPage(name: Routes.studentWorkDetailPage, page: () => const StudentWorkDetailPage(), binding: StudentWorkDetailBinding(), transition: Transition.noTransition),
GetPage(name: Routes.knowledgePointsGraspPage, page: () => const KnowledgePointsGraspPage(), binding: KnowledgePointsGraspBinding(), transition: Transition.noTransition),
GetPage(name: Routes.knowledgePointsGraspDetailPage, page: () => const KnowledgePointsGraspDetailPage(), binding: KnowledgePointsGraspDetailBinding(), transition: Transition.noTransition),
]; ];
} }

View File

@ -16,4 +16,6 @@ abstract class Routes {
static const jobReportPage = '/jobReportPage'; static const jobReportPage = '/jobReportPage';
static const studentPersonalPage = '/studentPersonalPage'; static const studentPersonalPage = '/studentPersonalPage';
static const studentWorkDetailPage = '/studentWorkDetailPage'; static const studentWorkDetailPage = '/studentWorkDetailPage';
static const knowledgePointsGraspPage = '/knowledgePointsGraspPage';
static const knowledgePointsGraspDetailPage = '/knowledgePointsGraspDetailPage';
} }