Compare commits

..

No commits in common. "a3fd75efb5b146daf041fba5d3d82fa57122a65e" and "bcaf5c77b7b4d36749e1872cf07d596e58e34de1" have entirely different histories.

17 changed files with 1894 additions and 2058 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 B

View File

@ -13,7 +13,7 @@ class AppConfig {
static const UI_WIDTH = 375.0; static const UI_WIDTH = 375.0;
/// ui width /// ui width
static const UI_HEIGHT = 867.0; static const UI_HEIGHT = 812.0;
static const SKIP_UPDATING_USER = '18888888888'; static const SKIP_UPDATING_USER = '18888888888';
static const APP_NAME = '18888888888'; static const APP_NAME = '18888888888';

View File

@ -24,98 +24,94 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
String homeworkId = state.homeworkId.value; String homeworkId = state.homeworkId.value;
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Obx(() {
backgroundColor: Colors.white, return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
title: Obx(() { }),
return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333))); centerTitle: true,
}), leading: IconButton(
centerTitle: true, icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () {
icon: const Icon(Icons.arrow_back_ios, color: Colors.black), Get.back();
onPressed: () { },
Get.back(); ),
}, actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Padding(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async{
return logic.getList();
},
child: state.completed.value
? Utils.isPad()
? GridView(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2, //widget
mainAxisSpacing: 10.h,
crossAxisSpacing: 6.w,
childAspectRatio: 1.48 //1widget
), ),
body: Padding( children: state.classList.map((taskItem) {
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), return CompletedAnnotateItem(
child: Obx(() { taskItem: taskItem,
return EasyRefresh( logic: logic,
firstRefresh: false, name: state.name.value,
taskIndependence: true, );
controller: logic.refreshController, }).toList(),
header: MaterialHeader(), )
footer: TaurusFooter(), : ListView.builder(
onRefresh: () async{ itemCount: state.classList.length,
return logic.getList(); itemBuilder: (context, index) {
}, AnnotatedClass taskItem = state.classList[index];
child: state.completed.value return CompletedAnnotateItem(
? Utils.isPad() taskItem: taskItem,
? GridView( logic: logic,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( name: state.name.value,
crossAxisCount: 2, //widget );
mainAxisSpacing: 10.h, })
crossAxisSpacing: 6.w, : Utils.isPad()
childAspectRatio: 1.48 //1widget ? MasonryGridView.count(
), crossAxisCount: 2, //
children: state.classList.map((taskItem) { mainAxisSpacing: 4.w, //
return CompletedAnnotateItem( crossAxisSpacing: 4.h, //
taskItem: taskItem, itemCount: state.classList.length,
logic: logic, itemBuilder: (context, index) {
name: state.name.value, AnnotatedClass item = state.classList[index];
); return AnnotateItem(
}).toList(), homeworkId: homeworkId,
) item: item,
: ListView.builder( font: 11.sp,
itemCount: state.classList.length, name: state.name.value,
itemBuilder: (context, index) { logic: logic,
AnnotatedClass taskItem = state.classList[index]; );
return CompletedAnnotateItem( },
taskItem: taskItem, )
logic: logic, : ListView.builder(
name: state.name.value, itemCount: state.classList.length,
); itemBuilder: (context, index) {
}) AnnotatedClass item = state.classList[index];
: Utils.isPad() return AnnotateItem(
? MasonryGridView.count( homeworkId: homeworkId,
crossAxisCount: 2, // item: item,
mainAxisSpacing: 4.w, // font: 12.sp,
crossAxisSpacing: 4.h, // name: state.name.value,
itemCount: state.classList.length, logic: logic,
itemBuilder: (context, index) { );
AnnotatedClass item = state.classList[index]; }));
return AnnotateItem( }),
homeworkId: homeworkId, ),
item: item,
font: 11.sp,
name: state.name.value,
logic: logic,
);
},
)
: ListView.builder(
itemCount: state.classList.length,
itemBuilder: (context, index) {
AnnotatedClass item = state.classList[index];
return AnnotateItem(
homeworkId: homeworkId,
item: item,
font: 12.sp,
name: state.name.value,
logic: logic,
);
}));
}),
),
);
}
); );
} }

View File

@ -24,153 +24,147 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Text(
backgroundColor: Colors.white, '答题轨迹',
title: Text( style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
'答题轨迹', ),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)), centerTitle: true,
), leading: IconButton(
centerTitle: true, icon: Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Column(
), crossAxisAlignment: CrossAxisAlignment.start,
body: Column( children: [
crossAxisAlignment: CrossAxisAlignment.start, SizedBox(
children: [ height: 10.r,
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(
dividerHeight: 0,
tabAlignment: TabAlignment.start,
indicator: const UnderlineTabIndicator(
borderSide: BorderSide(
color: const Color.fromRGBO(104, 136, 253, 1),
), ),
Container(
padding: EdgeInsets.symmetric(horizontal: 14.r),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
child: TabBar(
dividerHeight: 0,
tabAlignment: TabAlignment.start,
indicator: const UnderlineTabIndicator(
borderSide: BorderSide(
color: const Color.fromRGBO(104, 136, 253, 1),
),
), ),
onTap: (int val) { onTap: (int val) {
state.tabIndex.value = val; state.tabIndex.value = val;
// EasyLoading.show(status: 'loading...'); // EasyLoading.show(status: 'loading...');
/* if(val == 0){ /* if(val == 0){
logic.getStudentGroups(); logic.getStudentGroups();
}else{ }else{
logic.getWorkList(); logic.getWorkList();
}*/ }*/
}, },
tabs: [ tabs: [
SizedBox( SizedBox(
width: (MediaQuery width: (MediaQuery
.of(context) .of(context)
.size .size
.width - 28.r) / 2, .width - 28.r) / 2,
child: const Tab( child: const Tab(
text: '按学生', text: '按学生',
),
),
SizedBox(
width: (MediaQuery
.of(context)
.size
.width - 28.r) / 2,
child: const Tab(
text: '按作业',
),
)
],
controller: logic.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),
), ),
), ),
Obx(() { SizedBox(
return Expanded( width: (MediaQuery
child: Padding( .of(context)
padding: .size
EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r), .width - 28.r) / 2,
child: child: const Tab(
state.tabIndex.value == 0 text: '按作业',
? ),
EasyRefresh( )
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
logic.getStudentGroups();
},
child: StudentGroupList(
state.studentGroups, logic.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: logic.refreshController2,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
state.page = 1;
logic.getWorkList();
},
onLoad: () async {
if (state.jobList.length < state.total) {
EasyLoading.show(status: 'loading...');
state.page = state.page + 1;
logic.getWorkList();
}
},
child: AnswerTrajectoryJob(state.jobList.value)),
),
);
})
], ],
controller: logic.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),
), ),
); ),
} Obx(() {
return Expanded(
child: Padding(
padding:
EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
child:
state.tabIndex.value == 0
?
EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
logic.getStudentGroups();
},
child: StudentGroupList(
state.studentGroups, logic.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: logic.refreshController2,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
state.page = 1;
logic.getWorkList();
},
onLoad: () async {
if (state.jobList.length < state.total) {
EasyLoading.show(status: 'loading...');
state.page = state.page + 1;
logic.getWorkList();
}
},
child: AnswerTrajectoryJob(state.jobList.value)),
),
);
})
],
),
); );
} }
@override @override

View File

@ -71,7 +71,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
bottomRight: Radius.circular(4.r), bottomRight: Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText( child: quickText(
item.assessType == 0 ? '作业' : '考试', item.assessType == 0 ? '作业' : '考试',
color: Colors.white, color: Colors.white,
@ -203,7 +203,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
bottomRight: Radius.circular(4.r), bottomRight: Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText( child: quickText(
item.assessType == 0 ? '作业' : '考试', item.assessType == 0 ? '作业' : '考试',
color: Colors.white, color: Colors.white,

View File

@ -29,217 +29,213 @@ class _AnswerTrajectoryDetailPageState
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: Color(0xFFF5F5F5),
return Scaffold( appBar: AppBar(
backgroundColor: Color(0xFFF5F5F5), centerTitle: true,
appBar: AppBar( backgroundColor: Colors.white,
centerTitle: true, title: Obx(() {
backgroundColor: Colors.white, return Text(
title: Obx(() { state.title.value,
return Text( style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
state.title.value, overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)), );
overflow: TextOverflow.ellipsis, }),
); leading: IconButton(
}), icon: Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Column(
), children: [
body: Column( SizedBox(
children: [ height: 10.r,
SizedBox( ),
height: 10.r, Obx(() {
), return state.classList.isNotEmpty?Padding(
Obx(() { padding: EdgeInsets.symmetric(horizontal: 14.r),
return state.classList.isNotEmpty?Padding( child: Row(
padding: EdgeInsets.symmetric(horizontal: 14.r), mainAxisAlignment: MainAxisAlignment.start,
child: Row( children: [
mainAxisAlignment: MainAxisAlignment.start, SingleChildScrollView(
children: [ scrollDirection: Axis.horizontal,
SingleChildScrollView( child: Row(
scrollDirection: Axis.horizontal, children: List.generate(state.classList.length, (
child: Row( index) {
children: List.generate(state.classList.length, ( AnnotatedClass item = state.classList[index];
index) {
AnnotatedClass item = state.classList[index];
return InkWell(
onTap: () {
if (state.currentClass.value.classId !=
item.classId) {
state.currentClass.value = item;
}
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 5.r, horizontal: 10.r),
margin: EdgeInsets.only(
right: index < state.classList.length
? 8.r
: 0),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(4.r),
),
child: Center(
child: Text(
'${EnumUtils.formatGrade(state.grade)}${item
.className}',
style: TextStyle(
fontSize: 10.sp,
color: state.currentClass.value
.classId == item.classId
? Color(0xFF6888FD)
: Color(0xFF686868)),
),
),
),
);
})),
),
],
),
):Container();
}),
SizedBox(
height: 10.r,
),
Container(
height: 1.r,
color: const Color(0xFFCCCCCC),
),
Obx((){
return state.currentClass.value.students.isNotEmpty ? Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: EasyRefresh(
firstRefresh: true,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
// getStudentList();
},
child: state.currentClass.value.students.isNotEmpty
? Utils.isPad()
? GridView(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10.r,
crossAxisSpacing: 10.r,
childAspectRatio: 556 / 112,
),
children: List.generate(
state.currentClass.value.students.length, (index) {
AnnotatedStudents item = state.currentClass.value.students[index];
return InkWell( return InkWell(
onTap: () { onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value}); if (state.currentClass.value.classId !=
}, item.classId) {
child: Container( state.currentClass.value = item;
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) {
AnnotatedStudents item = state.currentClass.value
.students[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value});
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
vertical: 20.r, horizontal: 15.r), vertical: 5.r, horizontal: 10.r),
margin: EdgeInsets.only(bottom: 15.r), margin: EdgeInsets.only(
right: index < state.classList.length
? 8.r
: 0),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius:
BorderRadius.all(Radius.circular(10.r)),
color: Colors.white, color: Colors.white,
borderRadius: BorderRadius.circular(4.r),
), ),
child: Row( child: Center(
mainAxisAlignment: child: Text(
MainAxisAlignment.spaceBetween, '${EnumUtils.formatGrade(state.grade)}${item
children: [ .className}',
Expanded( style: TextStyle(
child: Text( fontSize: 10.sp,
item.studentName, color: state.currentClass.value
style: TextStyle( .classId == item.classId
fontSize: 12.sp, ? Color(0xFF6888FD)
color: Color(0xFF6888FD)), : Color(0xFF686868)),
)), ),
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: state.currentClass.value.students.length,
)
: const MyEmptyWidget(),
),
), ),
) : const MyEmptyWidget(); ],
}), ),
], ):Container();
), }),
); SizedBox(
} height: 10.r,
),
Container(
height: 1.r,
color: const Color(0xFFCCCCCC),
),
Obx((){
return state.currentClass.value.students.isNotEmpty ? Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: EasyRefresh(
firstRefresh: true,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
// getStudentList();
},
child: state.currentClass.value.students.isNotEmpty
? Utils.isPad()
? GridView(
gridDelegate:
SliverGridDelegateWithFixedCrossAxisCount(
crossAxisCount: 2,
mainAxisSpacing: 10.r,
crossAxisSpacing: 10.r,
childAspectRatio: 556 / 112,
),
children: List.generate(
state.currentClass.value.students.length, (index) {
AnnotatedStudents item = state.currentClass.value.students[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value});
},
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) {
AnnotatedStudents item = state.currentClass.value
.students[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value});
},
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: state.currentClass.value.students.length,
)
: const MyEmptyWidget(),
),
),
) : const MyEmptyWidget();
}),
],
),
); );
} }

View File

@ -24,404 +24,400 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Obx(() {
backgroundColor: Colors.white, return Text(
title: Obx(() { state.title.value,
return Text( style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
state.title.value, );
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)), }),
); centerTitle: true,
}), leading: IconButton(
centerTitle: true, icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: const Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Padding(
), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
body: Padding( child: Obx(() {
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), return EasyRefresh(
child: Obx(() { firstRefresh: false,
return EasyRefresh( taskIndependence: true,
firstRefresh: false, controller: logic.refreshController,
taskIndependence: true, header: MaterialHeader(),
controller: logic.refreshController, footer: TaurusFooter(),
header: MaterialHeader(), onRefresh: () async {
footer: TaurusFooter(), logic.getList();
onRefresh: () async { },
logic.getList(); child: state.studentList.isNotEmpty
}, ? Utils.isPad()
child: state.studentList.isNotEmpty ? GridView(
? Utils.isPad() shrinkWrap: true,
? GridView( gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
shrinkWrap: true, crossAxisCount: 2,
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( mainAxisSpacing: 10.r,
crossAxisCount: 2, crossAxisSpacing: 10.r,
mainAxisSpacing: 10.r, childAspectRatio: 556 / 112,
crossAxisSpacing: 10.r, ),
childAspectRatio: 556 / 112, children:
), List.generate(state.studentList.length, (index) {
children: StudentItem item = state.studentList[index];
List.generate(state.studentList.length, (index) { return InkWell(
StudentItem item = state.studentList[index]; onTap: () {
return InkWell( // RouterManager.router.navigateTo(context,
onTap: () { // '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
// RouterManager.router.navigateTo(context, Get.toNamed(Routes.studentWorkDetailPage,
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); arguments: {
Get.toNamed(Routes.studentWorkDetailPage, 'studentName': item.name,
arguments: { 'studentId': item.id
'studentName': item.name, });
'studentId': item.id },
}); child: Container(
}, padding: EdgeInsets.symmetric(horizontal: 10.r),
child: Container( decoration: BoxDecoration(
padding: EdgeInsets.symmetric(horizontal: 10.r), borderRadius:
decoration: BoxDecoration( BorderRadius.all(Radius.circular(10.r)),
borderRadius: color: Colors.white,
BorderRadius.all(Radius.circular(10.r)), ),
color: Colors.white, child: Row(
), mainAxisAlignment:
child: Row( MainAxisAlignment.spaceBetween,
mainAxisAlignment: children: [
MainAxisAlignment.spaceBetween, Expanded(
children: [ child: Text(
Expanded(
child: Text(
item.name, item.name,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: const Color(0xFF6888FD)), color: const Color(0xFF6888FD)),
)), )),
state.page == 'answerTrajectory' state.page == 'answerTrajectory'
? Container( ? Container(
height: 20.r, height: 20.r,
width: 70.r, width: 70.r,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 1.r, width: 1.r,
color: const Color(0xFFFFA41E)), color: const Color(0xFFFFA41E)),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(20.r)), Radius.circular(20.r)),
), ),
child: Center( child: Center(
child: Text('详情', child: Text('详情',
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: Color(0xFFFFA41E))), color: Color(0xFFFFA41E))),
)) ))
: state.page == 'history' : state.page == 'history'
? Container( ? Container(
height: 20.r, height: 20.r,
width: 70.r, width: 70.r,
decoration: BoxDecoration( decoration: BoxDecoration(
color: color:
const Color(0xFF6888FD), const Color(0xFF6888FD),
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
20.r))), 20.r))),
child: Center( child: Center(
child: Text( child: Text(
'历史作业', '历史作业',
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: Colors.white), color: Colors.white),
)), )),
) )
: item.priorityAnnotate : item.priorityAnnotate
? InkWell( ? InkWell(
onTap: () { onTap: () {
logic.setJobReadLevel( logic.setJobReadLevel(
item.id, false); item.id, false);
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child: Container(
height: 20.r, height: 20.r,
width: 80.r, width: 80.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
4.r)), 4.r)),
color: const Color( color: const Color(
0xFFB7FFE0), 0xFFB7FFE0),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: [ children: [
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
left: 3.r), left: 3.r),
child: Image.asset( child: Image.asset(
'assets/images/youx_icon_active.png', 'assets/images/youx_icon_active.png',
width: 14.r, width: 14.r,
height: 14.r, height: 14.r,
), ),
), ),
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
top: 2.r, top: 2.r,
left: 4.r), left: 4.r),
child: Text( child: Text(
'优先批阅', '优先批阅',
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: const Color( color: const Color(
0xFF4CC793)), 0xFF4CC793)),
), ),
), ),
], ],
), ),
), ),
) )
: InkWell( : InkWell(
onTap: () { onTap: () {
logic.setJobReadLevel( logic.setJobReadLevel(
item.id, true); item.id, true);
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child: Container(
height: 20.r, height: 20.r,
width: 80.r, width: 80.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
4.r)), 4.r)),
color: const Color( color: const Color(
0xFFE1E1E1), 0xFFE1E1E1),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: [ children: [
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
left: 3.r), left: 3.r),
child: Image.asset( child: Image.asset(
'assets/images/youx_icon_default.png', 'assets/images/youx_icon_default.png',
width: 14.r, width: 14.r,
height: 14.r, height: 14.r,
), ),
), ),
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
top: 2.r, top: 2.r,
left: 4.r), left: 4.r),
child: Text( child: Text(
'优先批阅', '优先批阅',
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: const Color( color: const Color(
0xFF8A9691)), 0xFF8A9691)),
), ),
), ),
], ],
), ),
), ),
),
],
), ),
], ),
), );
), }),
); )
}), : ListView.builder(
) itemBuilder: (context, index) {
: ListView.builder( StudentItem item = state.studentList[index];
itemBuilder: (context, index) { return InkWell(
StudentItem item = state.studentList[index]; onTap: () {
return InkWell( // RouterManager.router.navigateTo(context,
onTap: () { // '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
// RouterManager.router.navigateTo(context, Get.toNamed(Routes.studentWorkDetailPage,
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}'); arguments: {
Get.toNamed(Routes.studentWorkDetailPage, 'studentName': item.name,
arguments: { 'studentId': item.id
'studentName': item.name, });
'studentId': item.id },
}); child: Container(
}, padding: EdgeInsets.symmetric(
child: Container( vertical: 20.r, horizontal: 15.r),
padding: EdgeInsets.symmetric( margin: EdgeInsets.only(bottom: 15.r),
vertical: 20.r, horizontal: 15.r), decoration: BoxDecoration(
margin: EdgeInsets.only(bottom: 15.r), borderRadius:
decoration: BoxDecoration( BorderRadius.all(Radius.circular(10.r)),
borderRadius: color: Colors.white,
BorderRadius.all(Radius.circular(10.r)), ),
color: Colors.white, child: Row(
), mainAxisAlignment:
child: Row( MainAxisAlignment.spaceBetween,
mainAxisAlignment: children: [
MainAxisAlignment.spaceBetween, Expanded(
children: [ child: Text(
Expanded(
child: Text(
item.name, item.name,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF6888FD)), color: Color(0xFF6888FD)),
)), )),
state.page == 'answerTrajectory' state.page == 'answerTrajectory'
? Container( ? Container(
height: 24.r, height: 24.r,
width: 72.r, width: 72.r,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all( border: Border.all(
width: 1.r, width: 1.r,
color: Color(0xFFFFA41E)), color: Color(0xFFFFA41E)),
borderRadius: BorderRadius.all( borderRadius: BorderRadius.all(
Radius.circular(20.r)), Radius.circular(20.r)),
), ),
child: Center( child: Center(
child: Text('详情', child: Text('详情',
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: Color(0xFFFFA41E))), color: Color(0xFFFFA41E))),
)) ))
: state.page == 'history' : state.page == 'history'
? Container( ? Container(
height: 24.r, height: 24.r,
width: 82.r, width: 82.r,
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color(0xFF6888FD), color: Color(0xFF6888FD),
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
20.r))), 20.r))),
child: Center( child: Center(
child: Text( child: Text(
'历史作业', '历史作业',
style: TextStyle( style: TextStyle(
fontSize: 10.r, fontSize: 10.r,
color: Colors.white), color: Colors.white),
)), )),
) )
: item.priorityAnnotate : item.priorityAnnotate
? InkWell( ? InkWell(
onTap: () { onTap: () {
logic.setJobReadLevel( logic.setJobReadLevel(
item.id, false); item.id, false);
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child: Container(
height: 24.r, height: 24.r,
width: 82.r, width: 82.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
4.r)), 4.r)),
color: Color(0xFFB7FFE0), color: Color(0xFFB7FFE0),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: [ children: [
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
left: 3.r), left: 3.r),
child: Image.asset( child: Image.asset(
'assets/images/youx_icon_active.png', 'assets/images/youx_icon_active.png',
width: 14.r, width: 14.r,
height: 14.r, height: 14.r,
), ),
), ),
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
top: 5.r, top: 5.r,
left: 4.r), left: 4.r),
child: Text( child: Text(
'优先批阅', '优先批阅',
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: const Color( color: const Color(
0xFF4CC793)), 0xFF4CC793)),
), ),
), ),
], ],
), ),
), ),
) )
: InkWell( : InkWell(
onTap: () { onTap: () {
logic.setJobReadLevel( logic.setJobReadLevel(
item.id, true); item.id, true);
EasyLoading.show( EasyLoading.show(
status: 'loading...'); status: 'loading...');
}, },
child: Container( child: Container(
height: 24.r, height: 24.r,
width: 82.r, width: 82.r,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: borderRadius:
BorderRadius.all( BorderRadius.all(
Radius.circular( Radius.circular(
4.r)), 4.r)),
color: const Color( color: const Color(
0xFFE1E1E1), 0xFFE1E1E1),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment
.start, .start,
children: [ children: [
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
left: 3.r), left: 3.r),
child: Image.asset( child: Image.asset(
'assets/images/youx_icon_default.png', 'assets/images/youx_icon_default.png',
width: 14.r, width: 14.r,
height: 14.r, height: 14.r,
), ),
), ),
Padding( Padding(
padding: padding:
EdgeInsets.only( EdgeInsets.only(
top: 5.r, top: 5.r,
left: 4.r), left: 4.r),
child: Text( child: Text(
'优先批阅', '优先批阅',
style: TextStyle( style: TextStyle(
fontSize: 10.sp, fontSize: 10.sp,
color: const Color( color: const Color(
0xFF8A9691)), 0xFF8A9691)),
), ),
), ),
], ],
), ),
), ),
),
],
), ),
], ),
), );
), },
); itemCount: state.studentList.length,
}, )
itemCount: state.studentList.length, : const MyEmptyWidget(),
)
: const MyEmptyWidget(),
);
}),
),
); );
} }),
),
); );
} }

