From ff9a181c998d6cabe2034e90717154e6c16f85f1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=89=AB=E5=9C=B0=E5=83=A7?= <357099073@qq.com>
Date: Mon, 17 Nov 2025 23:51:41 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E7=9B=AE=E5=BC=95=E5=85=A5=E7=BC=96?=
=?UTF-8?q?=E8=BE=91=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/detail.vue | 28 ++++++++--
.../examinationQuestions/components/edit.vue | 56 +++++++++++++++++--
2 files changed, 75 insertions(+), 9 deletions(-)
diff --git a/pc/src/views/apps/exams/examinationQuestions/components/detail.vue b/pc/src/views/apps/exams/examinationQuestions/components/detail.vue
index 57b2cae..8a20542 100644
--- a/pc/src/views/apps/exams/examinationQuestions/components/detail.vue
+++ b/pc/src/views/apps/exams/examinationQuestions/components/detail.vue
@@ -1,14 +1,20 @@
- {{ q?.question_title || '-' }}
+
+
+ -
+
{{ displayType }}
{{ q?.score ?? '-' }}
{{ (answerDisplay || []).join(', ') }}
{{ answerDisplay || '-' }}
- {{ q?.question_analysis || '-' }}
+
+
+ -
+
{{ formatTime(q?.create_time || q?.created_at) }}
{{ formatTime(q?.update_time || q?.updated_at) }}
@@ -16,7 +22,11 @@
@@ -42,7 +52,11 @@ const typeOptions = ref([])
const q = computed(() => (props.model && (props.model.Question || props.model)) || null)
const displayType = computed(() => {
- const typeValue = String(q.value?.question_type ?? '')
+ // 兼容多种返回字段:question_type / QuestionType,根节点或 Question 内部
+ const raw = q.value
+ ? (q.value.question_type ?? q.value.QuestionType)
+ : (props.model?.question_type ?? props.model?.QuestionType)
+ const typeValue = raw != null ? String(raw) : ''
const found = typeOptions.value.find(opt => String(opt.dict_value) === typeValue)
return found ? found.dict_label : typeValue
})
@@ -89,4 +103,10 @@ function handleClose() {
diff --git a/pc/src/views/apps/exams/examinationQuestions/components/edit.vue b/pc/src/views/apps/exams/examinationQuestions/components/edit.vue
index 48058b3..1d9b988 100644
--- a/pc/src/views/apps/exams/examinationQuestions/components/edit.vue
+++ b/pc/src/views/apps/exams/examinationQuestions/components/edit.vue
@@ -24,7 +24,7 @@
-
+
@@ -67,7 +67,7 @@
-
+
@@ -115,10 +115,11 @@