Compare commits
No commits in common. "6b3c1fd2a4cf9c4e313701c20e261d83ec180dff" and "bb7dcfb0efb44f07a62669affcc05b2d05a43141" have entirely different histories.
6b3c1fd2a4
...
bb7dcfb0ef
|
|
@ -10,7 +10,6 @@ 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';
|
||||||
|
|
||||||
|
|
@ -32,8 +31,6 @@ 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,8 +40,9 @@ 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()];
|
||||||
// APP 启动后就直接更新
|
// TODO 启动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: 14.sp, color: Colors.white),
|
child: quickText('取 消', size: 12.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: 14.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
child: quickText('提 交', size: 12.sp, color: const Color.fromRGBO(76, 199, 147, 1)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,9 @@ 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';
|
||||||
|
|
||||||
|
|
@ -45,7 +41,7 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 2,
|
flex: 3,
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.only(left: 10.w),
|
padding: EdgeInsets.only(left: 10.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|
@ -58,7 +54,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,
|
value: sateData.value?.templateId, // TODO 数据
|
||||||
hint: const Text('请选择作业页码'), // 锚点的显示文本
|
hint: const Text('请选择作业页码'), // 锚点的显示文本
|
||||||
items: sateData.value?.templateIdKeys?.map((e) {
|
items: sateData.value?.templateIdKeys?.map((e) {
|
||||||
return DropdownMenuItem(
|
return DropdownMenuItem(
|
||||||
|
|
@ -78,7 +74,7 @@ class _DropdownSwitchStudentsTypeState extends State<DropdownSwitchStudentsType>
|
||||||
),
|
),
|
||||||
const Expanded(flex: 1, child: SizedBox()),
|
const Expanded(flex: 1, child: SizedBox()),
|
||||||
Expanded(
|
Expanded(
|
||||||
flex: 3,
|
flex: 4,
|
||||||
child: Stack(
|
child: Stack(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
|
|
@ -94,6 +90,9 @@ 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,
|
||||||
|
|
@ -126,6 +125,7 @@ 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,17 +152,15 @@ 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.spaceAround,
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
$ContinueToReview(), // 继续批阅
|
$ContinueToReview(), // 继续批阅
|
||||||
$HistoryHomework(), // 学生历史作业
|
$HistoryHomework() // 学生历史作业
|
||||||
$StudentHandwriting(), // 学生笔迹
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -172,42 +170,6 @@ 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>();
|
||||||
|
|
@ -237,7 +199,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 SizedBox(
|
return Expanded(
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: callFun,
|
onTap: callFun,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
@ -248,7 +210,7 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
|
||||||
SizedBox(width: 1.w),
|
SizedBox(width: 1.w),
|
||||||
quickText(
|
quickText(
|
||||||
'继续批阅',
|
'继续批阅',
|
||||||
size: 12.sp,
|
size: 10.sp,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
color: Theme.of(context).primaryColor.withOpacity(0.9),
|
color: Theme.of(context).primaryColor.withOpacity(0.9),
|
||||||
),
|
),
|
||||||
|
|
@ -263,25 +225,26 @@ 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 SizedBox(
|
return Expanded(
|
||||||
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);
|
||||||
if (studentId == null || (sateData.value?.students.isEmpty ?? true)) return;
|
// JobConcernedWithStudent? _studentModel = _useSwitchStudentAndType.currentStudent.value;
|
||||||
var currentStudent = sateData.value!.students.firstWhereOrNull((e) => e.id == studentId);
|
// if (_studentModel == null) return;
|
||||||
if (currentStudent == null) return;
|
// String url =
|
||||||
Get.toNamed(Routes.studentWorkDetailPage, arguments: {'studentId': studentId, 'studentName': currentStudent.name});
|
// '${RouterManager.jobPersonalDetailPath}?studentId=${_studentModel.studentId}&studentName=${Uri.encodeComponent(_studentModel.studentName)}';
|
||||||
|
// RouterManager.router.navigateTo(context, url, transition: getTransition());
|
||||||
}),
|
}),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
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: 12.sp,
|
size: 10.sp,
|
||||||
decoration: TextDecoration.underline,
|
decoration: TextDecoration.underline,
|
||||||
color: Theme.of(context).primaryColor.withOpacity(0.8),
|
color: Theme.of(context).primaryColor.withOpacity(0.8),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
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(logic, sateData)),
|
Expanded(flex: 2, child: $QuestionNumberView(sateData)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
|
|
@ -209,10 +209,7 @@ Widget $totalSubmitCountView(BuildContext context, HomeworkReviewState sateData)
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
quickText('已阅', color: const Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
|
||||||
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),
|
||||||
|
|
@ -225,7 +222,7 @@ Widget $totalSubmitCountView(BuildContext context, HomeworkReviewState sateData)
|
||||||
|
|
||||||
// 试题题号视图
|
// 试题题号视图
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $questionNumberView(BuildContext context, HomeworkReviewLogic logic, HomeworkReviewState sateData) {
|
Widget $questionNumberView(BuildContext context, HomeworkReviewState sateData) {
|
||||||
final scrollControllerNum = useScrollController(); // 试题题号区域
|
final scrollControllerNum = useScrollController(); // 试题题号区域
|
||||||
|
|
||||||
useEffect(() {
|
useEffect(() {
|
||||||
|
|
@ -274,12 +271,7 @@ Widget $questionNumberView(BuildContext context, HomeworkReviewLogic logic, Home
|
||||||
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
|
children: studentQuestions?.asMap().keys.map((e) => $ScoringQuestionsView(studentQuestions[e], imageVal.scaleRatio)).toList() ?? [],
|
||||||
?.asMap()
|
|
||||||
.keys
|
|
||||||
.map((e) => $ScoringQuestionsView(logic, studentQuestions[e], imageVal.scaleRatio, studentQuestions))
|
|
||||||
.toList() ??
|
|
||||||
[],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|
@ -289,19 +281,11 @@ Widget $questionNumberView(BuildContext context, HomeworkReviewLogic logic, Home
|
||||||
|
|
||||||
// 单道题得分框
|
// 单道题得分框
|
||||||
@hwidget
|
@hwidget
|
||||||
Widget $scoringQuestionsView(
|
Widget $scoringQuestionsView(BuildContext context, StudentQuestions item, double scaleRatio) {
|
||||||
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, (_, __) {
|
||||||
|
|
@ -311,7 +295,6 @@ Widget $scoringQuestionsView(
|
||||||
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,6 +2,7 @@ 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';
|
||||||
|
|
@ -23,7 +24,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return OrientationBuilder(builder: (BuildContext context, Orientation orientation) {
|
return OrientationBuilder(
|
||||||
|
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(
|
||||||
|
|
@ -54,8 +56,10 @@ 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,
|
Get.toNamed(Routes.studentWorkDetailPage, arguments: {
|
||||||
arguments: {'studentId': state.studentInfo.value.studentId, 'studentName': state.studentInfo.value.studentName});
|
'studentId': state.studentInfo.value.studentId,
|
||||||
|
'studentName': state.studentInfo.value.studentName
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
|
|
@ -67,7 +71,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'历史作业',
|
'历史作业',
|
||||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFF2080F7)),
|
style: TextStyle(
|
||||||
|
fontSize: 10.r, color: const Color(0xFF2080F7)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -76,8 +81,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () =>
|
onTap: () => showAnswerHandwriting(context,
|
||||||
showAnswerHandwriting(context, homeworkId: state.homeworkId, studentId: state.studentId).then((e) => ToastUtils.dismiss()),
|
homeworkId: state.homeworkId,
|
||||||
|
studentId: state.studentId)
|
||||||
|
.then((e) => ToastUtils.dismiss()),
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 93.r,
|
width: 93.r,
|
||||||
height: 28.r,
|
height: 28.r,
|
||||||
|
|
@ -88,7 +95,8 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
'原稿笔迹',
|
'原稿笔迹',
|
||||||
style: TextStyle(fontSize: 10.r, color: const Color(0xFF4CC793)),
|
style: TextStyle(
|
||||||
|
fontSize: 10.r, color: const Color(0xFF4CC793)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -112,7 +120,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'客观题',
|
'客观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
color: const Color(0xFF5C5C5C),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -120,7 +131,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return Text(
|
return Text(
|
||||||
'${state.studentInfo.value.kgtCorrectRate}%',
|
'${state.studentInfo.value.kgtCorrectRate}%',
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
color: const Color(0xFF4CC793),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
@ -130,13 +144,19 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: state.studentInfo.value.kgtList.length > 8 ? 300.r : state.studentInfo.value.kgtList.length * 40.r + 40.r,
|
height: state.studentInfo.value.kgtList.length > 8
|
||||||
|
? 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, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
|
homeworkId: state.homeworkId,
|
||||||
|
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([]);
|
||||||
|
|
@ -167,7 +187,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'主观题',
|
'主观题',
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF5C5C5C), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
color: const Color(0xFF5C5C5C),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 10.r,
|
width: 10.r,
|
||||||
|
|
@ -175,7 +198,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return Text(
|
return Text(
|
||||||
'${state.studentInfo.value.zgtCorrectRate}%',
|
'${state.studentInfo.value.zgtCorrectRate}%',
|
||||||
style: TextStyle(fontSize: 14.sp, color: const Color(0xFF4CC793), fontWeight: FontWeight.w600),
|
style: TextStyle(
|
||||||
|
fontSize: 14.sp,
|
||||||
|
color: const Color(0xFF4CC793),
|
||||||
|
fontWeight: FontWeight.w600),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
@ -185,7 +211,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
),
|
),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: state.studentInfo.value.zgtList.length > 8 ? 300.r : state.studentInfo.value.zgtList.length * 40.r + 40.r,
|
height: state.studentInfo.value.zgtList.length > 8
|
||||||
|
? 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,
|
||||||
|
|
@ -194,7 +223,10 @@ class _StudentPersonalPageState extends State<StudentPersonalPage> {
|
||||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||||
});*/
|
});*/
|
||||||
showAnswerHandwriting(context,
|
showAnswerHandwriting(context,
|
||||||
homeworkId: state.homeworkId, studentId: state.studentId, questionNo: questionNo, templateId: templateId)
|
homeworkId: state.homeworkId,
|
||||||
|
studentId: state.studentId,
|
||||||
|
questionNo: questionNo,
|
||||||
|
templateId: templateId)
|
||||||
.then((e) => ToastUtils.dismiss());
|
.then((e) => ToastUtils.dismiss());
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
import 'package:dio/dio.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
@ -23,8 +22,8 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
state.userNameController = TextEditingController()..addListener(userNameListener);
|
state.userNameController = TextEditingController(text: 'longyunfei')..addListener(userNameListener);
|
||||||
state.passwordController = TextEditingController();
|
state.passwordController = TextEditingController(text: '123@abc');
|
||||||
state.pwdFocus = FocusNode();
|
state.pwdFocus = FocusNode();
|
||||||
state.theFocus = FocusNode();
|
state.theFocus = FocusNode();
|
||||||
}
|
}
|
||||||
|
|
@ -115,12 +114,6 @@ class LoginLogic extends GetxController with RequestToolMixin {
|
||||||
StorageService.to.erase();
|
StorageService.to.erase();
|
||||||
if (e is Exception) {
|
if (e is Exception) {
|
||||||
try {
|
try {
|
||||||
if (e is DioException && e.response?.data != null) {
|
|
||||||
Map? msg = e.response?.data['error'];
|
|
||||||
if (msg != null && msg["message"] != null) {
|
|
||||||
return toMsg(msg["message"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
toMsg(e.toString().split(":")[1]);
|
toMsg(e.toString().split(":")[1]);
|
||||||
return;
|
return;
|
||||||
// ignore: empty_catches
|
// ignore: empty_catches
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue