From 9d2f15c80c833600ec98591a89542e05ef7fe386 Mon Sep 17 00:00:00 2001 From: "DESKTOP-I3JPKHK\\wy" <1111> Date: Wed, 23 Apr 2025 15:27:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=98=85=E9=A1=B5=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/question_number_view.dart | 4 ++ .../components/question_paper_view.dart | 27 +++++++++- .../configuration_files/index.dart | 52 ++++++++++--------- 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_number_view.dart b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_number_view.dart index af3fc05..aed266f 100644 --- a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_number_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_number_view.dart @@ -148,6 +148,10 @@ Widget $scoringQuestionsView(BuildContext context, List? stude studentScore.value = item.studentScore; }); + // useValueChanged(item, (_, __) { + // studentScore.value = item.studentScore; + // }); + useEffect(() { /// 学生打分数据 studentScoreListener() { diff --git a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_paper_view.dart b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_paper_view.dart index fba8382..5d1f227 100644 --- a/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_paper_view.dart +++ b/making_school_asignment_app/lib/page/home_page/children/homework_review/components/question_paper_view.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'dart:math'; import 'package:flutter/cupertino.dart'; @@ -278,6 +279,10 @@ class QuestionImageView extends HookWidget with EventBusMixin(maxHeight); @@ -424,21 +429,38 @@ class QuestionImageView extends HookWidget with EventBusMixin 0) { + _activePointers = 0; + if (vnHandWritings.value.last != null) { + vnHandWritings.value.add(null); // 增加空点以分隔不同的线段 + sateData.handwritings = vnHandWritings.value; // 添加笔迹数据 + } + } + }); sateData.panQuestView = true; }, onPointerUp: (PointerUpEvent details) { // 处理单个触摸点抬起的逻辑 // activePointers--; // globalPosition = null; - _activePointers--; + if (_activePointers > 0) { + _activePointers = _activePointers - 1; + } + print("---进入:onPointerUp $_activePointers"); + timer?.cancel(); if (!annotationState.pen.value) return; vnHandWritings.value.add(null); // 增加空点以分隔不同的线段 sateData.handwritings = vnHandWritings.value; // 添加笔迹数据 }, onPointerMove: (PointerMoveEvent event) { + print("进入:onPointerMove $_activePointers"); if (_activePointers != 1) return; + timer?.cancel(); if (!annotationState.pen.value) return; Offset localPosition = event.localPosition; // 相对 @@ -486,6 +508,7 @@ class QuestionImageView extends HookWidget with EventBusMixin getData()); super.onInit(); } @@ -311,32 +311,36 @@ class HomeworkReviewLogic extends GetxController with RequestToolMixin { var totalUnAnnotateCount = data.totalUnAnnotateCount; if (data.needAnnotate) totalUnAnnotateCount -= 1; // 是否需要批阅 - if (totalUnAnnotateCount <= 0 && !state.lastQuestionPrompt) { + if (totalUnAnnotateCount <= 0) { // 批阅完成 - showDialog( - context: context, - builder: (BuildContext context1) { - return AlertDialog( - title: quickText('批阅已完成'), - content: const Text('暂无更多批阅项'), - actions: [ - TextButton( - child: const Text('继续'), - onPressed: () { - state.lastQuestionPrompt = true; - Navigator.of(context1).pop(); - }, - ), - TextButton( - child: const Text('退出批阅'), + if (!state.lastQuestionPrompt) { + await showDialog( + context: context, + builder: (BuildContext context1) { + return AlertDialog( + title: quickText('批阅已完成'), + content: const Text('暂无更多批阅项'), + actions: [ + TextButton( + child: const Text('继续'), onPressed: () { + state.lastQuestionPrompt = true; Navigator.of(context1).pop(); - Get.back(); - }), - ], - ); - }, - ); + }, + ), + TextButton( + child: const Text('退出批阅'), + onPressed: () { + Navigator.of(context1).pop(); + Get.back(); + }), + ], + ); + }, + ); + }else{ + ToastUtils.showSuccess("已经提交",duration:const Duration(milliseconds: 800)); + } return; } var newParams = DoPaperDetailsParam.fromJson(state.param.value.toJson());