no message
This commit is contained in:
parent
b92dca04c0
commit
0ea085de97
|
|
@ -10,6 +10,7 @@ import 'package:making_school_asignment_app/common/utils/storage.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
import 'common/utils/app_upgrade/upgradeLogic.dart';
|
import 'common/utils/app_upgrade/upgradeLogic.dart';
|
||||||
|
|
||||||
|
|
@ -31,6 +32,8 @@ void main() async {
|
||||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||||
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); // 屏幕强制竖屏
|
await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]); // 屏幕强制竖屏
|
||||||
runApp(const MyApp());
|
runApp(const MyApp());
|
||||||
|
|
||||||
|
Permission.storage.request();
|
||||||
}
|
}
|
||||||
|
|
||||||
class MyApp extends StatelessWidget {
|
class MyApp extends StatelessWidget {
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,8 @@ class _StartPageState extends State<StartPage> with RequestToolMixin {
|
||||||
Get.put(WorkLogic());
|
Get.put(WorkLogic());
|
||||||
|
|
||||||
_bodyList = [const HomePage(), const WorkPage(), const MyInfo()];
|
_bodyList = [const HomePage(), const WorkPage(), const MyInfo()];
|
||||||
// TODO 启动APP 后直接请求更新
|
// APP 启动后就直接更新
|
||||||
if (!_upgradeLogic.showUpgrade.value) _upgradeLogic.getAppUpgrade(context);
|
if (!_upgradeLogic.showUpgrade.value) _upgradeLogic.getAppUpgrade(context);
|
||||||
|
|
||||||
_timer?.cancel();
|
_timer?.cancel();
|
||||||
_timer = Timer.periodic(const Duration(seconds: 40), (e) {
|
_timer = Timer.periodic(const Duration(seconds: 40), (e) {
|
||||||
if (Get.currentRoute == Routes.login) return; // 在登录页面不更新APP
|
if (Get.currentRoute == Routes.login) return; // 在登录页面不更新APP
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,7 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.cancelAllRatings()),
|
||||||
child: quickText('取 消', size: 12.sp, color: Colors.white),
|
child: quickText('取 消', size: 14.sp, color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -211,7 +211,7 @@ class _BottomAnnotationSwitchJobState extends State<BottomAnnotationSwitch> with
|
||||||
height: double.infinity,
|
height: double.infinity,
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
|
onPressed: () => easyThrottle('homework_bottom_operation_bar_scoring_related', () => _homeworkLogic.submit(context)),
|
||||||
child: quickText('提 交', size: 12.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
child: quickText('提 交', size: 14.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,13 @@ import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
|
||||||
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
||||||
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/homework_review/configuration_files/index.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/homework_review/configuration_files/index.dart';
|
||||||
|
import 'package:making_school_asignment_app/routes/app_pages.dart';
|
||||||
|
|
||||||
|
import 'original_manuscript_handwriting/answer_handwriting_view.dart';
|
||||||
|
|
||||||
part 'dropdown_switch_students_type.g.dart';
|
part 'dropdown_switch_students_type.g.dart';
|
||||||
|
|
||||||
|
|
@ -41,7 +45,7 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 2,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -54,7 +58,7 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
underline: Container(),
|
underline: Container(),
|
||||||
padding: EdgeInsets.only(right: 4.w),
|
padding: EdgeInsets.only(right: 4.w),
|
||||||
icon: const Icon(Icons.keyboard_arrow_down_rounded),
|
icon: const Icon(Icons.keyboard_arrow_down_rounded),
|
||||||
value: sateData.value?.templateId, // TODO 数据
|
value: sateData.value?.templateId,
|
||||||
hint: const Text('请选择作业页码'), // 锚点的显示文本
|
hint: const Text('请选择作业页码'), // 锚点的显示文本
|
||||||
items: sateData.value?.templateIdKeys?.map((e) {
|
items: sateData.value?.templateIdKeys?.map((e) {
|
||||||
return DropdownMenuItem(
|
return DropdownMenuItem(
|
||||||
|
|
@ -74,7 +78,7 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
),
|
),
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
const Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 4,
|
flex: 3,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -90,9 +94,6 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
value: sateData.value?.studentId,
|
value: sateData.value?.studentId,
|
||||||
underline: Container(),
|
underline: Container(),
|
||||||
isExpanded: true,
|
isExpanded: true,
|
||||||
onTap: () {
|
|
||||||
print('数据..................');
|
|
||||||
},
|
|
||||||
items: sateData.value?.students.map((e) {
|
items: sateData.value?.students.map((e) {
|
||||||
return DropdownMenuItem(
|
return DropdownMenuItem(
|
||||||
value: e.id,
|
value: e.id,
|
||||||
|
|
@ -125,7 +126,6 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
}).toList(),
|
}).toList(),
|
||||||
hint: const Text('请选择学生'), // 锚点的显示文本
|
hint: const Text('请选择学生'), // 锚点的显示文本
|
||||||
onChanged: (value) {
|
onChanged: (value) {
|
||||||
print('1111111111');
|
|
||||||
if (logic.state.param.value.studentId == value) return;
|
if (logic.state.param.value.studentId == value) return;
|
||||||
logic.state.param.value.studentId = value;
|
logic.state.param.value.studentId = value;
|
||||||
logic.state.param.value = DoPaperDetailsParam.fromJson(logic.state.param.value.toJson());
|
logic.state.param.value = DoPaperDetailsParam.fromJson(logic.state.param.value.toJson());
|
||||||
|
|
@ -152,15 +152,17 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
// const Expanded(flex: 1, child: SizedBox()),
|
||||||
|
SizedBox(width: 8.w),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: isPad() ? 4 : 5,
|
flex: isPad() ? 4 : 5,
|
||||||
child: const Row(
|
child: const Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
mainAxisAlignment: MainAxisAlignment.end,
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||||
children: [
|
children: [
|
||||||
$ContinueToReview(), // 继续批阅
|
$ContinueToReview(), // 继续批阅
|
||||||
$HistoryHomework() // 学生历史作业
|
$HistoryHomework(), // 学生历史作业
|
||||||
|
$StudentHandwriting(), // 学生笔迹
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -170,6 +172,42 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@swidget
|
||||||
|
Widget $studentHandwriting(BuildContext context) {
|
||||||
|
final logic = Get.find<HomeworkReviewLogic>();
|
||||||
|
final sateData = Get.find<HomeworkReviewLogic>().state.data;
|
||||||
|
return InkWell(
|
||||||
|
onTap: () => easyThrottle(
|
||||||
|
'SHOW_ANSWER_HANDWRITING',
|
||||||
|
() async {
|
||||||
|
var homeworkId = logic.state.param.value.homeworkId;
|
||||||
|
var studentId = sateData.value?.studentId;
|
||||||
|
if (studentId == null) return;
|
||||||
|
var templateIdKeyMap = sateData.value?.templateIdKeyMap;
|
||||||
|
int? pageNum;
|
||||||
|
var templateId = sateData.value?.templateId;
|
||||||
|
if (templateIdKeyMap != null && templateId != null) {
|
||||||
|
pageNum = templateIdKeyMap[templateId];
|
||||||
|
}
|
||||||
|
await showAnswerHandwriting(context, homeworkId: homeworkId, studentId: studentId, templateId: templateId, pageNum: pageNum);
|
||||||
|
ToastUtils.dismiss();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Icon(Icons.edit_outlined, size: 12.sp, color: Theme.of(context).primaryColor.withOpacity(0.8)),
|
||||||
|
SizedBox(width: 1.w),
|
||||||
|
quickText(
|
||||||
|
'学生笔迹',
|
||||||
|
size: 12.sp,
|
||||||
|
decoration: TextDecoration.underline,
|
||||||
|
color: Theme.of(context).primaryColor.withOpacity(0.9),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
@swidget
|
@swidget
|
||||||
Widget $continueToReview(BuildContext context, {bool isFloatingAction = false}) {
|
Widget $continueToReview(BuildContext context, {bool isFloatingAction = false}) {
|
||||||
final logic = Get.find<HomeworkReviewLogic>();
|
final logic = Get.find<HomeworkReviewLogic>();
|
||||||
|
|
@ -199,7 +237,7 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
child: Icon(Icons.flip_camera_android_outlined, size: 20.sp, color: Theme.of(context).primaryColor),
|
child: Icon(Icons.flip_camera_android_outlined, size: 20.sp, color: Theme.of(context).primaryColor),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return Expanded(
|
return SizedBox(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: callFun,
|
onTap: callFun,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -210,7 +248,7 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
SizedBox(width: 1.w),
|
SizedBox(width: 1.w),
|
||||||
quickText(
|
quickText(
|
||||||
'继续批阅',
|
'继续批阅',
|
||||||
size: 10.sp,
|
size: 12.sp,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
color: Theme.of(context).primaryColor.withOpacity(0.9),
|
color: Theme.of(context).primaryColor.withOpacity(0.9),
|
||||||
),
|
),
|
||||||
|
|
@ -225,26 +263,25 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
@swidget
|
@swidget
|
||||||
Widget $historyHomework(BuildContext context) {
|
Widget $historyHomework(BuildContext context) {
|
||||||
final sateData = Get.find<HomeworkReviewLogic>().state.data;
|
final sateData = Get.find<HomeworkReviewLogic>().state.data;
|
||||||
return Expanded(
|
return SizedBox(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () => easyThrottle('DO_PAPERS_JOB_HISTORICAL_HOMEWORK', () {
|
onTap: () => easyThrottle('DO_PAPERS_JOB_HISTORICAL_HOMEWORK', () {
|
||||||
// TODO 学生历史作业页面跳转
|
|
||||||
int? studentId = sateData.value?.studentId;
|
int? studentId = sateData.value?.studentId;
|
||||||
if (kDebugMode) print(studentId);
|
if (kDebugMode) print(studentId);
|
||||||
// JobConcernedWithStudent? _studentModel = _useSwitchStudentAndType.currentStudent.value;
|
if (studentId == null || (sateData.value?.students.isEmpty ?? true)) return;
|
||||||
// if (_studentModel == null) return;
|
var currentStudent = sateData.value!.students.firstWhereOrNull((e) => e.id == studentId);
|
||||||
// String url =
|
if (currentStudent == null) return;
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${_studentModel.studentId}&studentName=${Uri.encodeComponent(_studentModel.studentName)}';
|
Get.toNamed(Routes.studentWorkDetailPage, arguments: {'studentId': studentId, 'studentName': currentStudent.name});
|
||||||
// RouterManager.router.navigateTo(context, url, transition: getTransition());
|
|
||||||
}),
|
}),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.location_history, size: 12.sp, color: const Color.fromRGBO(104, 103, 103, 1)),
|
Icon(Icons.location_history, size: 12.sp, color: const Color.fromRGBO(104, 103, 103, 1)),
|
||||||
SizedBox(width: 1.w),
|
SizedBox(width: 1.w),
|
||||||
quickText(
|
quickText(
|
||||||
'历史作业',
|
'历史作业',
|
||||||
size: 10.sp,
|
size: 12.sp,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
color: Theme.of(context).primaryColor.withOpacity(0.8),
|
color: Theme.of(context).primaryColor.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
import 'package:making_school_asignment_app/common/config/request_config.dart';
|
|
||||||
|
|
||||||
part 'job_handwriting.g.dart';
|
part 'job_handwriting.g.dart';
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ class _QuestionPaperViewState extends State<QuestionPaperView> {
|
||||||
}),
|
}),
|
||||||
),
|
),
|
||||||
// 试题题号视图
|
// 试题题号视图
|
||||||
Expanded(flex: 2, child: $QuestionNumberView(sateData)),
|
Expanded(flex: 2, child: $QuestionNumberView(logic, sateData)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
|
|
@ -209,7 +209,10 @@ Widget $totalSubmitCountView(BuildContext context, HomeworkReviewState sateData)
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
quickText('已阅', color: const Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
|
Padding(
|
||||||
|
padding: EdgeInsets.only(bottom: 1.h),
|
||||||
|
child: quickText('已阅', color: const Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
|
||||||
|
),
|
||||||
quickText(data.annotatedCount, color: const Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.bold),
|
quickText(data.annotatedCount, color: const Color.fromRGBO(76, 199, 147, 1), size: 12.sp, fontWeight: FontWeight.bold),
|
||||||
quickText('/', color: const Color.fromRGBO(117, 117, 117, 1), size: 12.sp),
|
quickText('/', color: const Color.fromRGBO(117, 117, 117, 1), size: 12.sp),
|
||||||
quickText(data.submitCount - data.annotatedCount, color: const Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
|
quickText(data.submitCount - data.annotatedCount, color: const Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
|
||||||
|
|
@ -222,7 +225,7 @@ Widget $totalSubmitCountView(BuildContext context, HomeworkReviewState sateData)
|
||||||
|
|
||||||
// 试题题号视图
|
// 试题题号视图
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
Widget $questionNumberView(BuildContext context, HomeworkReviewLogic logic, HomeworkReviewState sateData) {
|
||||||
final scrollControllerNum = useScrollController(); // 试题题号区域
|
final scrollControllerNum = useScrollController(); // 试题题号区域
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
|
|
@ -271,7 +274,12 @@ Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
||||||
padding: EdgeInsets.only(top: imageVal.remainingHeight > 0 ? imageVal.remainingHeight / 2 : 0),
|
padding: EdgeInsets.only(top: imageVal.remainingHeight > 0 ? imageVal.remainingHeight / 2 : 0),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
children: studentQuestions?.asMap().keys.map((e) => $ScoringQuestionsView(studentQuestions[e], imageVal.scaleRatio)).toList() ?? [],
|
children: studentQuestions
|
||||||
|
?.asMap()
|
||||||
|
.keys
|
||||||
|
.map((e) => $ScoringQuestionsView(logic, studentQuestions[e], imageVal.scaleRatio, studentQuestions))
|
||||||
|
.toList() ??
|
||||||
|
[],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -281,11 +289,19 @@ Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
||||||
|
|
||||||
// 单道题得分框
|
// 单道题得分框
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $scoringQuestionsView(BuildContext context, StudentQuestions item, double scaleRatio) {
|
Widget $scoringQuestionsView(
|
||||||
|
BuildContext context, HomeworkReviewLogic logic, StudentQuestions item, double scaleRatio, List<StudentQuestions>? studentQuestions) {
|
||||||
var studentScore = useState<int?>(item.studentScore);
|
var studentScore = useState<int?>(item.studentScore);
|
||||||
|
|
||||||
useValueChanged<int?, void>(studentScore.value, (_, __) {
|
useValueChanged<int?, void>(studentScore.value, (_, __) {
|
||||||
item.studentScore = studentScore.value;
|
item.studentScore = studentScore.value;
|
||||||
|
|
||||||
|
// 校验是否自动提交 对于已经批阅过的试题 不重复自动提交
|
||||||
|
var annotateTime = logic.state.data.value?.annotateTime;
|
||||||
|
if (annotateTime == null) {
|
||||||
|
var noRatingGiven = studentQuestions!.firstWhereOrNull((e) => e.studentScore == null);
|
||||||
|
if (noRatingGiven == null) logic.submit(context);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
useValueChanged<StudentQuestions, void>(item, (_, __) {
|
useValueChanged<StudentQuestions, void>(item, (_, __) {
|
||||||
|
|
@ -295,6 +311,7 @@ Widget $scoringQuestionsView(BuildContext context, StudentQuestions item, double
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
return () {};
|
return () {};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
var padinVal = item.correctRate > 0 ? EdgeInsets.only(top: 6.4.h) : EdgeInsets.symmetric(vertical: 2.h);
|
var padinVal = item.correctRate > 0 ? EdgeInsets.only(top: 6.4.h) : EdgeInsets.symmetric(vertical: 2.h);
|
||||||
return Container(
|
return Container(
|
||||||
height: item.height * scaleRatio,
|
height: item.height * scaleRatio,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
|
||||||
import 'package:making_school_asignment_app/common/utils/utils.dart';
|
|
||||||
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
import 'package:making_school_asignment_app/page/global_widget/ReturnToHomepage.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/homework_review/components/original_manuscript_handwriting/answer_handwriting_view.dart';
|
||||||
import 'package:making_school_asignment_app/page/home_page/children/student_personal/widget/student_kg_table.dart';
|
import 'package:making_school_asignment_app/page/home_page/children/student_personal/widget/student_kg_table.dart';
|
||||||
|
|
@ -24,8 +23,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(
|
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
||||||
builder: (BuildContext context, Orientation orientation) {
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
backgroundColor: const Color.fromRGBO(245, 245, 245, 1),
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
|
@ -56,10 +54,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// RouterManager.router.navigateTo(context,
|
// RouterManager.router.navigateTo(context,
|
||||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${widget.studentId}&studentName=${Uri.encodeComponent(state.studentInfo.studentName!)}');
|
||||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
Get.toNamed(Routes.studentWorkDetailPage,
|
||||||
'studentId': state.studentInfo.value.studentId,
|
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName});
|
||||||
'studentName': state.studentInfo.value.studentName
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
|
|
@ -71,8 +67,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'历史作业',
|
'历史作业',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)),
|
||||||
fontSize: 10.r, color: const Color(0xFF2080F7)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -81,10 +76,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => showAnswerHandwriting(context,
|
onTap: () =>
|
||||||
homeworkId: state.homeworkId,
|
showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()),
|
||||||
studentId: state.studentId)
|
|
||||||
.then((e) => ToastUtils.dismiss()),
|
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
height: 28.r,
|
height: 28.r,
|
||||||
|
|
@ -95,8 +88,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'原稿笔迹',
|
'原稿笔迹',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)),
|
||||||
fontSize: 10.r, color: const Color(0xFF4CC793)),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -120,10 +112,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题',
|
'客观题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF5C5C5C),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -131,10 +120,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return Text(
|
return Text(
|
||||||
'${state.studentInfo.value.kgtCorrectRate}%',
|
'${state.studentInfo.value.kgtCorrectRate}%',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600),
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF4CC793),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
@ -144,19 +130,13 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: state.studentInfo.value.kgtList.length > 8
|
height: state.studentInfo.value.kgtList.length > 8 ? 300.r : state.studentInfo.value.kgtList.length * 40.r + 40.r,
|
||||||
? 300.r
|
|
||||||
: state.studentInfo.value.kgtList.length * 40.r +
|
|
||||||
40.r,
|
|
||||||
child: StudentKgTable(
|
child: StudentKgTable(
|
||||||
headList: const ['题号', '学生答案', '标准答案'],
|
headList: const ['题号', '学生答案', '标准答案'],
|
||||||
bodyList: state.studentInfo.value.kgtList,
|
bodyList: state.studentInfo.value.kgtList,
|
||||||
questionNumCall: (questionNo, templateId) {
|
questionNumCall: (questionNo, templateId) {
|
||||||
showAnswerHandwriting(context,
|
showAnswerHandwriting(context,
|
||||||
homeworkId: state.homeworkId,
|
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
|
||||||
studentId: state.studentId,
|
|
||||||
questionNo: questionNo,
|
|
||||||
templateId: templateId)
|
|
||||||
.then((e) => ToastUtils.dismiss());
|
.then((e) => ToastUtils.dismiss());
|
||||||
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
// showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
||||||
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
// ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||||
|
|
@ -187,10 +167,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'主观题',
|
'主观题',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF5C5C5C),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -198,10 +175,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return Text(
|
return Text(
|
||||||
'${state.studentInfo.value.zgtCorrectRate}%',
|
'${state.studentInfo.value.zgtCorrectRate}%',
|
||||||
style: TextStyle(
|
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600),
|
||||||
fontSize: 14.sp,
|
|
||||||
color: const Color(0xFF4CC793),
|
|
||||||
fontWeight: FontWeight.w600),
|
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
@ -211,10 +185,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: state.studentInfo.value.zgtList.length > 8
|
height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r,
|
||||||
? 300.r
|
|
||||||
: state.studentInfo.value.zgtList.length * 40.r +
|
|
||||||
40.r,
|
|
||||||
child: StudentZgTable(
|
child: StudentZgTable(
|
||||||
headList: const ['题号', '用时', '批注结果', '答案'],
|
headList: const ['题号', '用时', '批注结果', '答案'],
|
||||||
bodyList: state.studentInfo.value.zgtList,
|
bodyList: state.studentInfo.value.zgtList,
|
||||||
|
|
@ -223,10 +194,7 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||||
});*/
|
});*/
|
||||||
showAnswerHandwriting(context,
|
showAnswerHandwriting(context,
|
||||||
homeworkId: state.homeworkId,
|
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
|
||||||
studentId: state.studentId,
|
|
||||||
questionNo: questionNo,
|
|
||||||
templateId: templateId)
|
|
||||||
.then((e) => ToastUtils.dismiss());
|
.then((e) => ToastUtils.dismiss());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue