旋转监听
This commit is contained in:
parent
e95bf53b7a
commit
a3fd75efb5
|
|
@ -24,94 +24,98 @@ 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 Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Obx(() {
|
appBar: AppBar(
|
||||||
return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
backgroundColor: Colors.white,
|
||||||
}),
|
title: Obx(() {
|
||||||
centerTitle: true,
|
return Text(state.name.value, style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)));
|
||||||
leading: IconButton(
|
}),
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
centerTitle: true,
|
||||||
onPressed: () {
|
leading: IconButton(
|
||||||
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),
|
|
||||||
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) {
|
body: Padding(
|
||||||
return CompletedAnnotateItem(
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||||
taskItem: taskItem,
|
child: Obx(() {
|
||||||
logic: logic,
|
return EasyRefresh(
|
||||||
name: state.name.value,
|
firstRefresh: false,
|
||||||
);
|
taskIndependence: true,
|
||||||
}).toList(),
|
controller: logic.refreshController,
|
||||||
)
|
header: MaterialHeader(),
|
||||||
: ListView.builder(
|
footer: TaurusFooter(),
|
||||||
itemCount: state.classList.length,
|
onRefresh: () async{
|
||||||
itemBuilder: (context, index) {
|
return logic.getList();
|
||||||
AnnotatedClass taskItem = state.classList[index];
|
},
|
||||||
return CompletedAnnotateItem(
|
child: state.completed.value
|
||||||
taskItem: taskItem,
|
? Utils.isPad()
|
||||||
logic: logic,
|
? GridView(
|
||||||
name: state.name.value,
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
);
|
crossAxisCount: 2, //横轴三个子widget
|
||||||
})
|
mainAxisSpacing: 10.h,
|
||||||
: Utils.isPad()
|
crossAxisSpacing: 6.w,
|
||||||
? MasonryGridView.count(
|
childAspectRatio: 1.48 //宽高比为1时,子widget
|
||||||
crossAxisCount: 2, //几列
|
),
|
||||||
mainAxisSpacing: 4.w, // 间距
|
children: state.classList.map((taskItem) {
|
||||||
crossAxisSpacing: 4.h, // 纵向间距?
|
return CompletedAnnotateItem(
|
||||||
itemCount: state.classList.length,
|
taskItem: taskItem,
|
||||||
itemBuilder: (context, index) {
|
logic: logic,
|
||||||
AnnotatedClass item = state.classList[index];
|
name: state.name.value,
|
||||||
return AnnotateItem(
|
);
|
||||||
homeworkId: homeworkId,
|
}).toList(),
|
||||||
item: item,
|
)
|
||||||
font: 11.sp,
|
: ListView.builder(
|
||||||
name: state.name.value,
|
itemCount: state.classList.length,
|
||||||
logic: logic,
|
itemBuilder: (context, index) {
|
||||||
);
|
AnnotatedClass taskItem = state.classList[index];
|
||||||
},
|
return CompletedAnnotateItem(
|
||||||
)
|
taskItem: taskItem,
|
||||||
: ListView.builder(
|
logic: logic,
|
||||||
itemCount: state.classList.length,
|
name: state.name.value,
|
||||||
itemBuilder: (context, index) {
|
);
|
||||||
AnnotatedClass item = state.classList[index];
|
})
|
||||||
return AnnotateItem(
|
: Utils.isPad()
|
||||||
homeworkId: homeworkId,
|
? MasonryGridView.count(
|
||||||
item: item,
|
crossAxisCount: 2, //几列
|
||||||
font: 12.sp,
|
mainAxisSpacing: 4.w, // 间距
|
||||||
name: state.name.value,
|
crossAxisSpacing: 4.h, // 纵向间距?
|
||||||
logic: logic,
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Text(
|
appBar: AppBar(
|
||||||
'答题轨迹',
|
backgroundColor: Colors.white,
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
title: Text(
|
||||||
),
|
'答题轨迹',
|
||||||
centerTitle: true,
|
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||||
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) {
|
centerTitle: true,
|
||||||
state.tabIndex.value = val;
|
leading: IconButton(
|
||||||
// EasyLoading.show(status: 'loading...');
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
/* if(val == 0){
|
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();
|
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),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
Obx(() {
|
||||||
width: (MediaQuery
|
return Expanded(
|
||||||
.of(context)
|
child: Padding(
|
||||||
.size
|
padding:
|
||||||
.width - 28.r) / 2,
|
EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||||
child: const Tab(
|
child:
|
||||||
text: '按作业',
|
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
|
@override
|
||||||
|
|
|
||||||
|
|
@ -29,213 +29,217 @@ class _AnswerTrajectoryDetailPageState
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: Color(0xFFF5F5F5),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
centerTitle: true,
|
backgroundColor: Color(0xFFF5F5F5),
|
||||||
backgroundColor: Colors.white,
|
appBar: AppBar(
|
||||||
title: Obx(() {
|
centerTitle: true,
|
||||||
return Text(
|
backgroundColor: Colors.white,
|
||||||
state.title.value,
|
title: Obx(() {
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
return Text(
|
||||||
overflow: TextOverflow.ellipsis,
|
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(),
|
leading: IconButton(
|
||||||
),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
),
|
ReturnToHomepage(),
|
||||||
body: Column(
|
],
|
||||||
children: [
|
),
|
||||||
SizedBox(
|
body: Column(
|
||||||
height: 10.r,
|
children: [
|
||||||
),
|
SizedBox(
|
||||||
Obx(() {
|
height: 10.r,
|
||||||
return state.classList.isNotEmpty?Padding(
|
),
|
||||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
Obx(() {
|
||||||
child: Row(
|
return state.classList.isNotEmpty?Padding(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||||
children: [
|
child: Row(
|
||||||
SingleChildScrollView(
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
scrollDirection: Axis.horizontal,
|
children: [
|
||||||
child: Row(
|
SingleChildScrollView(
|
||||||
children: List.generate(state.classList.length, (
|
scrollDirection: Axis.horizontal,
|
||||||
index) {
|
child: Row(
|
||||||
AnnotatedClass item = state.classList[index];
|
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(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (state.currentClass.value.classId !=
|
Get.toNamed(Routes.studentPersonalPage, arguments: {'studentId': item.studentId, 'homeworkId': state.homeworkId.value});
|
||||||
item.classId) {
|
|
||||||
state.currentClass.value = item;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
vertical: 5.r, horizontal: 10.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: Center(
|
child: Row(
|
||||||
child: Text(
|
mainAxisAlignment:
|
||||||
'${EnumUtils.formatGrade(state.grade)}${item
|
MainAxisAlignment.spaceBetween,
|
||||||
.className}',
|
children: [
|
||||||
style: TextStyle(
|
Expanded(
|
||||||
fontSize: 10.sp,
|
child: Text(
|
||||||
color: state.currentClass.value
|
item.studentName,
|
||||||
.classId == item.classId
|
style: TextStyle(
|
||||||
? Color(0xFF6888FD)
|
fontSize: 12.sp,
|
||||||
: Color(0xFF686868)),
|
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();
|
||||||
),
|
}),
|
||||||
):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();
|
|
||||||
}),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,400 +24,404 @@ class _ClassStudentPageState extends State<ClassStudentPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Obx(() {
|
appBar: AppBar(
|
||||||
return Text(
|
backgroundColor: Colors.white,
|
||||||
state.title.value,
|
title: Obx(() {
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
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),
|
centerTitle: true,
|
||||||
onPressed: () => Get.back(),
|
leading: IconButton(
|
||||||
),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
),
|
ReturnToHomepage(),
|
||||||
body: Padding(
|
],
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
),
|
||||||
child: Obx(() {
|
body: Padding(
|
||||||
return EasyRefresh(
|
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||||
firstRefresh: false,
|
child: Obx(() {
|
||||||
taskIndependence: true,
|
return EasyRefresh(
|
||||||
controller: logic.refreshController,
|
firstRefresh: false,
|
||||||
header: MaterialHeader(),
|
taskIndependence: true,
|
||||||
footer: TaurusFooter(),
|
controller: logic.refreshController,
|
||||||
onRefresh: () async {
|
header: MaterialHeader(),
|
||||||
logic.getList();
|
footer: TaurusFooter(),
|
||||||
},
|
onRefresh: () async {
|
||||||
child: state.studentList.isNotEmpty
|
logic.getList();
|
||||||
? Utils.isPad()
|
},
|
||||||
? GridView(
|
child: state.studentList.isNotEmpty
|
||||||
shrinkWrap: true,
|
? Utils.isPad()
|
||||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
? GridView(
|
||||||
crossAxisCount: 2,
|
shrinkWrap: true,
|
||||||
mainAxisSpacing: 10.r,
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||||
crossAxisSpacing: 10.r,
|
crossAxisCount: 2,
|
||||||
childAspectRatio: 556 / 112,
|
mainAxisSpacing: 10.r,
|
||||||
),
|
crossAxisSpacing: 10.r,
|
||||||
children:
|
childAspectRatio: 556 / 112,
|
||||||
List.generate(state.studentList.length, (index) {
|
),
|
||||||
StudentItem item = state.studentList[index];
|
children:
|
||||||
return InkWell(
|
List.generate(state.studentList.length, (index) {
|
||||||
onTap: () {
|
StudentItem item = state.studentList[index];
|
||||||
// RouterManager.router.navigateTo(context,
|
return InkWell(
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
onTap: () {
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,
|
// RouterManager.router.navigateTo(context,
|
||||||
arguments: {
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
'studentName': item.name,
|
Get.toNamed(Routes.studentWorkDetailPage,
|
||||||
'studentId': item.id
|
arguments: {
|
||||||
});
|
'studentName': item.name,
|
||||||
},
|
'studentId': item.id
|
||||||
child: Container(
|
});
|
||||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
},
|
||||||
decoration: BoxDecoration(
|
child: Container(
|
||||||
borderRadius:
|
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
borderRadius:
|
||||||
),
|
BorderRadius.all(Radius.circular(10.r)),
|
||||||
child: Row(
|
color: Colors.white,
|
||||||
mainAxisAlignment:
|
),
|
||||||
MainAxisAlignment.spaceBetween,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment:
|
||||||
Expanded(
|
MainAxisAlignment.spaceBetween,
|
||||||
child: Text(
|
children: [
|
||||||
|
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) {
|
)
|
||||||
StudentItem item = state.studentList[index];
|
: ListView.builder(
|
||||||
return InkWell(
|
itemBuilder: (context, index) {
|
||||||
onTap: () {
|
StudentItem item = state.studentList[index];
|
||||||
// RouterManager.router.navigateTo(context,
|
return InkWell(
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
onTap: () {
|
||||||
Get.toNamed(Routes.studentWorkDetailPage,
|
// RouterManager.router.navigateTo(context,
|
||||||
arguments: {
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||||
'studentName': item.name,
|
Get.toNamed(Routes.studentWorkDetailPage,
|
||||||
'studentId': item.id
|
arguments: {
|
||||||
});
|
'studentName': item.name,
|
||||||
},
|
'studentId': item.id
|
||||||
child: Container(
|
});
|
||||||
padding: EdgeInsets.symmetric(
|
},
|
||||||
vertical: 20.r, horizontal: 15.r),
|
child: Container(
|
||||||
margin: EdgeInsets.only(bottom: 15.r),
|
padding: EdgeInsets.symmetric(
|
||||||
decoration: BoxDecoration(
|
vertical: 20.r, horizontal: 15.r),
|
||||||
borderRadius:
|
margin: EdgeInsets.only(bottom: 15.r),
|
||||||
BorderRadius.all(Radius.circular(10.r)),
|
decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
borderRadius:
|
||||||
),
|
BorderRadius.all(Radius.circular(10.r)),
|
||||||
child: Row(
|
color: Colors.white,
|
||||||
mainAxisAlignment:
|
),
|
||||||
MainAxisAlignment.spaceBetween,
|
child: Row(
|
||||||
children: [
|
mainAxisAlignment:
|
||||||
Expanded(
|
MainAxisAlignment.spaceBetween,
|
||||||
child: Text(
|
children: [
|
||||||
|
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,
|
);
|
||||||
)
|
},
|
||||||
: const MyEmptyWidget(),
|
itemCount: state.studentList.length,
|
||||||
|
)
|
||||||
|
: const MyEmptyWidget(),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}),
|
}
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
||||||
ReturnToHomepage(),
|
ReturnToHomepage(),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
body: Column(
|
body:OrientationBuilder(
|
||||||
|
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),
|
||||||
|
|
@ -139,7 +141,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) {
|
||||||
|
|
@ -221,7 +223,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:
|
||||||
|
|
@ -249,12 +251,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',
|
||||||
|
|
@ -300,8 +302,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(
|
||||||
|
|
@ -336,10 +338,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',
|
||||||
|
|
@ -373,7 +375,9 @@ class _FavStudentPageState extends State<FavStudentPage> {
|
||||||
}),
|
}),
|
||||||
|
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,93 +25,97 @@ class _JobReportPageState extends State<JobReportPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
centerTitle: true,
|
appBar: AppBar(
|
||||||
title: Center(child: Obx(() {
|
backgroundColor: Colors.white,
|
||||||
return quickText(
|
centerTitle: true,
|
||||||
'${state.title.value}作业报告',
|
title: Center(child: Obx(() {
|
||||||
size: 14.sp,
|
return quickText(
|
||||||
color: const Color.fromRGBO(51, 51, 51, 1),
|
'${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(),
|
leading: IconButton(
|
||||||
),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
),
|
ReturnToHomepage(),
|
||||||
body: Obx(() {
|
],
|
||||||
if (state.hasData.value) {
|
),
|
||||||
return SingleChildScrollView(
|
body: Obx(() {
|
||||||
child: Column(
|
if (state.hasData.value) {
|
||||||
children: [
|
return SingleChildScrollView(
|
||||||
// 下拉框
|
child: Column(
|
||||||
Container(
|
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
|
||||||
decoration: const BoxDecoration(
|
|
||||||
color: Colors.white,
|
|
||||||
),
|
|
||||||
child: Row(
|
|
||||||
children: [
|
children: [
|
||||||
Obx(() {
|
// 下拉框
|
||||||
return DropdownSelection(
|
Container(
|
||||||
involveClasses: state.involveClasses.value,
|
padding: EdgeInsets.symmetric(vertical: 10.h, horizontal: 10.w),
|
||||||
classData: state.classData.value,
|
decoration: const BoxDecoration(
|
||||||
call: (AnnotatedClass item) {
|
color: Colors.white,
|
||||||
state.classData.value = item;
|
),
|
||||||
if (item.grade == -1) state.classData.value = state.defaultClass;
|
child: Row(
|
||||||
logic.getWorkData();
|
children: [
|
||||||
});
|
Obx(() {
|
||||||
}),
|
return DropdownSelection(
|
||||||
// Expanded(child: Text('')),
|
involveClasses: state.involveClasses.value,
|
||||||
],
|
classData: state.classData.value,
|
||||||
),
|
call: (AnnotatedClass item) {
|
||||||
),
|
state.classData.value = item;
|
||||||
//完成率、正确率
|
if (item.grade == -1) state.classData.value = state.defaultClass;
|
||||||
/* TopCount(
|
logic.getWorkData();
|
||||||
|
});
|
||||||
|
}),
|
||||||
|
// 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());
|
|
||||||
}
|
}
|
||||||
}),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,218 +27,221 @@ class _KnowledgePointsGraspPageState extends State<KnowledgePointsGraspPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
appBar: AppBar(
|
||||||
centerTitle: true,
|
backgroundColor: Colors.white,
|
||||||
leading: IconButton(
|
title: Text('知识点掌握', style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333))),
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
centerTitle: true,
|
||||||
onPressed: () => Get.back(),
|
leading: IconButton(
|
||||||
),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
elevation: 0,
|
ReturnToHomepage(),
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
|
elevation: 0,
|
||||||
),
|
),
|
||||||
),
|
body: Column(
|
||||||
Obx(() {
|
children: [
|
||||||
return JobConditionFilter(
|
Container(
|
||||||
jobType: 1,
|
margin: EdgeInsets.all(15.r),
|
||||||
controller: logic.tabController,
|
// height: 30.r,
|
||||||
customTimeStr: state.customTimeStr.value,
|
child: Row(
|
||||||
customTime: logic.tabController.index != 2 ||
|
children: [
|
||||||
((state.dateEnd == null || state.dateEnd == '') && (state.dateStart == null || state.dateStart == ''))
|
Expanded(
|
||||||
? null
|
child: Container(
|
||||||
: PickerDateRange(
|
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.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();
|
||||||
},
|
},
|
||||||
child: state.dataList.isNotEmpty
|
refreshTime: (value) {
|
||||||
? ListView.builder(
|
if (value != null && value.startDate != null) {
|
||||||
itemCount: state.dataList.value.length,
|
state.customTimeStr.value = value.startDate?.toString().substring(0, 10) ?? '';
|
||||||
itemBuilder: (context, index) {
|
if (value.endDate != null) {
|
||||||
KnowledgePointsGrasp item = state.dataList[index];
|
if (!Utils.isPad() && value.startDate!.year == value.endDate!.year) {
|
||||||
return InkWell(
|
state.customTimeStr.value = '${value.startDate.toString().substring(5, 10)}~${value.endDate.toString().substring(5, 10)}';
|
||||||
onTap: () {
|
} else {
|
||||||
Get.toNamed(Routes.knowledgePointsGraspDetailPage, arguments: {
|
state.customTimeStr.value = '${state.customTimeStr.value}~${value.endDate?.toString().substring(0, 10)}';
|
||||||
'dateStart': state.dateStart,
|
}
|
||||||
'dateEnd': state.dateEnd,
|
}
|
||||||
'knowledgeId': item.knowledgeId,
|
}
|
||||||
'knowledgeName': item.knowledgeName
|
},
|
||||||
});
|
);
|
||||||
},
|
}),
|
||||||
child: Container(
|
Expanded(
|
||||||
margin: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
child: Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 10.r),
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
decoration: BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(10.r)), color: Colors.white),
|
child: Obx(() {
|
||||||
child: Column(
|
return EasyRefresh(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
firstRefresh: false,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
taskIndependence: true,
|
||||||
children: [
|
controller: logic.refreshController,
|
||||||
Row(
|
header: MaterialHeader(),
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
footer: TaurusFooter(),
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
onRefresh: () async {
|
||||||
children: [
|
state.page = 1;
|
||||||
Expanded(
|
logic.getList();
|
||||||
child: Text(
|
},
|
||||||
item.knowledgeName,
|
onLoad: () async {
|
||||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF505050)),
|
if (state.page < state.totalPages) {
|
||||||
)),
|
state.page += 1;
|
||||||
Container(
|
logic.getList();
|
||||||
width: 49.r,
|
}
|
||||||
height: 22.r,
|
},
|
||||||
decoration: BoxDecoration(
|
child: state.dataList.isNotEmpty
|
||||||
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
? ListView.builder(
|
||||||
border: Border.all(width: 1.r, color: Color(0xFF6888FD)),
|
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: [
|
SizedBox(
|
||||||
Text(
|
height: 10.r,
|
||||||
'${item.count}次',
|
),
|
||||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
|
ProgressBar(
|
||||||
),
|
title: '正确率:',
|
||||||
Image.asset(
|
color: Color(0xFF90E0BE),
|
||||||
'assets/images/right_icon_blue.png',
|
percent: item.correctRate / 100,
|
||||||
width: 8.r,
|
padingEdg: EdgeInsets.zero,
|
||||||
height: 8.r,
|
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
|
@override
|
||||||
|
|
|
||||||
|
|
@ -68,165 +68,167 @@ class _KnowledgePointsGraspDetailPageState extends State<KnowledgePointsGraspDet
|
||||||
EasyLoading.dismiss();
|
EasyLoading.dismiss();
|
||||||
}
|
}
|
||||||
|
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Obx(() {
|
appBar: AppBar(
|
||||||
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
backgroundColor: Colors.white,
|
||||||
}),
|
title: Obx(() {
|
||||||
centerTitle: true,
|
return Text(state.knowledgeName.value, style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)));
|
||||||
leading: IconButton(
|
}),
|
||||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
centerTitle: true,
|
||||||
onPressed: () => Get.back(),
|
leading: IconButton(
|
||||||
),
|
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
elevation: 0,
|
ReturnToHomepage(),
|
||||||
),
|
],
|
||||||
body: Padding(
|
elevation: 0,
|
||||||
padding: EdgeInsets.symmetric(vertical: 10.r),
|
),
|
||||||
child: Obx(() {
|
body: Padding(
|
||||||
return EasyRefresh(
|
padding: EdgeInsets.symmetric(vertical: 10.r),
|
||||||
firstRefresh: false,
|
child: Obx(() {
|
||||||
taskIndependence: true,
|
return EasyRefresh(
|
||||||
controller: logic.refreshController,
|
firstRefresh: false,
|
||||||
header: MaterialHeader(),
|
taskIndependence: true,
|
||||||
footer: TaurusFooter(),
|
controller: logic.refreshController,
|
||||||
onRefresh: () async {
|
header: MaterialHeader(),
|
||||||
logic.getList();
|
footer: TaurusFooter(),
|
||||||
},
|
onRefresh: () async {
|
||||||
onLoad: () async {
|
logic.getList();
|
||||||
// getList();
|
},
|
||||||
},
|
onLoad: () async {
|
||||||
child: state.dataList.isNotEmpty
|
// getList();
|
||||||
? ListView.builder(
|
},
|
||||||
itemCount: state.dataList.length,
|
child: state.dataList.isNotEmpty
|
||||||
itemBuilder: (context, index) {
|
? ListView.builder(
|
||||||
KnowledgeReportDetail item = state.dataList[index];
|
itemCount: state.dataList.length,
|
||||||
return InkWell(
|
itemBuilder: (context, index) {
|
||||||
onTap: () {
|
KnowledgeReportDetail item = state.dataList[index];
|
||||||
/* RouterManager.router.navigateTo(
|
return InkWell(
|
||||||
|
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: [
|
|
||||||
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,
|
|
||||||
children: [
|
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(
|
InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
EasyLoading.show(status: 'loading...');
|
EasyLoading.show(status: 'loading...');
|
||||||
showStudent(item.homeworkId, item.templateId, item.questionNo, item.homeworkName);
|
showImg(item.questionPicture, context);
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: EdgeInsets.only(right: 6.r),
|
width: 49.r,
|
||||||
width: 56.r,
|
height: 22.r,
|
||||||
height: 20.r,
|
decoration: BoxDecoration(
|
||||||
decoration: BoxDecoration(
|
borderRadius: BorderRadius.all(Radius.circular(20.r)),
|
||||||
color: Color(0xFFD4FFED),
|
border: Border.all(width: 1.r, color: Color(0xFF8B8B8B)),
|
||||||
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(
|
||||||
/* progressBar(context,
|
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: '正确率 >',
|
title: '正确率 >',
|
||||||
color: Color(0xFF90E0BE),
|
color: Color(0xFF90E0BE),
|
||||||
percent: item.correctRate / 100,
|
percent: item.correctRate / 100,
|
||||||
|
|
@ -234,16 +236,17 @@ 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
|
||||||
|
|
|
||||||
|
|
@ -20,38 +20,42 @@ class _StudentHistoryWorkPageState extends State<StudentHistoryWorkPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation){
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Text(
|
appBar: AppBar(
|
||||||
'我的班级 ',
|
backgroundColor: Colors.white,
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
title: Text(
|
||||||
),
|
'我的班级 ',
|
||||||
centerTitle: true,
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF333333)),
|
||||||
leading: IconButton(
|
),
|
||||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
centerTitle: true,
|
||||||
onPressed: () => Get.back(),
|
leading: IconButton(
|
||||||
),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
actions: const [
|
||||||
),
|
ReturnToHomepage(),
|
||||||
body: Padding(
|
],
|
||||||
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
),
|
||||||
child: EasyRefresh(
|
body: Padding(
|
||||||
firstRefresh: false,
|
padding: EdgeInsets.only(top: 15.r, left: 14.r, right: 14.r),
|
||||||
taskIndependence: true,
|
child: EasyRefresh(
|
||||||
controller: logic.refreshController,
|
firstRefresh: false,
|
||||||
header: MaterialHeader(),
|
taskIndependence: true,
|
||||||
footer: TaurusFooter(),
|
controller: logic.refreshController,
|
||||||
onRefresh: () async {
|
header: MaterialHeader(),
|
||||||
logic.getList();
|
footer: TaurusFooter(),
|
||||||
},
|
onRefresh: () async {
|
||||||
child: StudentGroupList(state.clssList, logic.goNextPage),
|
logic.getList();
|
||||||
),
|
},
|
||||||
),
|
child: StudentGroupList(state.clssList, logic.goNextPage),
|
||||||
);
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
|
|
||||||
|
|
@ -24,189 +24,222 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return OrientationBuilder(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
builder: (BuildContext context, Orientation orientation) {
|
||||||
appBar: AppBar(
|
return Scaffold(
|
||||||
backgroundColor: Colors.white,
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
title: Obx(() {
|
appBar: AppBar(
|
||||||
return Text(
|
backgroundColor: Colors.white,
|
||||||
state.studentInfo.value.studentName,
|
title: Obx(() {
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF000000)),
|
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),
|
centerTitle: true,
|
||||||
onPressed: () => Get.back(),
|
leading: IconButton(
|
||||||
),
|
icon: const Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||||
actions: const [
|
onPressed: () => Get.back(),
|
||||||
ReturnToHomepage(),
|
),
|
||||||
],
|
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());
|
|
||||||
},
|
|
||||||
),
|
|
||||||
);
|
|
||||||
})
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
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
|
@override
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue