fix: pk comment
This commit is contained in:
@@ -82,3 +82,15 @@ export function reviewTopic(data) {
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核日志列表
|
||||
* @param { pageNo, pageSize, topicId?, itemId?, userId? }
|
||||
*/
|
||||
export function getReviewLogList(data) {
|
||||
return request({
|
||||
url: 'management/api/rating/topicItemOperate/pending/history',
|
||||
method: 'get',
|
||||
params: data,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -141,6 +141,12 @@ export const asyncRoutes = [
|
||||
component: () => import('@/views/rating/topicItemReview/index'),
|
||||
meta: { title: '评分项审核' },
|
||||
},
|
||||
{
|
||||
path: 'item-review-log',
|
||||
name: 'RatingTopicItemReviewLogIndex',
|
||||
component: () => import('@/views/rating/topicItemReviewLog/index'),
|
||||
meta: { title: '审核日志' },
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
198
src/views/rating/topicItemReviewLog/index.vue
Normal file
198
src/views/rating/topicItemReviewLog/index.vue
Normal file
@@ -0,0 +1,198 @@
|
||||
<template>
|
||||
<div class="rating-review-log-container">
|
||||
<el-table v-loading="listLoading" :data="list" :element-loading-text="elementLoadingText">
|
||||
<el-table-column align="center" label="审核类型" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.type === 'topic'">评价主题</el-tag>
|
||||
<el-tag v-else-if="row.type === 'topicItem'" type="warning">评分项</el-tag>
|
||||
<span v-else>{{ row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="left" label="审核对象" min-width="260" width="260">
|
||||
<template #default="{ row }">
|
||||
<!-- 评分项类型 -->
|
||||
<div v-if="row.type === 'topicItem'" class="item-info-cell">
|
||||
<el-image v-if="row.itemAvatarUrl" class="item-avatar" :src="getThumbUrl(row.itemAvatarUrl)" />
|
||||
<div v-else class="item-avatar-placeholder"><i class="el-icon-picture-outline" /></div>
|
||||
<div class="item-details">
|
||||
<div class="item-name">{{ row.itemName || '-' }}</div>
|
||||
<div class="item-sub" :title="row.topicTitle">
|
||||
<span class="sub-label">所属话题:</span>
|
||||
<span class="sub-value">{{ row.topicTitle || '-' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 评价主题类型 -->
|
||||
<div v-else class="item-info-cell">
|
||||
<div class="item-avatar-placeholder" style="border-radius: 4px"><i class="el-icon-document" /></div>
|
||||
<div class="item-details">
|
||||
<div class="item-name">{{ row.topicTitle || '-' }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="审核结果" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.auditStatus === 2" type="success">已通过</el-tag>
|
||||
<el-tag v-else-if="row.auditStatus === 3" type="danger">已拒绝</el-tag>
|
||||
<el-tag v-else-if="row.auditStatus === 4" type="info">禁用</el-tag>
|
||||
<span v-else>{{ row.auditStatus }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="left" label="审核备注 / 拒绝原因" min-width="200">
|
||||
<template #default="{ row }">
|
||||
<div v-if="row.rejectReason" class="remark-row">
|
||||
<span class="remark-label" style="color: #f56c6c">拒绝原因:</span>
|
||||
<span>{{ row.rejectReason }}</span>
|
||||
</div>
|
||||
<div v-if="row.auditRemark" class="remark-row">
|
||||
<span class="remark-label">审核备注:</span>
|
||||
<span>{{ row.auditRemark }}</span>
|
||||
</div>
|
||||
<span v-if="!row.rejectReason && !row.auditRemark">-</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="审核员 ID" prop="auditorId" width="220" />
|
||||
|
||||
<el-table-column align="center" label="审核时间" prop="createdAt" width="160">
|
||||
<template #default="{ row }">
|
||||
{{ formatTime(row.createdAt) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
background
|
||||
:current-page="queryForm.pageNo"
|
||||
:layout="layout"
|
||||
:page-size="queryForm.pageSize"
|
||||
:total="total"
|
||||
@current-change="handleCurrentChange"
|
||||
@size-change="handleSizeChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getReviewLogList } from '@/api/rating/topicOperate'
|
||||
import { formatTime } from '@/utils'
|
||||
import { getThumbUrl } from '@/utils/blessing'
|
||||
|
||||
export default {
|
||||
name: 'RatingTopicItemReviewLogIndex',
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
listLoading: true,
|
||||
layout: 'total, sizes, prev, pager, next, jumper',
|
||||
total: 0,
|
||||
elementLoadingText: '正在加载...',
|
||||
queryForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
formatTime,
|
||||
getThumbUrl,
|
||||
handleSizeChange(val) {
|
||||
this.queryForm.pageSize = val
|
||||
this.fetchData()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.queryForm.pageNo = val
|
||||
this.fetchData()
|
||||
},
|
||||
async fetchData() {
|
||||
this.listLoading = true
|
||||
try {
|
||||
const { data } = await getReviewLogList(this.queryForm)
|
||||
this.list = data.list || []
|
||||
this.total = data.totalCount || 0
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
} finally {
|
||||
this.listLoading = false
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.rating-review-log-container {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.item-info-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-avatar,
|
||||
.item-avatar-placeholder {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
margin-right: 12px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.item-avatar-placeholder {
|
||||
background-color: #f0f2f5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909399;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.item-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.item-name {
|
||||
font-weight: bold;
|
||||
color: #303133;
|
||||
margin-bottom: 4px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.item-sub {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.sub-label {
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.sub-value {
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.remark-row {
|
||||
font-size: 13px;
|
||||
line-height: 1.5;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
.remark-label {
|
||||
color: #909399;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user