旋转监听
This commit is contained in:
parent
e95bf53b7a
commit
a3fd75efb5
|
|
@ -24,94 +24,98 @@ class _AnnotateClassPageState extends State<AnnotateClassPage> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
String homeworkId = state.homeworkId.value;
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
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 //宽高比为1时,子widget
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () {
|
||||
Get.back();
|
||||
},
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
children: state.classList.map((taskItem) {
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass taskItem = state.classList[index];
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
})
|
||||
: Utils.isPad()
|
||||
? MasonryGridView.count(
|
||||
crossAxisCount: 2, //几列
|
||||
mainAxisSpacing: 4.w, // 间距
|
||||
crossAxisSpacing: 4.h, // 纵向间距?
|
||||
itemCount: state.classList.length,
|
||||
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,
|
||||
);
|
||||
}));
|
||||
}),
|
||||
),
|
||||
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 //宽高比为1时,子widget
|
||||
),
|
||||
children: state.classList.map((taskItem) {
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
}).toList(),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemCount: state.classList.length,
|
||||
itemBuilder: (context, index) {
|
||||
AnnotatedClass taskItem = state.classList[index];
|
||||
return CompletedAnnotateItem(
|
||||
taskItem: taskItem,
|
||||
logic: logic,
|
||||
name: state.name.value,
|
||||
);
|
||||
})
|
||||
: Utils.isPad()
|
||||
? MasonryGridView.count(
|
||||
crossAxisCount: 2, //几列
|
||||
mainAxisSpacing: 4.w, // 间距
|
||||
crossAxisSpacing: 4.h, // 纵向间距?
|
||||
itemCount: state.classList.length,
|
||||
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,
|
||||
);
|
||||
}));
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,147 +24,153 @@ class _AnswerTrajectoryPageState extends State<AnswerTrajectoryPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'答题轨迹',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
||||
child: TabBar(
|
||||
dividerHeight: 0,
|
||||
tabAlignment: TabAlignment.start,
|
||||
indicator: const UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
color: const Color.fromRGBO(104, 136, 253, 1),
|
||||
),
|
||||
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'答题轨迹',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
onTap: (int val) {
|
||||
state.tabIndex.value = val;
|
||||
// EasyLoading.show(status: 'loading...');
|
||||
/* if(val == 0){
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
border: Border(
|
||||
bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
||||
child: TabBar(
|
||||
dividerHeight: 0,
|
||||
tabAlignment: TabAlignment.start,
|
||||
indicator: const UnderlineTabIndicator(
|
||||
borderSide: BorderSide(
|
||||
color: const Color.fromRGBO(104, 136, 253, 1),
|
||||
),
|
||||
|
||||
),
|
||||
onTap: (int val) {
|
||||
state.tabIndex.value = val;
|
||||
// EasyLoading.show(status: 'loading...');
|
||||
/* if(val == 0){
|
||||
logic.getStudentGroups();
|
||||
}else{
|
||||
logic.getWorkList();
|
||||
}*/
|
||||
},
|
||||
tabs: [
|
||||
SizedBox(
|
||||
width: (MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width - 28.r) / 2,
|
||||
child: const Tab(
|
||||
text: '按学生',
|
||||
},
|
||||
tabs: [
|
||||
SizedBox(
|
||||
width: (MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width - 28.r) / 2,
|
||||
child: const Tab(
|
||||
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),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: (MediaQuery
|
||||
.of(context)
|
||||
.size
|
||||
.width - 28.r) / 2,
|
||||
child: const Tab(
|
||||
text: '按作业',
|
||||
),
|
||||
)
|
||||
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)),
|
||||
),
|
||||
);
|
||||
})
|
||||
],
|
||||
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
|
||||
|
|
|
|||
|
|
@ -29,213 +29,217 @@ class _AnswerTrajectoryDetailPageState
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFFF5F5F5),
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Obx(() {
|
||||
return state.classList.isNotEmpty?Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: List.generate(state.classList.length, (
|
||||
index) {
|
||||
AnnotatedClass item = state.classList[index];
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color(0xFFF5F5F5),
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Obx(() {
|
||||
return state.classList.isNotEmpty?Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: List.generate(state.classList.length, (
|
||||
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(
|
||||
onTap: () {
|
||||
if (state.currentClass.value.classId !=
|
||||
item.classId) {
|
||||
state.currentClass.value = item;
|
||||
}
|
||||
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value});
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 5.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.only(
|
||||
right: index < state.classList.length
|
||||
? 8.r
|
||||
: 0),
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(Radius.circular(10.r)),
|
||||
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)),
|
||||
),
|
||||
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(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
):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();
|
||||
}),
|
||||
],
|
||||
),
|
||||
) : const MyEmptyWidget();
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,400 +24,404 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
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 {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
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(
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.title.value,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
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 {
|
||||
logic.getList();
|
||||
},
|
||||
child: state.studentList.isNotEmpty
|
||||
? Utils.isPad()
|
||||
? GridView(
|
||||
shrinkWrap: true,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 10.r,
|
||||
crossAxisSpacing: 10.r,
|
||||
childAspectRatio: 556 / 112,
|
||||
),
|
||||
children:
|
||||
List.generate(state.studentList.length, (index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
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.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: const Color(0xFF6888FD)),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
const Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: const Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 20.r,
|
||||
width: 70.r,
|
||||
decoration: BoxDecoration(
|
||||
color:
|
||||
const Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 20.r,
|
||||
width: 80.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 2.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
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(
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}),
|
||||
)
|
||||
: ListView.builder(
|
||||
itemBuilder: (context, index) {
|
||||
StudentItem item = state.studentList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {
|
||||
'studentName': item.name,
|
||||
'studentId': item.id
|
||||
});
|
||||
},
|
||||
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.name,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF6888FD)),
|
||||
)),
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: Color(0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
state.page == 'answerTrajectory'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 72.r,
|
||||
decoration: BoxDecoration(
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color(0xFFFFA41E)),
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.r)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text('详情',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Color(0xFFFFA41E))),
|
||||
))
|
||||
: state.page == 'history'
|
||||
? Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF6888FD),
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
20.r))),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r,
|
||||
color: Colors.white),
|
||||
)),
|
||||
)
|
||||
: item.priorityAnnotate
|
||||
? InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, false);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: Color(0xFFB7FFE0),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_active.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
: InkWell(
|
||||
onTap: () {
|
||||
logic.setJobReadLevel(
|
||||
item.id, true);
|
||||
EasyLoading.show(
|
||||
status: 'loading...');
|
||||
},
|
||||
child: Container(
|
||||
height: 24.r,
|
||||
width: 82.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius:
|
||||
BorderRadius.all(
|
||||
Radius.circular(
|
||||
4.r)),
|
||||
color: const Color(
|
||||
0xFFE1E1E1),
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment
|
||||
.start,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
left: 3.r),
|
||||
child: Image.asset(
|
||||
'assets/images/youx_icon_default.png',
|
||||
width: 14.r,
|
||||
height: 14.r,
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.only(
|
||||
top: 5.r,
|
||||
left: 4.r),
|
||||
child: Text(
|
||||
'优先批阅',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: const Color(
|
||||
0xFF8A9691)),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: state.studentList.length,
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
itemCount: state.studentList.length,
|
||||
)
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Column(
|
||||
body:OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 0.r, horizontal: 14.r),
|
||||
|
|
@ -139,7 +141,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
children: [
|
||||
Obx(() {
|
||||
return DropdownSelection(
|
||||
bgColor: Colors.white,
|
||||
bgColor: Colors.white,
|
||||
involveClasses: state.involveClasses.value,
|
||||
classData: state.classData.value,
|
||||
call: (AnnotatedClass item) {
|
||||
|
|
@ -221,7 +223,7 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
child: InkWell(
|
||||
onTap: () {
|
||||
showStudentDialog(context,
|
||||
student, state.favList);
|
||||
student, state.favList);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
|
|
@ -249,12 +251,12 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
),
|
||||
InkWell(
|
||||
onTap: () async {
|
||||
var confim =
|
||||
await confirmDialog();
|
||||
if (confim) {
|
||||
logic.getDelete(
|
||||
student);
|
||||
}
|
||||
var confim =
|
||||
await confirmDialog();
|
||||
if (confim) {
|
||||
logic.getDelete(
|
||||
student);
|
||||
}
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
|
|
@ -300,8 +302,8 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
HomeworkFavs student = item['list'][i];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
showStudentDialog(
|
||||
context, student, state.favList);
|
||||
showStudentDialog(
|
||||
context, student, state.favList);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
|
|
@ -336,10 +338,10 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
InkWell(
|
||||
onTap: () async {
|
||||
var confim =
|
||||
await confirmDialog();
|
||||
if (confim) {
|
||||
logic.getDelete(student);
|
||||
}
|
||||
await confirmDialog();
|
||||
if (confim) {
|
||||
logic.getDelete(student);
|
||||
}
|
||||
},
|
||||
child: Image.asset(
|
||||
'assets/images/favorite_delete_icon.png',
|
||||
|
|
@ -373,7 +375,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
|||
}),
|
||||
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -25,93 +25,97 @@ class _JobReportPageState extends State<JobReportPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
centerTitle: true,
|
||||
title: Center(child: Obx(() {
|
||||
return quickText(
|
||||
'${state.title.value}作业报告',
|
||||
size: 14.sp,
|
||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
||||
);
|
||||
})),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Obx(() {
|
||||
if (state.hasData.value) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
centerTitle: true,
|
||||
title: Center(child: Obx(() {
|
||||
return quickText(
|
||||
'${state.title.value}作业报告',
|
||||
size: 14.sp,
|
||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
||||
);
|
||||
})),
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Obx(() {
|
||||
if (state.hasData.value) {
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Obx(() {
|
||||
return DropdownSelection(
|
||||
involveClasses: state.involveClasses.value,
|
||||
classData: state.classData.value,
|
||||
call: (AnnotatedClass item) {
|
||||
state.classData.value = item;
|
||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
||||
logic.getWorkData();
|
||||
});
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
//完成率、正确率
|
||||
/* TopCount(
|
||||
// 下拉框
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Obx(() {
|
||||
return DropdownSelection(
|
||||
involveClasses: state.involveClasses.value,
|
||||
classData: state.classData.value,
|
||||
call: (AnnotatedClass item) {
|
||||
state.classData.value = item;
|
||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
||||
logic.getWorkData();
|
||||
});
|
||||
}),
|
||||
// Expanded(child: Text('')),
|
||||
],
|
||||
),
|
||||
),
|
||||
//完成率、正确率
|
||||
/* TopCount(
|
||||
data, classData == null ? '' : classData!.className, widget.id),*/
|
||||
//客观题、主观题
|
||||
KgtZgtTable(
|
||||
studentCount: state.dataCount.studentCount!,
|
||||
homeworkId: state.homeworkId.value,
|
||||
kgReport: state.kgReport,
|
||||
zgReport: state.zgReport,
|
||||
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
|
||||
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)),
|
||||
// 掌握知识点的情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: KnowledgePoint(
|
||||
knowsList: state.knowsList,
|
||||
data: state.homeData,
|
||||
className: state.classData.value.className,
|
||||
homeworkId: state.homeworkId.value)),
|
||||
// 掌握知识点的情况
|
||||
/* Container(
|
||||
//客观题、主观题
|
||||
KgtZgtTable(
|
||||
studentCount: state.dataCount.studentCount!,
|
||||
homeworkId: state.homeworkId.value,
|
||||
kgReport: state.kgReport,
|
||||
zgReport: state.zgReport,
|
||||
kgtOkRate: state.dataCount.kgtOkRate!.toStringAsFixed(0),
|
||||
zgtOkRate: state.dataCount.zgtOkRate!.toStringAsFixed(0)),
|
||||
// 掌握知识点的情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: KnowledgePoint(
|
||||
knowsList: state.knowsList,
|
||||
data: state.homeData,
|
||||
className: state.classData.value.className,
|
||||
homeworkId: state.homeworkId.value)),
|
||||
// 掌握知识点的情况
|
||||
/* Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
child: $OverallPerformance(data.studentCount, data.overallTitles)),
|
||||
// 单位时间答题情况
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
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(
|
||||
height: 30.r,
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
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());
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,218 +27,221 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(15.r),
|
||||
// height: 30.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: TextField(
|
||||
controller: 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(
|
||||
width: 10.r,
|
||||
),
|
||||
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),
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
),
|
||||
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(
|
||||
body: Column(
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsets.all(15.r),
|
||||
// height: 30.r,
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.r, right: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(6.r),
|
||||
border: Border.all(width: 1.r, color: Color(0xFFDDDDDD)),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: TextField(
|
||||
controller: 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(
|
||||
width: 10.r,
|
||||
),
|
||||
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(() {
|
||||
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.dateEnd == null || state.dateEnd == '' ? null : DateTime.parse(state.dateEnd!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
if (startTime == null && endTime == null) {
|
||||
if (logic.tabController.index == 2) {
|
||||
logic.tabController.animateTo(0);
|
||||
}
|
||||
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
|
||||
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
|
||||
state.customTimeStr.value = '自定义';
|
||||
} else {
|
||||
state.dateStart = startTime ?? '';
|
||||
state.dateEnd = endTime ?? '';
|
||||
}
|
||||
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;
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
if (startTime == null && endTime == null) {
|
||||
if (logic.tabController.index == 2) {
|
||||
logic.tabController.animateTo(0);
|
||||
}
|
||||
state.dateStart = Utils.getWeekStartDate().toString().substring(0, 10);
|
||||
state.dateEnd = Utils.getWeekEndDate().toString().substring(0, 10);
|
||||
state.customTimeStr.value = '自定义';
|
||||
} else {
|
||||
state.dateStart = startTime ?? '';
|
||||
state.dateEnd = endTime ?? '';
|
||||
}
|
||||
state.page = 1;
|
||||
logic.getList();
|
||||
}
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.value.length,
|
||||
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)),
|
||||
// _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();
|
||||
}
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.value.length,
|
||||
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,
|
||||
children: [
|
||||
Text(
|
||||
'${item.count}次',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
Image.asset(
|
||||
'assets/images/right_icon_blue.png',
|
||||
width: 8.r,
|
||||
height: 8.r,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
ProgressBar(
|
||||
title: '正确率:',
|
||||
color: Color(0xFF90E0BE),
|
||||
percent: item.correctRate / 100,
|
||||
padingEdg: EdgeInsets.zero,
|
||||
marginEdg: EdgeInsets.only(top: 8.h)),
|
||||
],
|
||||
],
|
||||
),
|
||||
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
|
||||
|
|
|
|||
|
|
@ -68,165 +68,167 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
EasyLoading.dismiss();
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
// getList();
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.length,
|
||||
itemBuilder: (context, index) {
|
||||
KnowledgeReportDetail item = state.dataList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
/* RouterManager.router.navigateTo(
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
elevation: 0,
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||
child: Obx(() {
|
||||
return EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
onLoad: () async {
|
||||
// getList();
|
||||
},
|
||||
child: state.dataList.isNotEmpty
|
||||
? ListView.builder(
|
||||
itemCount: state.dataList.length,
|
||||
itemBuilder: (context, index) {
|
||||
KnowledgeReportDetail item = state.dataList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
/* RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.quickCheckPersonalPath +
|
||||
'?jobId=${item.jobName}&studentId=$studentId',
|
||||
transition: getTransition(),
|
||||
);*/
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
item.publishTime.substring(0, 10),
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.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(
|
||||
'第${item.questionNo}题',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 8.h),
|
||||
padding: EdgeInsets.zero,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.end,
|
||||
children: [
|
||||
Text(
|
||||
item.publishTime.substring(0, 10),
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
item.homeworkName,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
||||
)),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
showStudent(item.homeworkId, item.templateId, item.questionNo, item.homeworkName);
|
||||
showImg(item.questionPicture, context);
|
||||
},
|
||||
child: Container(
|
||||
margin: EdgeInsets.only(right: 6.r),
|
||||
width: 56.r,
|
||||
height: 20.r,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFD4FFED),
|
||||
borderRadius: BorderRadius.circular(20.r),
|
||||
width: 49.r,
|
||||
height: 22.r,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||
border: Border.all(width: 1.r, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'第${item.questionNo}题',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF8B8B8B)),
|
||||
),
|
||||
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,
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.only(top: 8.h),
|
||||
padding: EdgeInsets.zero,
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
showStudent(item.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: '正确率 >',
|
||||
color: Color(0xFF90E0BE),
|
||||
percent: item.correctRate / 100,
|
||||
|
|
@ -234,16 +236,17 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
|||
marginEdg: EdgeInsets.only(top: 8.h),
|
||||
studentCall:showStudent(item.questionId,item.jobName),
|
||||
),*/
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
})
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
})
|
||||
: const MyEmptyWidget(),
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
}),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -20,38 +20,42 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'我的班级 ',
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||
child: EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: StudentGroupList(state.clssList, logic.goNextPage),
|
||||
),
|
||||
),
|
||||
);
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation){
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'我的班级 ',
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: Padding(
|
||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||
child: EasyRefresh(
|
||||
firstRefresh: false,
|
||||
taskIndependence: true,
|
||||
controller: logic.refreshController,
|
||||
header: MaterialHeader(),
|
||||
footer: TaurusFooter(),
|
||||
onRefresh: () async {
|
||||
logic.getList();
|
||||
},
|
||||
child: StudentGroupList(state.clssList, logic.goNextPage),
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
|
|
@ -24,189 +24,222 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.studentInfo.value.studentName,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 14.r, left: 14.r),
|
||||
child: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage,
|
||||
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName});
|
||||
},
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEAF3FF),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () =>
|
||||
showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()),
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEDFFF7),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'原稿笔迹',
|
||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
//客观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
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(
|
||||
height: 15.r,
|
||||
),
|
||||
//主观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
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.zgtCorrectRate}%',
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF6888FD), fontWeight: FontWeight.w600),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Obx(() {
|
||||
return SizedBox(
|
||||
height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r,
|
||||
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([]);
|
||||
});*/
|
||||
showAnswerHandwriting(context,
|
||||
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
|
||||
.then((e) => ToastUtils.dismiss());
|
||||
},
|
||||
),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
return OrientationBuilder(
|
||||
builder: (BuildContext context, Orientation orientation) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Obx(() {
|
||||
return Text(
|
||||
state.studentInfo.value.studentName,
|
||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)),
|
||||
);
|
||||
}),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Get.back(),
|
||||
),
|
||||
actions: const [
|
||||
ReturnToHomepage(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.only(top: 14.r, left: 14.r),
|
||||
child: Row(
|
||||
children: [
|
||||
InkWell(
|
||||
onTap: () {
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||
'studentId': state.studentInfo.value.studentId,
|
||||
'studentName': state.studentInfo.value.studentName
|
||||
});
|
||||
},
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEAF3FF),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r, color: const Color(0xFF2080F7)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
width: 10.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap: () => showAnswerHandwriting(context,
|
||||
homeworkId: state.homeworkId,
|
||||
studentId: state.studentId)
|
||||
.then((e) => ToastUtils.dismiss()),
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
height: 28.r,
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFEDFFF7),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'原稿笔迹',
|
||||
style: TextStyle(
|
||||
fontSize: 10.r, color: const Color(0xFF4CC793)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
//客观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
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(
|
||||
height: 15.r,
|
||||
),
|
||||
//主观题
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
||||
margin: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
decoration: BoxDecoration(
|
||||
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.zgtCorrectRate}%',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: const Color(0xFF6888FD),
|
||||
fontWeight: FontWeight.w600),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
Obx(() {
|
||||
return SizedBox(
|
||||
height: state.studentInfo.value.zgtList.length > 8
|
||||
? 300.r
|
||||
: state.studentInfo.value.zgtList.length * 40.r +
|
||||
40.r,
|
||||
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([]);
|
||||
});*/
|
||||
showAnswerHandwriting(context,
|
||||
homeworkId: state.homeworkId,
|
||||
studentId: state.studentId,
|
||||
questionNo: questionNo,
|
||||
templateId: templateId)
|
||||
.then((e) => ToastUtils.dismiss());
|
||||
},
|
||||
),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue