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 @@ + + + + + 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()