View File

@ -113,9 +113,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
ReturnToHomepage(), ReturnToHomepage(),
], ],
), ),
body:OrientationBuilder( body: Column(
builder: (BuildContext context, Orientation orientation){
return Column(
children: [ children: [
Padding( Padding(
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r), padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
@ -141,7 +139,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
children: [ children: [
Obx(() { Obx(() {
return DropdownSelection( return DropdownSelection(
bgColor: Colors.white, bgColor: Colors.white,
involveClasses: state.involveClasses.value, involveClasses: state.involveClasses.value,
classData: state.classData.value, classData: state.classData.value,
call: (AnnotatedClass item) { call: (AnnotatedClass item) {
@ -223,7 +221,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
child: InkWell( child: InkWell(
onTap: () { onTap: () {
showStudentDialog(context, showStudentDialog(context,
student, state.favList); student, state.favList);
}, },
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
@ -251,12 +249,12 @@ class _FavStudentPageState extends State<FavStudentPage> {
), ),
InkWell( InkWell(
onTap: () async { onTap: () async {
var confim = var confim =
await confirmDialog(); await confirmDialog();
if (confim) { if (confim) {
logic.getDelete( logic.getDelete(
student); student);
} }
}, },
child: Image.asset( child: Image.asset(
'assets/images/favorite_delete_icon.png', 'assets/images/favorite_delete_icon.png',
@ -302,8 +300,8 @@ class _FavStudentPageState extends State<FavStudentPage> {
HomeworkFavs student = item['list'][i]; HomeworkFavs student = item['list'][i];
return InkWell( return InkWell(
onTap: () { onTap: () {
showStudentDialog( showStudentDialog(
context, student, state.favList); context, student, state.favList);
}, },
child: Container( child: Container(
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
@ -338,10 +336,10 @@ class _FavStudentPageState extends State<FavStudentPage> {
InkWell( InkWell(
onTap: () async { onTap: () async {
var confim = var confim =
await confirmDialog(); await confirmDialog();
if (confim) { if (confim) {
logic.getDelete(student); logic.getDelete(student);
} }
}, },
child: Image.asset( child: Image.asset(
'assets/images/favorite_delete_icon.png', 'assets/images/favorite_delete_icon.png',
@ -375,9 +373,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
}), }),
], ],
); ),
}
)
); );
} }

View File

@ -25,97 +25,93 @@ class _JobReportPageState extends State<JobReportPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( centerTitle: true,
backgroundColor: Colors.white, title: Center(child: Obx(() {
centerTitle: true, return quickText(
title: Center(child: Obx(() { '${state.title.value}作业报告',
return quickText( size: 14.sp,
'${state.title.value}作业报告', color: const Color.fromRGBO(51, 51, 51, 1),
size: 14.sp, );
color: const Color.fromRGBO(51, 51, 51, 1), })),
); leading: IconButton(
})), icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: const Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Obx(() {
), if (state.hasData.value) {
body: Obx(() { return SingleChildScrollView(
if (state.hasData.value) { child: Column(
return SingleChildScrollView( children: [
child: Column( //
Container(
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
decoration: const BoxDecoration(
color: Colors.white,
),
child: Row(
children: [ children: [
// Obx(() {
Container( return DropdownSelection(
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w), involveClasses: state.involveClasses.value,
decoration: const BoxDecoration( classData: state.classData.value,
color: Colors.white, call: (AnnotatedClass item) {
), state.classData.value = item;
child: Row( if (item.grade == -1) state.classData.value = state.defaultClass;
children: [ logic.getWorkData();
Obx(() { });
return DropdownSelection( }),
involveClasses: state.involveClasses.value, // Expanded(child: Text('')),
classData: state.classData.value, ],
call: (AnnotatedClass item) { ),
state.classData.value = item; ),
if (item.grade == -1) state.classData.value = state.defaultClass; //
logic.getWorkData(); /* TopCount(
});
}),
// Expanded(child: Text('')),
],
),
),
//
/* TopCount(
data, classData == null ? '' : classData!.className, widget.id),*/ data, classData == null ? '' : classData!.className, widget.id),*/
// //
KgtZgtTable( KgtZgtTable(
studentCount: state.dataCount.studentCount!, studentCount: state.dataCount.studentCount!,
homeworkId: state.homeworkId.value, homeworkId: state.homeworkId.value,
kgReport: state.kgReport, kgReport: state.kgReport,
zgReport: state.zgReport, zgReport: state.zgReport,
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0), kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)), zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)),
// //
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10.r), margin: EdgeInsets.symmetric(horizontal: 10.r),
child: KnowledgePoint( child: KnowledgePoint(
knowsList: state.knowsList, knowsList: state.knowsList,
data: state.homeData, data: state.homeData,
className: state.classData.value.className, className: state.classData.value.className,
homeworkId: state.homeworkId.value)), homeworkId: state.homeworkId.value)),
// //
/* Container( /* Container(
margin: EdgeInsets.symmetric(horizontal: 10.r), margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $OverallPerformance(data.studentCount, data.overallTitles)), child: $OverallPerformance(data.studentCount, data.overallTitles)),
// //
Container( Container(
margin: EdgeInsets.symmetric(horizontal: 10.r), margin: EdgeInsets.symmetric(horizontal: 10.r),
child: $UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos)),*/ child: $UnitTimeAnsweringSituation(widget.id, data.questionAnswerInfos)),*/
// //
Container(margin: EdgeInsets.symmetric(horizontal: 10.r), child: PersonnelDataOverview(studentList: state.studentList.value)), Container(margin: EdgeInsets.symmetric(horizontal: 10.r), child: PersonnelDataOverview(studentList: state.studentList.value)),
SizedBox( SizedBox(
height: 30.r, height: 30.r,
), ),
], ],
), ),
);
} else {
return Padding(padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 2 - 200.r), child: const MyEmptyWidget());
}
}),
); );
} else {
return Padding(padding: EdgeInsets.only(top: MediaQuery.of(context).size.height / 2 - 200.r), child: const MyEmptyWidget());
} }
}),
); );
} }

View File

@ -27,221 +27,218 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
backgroundColor: Colors.white, centerTitle: true,
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))), leading: IconButton(
centerTitle: true, icon: Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), elevation: 0,
], ),
elevation: 0, body: Column(
), children: [
body: Column( Container(
margin: EdgeInsets.all(15.r),
height: 30.r,
child: Row(
children: [ children: [
Container( Expanded(
margin: EdgeInsets.all(15.r), child: Container(
// height: 30.r, padding: EdgeInsets.only(left: 10.r, right: 10.r),
child: Row( decoration: BoxDecoration(
children: [ borderRadius: BorderRadius.circular(6.r),
Expanded( border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
child: Container( color: Colors.white,
padding: EdgeInsets.only(left: 10.r, right: 10.r), ),
decoration: BoxDecoration( child: TextField(
borderRadius: BorderRadius.circular(6.r), controller: logic.textController,
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)), textInputAction: TextInputAction.next,
color: Colors.white, style: TextStyle(
), color: const Color.fromRGBO(80, 87, 103, 1),
child: TextField( fontSize: 10.sp,
controller: logic.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( decoration: InputDecoration(
width: 10.r, 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,
), ),
InkWell( ),
onTap: () {
state.page = 1;
logic.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),
),
),
),
)
],
), ),
), ),
Obx(() { SizedBox(
return JobConditionFilter( width: 10.r,
jobType: 1, ),
controller: logic.tabController, InkWell(
customTimeStr: state.customTimeStr.value, onTap: () {
customTime: logic.tabController.index != 2 || state.page = 1;
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == '')) logic.getList();
? null },
: PickerDateRange( 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),
),
),
),
)
],
),
),
Obx(() {
return JobConditionFilter(
jobType: 1,
controller: logic.tabController,
customTimeStr: state.customTimeStr.value,
customTime: logic.tabController.index != 2 ||
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == ''))
? null
: PickerDateRange(
state.dateStart == null || state.dateStart == '' ? null : DateTime.parse(state.dateStart!), state.dateStart == null || state.dateStart == '' ? null : DateTime.parse(state.dateStart!),
state.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!), state.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!),
), ),
onTimeFilter: (String? startTime, String? endTime) { onTimeFilter: (String? startTime, String? endTime) {
EasyLoading.show(status: 'loading...'); EasyLoading.show(status: 'loading...');
if (startTime == null && endTime == null) { if (startTime == null && endTime == null) {
if (logic.tabController.index == 2) { if (logic.tabController.index == 2) {
logic.tabController.animateTo(0); logic.tabController.animateTo(0);
} }
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10); state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10); state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
state.customTimeStr.value = '自定义'; state.customTimeStr.value = '自定义';
} else { } else {
state.dateStart = startTime ?? ''; state.dateStart = startTime ?? '';
state.dateEnd = endTime ?? ''; state.dateEnd = endTime ?? '';
} }
state.page = 1; state.page = 1;
logic.getList();
// _refreshController2.callRefresh();
},
refreshTime: (value) {
if (value != null && value.startDate != null) {
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
if (value.endDate != null) {
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
} else {
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
}
}
}
},
);
}),
Expanded(
child: Padding(
padding: EdgeInsets.symmetric(vertical: 10.r),
child: Obx(() {
return EasyRefresh(
firstRefresh: false,
taskIndependence: true,
controller: logic.refreshController,
header: MaterialHeader(),
footer: TaurusFooter(),
onRefresh: () async {
state.page = 1;
logic.getList();
},
onLoad: () async {
if (state.page < state.totalPages) {
state.page += 1;
logic.getList(); logic.getList();
// _refreshController2.callRefresh(); }
}, },
refreshTime: (value) { child: state.dataList.isNotEmpty
if (value != null && value.startDate != null) { ? ListView.builder(
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? ''; itemCount: state.dataList.value.length,
if (value.endDate != null) { itemBuilder: (context, index) {
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) { KnowledgePointsGrasp item = state.dataList[index];
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}'; return InkWell(
} else { onTap: () {
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}'; Get.toNamed(Routes.knowledgePointsGraspDetailPage, arguments: {
} 'dateStart': state.dateStart,
} 'dateEnd': state.dateEnd,
} 'knowledgeId': item.knowledgeId,
}, 'knowledgeName': item.knowledgeName
); });
}), },
Expanded( child: Container(
child: Padding( margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(vertical: 10.r), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
child: Obx(() { decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white),
return EasyRefresh( child: Column(
firstRefresh: false, mainAxisAlignment: MainAxisAlignment.start,
taskIndependence: true, crossAxisAlignment: CrossAxisAlignment.start,
controller: logic.refreshController, children: [
header: MaterialHeader(), Row(
footer: TaurusFooter(), mainAxisAlignment: MainAxisAlignment.start,
onRefresh: () async { crossAxisAlignment: CrossAxisAlignment.end,
state.page = 1; children: [
logic.getList(); Expanded(
}, child: Text(
onLoad: () async { item.knowledgeName,
if (state.page < state.totalPages) { style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
state.page += 1; )),
logic.getList(); Container(
} width: 49.r,
}, height: 22.r,
child: state.dataList.isNotEmpty decoration: BoxDecoration(
? ListView.builder( borderRadius: BorderRadius.all(Radius.circular(20.r)),
itemCount: state.dataList.value.length, border: Border.all(width: 1.r, color: Color(0xFF6888FD)),
itemBuilder: (context, index) {
KnowledgePointsGrasp item = state.dataList[index];
return InkWell(
onTap: () {
Get.toNamed(Routes.knowledgePointsGraspDetailPage, arguments: {
'dateStart': state.dateStart,
'dateEnd': state.dateEnd,
'knowledgeId': item.knowledgeId,
'knowledgeName': item.knowledgeName
});
},
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,
),
],
),
), ),
], child: Row(
), mainAxisAlignment: MainAxisAlignment.center,
SizedBox( children: [
height: 10.r, Text(
), '${item.count}',
ProgressBar( style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
title: '正确率:', ),
color: Color(0xFF90E0BE), Image.asset(
percent: item.correctRate / 100, 'assets/images/right_icon_blue.png',
padingEdg: EdgeInsets.zero, width: 8.r,
marginEdg: EdgeInsets.only(top: 8.h)), height: 8.r,
], ),
), ],
),
),
],
),
SizedBox(
height: 10.r,
),
ProgressBar(
title: '正确率:',
color: Color(0xFF90E0BE),
percent: item.correctRate / 100,
padingEdg: EdgeInsets.zero,
marginEdg: EdgeInsets.only(top: 8.h)),
],
), ),
); ),
}) );
: const MyEmptyWidget(), })
); : const MyEmptyWidget(),
}), );
), }),
),
],
), ),
); ),
}); ],
),
);
} }
@override @override

View File

@ -68,167 +68,165 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
EasyLoading.dismiss(); EasyLoading.dismiss();
} }
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Obx(() {
backgroundColor: Colors.white, return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
title: Obx(() { }),
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))); centerTitle: true,
}), leading: IconButton(
centerTitle: true, icon: Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), elevation: 0,
], ),
elevation: 0, body: Padding(
), padding: EdgeInsets.symmetric(vertical: 10.r),
body: Padding( child: Obx(() {
padding: EdgeInsets.symmetric(vertical: 10.r), return EasyRefresh(
child: Obx(() { firstRefresh: false,
return EasyRefresh( taskIndependence: true,
firstRefresh: false, controller: logic.refreshController,
taskIndependence: true, header: MaterialHeader(),
controller: logic.refreshController, footer: TaurusFooter(),
header: MaterialHeader(), onRefresh: () async {
footer: TaurusFooter(), logic.getList();
onRefresh: () async { },
logic.getList(); onLoad: () async {
}, // getList();
onLoad: () async { },
// getList(); child: state.dataList.isNotEmpty
}, ? ListView.builder(
child: state.dataList.isNotEmpty itemCount: state.dataList.length,
? ListView.builder( itemBuilder: (context, index) {
itemCount: state.dataList.length, KnowledgeReportDetail item = state.dataList[index];
itemBuilder: (context, index) { return InkWell(
KnowledgeReportDetail item = state.dataList[index]; onTap: () {
return InkWell( /* RouterManager.router.navigateTo(
onTap: () {
/* RouterManager.router.navigateTo(
context, context,
RouterManager.quickCheckPersonalPath + RouterManager.quickCheckPersonalPath +
'?jobId=${item.jobName}&studentId=$studentId', '?jobId=${item.jobName}&studentId=$studentId',
transition: getTransition(), transition: getTransition(),
);*/ );*/
}, },
child: Container( child: Container(
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r), margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white), decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Row(
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Text( Text(
item.publishTime.substring(0, 10), item.publishTime.substring(0, 10),
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)), style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
), ),
SizedBox( SizedBox(
width: 10.r, width: 10.r,
), ),
Expanded( Expanded(
child: Text(
item.homeworkName,
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
)),
InkWell(
onTap: () {
EasyLoading.show(status: 'loading...');
showImg(item.questionPicture, context);
},
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( child: Text(
item.homeworkName, '${item.questionNo}',
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)), 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( InkWell(
onTap: () { onTap: () {
EasyLoading.show(status: 'loading...'); EasyLoading.show(status: 'loading...');
showImg(item.questionPicture, context); showStudent(item.homeworkId, item.templateId, item.questionNo, item.homeworkName);
}, },
child: Container( child: Container(
width: 49.r, margin: EdgeInsets.only(right: 6.r),
height: 22.r, width: 56.r,
decoration: BoxDecoration( height: 20.r,
borderRadius: BorderRadius.all(Radius.circular(20.r)), decoration: BoxDecoration(
border: Border.all(width: 1.r, color: Color(0xFF8B8B8B)), color: Color(0xFFD4FFED),
), borderRadius: BorderRadius.circular(20.r),
child: Center(
child: Text(
'${item.questionNo}',
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
), ),
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('${item.correctRate.toStringAsFixed(0)}%', size: 10.sp, color: Color(0xFF606060))
],
), ),
), ),
), ),
], ],
), ),
SizedBox( ),
height: 10.r, /* progressBar(context,
),
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.homeworkId, item.templateId, item.questionNo, item.homeworkName);
},
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('${item.correctRate.toStringAsFixed(0)}%', size: 10.sp, color: Color(0xFF606060))
],
),
),
),
],
),
),
/* progressBar(context,
title: '正确率 >', title: '正确率 >',
color: Color(0xFF90E0BE), color: Color(0xFF90E0BE),
percent: item.correctRate / 100, percent: item.correctRate / 100,
@ -236,17 +234,16 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
marginEdg: EdgeInsets.only(top: 8.h), marginEdg: EdgeInsets.only(top: 8.h),
studentCall:showStudent(item.questionId,item.jobName), studentCall:showStudent(item.questionId,item.jobName),
),*/ ),*/
], ],
),
), ),
); ),
}) );
: const MyEmptyWidget(), })
); : const MyEmptyWidget(),
}),
),
); );
}); }),
),
);
} }
@override @override

