Compare commits
No commits in common. "afeb05272ebe30962d9caec6960ca312a6761c27" and "83e328ceb80638e65c33531276918f6172086de9" have entirely different histories.
afeb05272e
...
83e328ceb8
|
|
@ -225,8 +225,3 @@ marking_app/lib/pages/homework_correction/job_home.g.dart
|
|||
marking_app/lib/common/model/marking/keyboard_assist_event.g.dart
|
||||
marking_app/lib/common/model/marking/marking_history_zoom_info.g.dart
|
||||
marking_app/lib/common/model/job/job_handwriting.g.dart
|
||||
marking_app/lib/utils/my_time_util.g.dart
|
||||
marking_app/lib/pages/homework_correction/widget/answer_handwriting.g.dart
|
||||
marking_app/lib/pages/report_detail/report_history.g.dart
|
||||
marking_app/lib/common/model/report/report_student_history_record.g.dart
|
||||
marking_app/lib/common/model/report/report_student_info.g.dart
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 303 B |
|
|
@ -352,7 +352,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
CURRENT_PROJECT_VERSION = 21;
|
||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -360,7 +360,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.105;
|
||||
MARKETING_VERSION = 1.0.104;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
|
@ -490,7 +490,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
CURRENT_PROJECT_VERSION = 21;
|
||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -498,7 +498,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.105;
|
||||
MARKETING_VERSION = 1.0.104;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
|
@ -520,7 +520,7 @@
|
|||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
|
||||
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 22;
|
||||
CURRENT_PROJECT_VERSION = 21;
|
||||
DEVELOPMENT_TEAM = CYDU583KN6;
|
||||
ENABLE_BITCODE = NO;
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
|
|
@ -528,7 +528,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0.105;
|
||||
MARKETING_VERSION = 1.0.104;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
|
|
|
|||
|
|
@ -33,12 +33,6 @@ mixin CommonMixin {
|
|||
return RestClientReport(dio, baseUrl: RequestConfig().baseUrlOfReport);
|
||||
}
|
||||
|
||||
// 获取 CLIENT
|
||||
Future<RestClient> getClientLogin() async {
|
||||
Dio dio = await getDio();
|
||||
return RestClient(dio, baseUrl: RequestConfig().loginBaseUrl);
|
||||
}
|
||||
|
||||
void setTimeOut(int seconds, call) => Future.delayed(Duration(seconds: seconds), call);
|
||||
|
||||
// 执行 context
|
||||
|
|
|
|||
|
|
@ -14,30 +14,11 @@ class GestureRecording {
|
|||
|
||||
bool scopeBox;
|
||||
|
||||
int intervalTime; // 间隔时间
|
||||
|
||||
GestureRecording({
|
||||
required this.eraser,
|
||||
required this.annotationSwitch,
|
||||
this.data,
|
||||
this.usageTime,
|
||||
this.scopeBox = false,
|
||||
this.intervalTime = 0,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 手势记录(原稿笔记还原)
|
||||
*/
|
||||
class GestureHandwritingRecording {
|
||||
int stroke;
|
||||
int usageTime; // 用时
|
||||
Offset data;
|
||||
int intervalTime; // 间隔时间
|
||||
GestureHandwritingRecording({
|
||||
required this.stroke,
|
||||
required this.data,
|
||||
required this.usageTime,
|
||||
required this.intervalTime,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,12 @@ class JobHandwriting extends Object {
|
|||
@JsonKey(name: 'pageCount')
|
||||
int pageCount;
|
||||
|
||||
JobHandwriting(this.lattices, this.paperPicture, this.pageNum, this.pageCount);
|
||||
JobHandwriting(
|
||||
this.lattices,
|
||||
this.paperPicture,
|
||||
this.pageNum,
|
||||
this.pageCount,
|
||||
);
|
||||
|
||||
factory JobHandwriting.fromJson(Map<String, dynamic> srcJson) => _$JobHandwritingFromJson(srcJson);
|
||||
|
||||
|
|
@ -29,18 +34,20 @@ class Lattices extends Object {
|
|||
int stroke;
|
||||
|
||||
@JsonKey(name: 'x')
|
||||
double x;
|
||||
int x;
|
||||
|
||||
@JsonKey(name: 'y')
|
||||
double y;
|
||||
int y;
|
||||
|
||||
@JsonKey(name: 'time')
|
||||
int time;
|
||||
|
||||
@JsonKey(name: 'intervalTime')
|
||||
int intervalTime;
|
||||
|
||||
Lattices(this.stroke, this.x, this.y, this.time, [this.intervalTime = 0]);
|
||||
Lattices(
|
||||
this.stroke,
|
||||
this.x,
|
||||
this.y,
|
||||
this.time,
|
||||
);
|
||||
|
||||
factory Lattices.fromJson(Map<String, dynamic> srcJson) => _$LatticesFromJson(srcJson);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,12 @@ class TestQuestionsImageInfo extends Object {
|
|||
double? imageHeightOffsetend;
|
||||
|
||||
TestQuestionsImageInfo(
|
||||
{required this.width, required this.height, required this.url, required this.boxWidth, required this.boxHeight, this.pixelRatio = 1}) {
|
||||
{required this.width,
|
||||
required this.height,
|
||||
required this.url,
|
||||
required this.boxWidth,
|
||||
required this.boxHeight,
|
||||
this.pixelRatio = 1}) {
|
||||
// print('图片宽度:$width');
|
||||
// print('图片高度:$height');
|
||||
|
||||
|
|
@ -55,14 +60,6 @@ class TestQuestionsImageInfo extends Object {
|
|||
}
|
||||
}
|
||||
|
||||
// 重新计算
|
||||
void calculateStartAndEndHeight([double otherHeight = 0]) {
|
||||
if (scaleHeight != null) {
|
||||
imageHeightOffsetStart = (boxHeight - (scaleHeight! + otherHeight)) / 2;
|
||||
imageHeightOffsetend = imageHeightOffsetStart! + scaleHeight!;
|
||||
}
|
||||
}
|
||||
|
||||
factory TestQuestionsImageInfo.fromJson(Map<String, dynamic> srcJson) => _$TestQuestionsImageInfoFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TestQuestionsImageInfoToJson(this);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ void main() {
|
|||
WidgetsFlutterBinding.ensureInitialized();
|
||||
RouterManager.initRouter();
|
||||
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual,
|
||||
overlays: [SystemUiOverlay.top, SystemUiOverlay.bottom]); // 屏幕刘海
|
||||
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); // 屏幕强制竖屏
|
||||
// OrientationHelper.setEnabledSystemUIOverlays(SystemUiOverlay.values);
|
||||
|
||||
|
|
@ -80,7 +81,7 @@ class _MyAppState extends State<MyApp> {
|
|||
splitScreenMode: true,
|
||||
builder: (context1, child) {
|
||||
return MaterialApp(
|
||||
title: '学而有道阅卷',
|
||||
title: '远轩阅卷系统',
|
||||
navigatorKey: TheGlobal.navigatorKey,
|
||||
debugShowCheckedModeBanner: false,
|
||||
// locale: const Locale('zh', 'CN'), // 中文简体 ,
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory>
|
|||
});
|
||||
getStudentGroups();
|
||||
getWorkList();
|
||||
print(userInfo);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -106,6 +107,7 @@ class _AnswerTrajectoryState extends State<AnswerTrajectory>
|
|||
}
|
||||
jobList = arr;
|
||||
setState(() {});
|
||||
print('total=${res.data!.total}');
|
||||
refreshController2.finishRefresh();
|
||||
EasyLoading.dismiss();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -185,14 +185,8 @@ class _AnswerTrajectoryJobDetailState extends State<AnswerTrajectoryJobDetail>
|
|||
var item = students[index];
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.quickCheckPersonalPath +
|
||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
RouterManager.router.navigateTo(context,
|
||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
|
|
@ -234,14 +228,8 @@ class _AnswerTrajectoryJobDetailState extends State<AnswerTrajectoryJobDetail>
|
|||
var item = students[index];
|
||||
return InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.quickCheckPersonalPath +
|
||||
'?jobId=${widget.jobId}&studentId=${item.studentId}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
// RouterManager.router.navigateTo(context,
|
||||
// '${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
RouterManager.router.navigateTo(context,
|
||||
'${RouterManager.jobPersonalDetailPath}?studentId=${item.studentId}&studentName=${Uri.encodeComponent(item.studentName)}');
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
|
||||
class ImageDialog{
|
||||
static void showImgDialog(BuildContext context,String imgUrl) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 10.r,horizontal: 45.r),
|
||||
backgroundColor: Colors.transparent,
|
||||
contentPadding: EdgeInsets.all(0),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(15.r))),
|
||||
content: Container(
|
||||
width: MediaQuery.of(context).size.width - 48.r,
|
||||
// height: MediaQuery.of(context).size.height * 0.4,
|
||||
color: Colors.white,
|
||||
// child: PhotoView(imageProvider: NetworkImage(imgUrl),backgroundDecoration: BoxDecoration(color: Colors.transparent),)),
|
||||
child: Image.network(imgUrl)),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,12 @@ class TrajectoryView extends StatefulHookConsumerWidget {
|
|||
final double boxHeight;
|
||||
final String questionNumber;
|
||||
final JobNoteTakingTrajectory trajectory;
|
||||
const TrajectoryView({required this.trajectory, required this.questionNumber, required this.boxHeight, required this.boxWidth, super.key});
|
||||
const TrajectoryView(
|
||||
{required this.trajectory,
|
||||
required this.questionNumber,
|
||||
required this.boxHeight,
|
||||
required this.boxWidth,
|
||||
super.key});
|
||||
|
||||
@override
|
||||
TrajectoryViewState createState() => TrajectoryViewState();
|
||||
|
|
@ -147,11 +152,15 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
|
||||
/// 试题范围框左上角
|
||||
trajectorys
|
||||
..add(GestureRecording(data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
||||
..add(GestureRecording(
|
||||
data: Offset(2.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
||||
|
||||
/// 右上角
|
||||
..add(GestureRecording(
|
||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop), scopeBox: true, annotationSwitch: false, eraser: false))
|
||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop),
|
||||
scopeBox: true,
|
||||
annotationSwitch: false,
|
||||
eraser: false))
|
||||
|
||||
/// 左下角
|
||||
..add(GestureRecording(
|
||||
|
|
@ -162,7 +171,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
|
||||
/// 右下角
|
||||
..add(GestureRecording(
|
||||
data: Offset(imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
||||
data: Offset(
|
||||
imagInfoModel!.scaleWidth! - 4.w, trajectory.pictureQuestionTop + trajectory.pictureQuestionHeight),
|
||||
scopeBox: true,
|
||||
annotationSwitch: false,
|
||||
eraser: false));
|
||||
|
|
@ -171,26 +181,14 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
ref.read(jobDrawingTrajectoryProvider.notifier).setVal(trajectorys);
|
||||
});
|
||||
if (lattices.isNotEmpty) {
|
||||
// Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
||||
// key: (key) => key.stroke,
|
||||
// value: (value) {
|
||||
// return lattices.where((item) => item.stroke == value.stroke).toList()
|
||||
// ..sort((a, b) => a.time.compareTo(b.time));
|
||||
// });
|
||||
|
||||
var map = Map<int, List<Lattices>>();
|
||||
for (var i = 0; i < lattices.length; i++) {
|
||||
Lattices item = lattices[i];
|
||||
if (!map.containsKey(item.stroke)) map[item.stroke] = [];
|
||||
map[item.stroke]!.add(item); // 添加笔画数据
|
||||
}
|
||||
Map<int, List<Lattices>> map = new Map.fromIterable(lattices,
|
||||
key: (key) => key.stroke,
|
||||
value: (value) {
|
||||
return lattices.where((item) => item.stroke == value.stroke).toList()
|
||||
..sort((a, b) => a.time.compareTo(b.time));
|
||||
});
|
||||
|
||||
List<int> keys = map.keys.toList();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
int theKey = keys[i];
|
||||
map[theKey]!.sort((a, b) => a.time.compareTo(b.time));
|
||||
}
|
||||
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
int theKey = keys[i];
|
||||
int? nextKey = i + 1 < keys.length ? keys[i + 1] : null;
|
||||
|
|
@ -201,7 +199,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
double theX = e.x * imagInfoModel!.scale!;
|
||||
double theY = e.y * imagInfoModel!.scale! + spacingHeight;
|
||||
|
||||
return GestureRecording(eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
|
||||
return GestureRecording(
|
||||
eraser: false, data: Offset(theX, theY), usageTime: e.time.toInt(), annotationSwitch: false);
|
||||
}).toList()
|
||||
..add(GestureRecording(eraser: false, annotationSwitch: false));
|
||||
// 原始轨迹展示
|
||||
|
|
@ -231,7 +230,8 @@ class TrajectoryViewState extends ConsumerState<TrajectoryView> {
|
|||
if (duration2 == null && nextStrokesData != null) {
|
||||
// 此时最后一个笔画完成了 停止时间是在下一个笔画开始时间之差
|
||||
Lattices minLattices = nextStrokesData.reduce((e1, e2) => e1.time < e2.time ? e1 : e2);
|
||||
differenceInMilliseconds = (Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
|
||||
differenceInMilliseconds =
|
||||
(Duration(milliseconds: minLattices.time.toInt()) - duration1).inMilliseconds;
|
||||
await Future.delayed(Duration(milliseconds: differenceInMilliseconds)); // 一个笔画完成进行下一个笔画的等待时间
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -290,11 +290,7 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
|||
var _currentTab = _useSwitchStudentAndType.currentTab.value;
|
||||
var _pageIndex = _currentTab?.pageIndex;
|
||||
if (_currentTab == null || _pageIndex == null) return;
|
||||
|
||||
var theLastQuestion = _currentTab.finishCount + 1 == _currentTab.total; // 当前提交的题是最后一题
|
||||
_useSwitchStudentAndType
|
||||
.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: theLastQuestion)
|
||||
.then((value) {
|
||||
_useSwitchStudentAndType.refreshQuestionTypeData(context, taskId: taskId, exitCallback: exitCallback, getNewData: false).then((value) {
|
||||
var params = MarkingTextQuestionJobTabParamsBus(taskId, _pageIndex);
|
||||
if (_currentTab.finishCount < _currentTab.total) {
|
||||
if (_currentTab.finishCount + 1 == _currentTab.total) {
|
||||
|
|
@ -370,55 +366,37 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
|||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 4,
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: DropdownButton(
|
||||
onTap: () {
|
||||
// 打开的时候请求刷新学生
|
||||
_useSwitchStudentAndType.getDataForStudents(taskId: taskId);
|
||||
},
|
||||
padding: EdgeInsets.only(right: 4.w),
|
||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
||||
value: _useSwitchStudentAndType.currentStudent.value?.studentId,
|
||||
underline: Container(),
|
||||
isExpanded: true,
|
||||
items: _useSwitchStudentAndType.studentData.value.map((e) {
|
||||
return DropdownMenuItem(
|
||||
child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp),
|
||||
value: e.studentId,
|
||||
);
|
||||
}).toList(),
|
||||
hint: Text('请选择学生'), // 锚点的显示文本
|
||||
onChanged: (value) {
|
||||
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
|
||||
if (currentStudent?.studentId == value) return;
|
||||
_useSwitchStudentAndType.studentBusInfo.value = null; // 置空BUS通知记录
|
||||
_useSwitchStudentAndType.currentStudent.value =
|
||||
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value);
|
||||
},
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 2.w,
|
||||
child: Stack(
|
||||
alignment: const FractionalOffset(0.52, 0.24),
|
||||
children: [
|
||||
Icon(
|
||||
const IconData(0xe63d, fontFamily: "AlibabaIcon"),
|
||||
size: 12.sp,
|
||||
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1),
|
||||
),
|
||||
quickText('优先', size: 4.sp, color: Colors.white),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(left: 10.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Color.fromRGBO(244, 244, 244, 1),
|
||||
borderRadius: BorderRadius.circular(4.r),
|
||||
),
|
||||
child: DropdownButton(
|
||||
onTap: () {
|
||||
// 打开的时候请求刷新学生
|
||||
_useSwitchStudentAndType.getDataForStudents(taskId: taskId);
|
||||
},
|
||||
padding: EdgeInsets.only(right: 4.w),
|
||||
icon: Icon(Icons.keyboard_arrow_down_rounded),
|
||||
value: _useSwitchStudentAndType.currentStudent.value?.studentId,
|
||||
underline: Container(),
|
||||
isExpanded: true,
|
||||
items: _useSwitchStudentAndType.studentData.value.map((e) {
|
||||
return DropdownMenuItem(
|
||||
child: quickText(e.studentName, color: Color.fromRGBO(79, 79, 79, 1), size: 14.sp),
|
||||
value: e.studentId,
|
||||
);
|
||||
}).toList(),
|
||||
hint: Text('请选择学生'), // 锚点的显示文本
|
||||
onChanged: (value) {
|
||||
JobConcernedWithStudent? currentStudent = _useSwitchStudentAndType.currentStudent.value;
|
||||
if (currentStudent?.studentId == value) return;
|
||||
_useSwitchStudentAndType.studentBusInfo.value = null; // 置空BUS通知记录
|
||||
_useSwitchStudentAndType.currentStudent.value =
|
||||
_useSwitchStudentAndType.studentData.value.firstWhereOrNull((element) => element.studentId == value);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
|
|
@ -480,6 +458,17 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context, {required Func
|
|||
),
|
||||
),
|
||||
),
|
||||
Stack(
|
||||
alignment: const FractionalOffset(0.52, 0.24),
|
||||
children: [
|
||||
Icon(
|
||||
const IconData(0xe63d, fontFamily: "AlibabaIcon"),
|
||||
size: 12.sp,
|
||||
color: _useSwitchStudentAndType.isFirst.value ? Color.fromRGBO(76, 199, 147, 1) : Color.fromRGBO(164, 164, 164, 1),
|
||||
),
|
||||
quickText('优先', size: 4.sp, color: Colors.white),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
@ -863,15 +852,16 @@ Widget $examPaperAndScoringKeyboardView(
|
|||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||
child: quickText(
|
||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
||||
size: 8.sp,
|
||||
color: Colors.white,
|
||||
align: TextAlign.end,
|
||||
),
|
||||
)
|
||||
if (question.accuracy > 0)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(bottom: 1.5.h),
|
||||
child: quickText(
|
||||
'正确率:${getDoubleRemoveZero(question.accuracy, question.accuracy.toString())}%',
|
||||
size: 8.sp,
|
||||
color: Colors.white,
|
||||
align: TextAlign.end,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ class UseSwitchStudentAndType with CommonMixin, EventBusMixin {
|
|||
return tabJob;
|
||||
}
|
||||
}
|
||||
// ToastUtils.showSuccess('最后一题提交成功');
|
||||
ToastUtils.showSuccess('最后一题提交成功');
|
||||
}
|
||||
return tabJob;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -261,10 +261,19 @@ class _HomeworkCorrectionState extends ConsumerState<HomeworkCorrection>
|
|||
),
|
||||
),
|
||||
),
|
||||
Expanded(flex: 1, child: SizedBox()),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(context, RouterManager.jobStudentGroupPath, transition: getTransition());
|
||||
},
|
||||
child: Icon(IconData(0xe63e, fontFamily: "AlibabaIcon"), color: Color.fromRGBO(44, 48, 63, 1), size: 24.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
if (_tabIndex == 1)
|
||||
$CompletedJobConditionFilter(
|
||||
controller: _tabController2,
|
||||
|
|
|
|||
|
|
@ -76,17 +76,14 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
child: ListView(
|
||||
children: [
|
||||
Container(
|
||||
constraints: BoxConstraints(
|
||||
minHeight: 200.h,
|
||||
maxWidth: double.infinity,
|
||||
height: 200.h,
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/job_home_top_bgm.png'),
|
||||
fit: BoxFit.fill, // 完全填充
|
||||
),
|
||||
),
|
||||
// decoration: BoxDecoration(
|
||||
// image: DecorationImage(
|
||||
// image: AssetImage('assets/images/job_home_top_bgm.png'),
|
||||
// fit: BoxFit.fitWidth, // 完全填充
|
||||
// ),
|
||||
// ),
|
||||
child: Image.asset('assets/images/job_home_top_bgm.png', fit: BoxFit.fitWidth),
|
||||
),
|
||||
SizedBox(height: 30.h),
|
||||
SlidingData([
|
||||
|
|
@ -107,8 +104,8 @@ class _JobHomeState extends State<JobHome> with CommonMixin, EventBusMixin, Auto
|
|||
navigationUrl: '${RouterManager.jobStudentGroupPath}?page=set',
|
||||
)
|
||||
], 0),
|
||||
// spaceWidth,
|
||||
// $TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], 0),
|
||||
spaceWidth,
|
||||
$TermRow([EntranceModel(title: '批阅设置', image: 'assets/images/job_home_marking_set.png', navigationUrl: '')], 0),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ class _JobKnowledgePointsState extends State<JobKnowledgePoints> with CommonMixi
|
|||
}
|
||||
|
||||
void getList() async {
|
||||
/* print('startDataTime=$startDataTime');
|
||||
print('endDataTime=$endDataTime');*/
|
||||
print('startDataTime=$startDataTime');
|
||||
print('endDataTime=$endDataTime');
|
||||
RestClient _client = await getClient();
|
||||
BaseStructureResult<List<KnowledgePoints>> res =
|
||||
await _client.getKnowledgeReport(startDataTime,endDataTime,textController.text);
|
||||
|
|
@ -265,7 +265,7 @@ class _JobKnowledgePointsState extends State<JobKnowledgePoints> with CommonMixi
|
|||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'${item.count}次',
|
||||
'2次',
|
||||
style: TextStyle(fontSize: 10.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
Image.asset('assets/images/right_icon_blue.png',width: 8.r,height: 8.r,),
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
|||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'第${item.questionNo}题',
|
||||
'${item.questionNo}题',
|
||||
style: TextStyle(
|
||||
fontSize: 10.sp,
|
||||
color: Color(0xFF8B8B8B)),
|
||||
|
|
@ -307,15 +307,10 @@ class _JobKnowledgePointsDetailState extends State<JobKnowledgePointsDetail>
|
|||
borderRadius:
|
||||
BorderRadius.circular(20.r),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
quickText('正确率',
|
||||
child: Center(
|
||||
child: quickText('正确率 >',
|
||||
color: Color(0xFF4CC793),
|
||||
size: 10.sp),
|
||||
Image.asset('assets/images/icon_back_green.png',width: 8.r,height: 8.r,)
|
||||
],
|
||||
)),
|
||||
size: 10.sp))),
|
||||
),
|
||||
Expanded(
|
||||
flex: 1,
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import 'package:marking_app/common/model/job/job_report_join_class.dart';
|
|||
import 'package:marking_app/common/model/job/job_report_knowledge_model.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||
import 'package:marking_app/components/ReturnToHomepage.dart';
|
||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/report_table.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/top_count.dart';
|
||||
import 'package:marking_app/pages/mainPage.dart';
|
||||
|
|
@ -1446,7 +1445,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
|||
// return;
|
||||
// }
|
||||
if (_qpm.questionPicture == null) return ToastUtils.showInfo('当前试题没有原题');
|
||||
/* Navigator.push(
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
|
|
@ -1454,8 +1453,7 @@ Widget $unitTimeAnsweringSituation(BuildContext context, int jobid, List<Questio
|
|||
body: PhotoView(imageProvider: NetworkImage(_qpm.questionPicture!)),
|
||||
);
|
||||
}),
|
||||
);*/
|
||||
ImageDialog.showImgDialog(context,_qpm.questionPicture!);
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
/// 原稿作业回显
|
||||
// 回显批注轨迹
|
||||
|
||||
import 'package:marking_app/common/model/job/gesture_recording.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
|
||||
final jobHandwritingDrawingTrajectoryProvider =
|
||||
StateNotifierProvider<JobHandwritingDrawingTrajectoryProviderHandle, List<GestureHandwritingRecording>>(
|
||||
(ref) => JobHandwritingDrawingTrajectoryProviderHandle([]));
|
||||
|
||||
class JobHandwritingDrawingTrajectoryProviderHandle extends StateNotifier<List<GestureHandwritingRecording>> with CommonMixin {
|
||||
JobHandwritingDrawingTrajectoryProviderHandle(List<GestureHandwritingRecording> progress) : super(progress);
|
||||
|
||||
setVal(List<GestureHandwritingRecording> val) {
|
||||
state = val;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
|
|
@ -9,23 +8,23 @@ import 'package:marking_app/components/ReturnToHomepage.dart';
|
|||
import 'package:marking_app/pages/homework_correction/widget/student_kg_table.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/student_zg_table.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/common_utils.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:marking_app/utils/toast_utils.dart';
|
||||
|
||||
import 'providers/handwriting_drawing_trajectory_provider.dart';
|
||||
import 'widget/answer_handwriting.dart';
|
||||
|
||||
class QuickCheckPersonal extends StatefulHookConsumerWidget {
|
||||
class QuickCheckPersonal extends StatefulWidget {
|
||||
final int jobId;
|
||||
final int studentId;
|
||||
|
||||
const QuickCheckPersonal({Key? key, required this.jobId, required this.studentId}) : super(key: key);
|
||||
|
||||
@override
|
||||
ConsumerState<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||
State<QuickCheckPersonal> createState() => _QuickCheckPersonalState();
|
||||
}
|
||||
|
||||
class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with CommonMixin {
|
||||
class _QuickCheckPersonalState extends State<QuickCheckPersonal> with CommonMixin {
|
||||
StudentDetails? studentInfo;
|
||||
|
||||
void initState() {
|
||||
|
|
@ -110,7 +109,7 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
|||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'历史作业',
|
||||
'历史查询',
|
||||
style: TextStyle(fontSize: 10.r, color: Color(0xFF2080F7)),
|
||||
),
|
||||
),
|
||||
|
|
@ -121,9 +120,7 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
|||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId).then((value) {
|
||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||
});
|
||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId);
|
||||
},
|
||||
child: Container(
|
||||
width: 93.r,
|
||||
|
|
@ -178,11 +175,6 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
|||
child: StudentKgTable(
|
||||
headList: ['题号', '学生答案', '标准答案'],
|
||||
bodyList: studentInfo!.kgDetails,
|
||||
questionNumCall: (no) {
|
||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
@ -226,11 +218,6 @@ class _QuickCheckPersonalState extends ConsumerState<QuickCheckPersonal> with Co
|
|||
child: StudentZgTable(
|
||||
headList: ['题号', '用时', '学生答案', '批注结果', '批注'],
|
||||
bodyList: studentInfo!.zgDetails,
|
||||
questionNumCall: (no) {
|
||||
showAnswerHandwriting(context, jobId: widget.jobId, studentId: widget.studentId, questionNo: int.parse(no)).then((value) {
|
||||
ref.read(jobHandwritingDrawingTrajectoryProvider.notifier).setVal([]);
|
||||
});
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -23,7 +23,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
|
|||
crossAxisCount: 2, //横轴三个子widget
|
||||
mainAxisSpacing: 10.h,
|
||||
crossAxisSpacing: 6.w,
|
||||
childAspectRatio: 2.4 //宽高比为1时,子widget
|
||||
childAspectRatio: 2.5 //宽高比为1时,子widget
|
||||
),
|
||||
children: List.generate(jobList.length, (index) {
|
||||
JobTaskItem item = jobList[index];
|
||||
|
|
@ -49,7 +49,6 @@ class AnswerTrajectoryJob extends StatelessWidget {
|
|||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 顶部任务名称
|
||||
Padding(
|
||||
|
|
@ -104,10 +103,7 @@ class AnswerTrajectoryJob extends StatelessWidget {
|
|||
],
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 6.r),
|
||||
child: Text('时间:${item.createTime.substring(0,10)}',style: TextStyle(fontSize: 10.sp),),
|
||||
),
|
||||
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(vertical: 6.h),
|
||||
decoration: BoxDecoration(
|
||||
|
|
@ -174,7 +170,6 @@ Padding(
|
|||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 顶部任务名称
|
||||
Padding(
|
||||
|
|
@ -230,13 +225,6 @@ Padding(
|
|||
],
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 5.r,
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 14.r),
|
||||
child: Text('时间:${item.createTime.substring(0,10)}',style: TextStyle(fontSize: 10.sp),),
|
||||
),
|
||||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import 'package:flutter/material.dart';
|
|||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||
import 'package:marking_app/common/model/job/job_report_model.dart';
|
||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
|
|
@ -360,7 +359,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
onTap: () {
|
||||
if (item.questionPicture == null)
|
||||
return ToastUtils.showInfo('当前试题没有原题');
|
||||
/* Navigator.push(
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
|
|
@ -370,8 +369,7 @@ class _ReportTableState extends State<ReportTable> {
|
|||
NetworkImage(item.questionPicture!)),
|
||||
);
|
||||
}),
|
||||
);*/
|
||||
ImageDialog.showImgDialog(context,item.questionPicture!);
|
||||
);
|
||||
},
|
||||
child: Text('原题',
|
||||
style: TextStyle(
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ class StudentKgTable extends StatefulWidget {
|
|||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final Function(String)? questionNumCall;
|
||||
|
||||
const StudentKgTable({
|
||||
Key? key,
|
||||
|
|
@ -16,7 +15,6 @@ class StudentKgTable extends StatefulWidget {
|
|||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
this.questionNumCall,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -31,51 +29,34 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
String sortString(String str) {
|
||||
return String.fromCharCodes(str.codeUnits.toList()..sort());
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
cells: [
|
||||
DataCell(
|
||||
InkWell(
|
||||
onTap: () {
|
||||
if (widget.questionNumCall != null) {
|
||||
widget.questionNumCall!(item.questionNo);
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(
|
||||
item.studentAnswer == null ? '未作答' : item.studentAnswer!,
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: item.studentAnswer == null
|
||||
? Color(0xFF525252)
|
||||
: item.state == 2
|
||||
? Color(0xFF4CC793)
|
||||
: item.state == 1
|
||||
? Color(0xFFFF7474)
|
||||
: item.state == 0
|
||||
? Color(0xFFD3D3D3)
|
||||
: Colors.white),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.studentAnswer == null?'未作答':item.studentAnswer!,
|
||||
style: TextStyle(fontSize: 12.sp, color: item.studentAnswer == null?Color(0xFF525252):
|
||||
item.state == 2?Color(0xFF4CC793):
|
||||
item.state == 1?Color(0xFFFF7474):item.state == 0?Color(0xFFD3D3D3):Colors.white),
|
||||
),
|
||||
))),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionAnswer == null ? '无' : item.questionAnswer!, style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
child: Text(item.questionAnswer == null ?'无':item.questionAnswer!,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
],
|
||||
|
|
@ -93,10 +74,14 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
dataRowHeight: 40.r,
|
||||
headingRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
|
|
@ -110,12 +95,14 @@ class _StudentKgTableState extends State<StudentKgTable> {
|
|||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 3,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/3,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import 'package:data_table_2/data_table_2.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/model/job/job_data_report.dart';
|
||||
import 'package:marking_app/pages/homework_correction/components/imgDialog.dart';
|
||||
import 'package:marking_app/pages/homework_correction/widget/answer_handwriting.dart';
|
||||
import 'package:marking_app/utils/common_utils.dart';
|
||||
import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
|
|
@ -13,7 +11,6 @@ class StudentZgTable extends StatefulWidget {
|
|||
final List bodyList;
|
||||
final int? fixedRows;
|
||||
final int? fixedCols;
|
||||
final Function(String)? questionNumCall;
|
||||
|
||||
const StudentZgTable({
|
||||
Key? key,
|
||||
|
|
@ -21,7 +18,6 @@ class StudentZgTable extends StatefulWidget {
|
|||
required this.bodyList,
|
||||
this.fixedCols = 0,
|
||||
this.fixedRows = 0,
|
||||
this.questionNumCall,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -33,22 +29,22 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
int? _sortColumnIndex;
|
||||
bool _sortAscending = true;
|
||||
|
||||
/*void showImgDialog(BuildContext context,String imgUrl){
|
||||
void showImgDialog(BuildContext context,String imgUrl){
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (_) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(),
|
||||
body: SizedBox(
|
||||
*/ /* width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,*/ /*
|
||||
/* width: MediaQuery.of(context).size.width * 0.6,
|
||||
height: MediaQuery.of(context).size.height * 0.6,*/
|
||||
child: PhotoView(
|
||||
imageProvider:
|
||||
NetworkImage(imgUrl)),
|
||||
),
|
||||
);
|
||||
}),
|
||||
);*/
|
||||
);
|
||||
/* showDialog(context: context, builder: (BuildContext context){
|
||||
return AlertDialog(
|
||||
// insetPadding: EdgeInsets.symmetric(vertical: 20.r,horizontal: 20.r),
|
||||
|
|
@ -66,75 +62,64 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
),
|
||||
);
|
||||
});*/
|
||||
// }
|
||||
}
|
||||
|
||||
DataRow _getRow(int index, [Color? color]) {
|
||||
assert(index >= 0);
|
||||
KgDetails item = widget.bodyList[index];
|
||||
return DataRow2.byIndex(
|
||||
index: index,
|
||||
color: color != null ? MaterialStateProperty.all(color) : null,
|
||||
color: color != null ? MaterialStateProperty.all(color): null,
|
||||
cells: [
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(CommonUtils.second2HMS(item.useTime!),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
if (widget.questionNumCall != null) {
|
||||
widget.questionNumCall!(item.questionNo);
|
||||
}
|
||||
onTap: (){
|
||||
if(item.state != 0){
|
||||
showImgDialog(context,item.studentAnswer!);
|
||||
}
|
||||
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.questionNo, style: TextStyle(fontSize: 12.sp, color: Color(0xFF6888FD))),
|
||||
child: Text(item.state!=0 ?'查看':'--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(CommonUtils.second2HMS(item.useTime!), style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
child: item.state == 2?
|
||||
Image.asset('assets/images/job_personal_correct_icon.png',width: 18.r,height: 18.r,):item.state == 1?
|
||||
Image.asset('assets/images/job_personal_error_icon.png',width: 10.r,height: 10.r,):Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
if (item.state != 0) {
|
||||
ImageDialog.showImgDialog(context, item.studentAnswer!);
|
||||
onTap: (){
|
||||
if(item.state==1 || item.state==2){
|
||||
showImgDialog(context,item.annotateAnswers!);
|
||||
}
|
||||
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.state != 0 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
DataCell(Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: item.state == 2
|
||||
? Image.asset(
|
||||
'assets/images/job_personal_correct_icon.png',
|
||||
width: 18.r,
|
||||
height: 18.r,
|
||||
)
|
||||
: item.state == 1
|
||||
? Image.asset(
|
||||
'assets/images/job_personal_error_icon.png',
|
||||
width: 10.r,
|
||||
height: 10.r,
|
||||
)
|
||||
: Text('', style: TextStyle(fontSize: 12.sp, color: Color(0xFF525252))),
|
||||
),
|
||||
)),
|
||||
DataCell(InkWell(
|
||||
onTap: () {
|
||||
if (item.state == 1 || item.state == 2) {
|
||||
ImageDialog.showImgDialog(context, item.annotateAnswers!);
|
||||
}
|
||||
},
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 5.r),
|
||||
child: Text(item.state == 1 || item.state == 2 ? '查看' : '--', style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
child: Text(item.state==1 || item.state==2?'查看':'--',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF3661FE))),
|
||||
),
|
||||
),
|
||||
)),
|
||||
|
|
@ -153,10 +138,14 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
headingRowHeight: 40.r,
|
||||
dataRowHeight: 40.r,
|
||||
border: TableBorder(
|
||||
horizontalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) => widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
horizontalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
bottom: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid),
|
||||
verticalInside: BorderSide(
|
||||
width: 1, color: Colors.white, style: BorderStyle.solid)),
|
||||
headingRowColor: MaterialStateProperty.resolveWith((states) =>
|
||||
widget.fixedCols! > 0 ? Colors.white : Colors.transparent),
|
||||
headingRowDecoration: BoxDecoration(color: Color(0xFFE6E6E6)),
|
||||
fixedColumnsColor: Color(0xFFE6E6E6),
|
||||
fixedCornerColor: Colors.grey[400],
|
||||
|
|
@ -170,12 +159,14 @@ class _StudentZgTableState extends State<StudentZgTable> {
|
|||
var item = widget.headList[index];
|
||||
return DataColumn2(
|
||||
label: Center(
|
||||
child: Text(item, style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
child: Text(item,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF505767))),
|
||||
),
|
||||
// size: ColumnSize.S,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r) / 5,
|
||||
fixedWidth: (MediaQuery.of(context).size.width - 20.r - 28.r)/5,
|
||||
);
|
||||
}),
|
||||
rows: List<DataRow>.generate(widget.bodyList.length, (index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
rows: List<DataRow>.generate(widget.bodyList.length,
|
||||
(index) => _getRow(index, Color(0xFFF5F5F5))));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,10 +44,8 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
|
||||
//添加证书
|
||||
setHttpsPEM() async {
|
||||
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate =
|
||||
(client) {
|
||||
client.badCertificateCallback =
|
||||
(X509Certificate cert, String host, int port) {
|
||||
(dio.httpClientAdapter as DefaultHttpClientAdapter).onHttpClientCreate = (client) {
|
||||
client.badCertificateCallback = (X509Certificate cert, String host, int port) {
|
||||
return true;
|
||||
};
|
||||
};
|
||||
|
|
@ -61,11 +59,10 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
late final FocusNode _theFocus;
|
||||
|
||||
bool keepPwd = false; // 记住密码
|
||||
bool readAgreement = false; // 阅读协议
|
||||
bool readAgreement = true; // 阅读协议
|
||||
bool canLogin = true;
|
||||
bool hasNameVal = false;
|
||||
bool _isShowPwd = true;
|
||||
bool showRegister = false;
|
||||
|
||||
void _showPassword() {
|
||||
setState(() {
|
||||
|
|
@ -80,7 +77,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
// 延迟更新 Provider
|
||||
ref.read(userTokenProvider.notifier).clean(); // 进入登录页先清空信息
|
||||
});
|
||||
getShowRegister();
|
||||
|
||||
super.initState();
|
||||
dio = Dio(
|
||||
BaseOptions(
|
||||
|
|
@ -89,14 +86,12 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
receiveTimeout: 8000,
|
||||
),
|
||||
);
|
||||
dio.interceptors
|
||||
.add(LogInterceptor(responseBody: true, requestBody: true)); //添加日志
|
||||
dio.interceptors.add(LogInterceptor(responseBody: true, requestBody: true)); //添加日志
|
||||
|
||||
setHttpsPEM();
|
||||
client = RestClient(dio, baseUrl: RequestConfig().loginBaseUrl);
|
||||
|
||||
_userNameController = TextEditingController()
|
||||
..addListener(userNameListener);
|
||||
_userNameController = TextEditingController()..addListener(userNameListener);
|
||||
_passwordController = TextEditingController();
|
||||
_pwdFocus = FocusNode();
|
||||
_theFocus = FocusNode();
|
||||
|
|
@ -111,23 +106,11 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
});
|
||||
}
|
||||
|
||||
void getShowRegister() async {
|
||||
RestClient client = await getClientLogin();
|
||||
BaseStructureResult<dynamic> resultData = await client.showRegister();
|
||||
if(resultData.success){
|
||||
setState(() {
|
||||
showRegister = resultData.data;
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void userNameListener() {
|
||||
String userName = _userNameController.text;
|
||||
int useNameLength = userName.length;
|
||||
bool hasNameValNew = useNameLength > 0;
|
||||
if (hasNameValNew != hasNameVal)
|
||||
toUpState(setState, () => hasNameVal = hasNameValNew, mounted);
|
||||
if (hasNameValNew != hasNameVal) toUpState(setState, () => hasNameVal = hasNameValNew, mounted);
|
||||
const isProd = bool.fromEnvironment('dart.vm.product');
|
||||
if (!isProd && useNameLength == 11) {
|
||||
_passwordController.text = userName.substring(useNameLength - 6);
|
||||
|
|
@ -182,15 +165,12 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
child: SizedBox(
|
||||
height: 86.w,
|
||||
width: 86.w,
|
||||
child: Image.asset('assets/images/logo.png',
|
||||
fit: BoxFit.cover),
|
||||
child: Image.asset('assets/images/logo.png', fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(
|
||||
horizontal: 32.w, vertical: 24.h),
|
||||
padding: EdgeInsets.only(
|
||||
top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
|
||||
margin: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.h),
|
||||
padding: EdgeInsets.only(top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(width: 1.w, color: Colors.white),
|
||||
|
|
@ -219,18 +199,13 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入账号",
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
hintStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelText: "账号",
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
labelStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
suffixIcon: !hasNameVal
|
||||
? null
|
||||
: Transform.translate(
|
||||
offset:
|
||||
Offset(10, 10), // 根据原始组件的padding值来设置偏移量
|
||||
offset: Offset(10, 10), // 根据原始组件的padding值来设置偏移量
|
||||
child: IconButton(
|
||||
alignment: Alignment.center,
|
||||
padding: EdgeInsets.zero,
|
||||
|
|
@ -252,8 +227,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
controller: _passwordController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLines: 1,
|
||||
obscureText: _isShowPwd,
|
||||
//隐藏密码显示
|
||||
obscureText: _isShowPwd, //隐藏密码显示
|
||||
textInputAction: TextInputAction.go,
|
||||
onSubmitted: (val) => toLogin(),
|
||||
style: TextStyle(
|
||||
|
|
@ -266,19 +240,13 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
onTap: _showPassword,
|
||||
child: Icon(
|
||||
Icons.remove_red_eye,
|
||||
color: !_isShowPwd
|
||||
? Theme.of(context).primaryColor
|
||||
: Colors.grey,
|
||||
color: !_isShowPwd ? Theme.of(context).primaryColor : Colors.grey,
|
||||
),
|
||||
),
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
hintStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelText: "密码",
|
||||
isDense: true,
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
labelStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -294,10 +262,8 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
checkColor: Colors.white,
|
||||
value: keepPwd,
|
||||
onChanged: (value) {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_pwdFocus);
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_theFocus);
|
||||
FocusScope.of(context).requestFocus(_pwdFocus);
|
||||
FocusScope.of(context).requestFocus(_theFocus);
|
||||
setState(() {
|
||||
keepPwd = value ?? false;
|
||||
});
|
||||
|
|
@ -318,20 +284,6 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
if (showRegister == true)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context, RouterManager.registerPath);
|
||||
},
|
||||
child: Text(
|
||||
'注册',
|
||||
style: TextStyle(
|
||||
fontSize: 14.sp,
|
||||
color: const Color.fromRGBO(
|
||||
148, 163, 182, 1)),
|
||||
)),
|
||||
],
|
||||
),
|
||||
InkWell(
|
||||
|
|
@ -339,9 +291,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
color: canLogin
|
||||
? const Color.fromRGBO(9, 105, 246, 1)
|
||||
: Colors.grey,
|
||||
color: canLogin ? const Color.fromRGBO(9, 105, 246, 1) : Colors.grey,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(46, 91, 255, 0.5),
|
||||
|
|
@ -359,8 +309,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
height: 50.h,
|
||||
child: Text(
|
||||
'登 录',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp, color: Colors.white),
|
||||
style: TextStyle(fontSize: 16.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -374,10 +323,8 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
checkColor: Colors.white,
|
||||
value: readAgreement,
|
||||
onChanged: (value) {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_pwdFocus);
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_theFocus);
|
||||
FocusScope.of(context).requestFocus(_pwdFocus);
|
||||
FocusScope.of(context).requestFocus(_theFocus);
|
||||
setState(() {
|
||||
readAgreement = value ?? false;
|
||||
});
|
||||
|
|
@ -392,7 +339,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText('我已阅读', size: 11.sp),
|
||||
child: quickText('请仔细阅读', size: 13.sp),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
|
|
@ -402,25 +349,9 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText(
|
||||
child: const Text(
|
||||
'《用户协议》',
|
||||
size: 12.sp,
|
||||
color: Colors.deepOrangeAccent,
|
||||
),
|
||||
),
|
||||
quickText('和', size: 10.sp),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.PRIVACY_GREEMENT.name}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText(
|
||||
'《隐私协议》',
|
||||
size: 12.sp,
|
||||
color: Colors.deepOrangeAccent,
|
||||
style: TextStyle(color: Colors.deepOrangeAccent),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
|
@ -452,29 +383,21 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
String userPwd = _passwordController.text.trim();
|
||||
if (userName == '') return toMsg('请填写用户账号');
|
||||
if (userPwd == '') return toMsg('请填写密码再试');
|
||||
if (!readAgreement) return toMsg('请勾选我已阅读用户协议和隐私协议');
|
||||
if (!readAgreement) return toMsg('请阅读用户协议');
|
||||
|
||||
String userPwdMd5 = CommonUtils.generateMD5(userPwd);
|
||||
print('userPwdMd5=$userPwdMd5');
|
||||
EasyLoading.show(status: 'loading...');
|
||||
try {
|
||||
BaseStructureResult<dynamic> resultData =
|
||||
await client.toLogin(UserLoginParams(userName, userPwdMd5));
|
||||
UserLogin? userData = resultData.code == 200 && resultData.data != null
|
||||
? UserLogin.fromJson(resultData.data)
|
||||
: null;
|
||||
if (resultData.code != 200 ||
|
||||
userData?.accessToken == null ||
|
||||
userData?.accessToken == '') {
|
||||
BaseStructureResult<dynamic> resultData = await client.toLogin(UserLoginParams(userName, userPwdMd5));
|
||||
UserLogin? userData = resultData.code == 200 && resultData.data != null ? UserLogin.fromJson(resultData.data) : null;
|
||||
if (resultData.code != 200 || userData?.accessToken == null || userData?.accessToken == '') {
|
||||
return toMsg(resultData.message ?? '登录失败,请重试');
|
||||
}
|
||||
|
||||
FastData fastData = FastData.getInstance();
|
||||
fastData.setToken(userData!.accessToken);
|
||||
|
||||
BaseStructureResult<UserInfo> userRes =
|
||||
await client.getUserInfo('Bearer ${userData.accessToken}');
|
||||
|
||||
BaseStructureResult<UserInfo> userRes = await client.getUserInfo('Bearer ${userData.accessToken}');
|
||||
if (userRes.code != 200 || userRes.data == null) {
|
||||
throw Exception('登录失败,请重试');
|
||||
}
|
||||
|
|
@ -489,8 +412,7 @@ class _TheLoginState extends ConsumerState<TheLogin> with CommonMixin {
|
|||
ref.read(userTokenProvider.notifier).initToken();
|
||||
|
||||
// 跳转登录页
|
||||
RouterManager.router.navigateTo(context, RouterManager.root,
|
||||
clearStack: true, transition: getTransition());
|
||||
RouterManager.router.navigateTo(context, RouterManager.root, clearStack: true, transition: getTransition());
|
||||
});
|
||||
} catch (e) {
|
||||
toPrint(val: e.toString());
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
if (!value) {
|
||||
return toLoginPage(context);
|
||||
}
|
||||
if (ref.read(userProvider).id == '540117143121989') return;
|
||||
ref.read(userReportProvider.notifier).initUserReport(); // 初始化报告页面用户身份职位
|
||||
}); // 定值token
|
||||
// 初始化偏好设置
|
||||
|
|
@ -106,7 +105,7 @@ class TheMainPageState extends ConsumerState<TheMainPage> with CommonMixin {
|
|||
void getAppUpgrade(UserInfo user) async {
|
||||
try {
|
||||
showUpgrade = true;
|
||||
if (['18888888888'].contains(user.loginName)) return;
|
||||
if (user.loginName == '18888888888') return;
|
||||
// 获取设备信息
|
||||
String deviceInfo;
|
||||
int deviceType;
|
||||
|
|
|
|||
|
|
@ -1,198 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/provider/user_provider.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/const_text.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class LogOff extends StatefulHookConsumerWidget {
|
||||
const LogOff({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
ConsumerState<LogOff> createState() => _LogOffState();
|
||||
}
|
||||
|
||||
class _LogOffState extends ConsumerState<LogOff> with CommonMixin{
|
||||
bool canClick = true;
|
||||
bool readAgreement = false; // 阅读协议
|
||||
|
||||
logOff() async{
|
||||
|
||||
if (!canClick) return;
|
||||
setState(() => canClick = false);
|
||||
void toMsg(msg) {
|
||||
ToastUtils.showError(msg);
|
||||
setState(() => canClick = true);
|
||||
}
|
||||
if (!readAgreement) return toMsg('请勾选我已阅读用户协议和隐私协议');
|
||||
|
||||
final userState = ref.watch(userProvider);
|
||||
EasyLoading.show(status: 'loading...');
|
||||
RestClient client = await getClientLogin();
|
||||
BaseStructureResult<dynamic> resultData = await client.getLogOff(userState.loginName);
|
||||
if (resultData.code != 200) {
|
||||
return ToastUtils.showError(resultData.message ?? '注销失败,请重试');
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
ToastUtils.showSuccess('注销成功');
|
||||
// 跳转登录页
|
||||
RouterManager.router.navigateTo(context, RouterManager.loginPath);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color.fromRGBO(248, 248, 248, 1),
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.white,
|
||||
title: Text(
|
||||
'注销',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF333333)),
|
||||
),
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back_ios, color: Colors.black),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
SizedBox(
|
||||
height: 30.r,
|
||||
),
|
||||
Center(
|
||||
child: Text(
|
||||
'温馨提示,请仔细阅读',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Color(0xFF464646),
|
||||
fontWeight: FontWeight.w500),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 20.r,
|
||||
),
|
||||
cont('您仅可注销您本人申请的账号'),
|
||||
cont('注销后,账号的全部权益将被清除'),
|
||||
cont('注销后,账号下的所有数据、记录等将无法访问或找回'),
|
||||
cont('注销后,将清除该账号在网站保留的个人信息'),
|
||||
cont('注销账号(账号删除)属于用户自主行为'),
|
||||
/* Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'注销账号即表示您已确认并同意',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF616161)),
|
||||
),
|
||||
InkWell(
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_LOGOUT.name}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: Text(
|
||||
'注销协议',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF6888FD)),
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
),*/
|
||||
SizedBox(
|
||||
height: 50.r,
|
||||
),
|
||||
InkWell(
|
||||
onTap:logOff,
|
||||
child: Center(
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
alignment: Alignment.center,
|
||||
width: 200.r,
|
||||
height: 50.r,
|
||||
decoration: BoxDecoration(
|
||||
color: canClick
|
||||
? const Color.fromRGBO(9, 105, 246, 1)
|
||||
: Colors.grey,
|
||||
/*boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(46, 91, 255, 0.5),
|
||||
offset: Offset(6.w, 10.h), //阴影y轴偏移量
|
||||
blurRadius: 14, //阴影模糊程度
|
||||
spreadRadius: 0.5, //阴影扩散程度
|
||||
)
|
||||
],*/
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(20.w),
|
||||
),
|
||||
),
|
||||
child: Text(
|
||||
'确认注销',
|
||||
style: TextStyle(fontSize: 16.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 30.w,
|
||||
padding: EdgeInsets.only(right: 10.w),
|
||||
child: Checkbox(
|
||||
activeColor: Colors.deepOrangeAccent,
|
||||
checkColor: Colors.white,
|
||||
value: readAgreement,
|
||||
onChanged: (value) {
|
||||
setState(() {
|
||||
readAgreement = value ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'已确认并同意',
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF616161)),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_LOGOUT.name}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText(
|
||||
'《注销协议》',
|
||||
size: 12.sp,
|
||||
color: Colors.deepOrangeAccent,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Widget cont(String name) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 5.r, horizontal: 14.r),
|
||||
child: Text(
|
||||
name,
|
||||
style: TextStyle(fontSize: 14.sp, color: Color(0xFF616161)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
@ -1,14 +1,11 @@
|
|||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/const_text.dart';
|
||||
import 'package:marking_app/utils/fluro/index.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
import 'package:package_info/package_info.dart';
|
||||
// 其他页面
|
||||
|
||||
|
|
@ -19,14 +16,12 @@ class OhterPage extends StatefulWidget {
|
|||
State<OhterPage> createState() => _OhterPageState();
|
||||
}
|
||||
|
||||
class _OhterPageState extends State<OhterPage> with CommonMixin{
|
||||
class _OhterPageState extends State<OhterPage> {
|
||||
String localVersion = '';
|
||||
bool showLogOff = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getShowLogOff();
|
||||
getPageInfo();
|
||||
}
|
||||
|
||||
|
|
@ -36,16 +31,6 @@ class _OhterPageState extends State<OhterPage> with CommonMixin{
|
|||
toUpState(setState, () => localVersion = packageInfo.version, mounted);
|
||||
}
|
||||
|
||||
getShowLogOff() async{
|
||||
RestClient client = await getClientLogin();
|
||||
BaseStructureResult<dynamic> resultData = await client.showLogOff();
|
||||
if(resultData.success){
|
||||
setState(() {
|
||||
showLogOff = resultData.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final personalInfoTitleStly = TextStyle(
|
||||
|
|
@ -71,7 +56,7 @@ class _OhterPageState extends State<OhterPage> with CommonMixin{
|
|||
Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
||||
padding: EdgeInsets.symmetric(vertical: 22.h, horizontal: 16.w),
|
||||
height: showLogOff?250.h:200.h,
|
||||
height: 130.h,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.all(Radius.circular(6.w)),
|
||||
color: Colors.white,
|
||||
|
|
@ -100,7 +85,7 @@ class _OhterPageState extends State<OhterPage> with CommonMixin{
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('隐私政策', style: personalInfoTitleStly),
|
||||
Text('用户隐私协议', style: personalInfoTitleStly),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
|
|
@ -114,67 +99,11 @@ class _OhterPageState extends State<OhterPage> with CommonMixin{
|
|||
height: 1.w,
|
||||
color: const Color.fromRGBO(240, 243, 255, 1),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
transition: TransitionType.fadeIn,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(bottom: 4.h),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('用户协议', style: personalInfoTitleStly),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
size: 16.sp,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 1.w,
|
||||
color: const Color.fromRGBO(240, 243, 255, 1),
|
||||
),
|
||||
// SizedBox(height: 8.h),
|
||||
SizedBox(height: 8.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [Text('APP版本', style: personalInfoTitleStly), quickText(localVersion)],
|
||||
),
|
||||
Container(
|
||||
height: 1.w,
|
||||
color: const Color.fromRGBO(240, 243, 255, 1),
|
||||
),
|
||||
// SizedBox(height: 8.h),
|
||||
if(showLogOff)
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
RouterManager.logOffPath
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
padding: EdgeInsets.only(bottom: 4.h,top: 8.r),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text('注销账号', style: personalInfoTitleStly),
|
||||
Icon(
|
||||
Icons.arrow_forward_ios,
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
size: 16.sp,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -1,293 +0,0 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:marking_app/common/config/request_config.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
import 'package:marking_app/common/model/common/base_structure_result.dart';
|
||||
import 'package:marking_app/common/model/user/user_login_params.dart';
|
||||
import 'package:marking_app/routes/RouterManager.dart';
|
||||
import 'package:marking_app/utils/common_utils.dart';
|
||||
import 'package:marking_app/utils/const_text.dart';
|
||||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/my_text.dart';
|
||||
import 'package:marking_app/utils/request/rest_client.dart';
|
||||
|
||||
class Register extends StatefulWidget {
|
||||
const Register({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<Register> createState() => _RegisterState();
|
||||
}
|
||||
|
||||
class _RegisterState extends State<Register> with CommonMixin{
|
||||
|
||||
late final FocusNode _theFocus;
|
||||
late final FocusNode _pwdFocus; // 密码
|
||||
//文本输入框控制器
|
||||
late final TextEditingController _userNameController;
|
||||
late final TextEditingController _passwordController;
|
||||
|
||||
bool readAgreement = false; // 阅读协议
|
||||
bool _isShowPwd = true;
|
||||
bool canLogin = true;
|
||||
|
||||
@override
|
||||
void initState(){
|
||||
super.initState();
|
||||
_userNameController = TextEditingController();
|
||||
_passwordController = TextEditingController();
|
||||
_pwdFocus = FocusNode();
|
||||
_theFocus = FocusNode();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
super.dispose();
|
||||
_userNameController.dispose();
|
||||
_passwordController.dispose();
|
||||
_pwdFocus.dispose();
|
||||
_theFocus.dispose();
|
||||
}
|
||||
|
||||
void toRegister() async{
|
||||
if (!canLogin) return;
|
||||
setState(() => canLogin = false);
|
||||
void toMsg(msg) {
|
||||
ToastUtils.showError(msg);
|
||||
setState(() => canLogin = true);
|
||||
}
|
||||
|
||||
FocusScope.of(context).requestFocus(_theFocus);
|
||||
|
||||
String userName = _userNameController.text.trim();
|
||||
String userPwd = _passwordController.text.trim();
|
||||
if (userName == '') return toMsg('请填写用户账号');
|
||||
if (userPwd == '') return toMsg('请填写密码');
|
||||
if (!readAgreement) return toMsg('请勾选我已阅读用户协议和隐私协议');
|
||||
|
||||
String userPwdMd5 = CommonUtils.generateMD5(userPwd);
|
||||
print('注册userPwdMd5=$userPwdMd5');
|
||||
EasyLoading.show(status: 'loading...');
|
||||
RestClient client = await getClientLogin();
|
||||
BaseStructureResult<dynamic> resultData = await client.toRegister(UserLoginParams(userName, userPwdMd5));
|
||||
|
||||
if (resultData.code != 200) {
|
||||
return toMsg(resultData.message ?? '注册失败,请重试');
|
||||
}
|
||||
EasyLoading.dismiss();
|
||||
ToastUtils.showSuccess('注册成功,请登录');
|
||||
// 跳转登录页
|
||||
RouterManager.router.navigateTo(context, RouterManager.loginPath);
|
||||
}
|
||||
|
||||
void _showPassword() {
|
||||
setState(() {
|
||||
_isShowPwd = !_isShowPwd;
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
FocusScope.of(context).requestFocus(_theFocus);
|
||||
},
|
||||
child: AnnotatedRegion(
|
||||
value: const SystemUiOverlayStyle(
|
||||
statusBarColor: Colors.transparent,
|
||||
systemNavigationBarIconBrightness: Brightness.light,
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
statusBarBrightness: Brightness.dark,
|
||||
),
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: double.infinity,
|
||||
alignment: Alignment.center,
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/login_bgi.png'),
|
||||
fit: BoxFit.fill, // 完全填充
|
||||
),
|
||||
),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
Container(
|
||||
width: 86.w,
|
||||
height: 86.w,
|
||||
alignment: Alignment.center,
|
||||
child: SizedBox(
|
||||
height: 86.w,
|
||||
width: 86.w,
|
||||
child: Image.asset('assets/images/logo.png', fit: BoxFit.cover),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
margin: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.h),
|
||||
padding: EdgeInsets.only(top: 34.h, bottom: 16.h, left: 22.w, right: 22.w),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(width: 1.w, color: Colors.white),
|
||||
borderRadius: BorderRadius.all(Radius.circular(10.w)),
|
||||
boxShadow: const [
|
||||
BoxShadow(
|
||||
color: Color.fromRGBO(46, 91, 255, 0.1),
|
||||
offset: Offset.zero, //阴影y轴偏移量
|
||||
blurRadius: 100, //阴影模糊程度
|
||||
spreadRadius: 100, //阴影扩散程度
|
||||
)
|
||||
],
|
||||
),
|
||||
child: Column(children: [
|
||||
TextField(
|
||||
controller: _userNameController,
|
||||
maxLines: 1,
|
||||
maxLength: 20,
|
||||
textInputAction: TextInputAction.next,
|
||||
onEditingComplete: () {
|
||||
FocusScope.of(context).requestFocus(_pwdFocus);
|
||||
},
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
fontSize: 15.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入账号",
|
||||
hintStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelText: "账号",
|
||||
labelStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
),
|
||||
),
|
||||
TextField(
|
||||
focusNode: _pwdFocus,
|
||||
controller: _passwordController,
|
||||
keyboardType: TextInputType.number,
|
||||
maxLines: 1,
|
||||
obscureText: _isShowPwd, //隐藏密码显示
|
||||
textInputAction: TextInputAction.go,
|
||||
onSubmitted: (val) => toRegister(),
|
||||
style: TextStyle(
|
||||
color: const Color.fromRGBO(80, 87, 103, 1),
|
||||
fontSize: 15.sp,
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: "请输入密码",
|
||||
suffix: GestureDetector(
|
||||
onTap: _showPassword,
|
||||
child: Icon(
|
||||
Icons.remove_red_eye,
|
||||
color: !_isShowPwd ? Theme.of(context).primaryColor : Colors.grey,
|
||||
),
|
||||
),
|
||||
hintStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(153, 153, 153, 1)),
|
||||
labelText: "密码",
|
||||
isDense: true,
|
||||
labelStyle: TextStyle(fontSize: 16.sp, color: const Color.fromRGBO(148, 163, 182, 1)),
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: 12.h,
|
||||
),
|
||||
InkWell(
|
||||
onTap: toRegister,
|
||||
child: Container(
|
||||
margin: EdgeInsets.symmetric(vertical: 10.h),
|
||||
decoration: BoxDecoration(
|
||||
color: canLogin ? const Color.fromRGBO(9, 105, 246, 1) : Colors.grey,
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: const Color.fromRGBO(46, 91, 255, 0.5),
|
||||
offset: Offset(6.w, 10.h), //阴影y轴偏移量
|
||||
blurRadius: 14, //阴影模糊程度
|
||||
spreadRadius: 0.5, //阴影扩散程度
|
||||
)
|
||||
],
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(8.w),
|
||||
),
|
||||
),
|
||||
alignment: Alignment.center,
|
||||
width: double.infinity,
|
||||
height: 50.h,
|
||||
child: Text(
|
||||
'注 册',
|
||||
style: TextStyle(fontSize: 16.sp, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 30.w,
|
||||
padding: EdgeInsets.only(right: 10.w),
|
||||
child: Checkbox(
|
||||
activeColor: Colors.deepOrangeAccent,
|
||||
checkColor: Colors.white,
|
||||
value: readAgreement,
|
||||
onChanged: (value) {
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_pwdFocus);
|
||||
FocusScope.of(context)
|
||||
.requestFocus(_theFocus);
|
||||
setState(() {
|
||||
readAgreement = value ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText('我已阅读', size: 11.sp),
|
||||
),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router.navigateTo(
|
||||
context,
|
||||
'${RouterManager.agreementPath}?type=${AGREEMENT_KEY.USER_AGREEMENT.name}',
|
||||
transition: getTransition(),
|
||||
);
|
||||
},
|
||||
child: quickText(
|
||||
'《用户协议》',
|
||||
size: 12.sp,
|
||||
color: Colors.deepOrangeAccent,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
]),
|
||||
)
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
)),
|
||||
Positioned(
|
||||
top: MediaQuery.of(context).padding.top+20.r,
|
||||
left: 20.r,
|
||||
child: InkWell(
|
||||
onTap: () => Navigator.pop(context),
|
||||
child: Icon(Icons.arrow_back_ios_new_rounded,
|
||||
color: Colors.white, size: 24.sp),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +1,6 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_easyloading/flutter_easyloading.dart';
|
||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||
import 'package:flutter_hooks/flutter_hooks.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
|
||||
import 'package:marking_app/common/mixin/common.dart';
|
||||
|
|
@ -14,22 +13,24 @@ import 'package:marking_app/utils/easy_refresh/MyEmptyWidget.dart';
|
|||
import 'package:marking_app/utils/index.dart';
|
||||
import 'package:marking_app/utils/request/rest_client_report.dart';
|
||||
import 'package:syncfusion_flutter_datepicker/datepicker.dart';
|
||||
part 'report_history.g.dart';
|
||||
|
||||
class ReportHistory extends StatefulWidget {
|
||||
final int userId;
|
||||
final int classId;
|
||||
final String studentName;
|
||||
|
||||
const ReportHistory({Key? key, required this.classId, required this.userId, required this.studentName}) : super(key: key);
|
||||
const ReportHistory({Key? key, required this.classId, required this.userId,required this.studentName})
|
||||
: super(key: key);
|
||||
|
||||
@override
|
||||
State<ReportHistory> createState() => _ReportHistoryState();
|
||||
}
|
||||
|
||||
class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerProviderStateMixin {
|
||||
class _ReportHistoryState extends State<ReportHistory>
|
||||
with CommonMixin, TickerProviderStateMixin {
|
||||
bool isWork = true;
|
||||
String startDataTime = CommonUtils.getWeekStartDate().toString().substring(0, 10);
|
||||
String startDataTime =
|
||||
CommonUtils.getWeekStartDate().toString().substring(0, 10);
|
||||
String endDataTime = CommonUtils.getWeekEndDate().toString().substring(0, 10);
|
||||
String customTimeStr = '自定义';
|
||||
late TabController tabController;
|
||||
|
|
@ -47,7 +48,8 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
}
|
||||
|
||||
void getList() async {
|
||||
if (startDataTime == DateTime.now().toString().substring(0, 10) || DateTime.parse(startDataTime).isAfter(DateTime.now())) {
|
||||
if (startDataTime == DateTime.now().toString().substring(0, 10) ||
|
||||
DateTime.parse(startDataTime).isAfter(DateTime.now())) {
|
||||
DateTime now = DateTime.parse(startDataTime);
|
||||
endDataTime = now.add(Duration(days: 1)).toString().substring(0, 10);
|
||||
print(now.add(Duration(days: 1)));
|
||||
|
|
@ -57,7 +59,8 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
RestClientReport clientReport = await getClientReport();
|
||||
BaseStructureResultReport<List<ReportStudentHistoryRecord>> res =
|
||||
// 488491659239519, 488491659190341, '2023-03-08', '2024-04-19'
|
||||
await clientReport.getStudentHistroyRecords(widget.userId, widget.classId, startDataTime, endDataTime);
|
||||
await clientReport.getStudentHistroyRecords(
|
||||
widget.userId, widget.classId, startDataTime, endDataTime);
|
||||
if (res.success) {
|
||||
setState(() {
|
||||
dataList = res.data!;
|
||||
|
|
@ -159,48 +162,55 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
SizedBox(
|
||||
height: 10.r,
|
||||
),
|
||||
JobConditionFilter(
|
||||
jobConditionFilter(context,
|
||||
controller: tabController,
|
||||
customTimeStr: customTimeStr,
|
||||
customTime: tabController.index != 3 || ((endDataTime == null || endDataTime == '') && (startDataTime == null || startDataTime == ''))
|
||||
customTime: tabController.index != 3 ||
|
||||
((endDataTime == null || endDataTime == '') &&
|
||||
(startDataTime == null || startDataTime == ''))
|
||||
? null
|
||||
: PickerDateRange(
|
||||
startDataTime == null || startDataTime == '' ? null : DateTime.parse(startDataTime!),
|
||||
endDataTime == null || endDataTime == '' ? null : DateTime.parse(endDataTime!),
|
||||
),
|
||||
onTimeFilter: (String? startTime, String? endTime) {
|
||||
if (startTime == null && endTime == null) {
|
||||
if (tabController.index == 3) {
|
||||
tabController.animateTo(0);
|
||||
}
|
||||
startDataTime = '';
|
||||
endDataTime = '';
|
||||
customTimeStr = '自定义';
|
||||
} else {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
startDataTime = startTime != null ? startTime : '';
|
||||
endDataTime = endTime != null ? endTime : '';
|
||||
setState(() {});
|
||||
getList();
|
||||
}
|
||||
startDataTime == null || startDataTime == ''
|
||||
? null
|
||||
: DateTime.parse(startDataTime!),
|
||||
endDataTime == null || endDataTime == ''
|
||||
? null
|
||||
: DateTime.parse(endDataTime!),
|
||||
), onTimeFilter: (String? startTime, String? endTime) {
|
||||
if (startTime == null && endTime == null) {
|
||||
if (tabController.index == 3) {
|
||||
tabController.animateTo(0);
|
||||
}
|
||||
startDataTime = '';
|
||||
endDataTime = '';
|
||||
customTimeStr = '自定义';
|
||||
} else {
|
||||
EasyLoading.show(status: 'loading...');
|
||||
startDataTime = startTime != null ? startTime : '';
|
||||
endDataTime = endTime != null ? endTime : '';
|
||||
setState(() {});
|
||||
getList();
|
||||
}
|
||||
|
||||
// _refreshController2.callRefresh();
|
||||
},
|
||||
refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
customTimeStr = value.startDate?.toString().substring(0, 10) ?? '';
|
||||
// _refreshController2.callRefresh();
|
||||
}, refreshTime: (value) {
|
||||
if (value != null && value.startDate != null) {
|
||||
customTimeStr =
|
||||
value.startDate?.toString().substring(0, 10) ?? '';
|
||||
setState(() {});
|
||||
if (value.endDate != null) {
|
||||
if (value.startDate!.year == value.endDate!.year) {
|
||||
customTimeStr = value.startDate.toString().substring(5, 10) +
|
||||
'~${value.endDate.toString().substring(5, 10)}';
|
||||
setState(() {});
|
||||
} else {
|
||||
customTimeStr =
|
||||
'$customTimeStr~${value.endDate?.toString().substring(0, 10)}';
|
||||
setState(() {});
|
||||
if (value.endDate != null) {
|
||||
if (value.startDate!.year == value.endDate!.year) {
|
||||
customTimeStr = value.startDate.toString().substring(5, 10) + '~${value.endDate.toString().substring(5, 10)}';
|
||||
setState(() {});
|
||||
} else {
|
||||
customTimeStr = '$customTimeStr~${value.endDate?.toString().substring(0, 10)}';
|
||||
setState(() {});
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
}
|
||||
}
|
||||
}),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 14.r, horizontal: 14.r),
|
||||
|
|
@ -219,9 +229,8 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
itemBuilder: (context, index) {
|
||||
ReportStudentHistoryRecord item = dataList[index];
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
RouterManager.router
|
||||
.navigateTo(context, '${RouterManager.completedReportPath}?examId=${item.examId}&studentNo=${item.studentExamNum}');
|
||||
onTap: (){
|
||||
RouterManager.router.navigateTo(context, '${RouterManager.completedReportPath}?examId=${item.examId}&studentNo=${item.studentExamNum}');
|
||||
},
|
||||
child: Container(
|
||||
// padding: EdgeInsets.all(6.r),
|
||||
|
|
@ -229,10 +238,13 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage('assets/images/report_student_history_bg.png'),
|
||||
image: AssetImage(
|
||||
'assets/images/report_student_history_bg.png'),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
border: Border.all(width: 1.r, color: Color.fromRGBO(46, 91, 255, 0.2)),
|
||||
border: Border.all(
|
||||
width: 1.r,
|
||||
color: Color.fromRGBO(46, 91, 255, 0.2)),
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
child: Column(
|
||||
|
|
@ -245,16 +257,21 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
item.examName,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF000000)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF000000)),
|
||||
),
|
||||
Spacer(),
|
||||
Text(
|
||||
item.examStartTime,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4A4A4A)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF4A4A4A)),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
|
@ -263,7 +280,8 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
height: 2.r,
|
||||
),
|
||||
Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.r),
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 10.r),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(5.r),
|
||||
),
|
||||
|
|
@ -273,54 +291,118 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: List.generate(item.scoreInfo.length, (i) {
|
||||
ScoreInfo score = item.scoreInfo[i];
|
||||
children: List.generate(
|
||||
item.scoreInfo.length, (i) {
|
||||
ScoreInfo score =
|
||||
item.scoreInfo[i];
|
||||
return Row(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Container(
|
||||
height: 22.r,
|
||||
width: item.scoreInfo.length > 4
|
||||
width: item.scoreInfo
|
||||
.length >
|
||||
4
|
||||
? 90.r
|
||||
: (MediaQuery.of(context).size.width - 48.r - (item.scoreInfo.length - 1) * 1.5.r) /
|
||||
item.scoreInfo.length,
|
||||
decoration: BoxDecoration(
|
||||
: (MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.width -
|
||||
48.r -
|
||||
(item.scoreInfo
|
||||
.length - 1) *
|
||||
1.5
|
||||
.r) /
|
||||
item.scoreInfo
|
||||
.length,
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: i == 0 ? Radius.circular(4.r) : Radius.zero,
|
||||
topRight: i == item.scoreInfo.length - 1 ? Radius.circular(4.r) : Radius.zero),
|
||||
color: Color(0xFFECECEC),
|
||||
topLeft: i == 0
|
||||
? Radius
|
||||
.circular(
|
||||
4.r)
|
||||
: Radius
|
||||
.zero,
|
||||
topRight: i ==
|
||||
item.scoreInfo.length -
|
||||
1
|
||||
? Radius
|
||||
.circular(
|
||||
4.r)
|
||||
: Radius
|
||||
.zero),
|
||||
color: Color(
|
||||
0xFFECECEC),
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
score.text,
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF8A8A8A)),
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
12.sp,
|
||||
color: Color(
|
||||
0xFF8A8A8A)),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: 30.r,
|
||||
width: item.scoreInfo.length > 4
|
||||
width: item.scoreInfo
|
||||
.length >
|
||||
4
|
||||
? 90.r
|
||||
: (MediaQuery.of(context).size.width - 48.r - (item.scoreInfo.length - 1) * 1.5.r) /
|
||||
item.scoreInfo.length,
|
||||
decoration: BoxDecoration(
|
||||
: (MediaQuery.of(
|
||||
context)
|
||||
.size
|
||||
.width -
|
||||
48.r -
|
||||
(item.scoreInfo
|
||||
.length - 1) *
|
||||
1.5.r) /
|
||||
item.scoreInfo
|
||||
.length,
|
||||
decoration:
|
||||
BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: i == 0 ? Radius.circular(4.r) : Radius.zero,
|
||||
bottomRight: i == item.scoreInfo.length - 1 ? Radius.circular(4.r) : Radius.zero),
|
||||
bottomLeft: i ==
|
||||
0
|
||||
? Radius
|
||||
.circular(
|
||||
4.r)
|
||||
: Radius
|
||||
.zero,
|
||||
bottomRight: i ==
|
||||
item.scoreInfo.length -
|
||||
1
|
||||
? Radius
|
||||
.circular(
|
||||
4.r)
|
||||
: Radius
|
||||
.zero),
|
||||
color: Colors.white,
|
||||
),
|
||||
child: Center(
|
||||
child: Text(
|
||||
score.value.toString(),
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF4A4A4A)),
|
||||
score.value
|
||||
.toString(),
|
||||
style: TextStyle(
|
||||
fontSize:
|
||||
12.sp,
|
||||
color: Color(
|
||||
0xFF4A4A4A)),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(
|
||||
width: i < item.scoreInfo.length - 1 ? 1.5.r : 0.r,
|
||||
width: i <
|
||||
item.scoreInfo
|
||||
.length - 1
|
||||
? 1.5.r
|
||||
: 0.r,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
|
@ -331,7 +413,9 @@ class _ReportHistoryState extends State<ReportHistory> with CommonMixin, TickerP
|
|||
: Center(
|
||||
child: Text(
|
||||
'-暂无数据-',
|
||||
style: TextStyle(fontSize: 12.sp, color: Color(0xFF8A8A8A)),
|
||||
style: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
color: Color(0xFF8A8A8A)),
|
||||
)),
|
||||
),
|
||||
SizedBox(
|
||||
|
|
@ -361,8 +445,9 @@ Widget jobConditionFilter(BuildContext context,
|
|||
required Function(String? startTime, String? endTime) onTimeFilter}) {
|
||||
var customTimeState = PickerDateRange(null, null);
|
||||
if (customTime != null) {
|
||||
customTimeState =
|
||||
PickerDateRange(customTime!.startDate != null ? customTime!.startDate : null, customTime!.endDate != null ? customTime!.endDate : null);
|
||||
customTimeState = PickerDateRange(
|
||||
customTime!.startDate != null ? customTime!.startDate : null,
|
||||
customTime!.endDate != null ? customTime!.endDate : null);
|
||||
}
|
||||
|
||||
DateTime getMonthStartDate() {
|
||||
|
|
@ -377,7 +462,9 @@ Widget jobConditionFilter(BuildContext context,
|
|||
nextMonth = 1;
|
||||
now = now.add(Duration(days: 31 - now.day)); // 跨年了,所以加到当前月的最后一天
|
||||
} else {
|
||||
now = now.add(Duration(days: DateTime(now.year, nextMonth, 0).day - now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
||||
now = now.add(Duration(
|
||||
days: DateTime(now.year, nextMonth, 0).day -
|
||||
now.day)); // 加到下个月的第一天的前一天,即本月最后一天
|
||||
}
|
||||
return now;
|
||||
}
|
||||
|
|
@ -389,10 +476,13 @@ Widget jobConditionFilter(BuildContext context,
|
|||
),
|
||||
child: Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
decoration: BoxDecoration(border: Border(bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
||||
decoration: BoxDecoration(
|
||||
border:
|
||||
Border(bottom: BorderSide(width: 1.r, color: Color(0xFFCCCCCC)))),
|
||||
child: TabBar(
|
||||
controller: controller,
|
||||
unselectedLabelStyle: TextStyle(fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
||||
unselectedLabelStyle: TextStyle(
|
||||
fontSize: 12.sp, color: const Color.fromRGBO(102, 102, 102, 1)),
|
||||
labelStyle: TextStyle(
|
||||
fontSize: 12.sp,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
|
@ -424,7 +514,9 @@ Widget jobConditionFilter(BuildContext context,
|
|||
return Center(
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
width: isPad() ? ScreenUtil().screenWidth / 2 : ScreenUtil().screenWidth / 1.3,
|
||||
width: isPad()
|
||||
? ScreenUtil().screenWidth / 2
|
||||
: ScreenUtil().screenWidth / 1.3,
|
||||
height: ScreenUtil().screenHeight / 2,
|
||||
child: SfDateRangePicker(
|
||||
showActionButtons: true,
|
||||
|
|
|
|||
|
|
@ -181,7 +181,6 @@ class _TheReportState extends ConsumerState<TheReport>
|
|||
RestClientReport clientReport = await getClientReport();
|
||||
UserInfoReport _userReport = ref.read(userReportProvider);
|
||||
if (!_userReport.normal) {
|
||||
if(ref.read(userProvider).id == '540117143121989') return null;
|
||||
// 用户职位数据是否已经请求,在主页已经请求一次 为正常使用 备用
|
||||
bool theFlag =
|
||||
await ref.read(userReportProvider.notifier).initUserReport();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
* @FilePath: \marking_app\lib\routes\RouterManager.dart
|
||||
* @Description: 路由
|
||||
*/
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:fluro/fluro.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:marking_app/common/model/enum/marking_list_type.dart';
|
||||
|
|
@ -33,9 +36,9 @@ import 'package:marking_app/pages/marking/progress.dart';
|
|||
import 'package:marking_app/pages/marking/progress_abnormal.dart';
|
||||
import 'package:marking_app/pages/marking/review.dart';
|
||||
import 'package:marking_app/pages/mine/index.dart';
|
||||
import 'package:marking_app/pages/mine/log_off.dart';
|
||||
import 'package:marking_app/pages/mine/other_pages/index.dart';
|
||||
import 'package:marking_app/pages/other/agreement_page.dart';
|
||||
import 'package:marking_app/pages/report_detail/completed_report.dart';
|
||||
import 'package:marking_app/pages/report_detail/index.dart';
|
||||
import 'package:marking_app/pages/report_detail/report_history.dart';
|
||||
import 'package:marking_app/pages/reports/report_class_teacher.dart';
|
||||
|
|
@ -43,8 +46,7 @@ import 'package:marking_app/pages/reports/report_personal_subject.dart';
|
|||
import 'package:marking_app/pages/reports/report_subject_teacher.dart';
|
||||
import 'package:marking_app/utils/const_text.dart';
|
||||
import 'package:marking_app/utils/the_global.dart';
|
||||
import 'package:marking_app/pages/register/index.dart';
|
||||
import 'package:marking_app/pages/report_detail/completed_report.dart';
|
||||
|
||||
import '../utils/index.dart';
|
||||
|
||||
class RouterManager {
|
||||
|
|
@ -83,8 +85,6 @@ class RouterManager {
|
|||
static const String jobPersonalDetailPath = '/homework_correction/job_personal_detail';
|
||||
static const String reportCardDialogPath = '/report_detail/widgets/report_card_dialog';
|
||||
static const String reportHistoryPath = '/report_detail/report_history';
|
||||
static const String registerPath = '/register/index';
|
||||
static const String logOffPath = '/mine/log_off';
|
||||
static const String jobKnowledgePointsPath = '/homework_correction/job_knowledge_points';
|
||||
static const String jobKnowledgePointsDetailPath = '/homework_correction/job_knowledge_points_detail';
|
||||
static const String answerTrajectoryPath = '/homework_correction/answer_trajectory';
|
||||
|
|
@ -384,12 +384,6 @@ class RouterManager {
|
|||
},
|
||||
);
|
||||
|
||||
// 注册页
|
||||
static final _registerPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const Register());
|
||||
|
||||
// 注销页
|
||||
static final _logOffPathHandler = Handler(handlerFunc: (BuildContext? context, Map<String, List<String>> params) => const LogOff());
|
||||
|
||||
// 知识点掌握
|
||||
static final _jobKnowledgePointsPathHandler = Handler(
|
||||
handlerFunc: (BuildContext? context, Map<String, List<String>> params) {
|
||||
|
|
@ -480,8 +474,6 @@ class RouterManager {
|
|||
router.define(jobPersonalDetailPath, handler: _jobPersonalDetailPathHandler, transitionType: TransitionType.material);
|
||||
router.define(reportCardDialogPath, handler: _reportCardDialogPathHandler, transitionType: TransitionType.material);
|
||||
router.define(reportHistoryPath, handler: _reportHistoryPathHandler, transitionType: TransitionType.material);
|
||||
router.define(registerPath, handler: _registerPathHandler, transitionType: TransitionType.material);
|
||||
router.define(logOffPath, handler: _logOffPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobMainListPagePath, handler: _jobMainListPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsPath, handler: _jobKnowledgePointsPathHandler, transitionType: TransitionType.material);
|
||||
router.define(jobKnowledgePointsDetailPath, handler: _jobKnowledgePointsDetailPathHandler, transitionType: TransitionType.material);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
/*协议*/
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore: camel_case_types
|
||||
enum AGREEMENT_KEY { PRIVACY_GREEMENT, USER_AGREEMENT, USER_LOGOUT }
|
||||
enum AGREEMENT_KEY { PRIVACY_GREEMENT, USER_AGREEMENT }
|
||||
|
||||
// ignore: non_constant_identifier_names
|
||||
final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
||||
AGREEMENT_KEY.PRIVACY_GREEMENT: AgreementClass(
|
||||
title: '隐私政策',
|
||||
title: '隐私协议',
|
||||
richText: '''<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>隐私政策</title>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>隐私政策</h1>
|
||||
|
|
@ -33,7 +33,7 @@ final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
|||
<ul>
|
||||
<li><strong>位置信息</strong>,指您开启设备定位功能并使用我们基于位置提供的相关服务时,收集的有关您位置的信息,包括:<ul><li>您通过具有定位功能的移动设备使用我们的服务时,通过GPS或WiFi等方式收集的您的地理位置信息;</li><li>您可以通过关闭定位功能,停止对您的地理位置信息的收集。</li></ul></li>
|
||||
<li><strong>个人信息</strong>,您在注册账户或使用我们的服务时,向我们提供的相关个人信息,例如电话号码、电子邮件等。</li>
|
||||
<li><strong>日志信息</strong>,指您使用我们的服务时,系统可能通过cookies、标识符及相关技术收集的信息,包括您的<strong>设备信息</strong>、<strong>浏览信息</strong>、<strong>点击信息</strong>,并将该等信息储存为日志信息,为您提供保障服务安全。您可以通过浏览器设置拒绝或管理cookie、标识符或相关技术的使用。</li>
|
||||
<li><strong>日志信息</strong>,指您使用我们的服务时,系统可能通过cookies、标识符及相关技术收集的信息,包括您的<strong>设备信息</strong>、<strong>浏览信息</strong>、<strong>点击信息</strong>,并将该等信息储存为日志信息,为您提供个性化的用户体验、保障服务安全。您可以通过浏览器设置拒绝或管理cookie、标识符或相关技术的使用。</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
|
@ -70,6 +70,7 @@ final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
|||
<li>向您提供服务;</li>
|
||||
<li>在我们提供服务时,用于身份验证、客户服务、安全防范、诈骗监测、存档和备份用途,确保我们向您提供的产品和服务的安全性;</li>
|
||||
<li>帮助我们设计新服务,改善我们现有服务;</li>
|
||||
<li>使我们更加了解您如何接入和使用我们的服务,从而针对性地回应您的个性化需求,例如语言设定、位置设定、个性化的帮助服务和指示,或对您和其他用户作出其他方面的回应;</li>
|
||||
<li>向您提供与您更加相关的广告以替代普遍投放的广告;</li>
|
||||
<li>评估我们服务中的广告和其他促销及推广活动的效果,并加以改善;</li>
|
||||
<li>软件认证或管理软件升级;</li>
|
||||
|
|
@ -106,54 +107,9 @@ final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
|||
|
||||
<h2>6. 您的权利</h2>
|
||||
<p>
|
||||
|
||||
<p><strong>(一)访问权</strong></p >
|
||||
|
||||
<p>原则上您可以通过如下方式访问您的个人信息:</p >
|
||||
|
||||
<p>1、账号信息:您可以随时登录您的账号,访问或编辑您账号中的资料信息、更改您的密码、添加安全信息、进行账号关联或身份认证等。</p >
|
||||
|
||||
<p>2、使用信息:您可以在我们的网站、客户端等服务中查阅订单信息等,您也可通过本隐私政策文末提供的方式联系我们删除这些信息,我们将在核实您的身份后提供,但法律法规另有约定的除外。</p >
|
||||
|
||||
<p>3、其他信息:如您在此访问过程中遇到操作问题的或如需获取其他前述无法获知的信息内容,您可通过本隐私政策文末提供的方式联系我们,我们将在核实您的身份后提供,但法律法规另有约定的除外。</p >
|
||||
|
||||
<p><strong>(二)删除权</strong></p >
|
||||
|
||||
<p>您可以通过本隐私政策文末提供的联系方式向我们提出删除您信息的请求,例如您不再需要我们继续为您提供服务,但已做数据匿名化处理或法律法规另有规定的除外。</p >
|
||||
|
||||
<p><strong>(三)索取权</strong></p >
|
||||
|
||||
<p>如您需要您数据的副本,您可以通过本隐私政策文末提供的方式联系我们,在核实您的身份后,我们将向您提供您在我们的服务中的信息副本(例如基本资料、身份信息),但法律法规另有规定的除外。</p >
|
||||
|
||||
<p><strong>(四)撤回同意权</strong></p >
|
||||
|
||||
<p>如您想更改相关功能的授权范围,您可以在我们的产品或服务中的相关功能设置界面进行操作处理。如您在此过程中遇到操作问题的,可以通过本隐私政策文末提供的方式联系我们。</p >
|
||||
|
||||
<p>当您取消相关信息收集的授权后,我们将不再收集该信息,也无法再为您提供上述与之对应的服务;但您知悉并同意,除非您行使前述“删除权”,否则您的该行为不会影响我们基于您之前的授权进行的信息的处理、存储。</p >
|
||||
|
||||
<p><strong>(五)注销权</strong></p >
|
||||
|
||||
<p>您可以通过联系我们的客服或通过其他我们公示的方式注销您的账号(但法律法规另有规定的除外),一旦您注销账号,将无法使用我们提供的全线用户产品的服务,因此请您谨慎操作。我们为了保护您或他人的合法权益会结合您对我们提供的各产品或服务的使用情况判断是否支持您的注销请求。除法律法规另有规定外,注销账号之后,您该账户内的所有信息将被清空,并根据您的要求删除您的信息。您通过第三方账号(如微信等)授权登录我们的服务时,需要向第三方申请注销账号。</p >
|
||||
|
||||
<p><strong>(六)例外情形</strong></p >
|
||||
|
||||
<p>在以下情形中,按照法律法规要求,我们将无法响应您的请求:</p >
|
||||
|
||||
<p>(1)与个人信息控制者履行法律法规规定的义务相关的;</p >
|
||||
|
||||
<p>(2)与国家安全、国防安全有关的;</p >
|
||||
|
||||
<p>(3)与公共安全、公共卫生、重大公共利益有关的;</p >
|
||||
|
||||
<p>(4)与刑事侦查、起诉、审判和执行判决等有关的;</p >
|
||||
|
||||
<p>(5)有充分证据表明您存在主观恶意或滥用权利的;</p >
|
||||
|
||||
<p>(6)出于维护个人信息主体或其他个人的生命、财产等重大合法权益但又很难得到本人同意的;</p >
|
||||
|
||||
<p>(7)响应您的请求将导致您或其他个人、组织的合法权益受到严重损害的;</p >
|
||||
|
||||
<p>(8)涉及商业秘密的。</p >
|
||||
在您使用我们的服务期间,我们可能会视产品具体情况为您提供相应的操作设置,以便您可以查询、删除、更正或撤回您的相关个人信息,您可参考相应的具体指引进行操作。此外,我们还设置了投诉举报渠道,您的意见将会得到及时的处理。如果您无法通过上述途径和方式行使您的个人信息主体权利,您可以通过本《隐私政策》中提供的联系方式提出您的请求,我们会按照法律法规的规定予以反馈。
|
||||
</p>
|
||||
<p>当您决定不再使用我们的产品或服务时,可以申请注销账户。注销账户后,除法律法规另有规定外,我们将删除或匿名化处理您的个人信息。</p>
|
||||
|
||||
<h2>7. 变更</h2>
|
||||
<p>
|
||||
|
|
@ -174,12 +130,9 @@ final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>用户协议</title>
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>隐私政策</h1>
|
||||
<div>更新日期:<strong>2023/1/1</strong></div>
|
||||
<div>生效日期:<strong>2023/1/1</strong></div>
|
||||
<h1>用户协议</h1>
|
||||
<p><i>重庆智学力人工智能科技有限公司</i>(以下简称“我们”)依据本协议为用户(以下简称“你”)提供<i>学而有道阅卷</i>服务。本协议对你和我们均具有法律约束力。</p>
|
||||
<h4>一、本服务的功能</h4>
|
||||
|
|
@ -193,103 +146,12 @@ final Map<AGREEMENT_KEY, AgreementClass> AGREEMENT_MAP = {
|
|||
<p>4.2 本协议条款无论因何种原因部分无效或不可执行,其余条款仍有效,对双方具有约束力。</p>
|
||||
</body>
|
||||
</html>''',
|
||||
),
|
||||
AGREEMENT_KEY.USER_LOGOUT: AgreementClass(
|
||||
title: '注销协议',
|
||||
richText: '''<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>《账号注销协议》</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
尊敬的用户,在您正式开始下一步有关账号注销流程前,我们先为您做出如下特别说明:注销本账号后,除法律法规另有规定外,您在该账号下的个人信息将进行删除或匿名化处理,且此前已关联该账号的相关产品与服务将不再关联。该账号一旦注销完成,将无法恢复,请您谨慎操作。
|
||||
</p>
|
||||
<p>
|
||||
若您经过慎重考虑后仍决定注销本账号的,请您务必先行仔细阅读和充分理解本《账号注销协议》(“本协议”),并同意本协议全部内容。您按照我们的注销操作流程开始注销流程的,或者您勾选本注销协议并开始下一步操作的,均视为您已经同意和遵守本协议全部内容。
|
||||
</p>
|
||||
<p>
|
||||
如您在注销后需要再次使用我们的服务的,欢迎您重新注册登录。
|
||||
</p>
|
||||
<h4>一、您知悉并同意:在您的账号注销后,将(可能)产生包括但不限于如下结果,并需要您自行承担:</h4>
|
||||
<p>
|
||||
1.您将无法登录、使用该账号,无法以此账号使用的服务;
|
||||
</p>
|
||||
<p>
|
||||
2.如您曾使用该账号登录其他用户产品,一旦您注销账号,将无法使用全线用户产品的服务。
|
||||
</p>
|
||||
<p>
|
||||
3.除法律法规另有规定外,您该账号下的个人信息将会被删除或匿名化处理。您无法再找回您的个人信息,也无权要求我们找回,前述个人信息包括但不限于:头像昵称等个人资料信息、设备信息、收藏、订阅、播放历史、观看记录、浏览记录、订阅/关注信息、私信、会员信息及购买、充值信息、积分、优惠卡券等信息;
|
||||
</p>
|
||||
<p>
|
||||
4.您同意,一旦您同意本协议或您注销本账号的,即视为您放弃该账号在使用期间已产生的及未来可能产生的权益,我们有权对该账号下的全部权益做清除处理,该等权益包括但不限于:会员权益及已产生但未消耗完毕的其他权益或未来预期的权益等,因此产生的后果由您自行承担;
|
||||
</p>
|
||||
<p>
|
||||
5.本账号一旦注销,将无法恢复。即使您在注销后以相同或其他提供的登录方式作为账号再次向我们申请注册登录的,此时该账号将视为新的用户账号。因此,我们善意地提醒您在申请注销前对需要备份的内容提前做好备份。同时,也建议您在申请注销前清除系统缓存;
|
||||
</p>
|
||||
<p>
|
||||
6.本账号一旦注销,您与我们签署的有关的《服务协议》(“服务协议”)终止(但已约定继续生效的除外)。但服务协议的终止并不影响账号注销前您使用的服务应当承担的相关责任,您仍需要对账号注销前使用的服务的行为承担相应责任,包括但不限于可能产生的违约责任、损害赔偿责任及履约义务等;
|
||||
</p>
|
||||
<p>
|
||||
7.其他因账号注销(可能)产生的结果。
|
||||
</p>
|
||||
<h4>二、在您向我们申请/继续申请注销账号之前,为保障您的账号安全和相关权益, 您需先行检查与确保您申请注销的账号已经同时满足以下条件,这些条件包括但不限于:</h4>
|
||||
<p>
|
||||
1.该账号为您本人合法拥有并登录使用,且符合用户协议及相关说明规则中有关账号的规定;
|
||||
</p>
|
||||
<p>
|
||||
2.该账号已解绑其他共享设备;
|
||||
</p>
|
||||
<p>
|
||||
3.该账号处于安全状态:账号为正常使用中且无违规、被封、被盗等情形;
|
||||
</p>
|
||||
<p>
|
||||
4.该账号中的相关权益(见本协议第一条第4款)已结清或得到妥善处理。请您妥善处理您的产品权益,可待相关权益使用完毕后再进行注销,若您未予以处理且继续进行账号注销流程,视为您自愿放弃该等权益;
|
||||
</p>
|
||||
<p>
|
||||
5.该账号无未完成状态订单;
|
||||
</p>
|
||||
<p>
|
||||
6.该账号所涉及到的会员自动续费功能已解除;
|
||||
</p>
|
||||
<p>
|
||||
7.该账号无任何纠纷:包括投诉举报、被投诉举报、国家机关调查、仲裁、诉讼等纠纷;
|
||||
</p>
|
||||
<p>
|
||||
上述问题您可首先尝试自行处理,如您无法处理的或在处理过程中有任何疑惑的,可联系客服协助处理。
|
||||
</p>
|
||||
<h4>三、如何注销账号?</h4>
|
||||
<p>
|
||||
1.您需按照我们的官方渠道提供的注销流程和操作指引,在相关功能设置页面进行注销操作;
|
||||
</p> <p>
|
||||
2.您已经同意本注销协议的全部内容;同时,您已经检查与确认满足了本协议第二条的要求;
|
||||
</p>
|
||||
<p>
|
||||
3.在您完成上述第2点后,为进一步保障您的相关合法权益,我们有权根据您的账号安全状态以及您的相关产品与服务的使用情况等综合判断您的账号是否符合注销条件。为保障您的账号安全和财产权益,我们有权进行注销申请的身份验证以判断您是该账号的有权使用人(如由您提供操作相关信息供我们核实等)。如我们在综合判断后发现该账号不符合注销条件的,或者身份验证失败的,您的注销可能会失败,您可以按照我们的指引进行后续操作或联系客服协助处理。即使我们判断您符合注销条件的,也是基于您的承诺(即您自身确保账号符合上述注销条件的承诺)进行的形式审查,仍由您自身对账号符合上述注销条件承担保证责任,我们对此不承担相应的法律责任;
|
||||
</p>
|
||||
<p>
|
||||
4.我们在您成功完成上述第3点的 “身份验证 ”后,视为您已成功向我们提交了账号注销申请。
|
||||
</p>
|
||||
<p>
|
||||
具体的注销流程化和操作以官方公布为准。您理解并同意,在您申请注销账号期间,如我们需要对相关信息、投诉或其他与您的账号相关的事项进行核实的,或者我们有其他合理的理由的,我们有权冻结您的该账号且暂时不为您提供注销服务。
|
||||
</p>
|
||||
<h4>四、其他</h4>
|
||||
<p>
|
||||
本协议为用户协议组成部分,本协议未尽事宜适用用户协议。本协议与用户协议不一致的,以本协议为准。同时,您知悉并同意: 即使您该账号被注销,也并不减轻或免除您应根据相关法律法规、相关协议、规则等(可能)需要承担的相关责任。
|
||||
</p>
|
||||
|
||||
|
||||
</body>
|
||||
</html>''',
|
||||
),
|
||||
)
|
||||
};
|
||||
|
||||
/* TYPE */
|
||||
class AgreementClass {
|
||||
String title;
|
||||
String richText;
|
||||
|
||||
AgreementClass({required this.title, required this.richText});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,65 +0,0 @@
|
|||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'my_time_util.g.dart';
|
||||
|
||||
// 毫秒转小时、分钟、秒的函数
|
||||
TimeUnitModel? convertMilliseconds(int milliseconds) {
|
||||
try {
|
||||
int hours = milliseconds ~/ (1000 * 60 * 60);
|
||||
int minutes = (milliseconds % (1000 * 60 * 60)) ~/ (1000 * 60);
|
||||
int seconds = (milliseconds % (1000 * 60)) ~/ 1000;
|
||||
|
||||
if ((milliseconds % 1000) > 500) seconds += 1;
|
||||
|
||||
return TimeUnitModel(hours, minutes, seconds);
|
||||
} catch (e) {
|
||||
print('时间转换报错');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
// 毫秒转小时、分钟、秒的函数
|
||||
TimeUnitModel? convertSeconds(int totalSeconds) {
|
||||
try {
|
||||
int hours = totalSeconds ~/ 3600; // 整除3600得到小时数
|
||||
int remainingSeconds = totalSeconds % 3600; // 取模3600得到剩余的秒数
|
||||
int minutes = remainingSeconds ~/ 60; // 整除60得到分钟数
|
||||
int seconds = remainingSeconds % 60; // 取模60得到最终的秒数
|
||||
|
||||
return TimeUnitModel(hours, minutes, seconds);
|
||||
} catch (e) {
|
||||
print('时间转换报错');
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class TimeUnitModel extends Object {
|
||||
int hours;
|
||||
int minutes;
|
||||
int seconds;
|
||||
TimeUnitModel(this.hours, this.minutes, this.seconds);
|
||||
|
||||
factory TimeUnitModel.fromJson(Map<String, dynamic> srcJson) => _$TimeUnitModelFromJson(srcJson);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TimeUnitModelToJson(this);
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
var timeStr = '';
|
||||
if (hours > 0) {
|
||||
timeStr += '${hours > 9 ? hours : '0' + hours.toString()} ';
|
||||
}
|
||||
if (minutes > 0) {
|
||||
timeStr += '${minutes > 9 ? minutes : '0' + minutes.toString()}';
|
||||
}
|
||||
|
||||
if (timeStr.length > 0) {
|
||||
timeStr += ':${seconds > 9 ? seconds : '0' + seconds.toString()}';
|
||||
} else {
|
||||
timeStr += '00:${seconds > 9 ? seconds : '0' + seconds.toString()}';
|
||||
}
|
||||
|
||||
return timeStr;
|
||||
}
|
||||
}
|
||||
|
|
@ -373,20 +373,4 @@ abstract class RestClient {
|
|||
@the_retrofit.Query("questionNo") int? questionNo,
|
||||
@the_retrofit.Query("pageNum") int? pageNum,
|
||||
);
|
||||
|
||||
// 注册
|
||||
@the_retrofit.POST("/auth/login/reg")
|
||||
Future<BaseStructureResult<dynamic>> toRegister(@the_retrofit.Body() UserLoginParams params);
|
||||
|
||||
// 是否显示注册
|
||||
@the_retrofit.GET("/auth/login/status/reg")
|
||||
Future<BaseStructureResult<dynamic>> showRegister();
|
||||
|
||||
// 是否显示注销
|
||||
@the_retrofit.GET("/auth/login/status/lg")
|
||||
Future<BaseStructureResult<dynamic>> showLogOff();
|
||||
|
||||
// 注销账号
|
||||
@the_retrofit.POST("/auth/login/lg")
|
||||
Future<BaseStructureResult> getLogOff(@the_retrofit.Field("loginName") String loginName);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
|
|||
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
|
||||
# Read more about iOS versioning at
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
version: 1.0.105
|
||||
version: 1.0.104
|
||||
|
||||
environment:
|
||||
sdk: ">=2.17.1 <3.0.0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue