mcy_new #1

Merged
wangyang merged 179 commits from mcy_new into master 2025-08-28 10:10:45 +08:00
50 changed files with 110 additions and 52 deletions
Showing only changes of commit 4919e72008 - Show all commits

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#FFFFFF</item>
<item name="android:windowSplashScreenBackground">#8C68FF</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.

View File

@ -6,7 +6,7 @@
<item name="android:windowFullscreen">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">false</item>
<item name="android:windowLayoutInDisplayCutoutMode">shortEdges</item>
<item name="android:windowSplashScreenBackground">#FFFFFF</item>
<item name="android:windowSplashScreenBackground">#8C68FF</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/android12splash</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

View File

@ -5,12 +5,13 @@ flutter_native_splash:
# 如需恢复默认的白屏,执行如下命令
# flutter pub run flutter_native_splash:remove
# 设置闪屏页的默认态logo或背景图片路径
color: "#FFFFFF"
color: "#8C68FF"
image_ios: assets/images/splash_native.png
background_image_android: assets/images/splash_native.png
android_12:
image: assets/images/splash2.png
image: assets/images/logo_splash.png
android: true
ios: true
android_gravity: fill
android_gravity: clip_vertical
ios_content_mode: scaleToFill

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

View File

@ -1,10 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
@ -16,15 +14,10 @@
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFill" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
</imageView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" image="LaunchBackground" translatesAutoresizingMaskIntoConstraints="NO" id="tWc-Dq-wcI"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4"></imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
@ -41,11 +34,11 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="80.916030534351137" y="264.08450704225356"/>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<image name="LaunchImage" width="751" height="1734"/>
<image name="LaunchBackground" width="1" height="1"/>
<image name="LaunchImage" width="187.66667175292969" height="433.33334350585938"/>
</resources>
</document>

View File

@ -20,3 +20,18 @@ class BottomOperationBar extends Object {
Map<String, dynamic> toJson() => _$BottomOperationBarToJson(this);
}
@JsonSerializable()
class ZoomKey extends Object {
ZoomKey();
factory ZoomKey.fromJson(Map<String, dynamic> srcJson) => _$ZoomKeyFromJson(srcJson);
Map<String, dynamic> toJson() => _$ZoomKeyToJson(this);
}

View File