View File

@ -306,7 +306,7 @@ Widget $reviewedItem({
bottomRight: Radius.circular(4.r), bottomRight: Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), child: quickText(type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
), ),
Expanded( Expanded(

View File

@ -207,7 +207,7 @@ class _TaskListItemState extends State<TaskListItem> {
bottomRight: Radius.circular(4.r), bottomRight: Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), child: quickText(widget.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
), ),
Expanded( Expanded(

View File

@ -20,42 +20,38 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation){ backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Text(
backgroundColor: Colors.white, '我的班级 ',
title: Text( style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
'我的班级 ', ),
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)), centerTitle: true,
), leading: IconButton(
centerTitle: true, icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: const Icon(Icons.arrow_back_ios, color: Colors.black), ),
onPressed: () => Get.back(), actions: const [
), ReturnToHomepage(),
actions: const [ ],
ReturnToHomepage(), ),
], body: Padding(
), padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
body: Padding( child: EasyRefresh(
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r), firstRefresh: false,
child: EasyRefresh( taskIndependence: true,
firstRefresh: false, controller: logic.refreshController,
taskIndependence: true, header: MaterialHeader(),
controller: logic.refreshController, footer: TaurusFooter(),
header: MaterialHeader(), onRefresh: () async {
footer: TaurusFooter(), logic.getList();
onRefresh: () async { },
logic.getList(); child: StudentGroupList(state.clssList, logic.goNextPage),
}, ),
child: StudentGroupList(state.clssList, logic.goNextPage), ),
), );
),
);
});
} }
@override @override

