From 4fb04c2be82b42eab5b0cda3a6fd7fdc7fcd5fbc Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Mon, 15 Jun 2026 15:37:27 +0800 Subject: [PATCH] feat: audit --- src/api/rating/topicItem.js | 11 ++ src/router/index.js | 28 ++- src/views/rating/topicItemReview/index.vue | 171 ++++++++++++++++++ .../topicReview/components/ReviewEdit.vue | 6 +- 4 files changed, 211 insertions(+), 5 deletions(-) create mode 100644 src/views/rating/topicItemReview/index.vue diff --git a/src/api/rating/topicItem.js b/src/api/rating/topicItem.js index 807e583..8ce719f 100644 --- a/src/api/rating/topicItem.js +++ b/src/api/rating/topicItem.js @@ -47,3 +47,14 @@ export function toggleEnable(id, isEnabled) { data: { isEnabled }, }) } + +/** + * 评分项审核列表 + */ +export function getPendingList(data) { + return request({ + url: 'management/api/rating/topicItem/pending/list', + method: 'get', + params: data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index f3e518a..4e9c21b 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -118,10 +118,30 @@ export const asyncRoutes = [ ], }, { - path: 'topic-review', - name: 'RatingTopicReviewIndex', - component: () => import('@/views/rating/topicReview/index'), - meta: { title: '话题审核' }, + path: '审核', + component: EmptyLayout, + alwaysShow: true, + redirect: 'noRedirect', + name: 'AuditIndex', + meta: { + title: '审核', + icon: 'clover', + permissions: ['admin'], + }, + children: [ + { + path: 'topic-review', + name: 'RatingTopicReviewIndex', + component: () => import('@/views/rating/topicReview/index'), + meta: { title: '话题审核' }, + }, + { + path: 'item-review', + name: 'RatingTopicItemReviewIndex', + component: () => import('@/views/rating/topicItemReview/index'), + meta: { title: '评分项审核' }, + }, + ], }, ], }, diff --git a/src/views/rating/topicItemReview/index.vue b/src/views/rating/topicItemReview/index.vue new file mode 100644 index 0000000..a500aa7 --- /dev/null +++ b/src/views/rating/topicItemReview/index.vue @@ -0,0 +1,171 @@ + + + + + + + + + + {{ row.name || '-' }} + + 所属话题: + {{ row.topic && row.topic.title ? row.topic.title : row.topicId || '-' }} + + + + + + + + + 审核中 + 已通过 + 已拒绝 + 禁用 + - + + + + + + {{ formatTime(row.createdAt) }} + + + + + + 通过 + 拒绝 + + + + + + + + + + + + + diff --git a/src/views/rating/topicReview/components/ReviewEdit.vue b/src/views/rating/topicReview/components/ReviewEdit.vue index 786f9a2..e97f8b0 100644 --- a/src/views/rating/topicReview/components/ReviewEdit.vue +++ b/src/views/rating/topicReview/components/ReviewEdit.vue @@ -62,7 +62,11 @@ async save() { this.saving = true try { - const { msg } = await reviewTopic(this.form) + const payload = { ...this.form } + if (payload.itemId && !payload.itemmId) { + payload.itemmId = payload.itemId + } + const { msg } = await reviewTopic(payload) this.$baseMessage(msg || '操作成功', 'success') this.$emit('fetch-data') this.close()