Compare commits

..

4 Commits

6 changed files with 175 additions and 63 deletions

View File

@ -1,6 +1,6 @@
# Uncomment this line to define a global platform for your project # Uncomment this line to define a global platform for your project
# source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git' # source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
platform :ios, '11.0' platform :ios, '12.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency. # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true' ENV['COCOAPODS_DISABLE_STATS'] = 'true'

View File

@ -8,9 +8,6 @@ PODS:
- fluttertoast (0.0.2): - fluttertoast (0.0.2):
- Flutter - Flutter
- Toast - Toast
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/standard (2.7.5)
- image_picker_ios (0.0.1): - image_picker_ios (0.0.1):
- Flutter - Flutter
- install_plugin (2.0.0): - install_plugin (2.0.0):
@ -30,7 +27,7 @@ PODS:
- FlutterMacOS - FlutterMacOS
- sqflite (0.0.3): - sqflite (0.0.3):
- Flutter - Flutter
- FMDB (>= 2.7.5) - FlutterMacOS
- Toast (4.0.0) - Toast (4.0.0)
- url_launcher_ios (0.0.1): - url_launcher_ios (0.0.1):
- Flutter - Flutter
@ -51,14 +48,13 @@ DEPENDENCIES:
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`) - permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- rive_common (from `.symlinks/plugins/rive_common/ios`) - rive_common (from `.symlinks/plugins/rive_common/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- sqflite (from `.symlinks/plugins/sqflite/ios`) - sqflite (from `.symlinks/plugins/sqflite/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)
- wakelock (from `.symlinks/plugins/wakelock/ios`) - wakelock (from `.symlinks/plugins/wakelock/ios`)
- webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`)
SPEC REPOS: SPEC REPOS:
trunk: trunk:
- FMDB
- ReachabilitySwift - ReachabilitySwift
- Toast - Toast
@ -86,7 +82,7 @@ EXTERNAL SOURCES:
shared_preferences_foundation: shared_preferences_foundation:
:path: ".symlinks/plugins/shared_preferences_foundation/darwin" :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
sqflite: sqflite:
:path: ".symlinks/plugins/sqflite/ios" :path: ".symlinks/plugins/sqflite/darwin"
url_launcher_ios: url_launcher_ios:
:path: ".symlinks/plugins/url_launcher_ios/ios" :path: ".symlinks/plugins/url_launcher_ios/ios"
wakelock: wakelock:
@ -99,21 +95,20 @@ SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069 flutter_keyboard_visibility: 0339d06371254c3eb25eeb90ba8d17dca8f9c069
fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c fluttertoast: fafc4fa4d01a6a9e4f772ecd190ffa525e9e2d9c
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a image_picker_ios: 99dfe1854b4fa34d0364e74a78448a0151025425
image_picker_ios: 4a8aadfbb6dc30ad5141a2ce3832af9214a705b5
install_plugin: b52f81470a1f37b006607bdf7ffc6031df43fe76 install_plugin: b52f81470a1f37b006607bdf7ffc6031df43fe76
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943 path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6 permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825 ReachabilitySwift: 985039c6f7b23a1da463388634119492ff86c825
rive_common: 8a159d68033a8b073e5853acc50f03aa486a2888 rive_common: 3a4c254c6e4db7e4b9e05daeb3d1f47ae4f7bf76
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126 shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
sqflite: 31f7eba61e3074736dff8807a9b41581e4f7f15a sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 Toast: 91b396c56ee72a5790816f40d3a94dd357abc196
url_launcher_ios: bf5ce03e0e2088bad9cc378ea97fa0ed5b49673b url_launcher_ios: bbd758c6e7f9fd7b5b1d4cde34d2b95fcce5e812
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
webview_flutter_wkwebview: 2e2d318f21a5e036e2c3f26171342e95908bd60a webview_flutter_wkwebview: 4f3e50f7273d31e5500066ed267e3ae4309c5ae4
PODFILE CHECKSUM: 441579d1897b785684860026b910c66dadea2938 PODFILE CHECKSUM: 64629b724b9886c2d78e6972ff5ef90e370df047
COCOAPODS: 1.11.3 COCOAPODS: 1.11.3

View File