View File

@ -24,222 +24,189 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return OrientationBuilder( return Scaffold(
builder: (BuildContext context, Orientation orientation) { backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
return Scaffold( appBar: AppBar(
backgroundColor: const Color.fromRGBO(245, 245, 245, 1), backgroundColor: Colors.white,
appBar: AppBar( title: Obx(() {
backgroundColor: Colors.white, return Text(
title: Obx(() { state.studentInfo.value.studentName,
return Text( style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)),
state.studentInfo.value.studentName, );
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)), }),
); centerTitle: true,
}), leading: IconButton(
centerTitle: true, icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
leading: IconButton( onPressed: () => Get.back(),
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
onPressed: () => Get.back(),
),
actions: const [
ReturnToHomepage(),
],
), ),
body: SingleChildScrollView( actions: const [
child: Column( ReturnToHomepage(),
children: [ ],
Padding( ),
padding: EdgeInsets.only(top: 14.r, left: 14.r), body: SingleChildScrollView(
child: Row( child: Column(
children: [ children: [
InkWell( Padding(
onTap: () { padding: EdgeInsets.only(top: 14.r, left: 14.r),
// RouterManager.router.navigateTo(context, child: Row(
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}'); children: [
Get.toNamed(Routes.studentWorkDetailPage, arguments: { InkWell(
'studentId': state.studentInfo.value.studentId, onTap: () {
'studentName': state.studentInfo.value.studentName // RouterManager.router.navigateTo(context,
}); // '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
}, Get.toNamed(Routes.studentWorkDetailPage,
child: Container( arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName});
width: 93.r, },
height: 28.r, child: Container(
decoration: BoxDecoration( width: 93.r,
color: const Color(0xFFEAF3FF), height: 28.r,
borderRadius: BorderRadius.circular(4.r), decoration: BoxDecoration(
), color: const Color(0xFFEAF3FF),
child: Center( borderRadius: BorderRadius.circular(4.r),
child: Text( ),
'历史作业', child: Center(
style: TextStyle( child: Text(
fontSize: 10.r, color: const Color(0xFF2080F7)), '历史作业',
), style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)),
), ),
), ),
), ),
SizedBox( ),
width: 10.r, SizedBox(
), width: 10.r,
InkWell( ),
onTap: () => showAnswerHandwriting(context, InkWell(
homeworkId: state.homeworkId, onTap: () =>
studentId: state.studentId) showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()),
.then((e) => ToastUtils.dismiss()), child: Container(
child: Container( width: 93.r,
width: 93.r, height: 28.r,
height: 28.r, decoration: BoxDecoration(
decoration: BoxDecoration( color: const Color(0xFFEDFFF7),
color: const Color(0xFFEDFFF7), borderRadius: BorderRadius.circular(4.r),
borderRadius: BorderRadius.circular(4.r), ),
), child: Center(
child: Center( child: Text(
child: Text( '原稿笔迹',
'原稿笔迹', style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)),
style: TextStyle(
fontSize: 10.r, color: const Color(0xFF4CC793)),
),
), ),
), ),
), ),
], ),
), ],
), ),
// ),
Container( //
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r), Container(
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
decoration: BoxDecoration( margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
color: Colors.white, decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(6.r)), color: Colors.white,
), borderRadius: BorderRadius.all(Radius.circular(6.r)),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'客观题',
style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF5C5C5C),
fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
),
Obx(() {
return Text(
'${state.studentInfo.value.kgtCorrectRate}%',
style: TextStyle(
fontSize: 14.sp,
color: const Color(0xFF6888FD),
fontWeight: FontWeight.w600),
);
}),
],
),
SizedBox(
height: 10.r,
),
Obx(() {
return SizedBox(
height: state.studentInfo.value.kgtList.length > 8
? 300.r
: state.studentInfo.value.kgtList.length * 40.r +
40.r,
child: StudentKgTable(
headList: const ['题号', '学生答案', '标准答案'],
bodyList: state.studentInfo.value.kgtList,
questionNumCall: (questionNo, templateId) {
showAnswerHandwriting(context,
homeworkId: state.homeworkId,
studentId: state.studentId,
questionNo: questionNo,
templateId: templateId)
.then((e) => ToastUtils.dismiss());
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
// });
},
),
);
})
],
),
), ),
SizedBox( child: Column(
height: 15.r, children: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text(
'客观题',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
),
SizedBox(
width: 10.r,
),
Obx(() {
return Text(
'${state.studentInfo.value.kgtCorrectRate}%',
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600),
);
}),
],
),
SizedBox(
height: 10.r,
),
Obx(() {
return SizedBox(
height: state.studentInfo.value.kgtList.length > 8 ? 300.r : state.studentInfo.value.kgtList.length * 40.r + 40.r,
child: StudentKgTable(
headList: const ['题号', '学生答案', '标准答案'],
bodyList: state.studentInfo.value.kgtList,
questionNumCall: (questionNo, templateId) {
showAnswerHandwriting(context,
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
.then((e) => ToastUtils.dismiss());
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
// });
},
),
);
})
],
), ),
// ),
Container( SizedBox(
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r), height: 15.r,
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r), ),
decoration: BoxDecoration( //
color: Colors.white, Container(
borderRadius: BorderRadius.all(Radius.circular(6.r)), padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
), margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
child: Column( decoration: BoxDecoration(
children: [ color: Colors.white,
Row( borderRadius: BorderRadius.all(Radius.circular(6.r)),
mainAxisAlignment: MainAxisAlignment.center, ),
crossAxisAlignment: CrossAxisAlignment.end, child: Column(
children: [ children: [
Text( Row(
'主观题', mainAxisAlignment: MainAxisAlignment.center,
style: TextStyle( crossAxisAlignment: CrossAxisAlignment.end,
fontSize: 14.sp, children: [
color: const Color(0xFF5C5C5C), Text(
fontWeight: FontWeight.w600), '主观题',
), style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
SizedBox( ),
width: 10.r, SizedBox(
), width: 10.r,
Obx(() { ),
return Text( Obx(() {
'${state.studentInfo.value.zgtCorrectRate}%', return Text(
style: TextStyle( '${state.studentInfo.value.zgtCorrectRate}%',
fontSize: 14.sp, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600),
color: const Color(0xFF6888FD), );
fontWeight: FontWeight.w600), }),
); ],
}), ),
], SizedBox(
), height: 10.r,
SizedBox( ),
height: 10.r, Obx(() {
), return SizedBox(
Obx(() { height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r,
return SizedBox( child: StudentZgTable(
height: state.studentInfo.value.zgtList.length > 8 headList: const ['题号', '用时', '批注结果', '答案'],
? 300.r bodyList: state.studentInfo.value.zgtList,
: state.studentInfo.value.zgtList.length * 40.r + questionNumCall: (questionNo, templateId) {
40.r, /* showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
child: StudentZgTable(
headList: const ['题号', '用时', '批注结果', '答案'],
bodyList: state.studentInfo.value.zgtList,
questionNumCall: (questionNo, templateId) {
/* showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]); ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
});*/ });*/
showAnswerHandwriting(context, showAnswerHandwriting(context,
homeworkId: state.homeworkId, homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
studentId: state.studentId, .then((e) => ToastUtils.dismiss());
questionNo: questionNo, },
templateId: templateId) ),
.then((e) => ToastUtils.dismiss()); );
}, })
), ],
);
})
],
),
), ),
], ),
), ],
), ),
); ),
}); );
} }
@override @override

View File

@ -167,7 +167,7 @@ class _HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin
bottomRight: Radius.circular(4.r), bottomRight: Radius.circular(4.r),
), ),
), ),
margin: EdgeInsets.only(top:3.h,right: 4.w), margin: EdgeInsets.only(right: 4.w),
child: quickText(state.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp), child: quickText(state.type == 1 ? '作业' : '考试', color: Colors.white, size: 10.sp),
), ),
Expanded( Expanded(