From acef084df756034abce7b7feac8d2d8623d6297d Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Tue, 9 Jun 2026 10:05:24 +0800 Subject: [PATCH] fix: rating --- src/api/rating/topic.js | 13 + src/api/rating/topicOperate.js | 17 ++ src/router/index.js | 6 + .../topicReview/components/ReviewEdit.vue | 75 +++++ src/views/rating/topicReview/index.vue | 270 ++++++++++++++++++ 5 files changed, 381 insertions(+) create mode 100644 src/views/rating/topicReview/components/ReviewEdit.vue create mode 100644 src/views/rating/topicReview/index.vue diff --git a/src/api/rating/topic.js b/src/api/rating/topic.js index b38d448..36b741d 100644 --- a/src/api/rating/topic.js +++ b/src/api/rating/topic.js @@ -8,6 +8,19 @@ export function getList(data) { }) } +/** + * 获取待审核话题列表 + * @param {pageNo: number, pageSize: number} data + * @returns + */ +export function getPendingList(data) { + return request({ + url: 'management/api/rating/topic/pending/list', + method: 'get', + params: data, + }) +} + export function getAllList(data) { return request({ url: 'management/api/rating/topic/list/all', diff --git a/src/api/rating/topicOperate.js b/src/api/rating/topicOperate.js index 8e28562..70f9f1d 100644 --- a/src/api/rating/topicOperate.js +++ b/src/api/rating/topicOperate.js @@ -65,3 +65,20 @@ export function commentLike(data) { data, }) } + +/** + * 审核话题 + * @param { topicId, userId, status, type, rejectReason?, auditRemark? } + * @param {*} status 2: 通过, 3: 拒绝 + * @param {*} type topic topicItem + * @param {*} rejectReason 拒绝原因 + * @param {*} auditRemark 审核备注 + * @returns + */ +export function reviewTopic(data) { + return request({ + url: 'management/api/rating/topicItemOperate/review', + method: 'post', + data, + }) +} diff --git a/src/router/index.js b/src/router/index.js index ba7f2c4..7d8c780 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -85,6 +85,12 @@ export const asyncRoutes = [ component: () => import('@/views/rating/topicCategory/index'), meta: { title: '评分话题分类' }, }, + { + path: 'topic-review', + name: 'RatingTopicReviewIndex', + component: () => import('@/views/rating/topicReview/index'), + meta: { title: '话题审核' }, + }, ], }, { diff --git a/src/views/rating/topicReview/components/ReviewEdit.vue b/src/views/rating/topicReview/components/ReviewEdit.vue new file mode 100644 index 0000000..c4342e9 --- /dev/null +++ b/src/views/rating/topicReview/components/ReviewEdit.vue @@ -0,0 +1,75 @@ + + + + + + {{ form.status === 2 ? '通过' : '拒绝' }} + + + + + + + + + + + + + + diff --git a/src/views/rating/topicReview/index.vue b/src/views/rating/topicReview/index.vue new file mode 100644 index 0000000..75adfc3 --- /dev/null +++ b/src/views/rating/topicReview/index.vue @@ -0,0 +1,270 @@ + + + + + + + + + + 查询 + + + + + + + + + + + 包含的评价项列表 + + + + + + {{ scope.row.name }} + + + + + + {{ item.category }} + - + + + + + + 审核中 + 已审通过 + 已拒绝 + 禁用 + - + + + + + {{ formatTime(scope.row.createdAt) }} + + + + + 通过 + 拒绝 + + + + + 该话题下暂无评价项 + + + + + + + + {{ row.title }} + {{ row.description }} + + + + + + + + 审核中 + 已审通过 + 已拒绝 + 禁用 + - + + + + + + {{ formatTime(row.createdAt) }} + + + + + + 通过 + 拒绝 + + + + + + + + + + + + +