From bb819d07a14693843a0f0c000283a73a5fe70dcc Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Wed, 24 Jun 2026 23:15:47 +0800 Subject: [PATCH] feat: feishu alert --- src/components/UserInfo/index.vue | 108 ++++++++++++++++++ .../comment/components/CommentReplyList.vue | 64 +---------- src/views/rating/pk/comment/index.vue | 67 +---------- .../pk/list/components/PkParticipantList.vue | 55 +-------- src/views/rating/topic/index.vue | 18 +-- src/views/rating/topicCommentRecord/index.vue | 63 +--------- src/views/rating/topicItem/index.vue | 10 +- src/views/rating/topicRecommend/index.vue | 11 +- src/views/rating/topicScoreRecord/index.vue | 63 +--------- 9 files changed, 153 insertions(+), 306 deletions(-) create mode 100644 src/components/UserInfo/index.vue diff --git a/src/components/UserInfo/index.vue b/src/components/UserInfo/index.vue new file mode 100644 index 0000000..0d65ff7 --- /dev/null +++ b/src/components/UserInfo/index.vue @@ -0,0 +1,108 @@ + + + + + + + + {{ user.nickname || '未知用户' }} + 机器人 + 真人 + + {{ user.id }} + + + + {{ userId }} + + + + + + + diff --git a/src/views/rating/pk/comment/components/CommentReplyList.vue b/src/views/rating/pk/comment/components/CommentReplyList.vue index 07a68d7..358f224 100644 --- a/src/views/rating/pk/comment/components/CommentReplyList.vue +++ b/src/views/rating/pk/comment/components/CommentReplyList.vue @@ -27,25 +27,7 @@ - - - - - - {{ row.user.nickname || '未知用户' }} - 机器人 - 真人 - - - - - {{ row.userId }} - + @@ -78,9 +60,11 @@ import { getCommentList, toggleEnable } from '@/api/rating/pk' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' export default { name: 'CommentReplyList', + components: { UserInfo }, data() { return { title: '回复列表', @@ -188,46 +172,4 @@ .meta-item i { margin-right: 4px; } - - .user-info-cell { - display: flex; - align-items: center; - } - - .user-avatar, - .user-avatar-placeholder { - width: 32px; - height: 32px; - border-radius: 50%; - margin-right: 8px; - flex-shrink: 0; - } - - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 16px; - } - - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - - .user-nickname { - font-weight: bold; - color: #303133; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .user-id { - font-size: 12px; - color: #909399; - } diff --git a/src/views/rating/pk/comment/index.vue b/src/views/rating/pk/comment/index.vue index 56fbc3d..ec1113f 100644 --- a/src/views/rating/pk/comment/index.vue +++ b/src/views/rating/pk/comment/index.vue @@ -79,26 +79,7 @@ - - - - - - {{ row.user.nickname || '未知用户' }} - 机器人 - 真人 - - {{ row.user.id }} - - - - {{ row.userId }} - + @@ -135,13 +116,14 @@ import { getCommentList, toggleEnable, getList as getPkList } from '@/api/rating/pk' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' import PkCommentEdit from './components/PkCommentEdit' import PkCommentLikeEdit from './components/PkCommentLikeEdit' import CommentReplyList from './components/CommentReplyList' export default { name: 'PkComment', - components: { PkCommentEdit, PkCommentLikeEdit, CommentReplyList }, + components: { PkCommentEdit, PkCommentLikeEdit, CommentReplyList, UserInfo }, directives: { loadmore: { bind(el, binding) { @@ -330,47 +312,4 @@ font-weight: bold; color: #303133; } - - .user-info-cell { - display: flex; - align-items: center; - } - - .user-avatar, - .user-avatar-placeholder { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 12px; - flex-shrink: 0; - } - - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 20px; - } - - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - - .user-nickname { - font-weight: bold; - color: #303133; - margin-bottom: 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - - .user-id { - font-size: 12px; - color: #909399; - } diff --git a/src/views/rating/pk/list/components/PkParticipantList.vue b/src/views/rating/pk/list/components/PkParticipantList.vue index 826f8fa..91c8109 100644 --- a/src/views/rating/pk/list/components/PkParticipantList.vue +++ b/src/views/rating/pk/list/components/PkParticipantList.vue @@ -3,14 +3,7 @@ - - - - - {{ row.nickname || '未知用户' }} - {{ row.id }} - - + @@ -30,9 +23,11 @@ - - diff --git a/src/views/rating/topic/index.vue b/src/views/rating/topic/index.vue index 6565fe5..f51b2c0 100644 --- a/src/views/rating/topic/index.vue +++ b/src/views/rating/topic/index.vue @@ -1,10 +1,10 @@ - + 创建话题 - + @@ -21,7 +21,7 @@ 查询 - + @@ -46,10 +46,10 @@ - + - 是 - 否 + + 系统创建 @@ -125,10 +125,11 @@ import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' import TopicEdit from './components/TopicEdit' + import UserInfo from '@/components/UserInfo' export default { name: 'RatingTopicIndex', - components: { TopicEdit }, + components: { TopicEdit, UserInfo }, data() { return { list: [], @@ -145,6 +146,9 @@ } }, created() { + if (this.$route.query.topicId) { + this.queryForm.keyword = this.$route.query.topicId + } this.fetchData() }, methods: { diff --git a/src/views/rating/topicCommentRecord/index.vue b/src/views/rating/topicCommentRecord/index.vue index b8385f7..c6b2d11 100644 --- a/src/views/rating/topicCommentRecord/index.vue +++ b/src/views/rating/topicCommentRecord/index.vue @@ -130,26 +130,7 @@ - - - - - - {{ row.user.nickname || '未知用户' }} - 机器人 - 真人 - - {{ row.user.id }} - - - - {{ row.userId }} - + @@ -182,12 +163,13 @@ import { getList as getItemList } from '@/api/rating/topicItem' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' import RecordCommentEdit from './components/RecordCommentEdit' import RecordCommentLikeEdit from './components/RecordCommentLikeEdit' export default { name: 'RatingTopicCommentIndex', - components: { RecordCommentEdit, RecordCommentLikeEdit }, + components: { RecordCommentEdit, RecordCommentLikeEdit, UserInfo }, directives: { loadmore: { bind(el, binding) { @@ -420,45 +402,6 @@ margin-right: 4px; } - /* 用户信息列样式 */ - .user-info-cell { - display: flex; - align-items: center; - } - .user-avatar, - .user-avatar-placeholder { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 12px; - flex-shrink: 0; - } - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 20px; - } - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - .user-nickname { - font-weight: bold; - color: #303133; - margin-bottom: 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .user-id { - font-size: 12px; - color: #909399; - } - /* 评价目标列样式 */ .target-info-cell { display: flex; diff --git a/src/views/rating/topicItem/index.vue b/src/views/rating/topicItem/index.vue index 32ce313..f8b89ba 100644 --- a/src/views/rating/topicItem/index.vue +++ b/src/views/rating/topicItem/index.vue @@ -61,6 +61,13 @@ + + + + 系统创建 + + + @@ -150,10 +157,11 @@ import { getThumbUrl } from '@/utils/blessing' import TopicItemRatingEdit from './components/TopicItemRatingEdit' import TopicItemCommentEdit from './components/TopicItemCommentEdit' + import UserInfo from '@/components/UserInfo' export default { name: 'RatingTopicItemIndex', - components: { TopicItemRatingEdit, TopicItemCommentEdit }, + components: { TopicItemRatingEdit, TopicItemCommentEdit, UserInfo }, data() { return { list: [], diff --git a/src/views/rating/topicRecommend/index.vue b/src/views/rating/topicRecommend/index.vue index 3512d50..eb7aff8 100644 --- a/src/views/rating/topicRecommend/index.vue +++ b/src/views/rating/topicRecommend/index.vue @@ -9,7 +9,7 @@ - + {{ row.topic ? row.topic.title : '-' }} Topic ID: @@ -91,6 +91,14 @@ this.queryForm.pageNo = val this.fetchData() }, + handleClick(topic) { + this.$router.push({ + path: '/rating/topic', + query: { + topicId: topic.id, + }, + }) + }, async fetchData() { this.listLoading = true try { @@ -142,6 +150,7 @@ .topic-cell { display: flex; flex-direction: column; + cursor: pointer; } .topic-title { diff --git a/src/views/rating/topicScoreRecord/index.vue b/src/views/rating/topicScoreRecord/index.vue index b9da238..ad83f35 100644 --- a/src/views/rating/topicScoreRecord/index.vue +++ b/src/views/rating/topicScoreRecord/index.vue @@ -108,26 +108,7 @@ - - - - - - {{ row.user.nickname || '未知用户' }} - 机器人 - 真人 - - {{ row.user.id }} - - - - {{ row.userId }} - + @@ -161,11 +142,12 @@ import { getList as getItemList } from '@/api/rating/topicItem' import { formatTime } from '@/utils' import { getThumbUrl } from '@/utils/blessing' + import UserInfo from '@/components/UserInfo' import RecordRatingEdit from './components/RecordRatingEdit' export default { name: 'RatingTopicRecordIndex', - components: { RecordRatingEdit }, + components: { RecordRatingEdit, UserInfo }, directives: { loadmore: { bind(el, binding) { @@ -392,45 +374,6 @@ padding: 20px; } - /* 用户信息列样式 */ - .user-info-cell { - display: flex; - align-items: center; - } - .user-avatar, - .user-avatar-placeholder { - width: 40px; - height: 40px; - border-radius: 50%; - margin-right: 12px; - flex-shrink: 0; - } - .user-avatar-placeholder { - background-color: #f0f2f5; - display: flex; - align-items: center; - justify-content: center; - color: #909399; - font-size: 20px; - } - .user-details { - display: flex; - flex-direction: column; - overflow: hidden; - } - .user-nickname { - font-weight: bold; - color: #303133; - margin-bottom: 4px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; - } - .user-id { - font-size: 12px; - color: #909399; - } - /* 评价目标列样式 */ .target-info-cell { display: flex;