feat: phase1 UI prep — 后台 App 用户列表支持系统筛选 + 国家中文名 + 标签语义优化
新增: 系统下拉 (ANDROID/IOS)、国家中文名映射、用户列昵称/UID 冒号标签 详情抽屉: 同步系统/国家/标签展示
This commit is contained in:
1 parent
daf681ae1a
commit
bedae02946
4 files changed
+111
-25
No files matched your search
@@ -9,10 +9,11 @@ import { useRbac } from '@/stores/rbac'
|
||||
import {
|
||||
APP_USER_STATUS,
|
||||
COUNTRY_OPTIONS,
|
||||
countryText,
|
||||
formatDateTime,
|
||||
formatDuration,
|
||||
platformText,
|
||||
statusMeta,
|
||||
systemText,
|
||||
useAppUsers
|
||||
} from './composables/useAppUsers'
|
||||
|
||||
@@ -26,6 +27,7 @@ const {
|
||||
keyword,
|
||||
statusFilter,
|
||||
countryFilter,
|
||||
platformFilter,
|
||||
currentPage,
|
||||
pageSize,
|
||||
detailVisible,
|
||||
@@ -54,6 +56,11 @@ const SOURCE_TEXT = {
|
||||
FAVORITE: '收藏'
|
||||
}
|
||||
const BAN_TYPE_TEXT = { BAN: '封禁', LIMIT: '限制', MUTE: '禁言' }
|
||||
const PLATFORM_OPTIONS = [
|
||||
{ value: '', label: '全部系统' },
|
||||
{ value: 'ANDROID', label: 'Android' },
|
||||
{ value: 'IOS', label: 'iOS' }
|
||||
]
|
||||
const APPEAL_TEXT = {
|
||||
none: '未申诉',
|
||||
pending: '待处理',
|
||||
@@ -117,6 +124,20 @@ function canBeBanned(row) {
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="platformFilter"
|
||||
class="app-user-platform"
|
||||
clearable
|
||||
placeholder="全部系统"
|
||||
@change="queryUsers"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in PLATFORM_OPTIONS"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="countryFilter"
|
||||
class="app-user-country"
|
||||
@@ -166,24 +187,24 @@ function canBeBanned(row) {
|
||||
<template v-else>{{ avatarText(row) }}</template>
|
||||
</span>
|
||||
<div class="app-user-meta">
|
||||
<span class="app-user-name" :title="row.nickname">{{
|
||||
row.nickname || '未设置昵称'
|
||||
}}</span>
|
||||
<span class="app-user-uid" :title="row.uid">{{ row.uid }}</span>
|
||||
<span class="app-user-name" :title="row.nickname || ''">
|
||||
昵称: {{ row.nickname || '未设置昵称' }}
|
||||
</span>
|
||||
<span class="app-user-uid">UID: {{ row.uid }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="系统" width="130" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ systemText(row) }}</template>
|
||||
<el-table-column label="系统" width="110" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ platformText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机 / 邮箱" min-width="150" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
<span class="app-user-mono">{{ row.maskedTarget || '—' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="国家" width="90">
|
||||
<template #default="{ row }">{{ row.countryCode || '—' }}</template>
|
||||
<el-table-column label="国家" width="110">
|
||||
<template #default="{ row }">{{ countryText(row.countryCode) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="90">
|
||||
<template #default="{ row }">
|
||||
@@ -249,8 +270,8 @@ function canBeBanned(row) {
|
||||
<template v-else>{{ avatarText(detail) }}</template>
|
||||
</span>
|
||||
<div class="app-user-meta">
|
||||
<span class="app-user-name">{{ detail.nickname || '未设置昵称' }}</span>
|
||||
<span class="app-user-uid">{{ detail.uid }}</span>
|
||||
<span class="app-user-name"> 昵称: {{ detail.nickname || '未设置昵称' }} </span>
|
||||
<span class="app-user-uid">UID: {{ detail.uid }}</span>
|
||||
</div>
|
||||
<el-tag :type="statusMeta(detail.status).tag" effect="light" style="margin-left: auto">
|
||||
{{ statusMeta(detail.status).label }}
|
||||
@@ -263,7 +284,10 @@ function canBeBanned(row) {
|
||||
{{ detail.maskedTarget || '—' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="国家 / 地区">
|
||||
{{ detail.countryCode || '—' }} / {{ detail.regionCode || '—' }}
|
||||
{{ countryText(detail.countryCode) }}
|
||||
<template v-if="detail.regionCode && detail.regionCode !== detail.countryCode">
|
||||
/ {{ countryText(detail.regionCode) }}
|
||||
</template>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="语言">{{ detail.language || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="时区">{{ detail.timezone || '—' }}</el-descriptions-item>
|
||||
@@ -273,7 +297,7 @@ function canBeBanned(row) {
|
||||
<el-descriptions-item label="最后登录">{{
|
||||
detail.lastLoginAt || '—'
|
||||
}}</el-descriptions-item>
|
||||
<el-descriptions-item label="系统">{{ systemText(detail) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="系统">{{ platformText(detail) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="会员">
|
||||
{{ detail.vipLevel ? `等级 ${detail.vipLevel}` : '未开通(第二阶段)' }}
|
||||
</el-descriptions-item>
|
||||
@@ -305,8 +329,8 @@ function canBeBanned(row) {
|
||||
<el-table-column label="完成" width="70">
|
||||
<template #default="{ row }">{{ row.finished ? '是' : '否' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="系统" width="120" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ systemText(row) }}</template>
|
||||
<el-table-column label="系统" width="100" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ platformText(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="来源" width="80">
|
||||
<template #default="{ row }">{{
|
||||
|
||||
Reference in new issue
Block a user