feat(admin): 观看记录独立菜单与治理状态全部筛选
This commit is contained in:
1 parent
50f2b177b1
commit
0710ea55f3
4 files changed
+289
-3
No files matched your search
@@ -26,12 +26,14 @@ const canWordUpdate = can('sensitive-word:update')
|
||||
const activeTab = ref('comments')
|
||||
|
||||
const COMMENT_STATUS = [
|
||||
{ value: '', label: '全部状态', tag: 'info' },
|
||||
{ value: 'pending', label: '待审核', tag: 'warning' },
|
||||
{ value: 'published', label: '已发布', tag: 'success' },
|
||||
{ value: 'rejected', label: '已驳回', tag: 'danger' },
|
||||
{ value: 'deleted', label: '已删除', tag: 'info' }
|
||||
]
|
||||
const REPORT_STATUS = [
|
||||
{ value: '', label: '全部状态', tag: 'info' },
|
||||
{ value: 'pending', label: '待处理', tag: 'warning' },
|
||||
{ value: 'handled', label: '已处理', tag: 'success' },
|
||||
{ value: 'rejected', label: '已驳回', tag: 'info' }
|
||||
@@ -48,6 +50,13 @@ function meta(list, value) {
|
||||
function levelText(level) {
|
||||
return WORD_LEVELS.find((item) => item.value === level)?.label || level
|
||||
}
|
||||
function commentEpisodeText(row) {
|
||||
if (row.episodeNo) return `第 ${row.episodeNo} 集`
|
||||
return row.episodeId ? `分集 #${row.episodeId}` : '未关联分集'
|
||||
}
|
||||
function commentContentTooltip(row) {
|
||||
return `短剧 ID:${row.dramaId} / 分集 ID:${row.episodeId || '未关联'}`
|
||||
}
|
||||
|
||||
const comments = reactive({
|
||||
rows: [],
|
||||
@@ -55,7 +64,7 @@ const comments = reactive({
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 10,
|
||||
status: 'pending',
|
||||
status: '',
|
||||
keyword: ''
|
||||
})
|
||||
async function loadComments() {
|
||||
@@ -123,7 +132,7 @@ const reports = reactive({
|
||||
loading: false,
|
||||
page: 1,
|
||||
size: 10,
|
||||
status: 'pending'
|
||||
status: ''
|
||||
})
|
||||
async function loadReports() {
|
||||
reports.loading = true
|
||||
@@ -325,7 +334,17 @@ const handleTargetText = computed(() => {
|
||||
<el-table-column prop="id" label="ID" width="80" />
|
||||
<el-table-column prop="nickname" label="用户" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="content" label="内容" min-width="220" show-overflow-tooltip />
|
||||
<el-table-column prop="dramaId" label="短剧ID" width="90" />
|
||||
<el-table-column label="短剧 / 分集" min-width="190">
|
||||
<template #default="{ row }">
|
||||
<el-tooltip :content="commentContentTooltip(row)" placement="top">
|
||||
<div class="episode-table-title">
|
||||
<b>{{ row.dramaTitle || `短剧 #${row.dramaId}` }}</b>
|
||||
<small>{{ commentEpisodeText(row) }}</small>
|
||||
<small v-if="row.episodeTitle">{{ row.episodeTitle }}</small>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="meta(COMMENT_STATUS, row.status).tag" effect="light">{{
|
||||
|
||||
Reference in new issue
Block a user