From 6445a02d5964880b2a9878c529f857fd77b0c9e7 Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Thu, 22 Oct 2026 21:13:05 +0800
Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E5=8D=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../survey/components/SurveyResultsDialog.vue | 16 ++++++++--------
tests/unit/components/Survey.spec.js | 5 ++++-
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/views/survey/components/SurveyResultsDialog.vue b/src/views/survey/components/SurveyResultsDialog.vue
index 8a44111..0fd4c93 100644
--- a/src/views/survey/components/SurveyResultsDialog.vue
+++ b/src/views/survey/components/SurveyResultsDialog.vue
@@ -87,19 +87,19 @@
>{{
- (scope.row.user || {}).name || "—"
+ (scope.row.respondent || scope.row.user || {}).name || "—"
}}{{
- (scope.row.user || {}).no || "—"
+ (scope.row.respondent || scope.row.user || {}).no || "—"
}}{{
- (scope.row.user || {}).company_name || "—"
+ (scope.row.respondent || scope.row.user || {}).company_name || "—"
}}{{
- (scope.row.user || {}).company_position || "—"
+ (scope.row.respondent || scope.row.user || {}).company_position || "—"
}}{{
@@ -138,13 +138,13 @@
border
:column="2"
>{{
- (reply.user || {}).name || "—"
+ (reply.respondent || reply.user || {}).name || "—"
}}{{
reply.updated_at || reply.created_at
}}{{
- (reply.user || {}).company_name || "—"
+ (reply.respondent || reply.user || {}).company_name || "—"
}}{{
- (reply.user || {}).no || "—"
+ (reply.respondent || reply.user || {}).no || "—"
}}
{
title: '提交时的标题',
desc: '历史问卷说明
'
},
- user: { name: '学员' },
+ user: { name: null, company_name: null },
+ respondent: { name: '问卷中的姓名', company_name: '问卷中的公司' },
questions: [
{ id: 1, name: '历史题目', edit_input: 'number', display_value: '0' }
]
@@ -437,6 +438,8 @@ describe('Survey editing and results', () => {
await wrapper.vm.openReply({ id: 7 })
await flush()
expect(wrapper.vm.reply.snapshot.title).toBe('提交时的标题')
+ expect(document.body.textContent).toContain('问卷中的姓名')
+ expect(document.body.textContent).toContain('问卷中的公司')
expect(
document.body.querySelector('.reply .description strong').textContent
).toBe('历史问卷说明')