From 28fff91b57f56d9af1c823845492e4a46e976141 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Sun, 5 Jul 2026 18:38:32 +0800 Subject: [PATCH] fix: robot --- src/views/rating/pk/list/index.vue | 32 +++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/src/views/rating/pk/list/index.vue b/src/views/rating/pk/list/index.vue index a54eb9e..6f5a01b 100644 --- a/src/views/rating/pk/list/index.vue +++ b/src/views/rating/pk/list/index.vue @@ -127,13 +127,18 @@ style="width: 100%" > -
- - {{ item.nickname || '未知用户' }} +
+
+ + {{ item.nickname || '未知用户' }} +
+ + {{ getCommentUserChooseName(item.choose) }} +
@@ -233,6 +238,7 @@ }, commentUserTotal: 0, fetchingCommentUsers: false, + currentCommentPk: null, } }, created() { @@ -342,8 +348,19 @@ handleVote(pkId, itemId, itemName) { this.$refs['voteEdit'].showEdit(pkId, itemId, itemName) }, + getCommentUserChooseName(choose) { + if (!choose || !this.currentCommentPk) return '-' + if (choose === this.currentCommentPk.leftItemId) { + return this.currentCommentPk.leftItemName || '-' + } + if (choose === this.currentCommentPk.rightItemId) { + return this.currentCommentPk.rightItemName || '-' + } + return '-' + }, handleComment(row) { this.commentDialogVisible = true + this.currentCommentPk = row this.commentForm = { pkId: row.id, userId: '', @@ -360,6 +377,7 @@ this.$refs['commentForm'].resetFields() } this.commentDialogVisible = false + this.currentCommentPk = null }, async fetchCommentUsers() { if (this.fetchingCommentUsers || !this.commentUserQuery.pkId) return