@ -66,6 +66,27 @@ class DropdownSwitchStudentsType extends StatelessWidget {
}).toList(),
onChanged: (value) {
if (logic.state.param.value.templateId == value) return;
var templateIds = logic.state.data.value?.templateIds;
if (value != null && templateIds != null) {
final templateIdKeyMap = logic.state.data.value?.templateIdKeyMap;
var answeredAlready = templateIds[value.toString()];
if (answeredAlready != null && !answeredAlready) {
final currentStudentId = sateData.value?.studentId;
final students = sateData.value?.students ?? [];
//
final currentStudent = currentStudentId != null ? students.firstWhereOrNull((e) => e.id == currentStudentId) : null;
final studentName = currentStudent?.name ?? '当前学生';
final questionNumber = templateIdKeyMap?[value] ?? '当前选择页';
ToastUtils.showInfo("$studentName第$questionNumber页,未作答 无需批阅");
return;
}
}
logic.state.param.value.templateId = value;
logic.state.param.value = DoPaperDetailsParam.fromJson(logic.state.param.value.toJson());
// _useSwitchStudentAndType.currentTab.value = _useSwitchStudentAndType.tabs.value.firstWhere((element) => element.pageIndex == value);
@ -215,8 +236,9 @@ Widget $continueToReview(BuildContext context, {bool isFloatingAction = false})
var param = logic.state.param.value;
int? submitCount = data?.submitCount; //
int? annotatedCount = data?.annotatedCount; //
if (data == null || (submitCount == annotatedCount || (param.templateId == null && param.studentId == null))) return const SizedBox();
// || (submitCount == annotatedCount || (param.templateId == null && param.studentId == null))
// TODO true 1/2/3/4 12 4
if (data == null || (data.needAnnotate ? true : data.totalUnAnnotateCount <= 0) ) return const SizedBox();
callFun() => easyThrottle(
'DO_PAPERS_JOB_CONTINUE_TO_REVIEW',
() {

View File

@ -6,7 +6,6 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:functional_widget_annotation/functional_widget_annotation.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_test_questions_image_info.dart';
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
import 'package:making_school_asignment_app/common/utils/toast_utils.dart';
import 'package:making_school_asignment_app/page/global_widget/my_text.dart';
@ -34,13 +33,11 @@ class QuestionNumberView extends GetView<HomeworkReviewLogic> {
onPanDown: (_) => sateData.panQuestView = false,
child: Obx(() {
var zoomFile = sateZoomData.zoomFile.value;
if (zoomFile == null) return const SizedBox();
var studentQuestions = sateData.studentQuestions.value ?? [];
return $QuestionNumberScrollView(
controller: controller,
sateData: sateData,
sateZoomData: sateZoomData,
);
if (zoomFile == null || studentQuestions.isEmpty) return const SizedBox();
return $QuestionNumberScrollView(controller: controller, sateData: sateData, sateZoomData: sateZoomData, studentQuestions: studentQuestions);
}),
),
);
@ -53,19 +50,24 @@ Widget $questionNumberScrollView({
required ZoomState sateZoomData,
required HomeworkReviewState sateData,
required HomeworkReviewLogic controller,
required List<StudentQuestions> studentQuestions,
}) {
final scrollControllerNum = useScrollController(); //
var studentQuestions = useState<List<StudentQuestions>>(sateData.studentQuestions.value ?? []);
// var studentQuestions = useState<List<StudentQuestions>>(sateData.studentQuestions.value ?? []);
var useZoom = useState<double>(sateZoomData.initScale.value ?? 1);
var usePiddingTop = useState<double>(sateZoomData.zoomFile.value?.imageHeightOffsetStart ?? 0);
useValueChanged<double?, void>(sateZoomData.zoomFile.value?.imageHeightOffsetStart, (_, __) {
usePiddingTop.value = sateZoomData.zoomFile.value?.imageHeightOffsetStart ?? 0;
});
useEffect(() {
var studentQuestionsStream = sateData.studentQuestions.listen((e) {
studentQuestions.value = e ?? [];
// var studentQuestionsStream = sateData.studentQuestions.listen((e) {
// studentQuestions.value = e ?? [];
// });
var sateDataDataStream = sateData.data.listen((e){
scrollControllerNum.jumpTo(0);
});
var stream = sateZoomData.initScale.listen((e) {
// print("initScale : $e");
useZoom.value = e ?? 1;
@ -85,7 +87,8 @@ Widget $questionNumberScrollView({
return () {
stream.cancel();
studentQuestionsStream.cancel();
sateDataDataStream.cancel();
// studentQuestionsStream.cancel();
};
}, []);
@ -127,13 +130,14 @@ Widget $questionNumberScrollView({
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
mainAxisSize: MainAxisSize.min,
children: studentQuestions.value
children: studentQuestions
.map((e) => $ScoringQuestionsView(
sateData,
e,
controller,
sateZoomData.zoomFile.value!.scaleRatio,
useZoom.value,
key: Key('${sateData.data.value?.templateId}_${sateData.data.value?.studentId}_${e.questionNo}'),
sateData:sateData,
item:e,
logic:controller,
scaleRatio:sateZoomData.zoomFile.value!.scaleRatio,
initScale:useZoom.value,
))
.toList(),
),
@ -143,7 +147,14 @@ Widget $questionNumberScrollView({
//
@hwidget
Widget $scoringQuestionsView(BuildContext context, HomeworkReviewState sateData, StudentQuestions item, HomeworkReviewLogic logic, double scaleRatio, double initScale) {
Widget $scoringQuestionsView(
BuildContext context, {
required HomeworkReviewState sateData,
required StudentQuestions item,
required HomeworkReviewLogic logic,
required double scaleRatio,
required double initScale,
}) {
var studentScore = useState<int?>(item.studentScore);
useValueChanged<int?, void>(item.studentScore, (_, __) {
@ -157,6 +168,7 @@ Widget $scoringQuestionsView(BuildContext context, HomeworkReviewState sateData,
useEffect(() {
///
studentScoreListener() {
print(item.toJson());
item.studentScore = studentScore.value;
var theVal = sateData.studentQuestions.value?.firstWhereOrNull((e) => e.questionNo == item.questionNo);
if (theVal != null) theVal.studentScore = studentScore.value;

View File

@ -11,7 +11,6 @@ import 'package:get/get.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_bus.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_param.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_paper_details_result.dart';
import 'package:making_school_asignment_app/common/job/marking_models/do_test_questions_image_info.dart';
import 'package:making_school_asignment_app/common/mixins/event_bus_mixin.dart';
import 'package:making_school_asignment_app/common/utils/anti_shake_throttling.dart';
import 'package:making_school_asignment_app/common/utils/cached_network_img.dart';

View File

@ -32,9 +32,9 @@ class HomeworkReviewState {
// late String homeworkId;
// late String homeworkName;
late Rx<DoPaperDetailsParam> param;
late Rx<DoPaperDetailsResult?> data;
late Rx<List<StudentQuestions>?> studentQuestions;
late Rx<double> slide; //
late Rx<DoPaperDetailsResult?> data = Rx<DoPaperDetailsResult?>(null);
late Rx<List<StudentQuestions>?> studentQuestions = Rx<List<StudentQuestions>?>(null);
late Rx<double> slide = 0.0.obs; //
bool? panQuestView = null;
// late Rx<TestQuestionsImageInfo?> imageScale;
// late Rx<TestQuestionsImageInfo?> imageScaleZoom = Rx<TestQuestionsImageInfo?>(null);
@ -98,10 +98,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
classId: Get.arguments['classId'],
subject: Get.arguments['subject'],
).obs;
state.data = Rx<DoPaperDetailsResult?>(null);
state.studentQuestions = Rx<List<StudentQuestions>?>(null);
// state.imageScale = Rx<TestQuestionsImageInfo?>(null);
state.slide = 0.0.obs;
//
_paramListen = state.param.listen((e) => getData());
@ -110,7 +107,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
if (e == null) return;
var zoomState = zoomLogic.zoomState;
state.studentQuestions.value = e.studentQuestions; //
final currentTemplateId = zoomState.zoomFile.value?.templateId; // ID
if (currentTemplateId != null && currentTemplateId != e.templateId) {
@ -177,6 +174,7 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin, EventBus
state.param.value.templateId ??= data.templateId;
state.param.value.studentId ??= data.studentId;
state.studentQuestions.value = data.studentQuestions; //
state.data.value = data;
} catch (e) {
print('获取数据报错了:$e');

View File

@ -36,6 +36,9 @@ class LoginLogic extends GetxController with RequestToolMixin {
// state.userNameController.text = "AppleTester";
// state.passwordController.text = "AppleTester123!";
// state.userNameController.text = "SZJY200504252";
// state.passwordController.text = "504252";
state.pwdFocus = FocusNode();
state.theFocus = FocusNode();
getShowUserAdditionalFeatures(); //

View File

@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.5+6
version: 1.0.3+4
environment:
sdk: '>=3.4.1 <4.0.0'
@ -100,7 +100,8 @@ dependencies:
device_info_plus: ^11.1.0
auto_size_text: ^3.0.0
# dependency_overrides:
# meta: ^1.15.0
dev_dependencies:
flutter_test:

View File

@ -187,6 +187,20 @@
@ -210,7 +224,7 @@
body {
margin: 0;
min-height: 100%;
background-color: #FFFFFF;
background-color: #8C68FF;
background-size: 100% 100%;
}