From cab94aaf6fb711289fa3e7567435ff70c4255d78 Mon Sep 17 00:00:00 2001
From: AfyerCu <20569838@qq.com>
Date: Sun, 16 Nov 2025 18:35:37 +0800
Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E9=98=85?=
=?UTF-8?q?=E5=8D=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 5 +-
src/components/common/DragSort.vue | 161 +++++++++++++
src/components/marking/TaskCard.vue | 29 ++-
.../marking/components/QuickScorePanel.vue | 36 +--
.../components/dialog/ScoreSettingsDialog.vue | 211 ++++++++++--------
.../renderer/MarkingImageViewerNew.vue | 80 ++++++-
.../components/renderer/QuestionRenderer.vue | 2 +-
.../marking/composables/useMarkingData.ts | 105 +++++----
.../marking/composables/useMarkingSettings.ts | 97 ++++----
src/composables/marking/MarkingContext.ts | 26 +--
.../marking/useMarkingNavigation.ts | 6 +-
src/http/http.ts | 8 +-
src/pages/marking/grading.vue | 38 +++-
src/service/types.ts | 4 +
src/store/user.ts | 6 +-
15 files changed, 541 insertions(+), 273 deletions(-)
create mode 100644 src/components/common/DragSort.vue
diff --git a/src/App.vue b/src/App.vue
index 706030d..ece9ede 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -38,7 +38,7 @@ function handlePageNavigation(targetPath?: string) {
const isLoggedIn = userStore.isLogin && userStore.accessToken
// 如果未登录且不是公开页面,跳转到加载页
- if (!isLoggedIn && targetPath && !isPublicPage(targetPath)) {
+ if (!isLoggedIn) {
console.log('用户未登录,跳转到加载页')
uni.reLaunch({
url: '/pages/auth/index',
@@ -47,11 +47,12 @@ function handlePageNavigation(targetPath?: string) {
}
// 如果已登录且访问的是登录相关页面,跳转到首页
- if (isLoggedIn && targetPath && isPublicPage(targetPath)) {
+ if (isLoggedIn) {
console.log('用户已登录,跳转到首页')
uni.reLaunch({
url: '/pages/index/index',
})
+ tabbarStore.setCurIdx(0)
return
}
diff --git a/src/components/common/DragSort.vue b/src/components/common/DragSort.vue
new file mode 100644
index 0000000..1d10a95
--- /dev/null
+++ b/src/components/common/DragSort.vue
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+ {{ item }}
+
+
+
+
+
+
diff --git a/src/components/marking/TaskCard.vue b/src/components/marking/TaskCard.vue
index 04889e0..cbafd90 100644
--- a/src/components/marking/TaskCard.vue
+++ b/src/components/marking/TaskCard.vue
@@ -49,6 +49,15 @@ function getStatusTagType(status?: string): 'primary' | 'success' | 'warning' |
// 进入阅卷
function handleEnterMarking(subject: SubjectInfo) {
+ // 已统分的考试不能进入
+ if (props.task.is_scored) {
+ uni.showToast({
+ title: '已完成,不能再进入',
+ icon: 'none',
+ })
+ return
+ }
+
if (!props.task.exam_id || !subject.subject_id) {
uni.showToast({
title: '参数错误',
@@ -84,22 +93,24 @@ function navigateToQuality(subjectId: number) {
-
+
{{ task.exam_name }}
+ 已完成
+
+
+
+
+
+ {{ task.exam_type }}
+
+ ID: {{ task.exam_id }}
{{ formatDate(task.exam_date) }}
-
-
-
-
-
- {{ task.exam_type }}
-
- 考试ID: {{ task.exam_id }}
+ {{ task.grade }}
diff --git a/src/components/marking/components/QuickScorePanel.vue b/src/components/marking/components/QuickScorePanel.vue
index 05f50c1..6247ff5 100644
--- a/src/components/marking/components/QuickScorePanel.vue
+++ b/src/components/marking/components/QuickScorePanel.vue
@@ -1,8 +1,8 @@
@@ -313,7 +322,7 @@ function resetQuickScoreScores() {
:close-on-click-modal="false"
custom-class="score-settings-popup"
>
-
+
@@ -413,21 +422,8 @@ function resetQuickScoreScores() {
- 给分排序
-
-
-
-
- {{ content }}
-
-
-
+
+ 给分排序
+
+
+
+ {{ item }}
+
+
+
@@ -492,21 +501,8 @@ function resetQuickScoreScores() {
- 给分排序
-
-
-
-
- {{ content }}
-
-
-
+
+ 给分排序
+
+
+
+ {{ item }}
+
+
+
@@ -539,7 +548,13 @@ function resetQuickScoreScores() {