提交当前工作区改动作为页面微调回溯点
This commit is contained in:
@@ -16,7 +16,15 @@
|
||||
/>
|
||||
|
||||
<a-tabs v-model:active-key="activeTab" @change="loadActiveTab">
|
||||
<a-tab-pane key="closures" tab="账号注销申请">
|
||||
<a-tab-pane key="closures">
|
||||
<template #tab>
|
||||
<span class="privacy-tab-title">
|
||||
账号注销申请
|
||||
<span v-if="closures.length" class="privacy-tab-count" :aria-label="`${closures.length} 条待处理申请`">
|
||||
{{ closures.length > 99 ? '99+' : closures.length }}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<a-table :columns="closureColumns" :data-source="closures" :loading="closureLoading" row-key="id" :scroll="{ x: 'max-content' }">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'account'">{{ record.nickname }}({{ record.userType === 2 ? '店长' : '员工' }})</template>
|
||||
@@ -32,7 +40,19 @@
|
||||
</a-table>
|
||||
</a-tab-pane>
|
||||
|
||||
<a-tab-pane key="moderation" tab="内容复核">
|
||||
<a-tab-pane key="moderation">
|
||||
<template #tab>
|
||||
<span class="privacy-tab-title">
|
||||
内容复核
|
||||
<span v-if="moderation.length" class="privacy-tab-count" :aria-label="`${moderation.length} 条待处理内容`">
|
||||
{{ moderation.length > 99 ? '99+' : moderation.length }}
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
<div class="moderation-toolbar">
|
||||
<span>待处理内容 {{ moderation.length }} 条</span>
|
||||
<a-button :loading="moderationLoading" @click="loadModeration">刷新列表</a-button>
|
||||
</div>
|
||||
<a-table :columns="moderationColumns" :data-source="moderation" :loading="moderationLoading" row-key="id" :scroll="{ x: 'max-content' }">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'type'">{{ moderationType(record.contentType) }}</template>
|
||||
@@ -108,7 +128,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { computed, onActivated, onMounted, ref } from 'vue'
|
||||
import { message, Modal } from 'ant-design-vue'
|
||||
import {
|
||||
adminPrivacyComplianceApi,
|
||||
@@ -281,12 +301,27 @@ function moderationType(type: string) {
|
||||
return ({ USER_PROFILE: '个人资料', USER_AVATAR: '头像', PRODUCT: '作品', EFFECT_DIAGRAM: '效果图', COMMENT: '评论', ORDER_ARTIST_REVIEW: '订单评价', SHOP: '门店资料', ANNOUNCEMENT: '公告', SYSTEM_MESSAGE: '系统消息' } as Record<string, string>)[type] || type
|
||||
}
|
||||
|
||||
onMounted(loadActiveTab)
|
||||
let skipInitialActivationRefresh = true
|
||||
onMounted(() => {
|
||||
void loadClosures()
|
||||
void loadModeration()
|
||||
})
|
||||
onActivated(() => {
|
||||
if (skipInitialActivationRefresh) {
|
||||
skipInitialActivationRefresh = false
|
||||
return
|
||||
}
|
||||
void loadClosures()
|
||||
void loadModeration()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.privacy-page { display: grid; gap: 16px; }
|
||||
.page-notice { border-radius: 8px; }
|
||||
.privacy-tab-title { display: inline-flex; align-items: center; gap: 8px; }
|
||||
.privacy-tab-count { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; align-items: center; justify-content: center; border-radius: 10px; background: var(--ant-color-error); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1; }
|
||||
.moderation-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 12px; color: var(--ant-color-text-secondary); font-size: 13px; }
|
||||
.payload-preview { max-width: 420px; max-height: 180px; margin: 0; overflow: auto; white-space: pre-wrap; word-break: break-word; font-size: 12px; }
|
||||
.moderation-content { display: grid; gap: 6px; }
|
||||
.moderation-author { color: var(--ant-color-text-secondary); font-size: 12px; }
|
||||
|
||||
Reference in New Issue
Block a user