@ -334,7 +334,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -351,7 +351,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 15; CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6; DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
@ -359,7 +359,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.93; MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -419,7 +419,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES; MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES; ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos; SDKROOT = iphoneos;
@ -468,7 +468,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES; GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0; IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos; SUPPORTED_PLATFORMS = iphoneos;
@ -487,7 +487,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 15; CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6; DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
@ -495,7 +495,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.93; MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
@ -517,7 +517,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES; ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = ""; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 15; CURRENT_PROJECT_VERSION = 16;
DEVELOPMENT_TEAM = CYDU583KN6; DEVELOPMENT_TEAM = CYDU583KN6;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_FILE = Runner/Info.plist;
@ -525,7 +525,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.93; MARKETING_VERSION = 1.0.96;
PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp; PRODUCT_BUNDLE_IDENTIFIER = com.example.markingApp;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -4,6 +4,9 @@ part 'job_collect_params.g.dart';
@JsonSerializable() @JsonSerializable()
class JobCollectParams extends Object { class JobCollectParams extends Object {
@JsonKey(name: 'paperId')
int paperId;
@JsonKey(name: 'taskId') @JsonKey(name: 'taskId')
int taskId; int taskId;
@ -14,6 +17,7 @@ class JobCollectParams extends Object {
bool isCollect; bool isCollect;
JobCollectParams( JobCollectParams(
this.paperId,
this.taskId, this.taskId,
this.studentId, this.studentId,
this.isCollect, this.isCollect,

View File

@ -19,12 +19,13 @@ class FavoriteWidget extends StatefulWidget {
class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestionsSwitch>, CommonMixin { class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestionsSwitch>, CommonMixin {
Future<JobCollectParams?>? _future; // Future<JobCollectParams?>? _future; //
JobQuestionsSwitch? _eventModel;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
eventOn(callback: (JobQuestionsSwitch eventModel) { eventOn(callback: (JobQuestionsSwitch eventModel) {
_future = getData(eventModel.taskId, eventModel.studentId); _eventModel = eventModel;
_future = getData(eventModel.taskId, eventModel.studentId, eventModel.paperId);
toUpState(setState, () {}, mounted); toUpState(setState, () {}, mounted);
}); });
} }
@ -35,11 +36,11 @@ class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestio
eventCancel(); eventCancel();
} }
Future<JobCollectParams?> getData(int taskId, int studentId) async { Future<JobCollectParams?> getData(int taskId, int studentId, int paperId) async {
try { try {
RestClient _client = await getClient(); RestClient _client = await getClient();
BaseStructureResult<bool> res = await _client.getJobCollect(taskId, studentId); BaseStructureResult<bool> res = await _client.getJobCollect(taskId, studentId);
if (res.success) return JobCollectParams(taskId, studentId, res.data ?? false); if (res.success) return JobCollectParams(paperId, taskId, studentId, res.data ?? false);
} catch (e) {} } catch (e) {}
return null; return null;
@ -47,12 +48,14 @@ class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestio
Future<void> toFavorite(JobCollectParams favoriteVal) async { Future<void> toFavorite(JobCollectParams favoriteVal) async {
try { try {
if (_eventModel?.paperId == null) return;
ToastUtils.showLoading(); ToastUtils.showLoading();
RestClient _client = await getClient(); RestClient _client = await getClient();
favoriteVal.isCollect = !favoriteVal.isCollect; favoriteVal.isCollect = !favoriteVal.isCollect;
favoriteVal.paperId = _eventModel!.paperId;
BaseStructureResult<bool> res = await _client.toJobFavoriteCancel(favoriteVal); BaseStructureResult<bool> res = await _client.toJobFavoriteCancel(favoriteVal);
if (res.success) { if (res.success) {
_future = getData(favoriteVal.taskId, favoriteVal.studentId); _future = getData(favoriteVal.taskId, favoriteVal.studentId, _eventModel!.paperId);
toUpState(setState, () {}, mounted); toUpState(setState, () {}, mounted);
} else { } else {
ToastUtils.showError(res.message ?? '操作失败,请重试'); ToastUtils.showError(res.message ?? '操作失败,请重试');
@ -97,6 +100,7 @@ class _FavoriteState extends State<FavoriteWidget> with EventBusMixin<JobQuestio
class JobQuestionsSwitch extends Object { class JobQuestionsSwitch extends Object {
final int taskId; final int taskId;
final int studentId; final int studentId;
final int paperId;
JobQuestionsSwitch(this.taskId, this.studentId); JobQuestionsSwitch(this.taskId, this.studentId, this.paperId);
} }

View File

@ -11,6 +11,7 @@ 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/common/base_structure_result.dart';
import 'package:marking_app/common/model/event_bus/jobs/job_do_papers_student_bus.dart'; import 'package:marking_app/common/model/event_bus/jobs/job_do_papers_student_bus.dart';
import 'package:marking_app/common/model/job/job_concerned_with_student.dart'; import 'package:marking_app/common/model/job/job_concerned_with_student.dart';
import 'package:marking_app/common/model/job/job_concerned_with_student_params.dart';
import 'package:marking_app/common/model/job/job_do_marking_status_info.dart'; import 'package:marking_app/common/model/job/job_do_marking_status_info.dart';
import 'package:marking_app/common/model/job/job_page_tab.dart'; import 'package:marking_app/common/model/job/job_page_tab.dart';
import 'package:marking_app/common/model/job/job_review_submission.dart'; import 'package:marking_app/common/model/job/job_review_submission.dart';
@ -93,7 +94,7 @@ class DoPapersJob extends HookWidget with EventBusMixin<DoPapersJobRefreshBus> {
exitCallback: () => Navigator.of(context).pop(refresh), exitCallback: () => Navigator.of(context).pop(refresh),
), ),
SizedBox(height: 1.h), SizedBox(height: 1.h),
Expanded(child: ExamPaperAndScoringView(taskId: taskId)), Expanded(child: ExamPaperAndScoringView(taskId: taskId, className: className)),
$BottomOperationBar() $BottomOperationBar()
], ],
), ),
@ -108,7 +109,17 @@ class DoPapersJob extends HookWidget with EventBusMixin<DoPapersJobRefreshBus> {
class ReviewStatusInfo extends HookWidget with CommonMixin { class ReviewStatusInfo extends HookWidget with CommonMixin {
final int taskId; final int taskId;
final int pageIndex; final int pageIndex;
const ReviewStatusInfo({required this.taskId, required this.pageIndex, super.key}); // final int schoolId;
// final int gradeId;
final String className;
const ReviewStatusInfo({
required this.taskId,
required this.pageIndex,
// required this.schoolId,
// required this.gradeId,
required this.className,
super.key,
});
Future<JobDoMarkingStatusInfo?> getData() async { Future<JobDoMarkingStatusInfo?> getData() async {
var _client = await getClient(); var _client = await getClient();
@ -116,6 +127,21 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
return result.data; return result.data;
} }
///
Future<List<JobConcernedWithStudent>?> getStudents() async {
try {
ToastUtils.showLoading();
var _client = await getClient();
var _result = await _client
.getJobWithStudents(JobConcernedWithStudentParams([taskId], isCommit: false, pageIndex: pageIndex));
if (_result.success) return _result.data;
} catch (e) {
ToastUtils.showError('获取数据失败,请重试');
} finally {
ToastUtils.dismiss();
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
var doMarkingInfo = useState<JobDoMarkingStatusInfo?>(null); var doMarkingInfo = useState<JobDoMarkingStatusInfo?>(null);
@ -125,7 +151,66 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
}, []); }, []);
if (doMarkingInfo.value == null) return Container(); if (doMarkingInfo.value == null) return Container();
return Container( return InkWell(
onTap: () async {
print('点击了...');
List<JobConcernedWithStudent>? students = await getStudents();
if (students == null) return;
showModalBottomSheet(
context: context,
elevation: 10,
backgroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(10.r),
topRight: Radius.circular(10.r),
),
),
builder: (BuildContext context) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: 2.w),
child: Column(
children: [
Container(
margin: EdgeInsets.only(top: 14.h),
child: quickText(
'当前页未提交学生名单',
size: 15.sp,
fontWeight: FontWeight.bold,
color: Color.fromRGBO(60, 60, 60, 1),
),
),
SizedBox(height: 10.h),
Expanded(
child: ListView(
padding: EdgeInsets.symmetric(vertical: 8.h, horizontal: 4.w),
children: [
Wrap(
spacing: 6.0, // ()
runSpacing: 4.0, //
alignment: WrapAlignment.spaceAround, //沿
children: students.map((e) {
return Chip(
backgroundColor: Color.fromRGBO(239, 242, 255, 1),
avatar: CircleAvatar(
backgroundColor: Colors.white,
child: quickText(e.studentName.substring(0, 1),
size: 12.sp, color: Theme.of(context).primaryColor),
),
label: quickText(e.studentName, color: Color.fromRGBO(80, 94, 110, 1), size: 12.sp),
);
}).toList(),
),
],
),
)
],
),
);
},
);
},
child: Container(
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
@ -137,6 +222,7 @@ class ReviewStatusInfo extends HookWidget with CommonMixin {
quickText(doMarkingInfo.value!.surplusNo, color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp), quickText(doMarkingInfo.value!.surplusNo, color: Color.fromRGBO(117, 117, 117, 1), size: 10.sp),
], ],
), ),
),
); );
} }
} }
@ -381,7 +467,8 @@ Widget $dropdownBoxSwitchStudentsOrTypeView(BuildContext context,
// //
class ExamPaperAndScoringView extends StatefulHookConsumerWidget { class ExamPaperAndScoringView extends StatefulHookConsumerWidget {
final int taskId; final int taskId;
const ExamPaperAndScoringView({required this.taskId, super.key}); final String className;
const ExamPaperAndScoringView({required this.taskId, required this.className, super.key});
@override @override
_EexamPaperAndScoringViewState createState() => _EexamPaperAndScoringViewState(); _EexamPaperAndScoringViewState createState() => _EexamPaperAndScoringViewState();
@ -444,7 +531,7 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
ref.read(jobHomeWorkProvider.notifier).setVal([]); ref.read(jobHomeWorkProvider.notifier).setVal([]);
} catch (e) {} } catch (e) {}
eventFire(model: JobQuestionsSwitch(jobDetails.taskId, jobDetails.studentId)); eventFire(model: JobQuestionsSwitch(jobDetails.taskId, jobDetails.studentId, jobDetails.paperId));
eventFire( eventFire(
model: JobDoPapersStudentBus( model: JobDoPapersStudentBus(
jobDetails.studentId, jobDetails.studentName, jobDetails.pageIndex, jobDetails.isFirst)); jobDetails.studentId, jobDetails.studentName, jobDetails.pageIndex, jobDetails.isFirst));
@ -522,7 +609,7 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
if (jobData == null) return Container(); // if (jobData == null) return Container(); //
print('容器宽度:${containerWidth};容器高度:${containerHeight}'); // print('容器宽度:${containerWidth};容器高度:${containerHeight}');
return Stack( return Stack(
children: [ children: [
JobPictureOverview( JobPictureOverview(
@ -567,14 +654,20 @@ class _EexamPaperAndScoringViewState extends ConsumerState<ExamPaperAndScoringVi
), ),
/// ///
ReviewStatusInfo(taskId: widget.taskId, pageIndex: jobData!.pageIndex) ReviewStatusInfo(
taskId: widget.taskId,
pageIndex: jobData!.pageIndex,
className: widget.className,
// gradeId: null,
// schoolId: null,
)
], ],
), ),
), ),
Expanded( Expanded(
flex: 2, flex: 2,
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 14.h), padding: EdgeInsets.only(bottom: 14.h, top: 6.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Color.fromRGBO(159, 159, 159, 0.97), color: Color.fromRGBO(159, 159, 159, 0.97),
boxShadow: [ boxShadow: [
@ -715,10 +808,15 @@ Widget $examPaperAndScoringKeyboardView(
Expanded( Expanded(
child: $MaterialBtn( child: $MaterialBtn(
bgc: Color.fromRGBO(237, 237, 237, 1), bgc: Color.fromRGBO(237, 237, 237, 1),
onTap: () => _useDoScoring.goToScoringShortcut( onTap: () {
_useDoScoring.goToScoringShortcut(
scoring: ScoringMethodEnum.CORRECT, scoring: ScoringMethodEnum.CORRECT,
questionNo: question.questionNo, questionNo: question.questionNo,
), );
var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit();
},
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 12.r), padding: EdgeInsets.symmetric(vertical: 12.r),
alignment: Alignment.center, alignment: Alignment.center,
@ -736,10 +834,15 @@ Widget $examPaperAndScoringKeyboardView(
SizedBox(width: 0.2.w), SizedBox(width: 0.2.w),
Expanded( Expanded(
child: $MaterialBtn( child: $MaterialBtn(
onTap: () => _useDoScoring.goToScoringShortcut( onTap: () {
_useDoScoring.goToScoringShortcut(
scoring: ScoringMethodEnum.CORRECT_HALF, scoring: ScoringMethodEnum.CORRECT_HALF,
questionNo: question.questionNo, questionNo: question.questionNo,
), );
var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit();
},
bgc: Color.fromRGBO(237, 237, 237, 1), bgc: Color.fromRGBO(237, 237, 237, 1),
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 12.r), padding: EdgeInsets.symmetric(vertical: 12.r),
@ -758,10 +861,15 @@ Widget $examPaperAndScoringKeyboardView(
SizedBox(width: 0.2.w), SizedBox(width: 0.2.w),
Expanded( Expanded(
child: $MaterialBtn( child: $MaterialBtn(
onTap: () => _useDoScoring.goToScoringShortcut( onTap: () {
_useDoScoring.goToScoringShortcut(
scoring: ScoringMethodEnum.WRONG, scoring: ScoringMethodEnum.WRONG,
questionNo: question.questionNo, questionNo: question.questionNo,
), );
var noAnswerQuestion =
_useDoScoring.submittedData.value.questions.firstWhereOrNull((e) => e.score == null);
if (noAnswerQuestion == null) toSubmit();
},
bgc: Color.fromRGBO(237, 237, 237, 1), bgc: Color.fromRGBO(237, 237, 237, 1),
child: Container( child: Container(
padding: EdgeInsets.symmetric(vertical: 12.r), padding: EdgeInsets.symmetric(vertical: 12.r),
@ -787,6 +895,7 @@ Widget $examPaperAndScoringKeyboardView(
}, },
), ),
), ),
SizedBox(height: 3.h),
Container( Container(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
@ -865,7 +974,7 @@ Widget $examPaperAndScoringKeyboardView(
), ),
), ),
), ),
SizedBox(height: 36.h), SizedBox(height: 26.h),
], ],
), ),
), ),