feat(admin): 举报列表展示短剧与分集
This commit is contained in:
1 parent
923a350cde
commit
e583bfed5f
2 files changed
+51
-10
No files matched your search
@@ -350,9 +350,20 @@ export interface CommentItem {
|
|||||||
export interface ReportItem {
|
export interface ReportItem {
|
||||||
id: number
|
id: number
|
||||||
reporterId: number
|
reporterId: number
|
||||||
|
reporterNickname?: string
|
||||||
|
reporterUid?: string
|
||||||
/** COMMENT / USER / DRAMA */
|
/** COMMENT / USER / DRAMA */
|
||||||
targetType: string
|
targetType: string
|
||||||
targetId: number
|
targetId: number
|
||||||
|
targetSummary?: string
|
||||||
|
dramaId?: number
|
||||||
|
dramaTitle?: string
|
||||||
|
episodeId?: number
|
||||||
|
episodeNo?: number
|
||||||
|
episodeTitle?: string
|
||||||
|
commentContent?: string
|
||||||
|
targetNickname?: string
|
||||||
|
targetUid?: string
|
||||||
reasonCode: string
|
reasonCode: string
|
||||||
description: string
|
description: string
|
||||||
/** pending / handled / rejected */
|
/** pending / handled / rejected */
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- Author: fruit.com.cn -->
|
<!-- Author: fruit.com.cn -->
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed, onMounted, reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import PageHeading from '@/views/components/PageHeading.vue'
|
import PageHeading from '@/views/components/PageHeading.vue'
|
||||||
import { useRbac } from '@/stores/rbac'
|
import { useRbac } from '@/stores/rbac'
|
||||||
@@ -38,6 +38,11 @@ const REPORT_STATUS = [
|
|||||||
{ value: 'handled', label: '已处理', tag: 'success' },
|
{ value: 'handled', label: '已处理', tag: 'success' },
|
||||||
{ value: 'rejected', label: '已驳回', tag: 'info' }
|
{ value: 'rejected', label: '已驳回', tag: 'info' }
|
||||||
]
|
]
|
||||||
|
const REPORT_TARGET_TYPES = {
|
||||||
|
COMMENT: { label: '评论', tag: 'warning' },
|
||||||
|
USER: { label: '用户', tag: 'success' },
|
||||||
|
DRAMA: { label: '短剧', tag: 'info' }
|
||||||
|
}
|
||||||
const WORD_LEVELS = [
|
const WORD_LEVELS = [
|
||||||
{ value: 'BLOCK', label: '禁止发布' },
|
{ value: 'BLOCK', label: '禁止发布' },
|
||||||
{ value: 'REVIEW', label: '转人工审核' },
|
{ value: 'REVIEW', label: '转人工审核' },
|
||||||
@@ -57,6 +62,15 @@ function commentEpisodeText(row) {
|
|||||||
function commentContentTooltip(row) {
|
function commentContentTooltip(row) {
|
||||||
return `短剧 ID:${row.dramaId} / 分集 ID:${row.episodeId || '未关联'}`
|
return `短剧 ID:${row.dramaId} / 分集 ID:${row.episodeId || '未关联'}`
|
||||||
}
|
}
|
||||||
|
function reportTargetMeta(type) {
|
||||||
|
return REPORT_TARGET_TYPES[type] || { label: type || '-', tag: 'info' }
|
||||||
|
}
|
||||||
|
function reportTargetSummary(row) {
|
||||||
|
return row.targetSummary || `${reportTargetMeta(row.targetType).label} #${row.targetId}`
|
||||||
|
}
|
||||||
|
function reporterText(row) {
|
||||||
|
return row.reporterNickname || row.reporterUid || `#${row.reporterId}`
|
||||||
|
}
|
||||||
|
|
||||||
const comments = reactive({
|
const comments = reactive({
|
||||||
rows: [],
|
rows: [],
|
||||||
@@ -280,11 +294,6 @@ function onTabChange(name) {
|
|||||||
if (name === 'reports') loadReports()
|
if (name === 'reports') loadReports()
|
||||||
if (name === 'words') loadWords()
|
if (name === 'words') loadWords()
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleTargetText = computed(() => {
|
|
||||||
const row = handleTarget.value
|
|
||||||
return row ? `${row.targetType} #${row.targetId}` : ''
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -429,8 +438,22 @@ const handleTargetText = computed(() => {
|
|||||||
empty-text="没有符合条件的工单"
|
empty-text="没有符合条件的工单"
|
||||||
>
|
>
|
||||||
<el-table-column prop="id" label="工单ID" width="90" />
|
<el-table-column prop="id" label="工单ID" width="90" />
|
||||||
<el-table-column prop="targetType" label="对象" width="100" />
|
<el-table-column label="对象" min-width="240">
|
||||||
<el-table-column prop="targetId" label="对象ID" width="90" />
|
<template #default="{ row }">
|
||||||
|
<el-tooltip placement="top">
|
||||||
|
<template #content>
|
||||||
|
<div>原始对象:#{{ row.targetId }}</div>
|
||||||
|
<div v-if="row.commentContent">评论内容:{{ row.commentContent }}</div>
|
||||||
|
</template>
|
||||||
|
<div class="episode-table-title">
|
||||||
|
<el-tag :type="reportTargetMeta(row.targetType).tag" size="small" effect="light">
|
||||||
|
{{ reportTargetMeta(row.targetType).label }}
|
||||||
|
</el-tag>
|
||||||
|
<b>{{ reportTargetSummary(row) }}</b>
|
||||||
|
</div>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="reasonCode" label="原因码" width="120" />
|
<el-table-column prop="reasonCode" label="原因码" width="120" />
|
||||||
<el-table-column
|
<el-table-column
|
||||||
prop="description"
|
prop="description"
|
||||||
@@ -438,7 +461,9 @@ const handleTargetText = computed(() => {
|
|||||||
min-width="180"
|
min-width="180"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column prop="reporterId" label="举报人" width="90" />
|
<el-table-column label="举报人" min-width="140" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">{{ reporterText(row) }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="状态" width="100">
|
<el-table-column label="状态" width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag :type="meta(REPORT_STATUS, row.status).tag" effect="light">{{
|
<el-tag :type="meta(REPORT_STATUS, row.status).tag" effect="light">{{
|
||||||
@@ -569,7 +594,12 @@ const handleTargetText = computed(() => {
|
|||||||
<el-dialog v-model="handleVisible" title="处理举报工单" width="480px">
|
<el-dialog v-model="handleVisible" title="处理举报工单" width="480px">
|
||||||
<el-form label-position="top">
|
<el-form label-position="top">
|
||||||
<el-form-item label="工单对象">
|
<el-form-item label="工单对象">
|
||||||
<el-input :model-value="handleTargetText" disabled />
|
<div v-if="handleTarget" class="episode-table-title">
|
||||||
|
<el-tag :type="reportTargetMeta(handleTarget.targetType).tag" size="small" effect="light">
|
||||||
|
{{ reportTargetMeta(handleTarget.targetType).label }}
|
||||||
|
</el-tag>
|
||||||
|
<b>{{ reportTargetSummary(handleTarget) }}</b>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="处理结论">
|
<el-form-item label="处理结论">
|
||||||
<el-radio-group v-model="handleForm.status">
|
<el-radio-group v-model="handleForm.status">
|
||||||
|
|||||||
Reference in new issue
Block a user