|
|
@@ -19,8 +19,8 @@
|
|
|
<el-table-column prop="user_mobile" label="用户手机号" />
|
|
|
<el-table-column prop="user_status" label="统一认证账号状态" width="150">
|
|
|
<template #default="scope">
|
|
|
- <el-tag :type="scope.row.user_status === 'ACTIVE' ? 'success' : 'danger'">
|
|
|
- {{ scope.row.user_status === 'ACTIVE' ? '已激活' : scope.row.user_status }}
|
|
|
+ <el-tag :type="userStatusTagType(scope.row.user_status)">
|
|
|
+ {{ userStatusLabel(scope.row.user_status) }}
|
|
|
</el-tag>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -407,6 +407,24 @@ const appName = route.query.name as string
|
|
|
|
|
|
const activeTab = ref('list')
|
|
|
|
|
|
+const USER_STATUS_LABELS: Record<string, string> = {
|
|
|
+ ACTIVE: '已激活',
|
|
|
+ PENDING: '待审核',
|
|
|
+ DISABLED: '已禁用'
|
|
|
+}
|
|
|
+
|
|
|
+function userStatusLabel(status: string | undefined | null): string {
|
|
|
+ if (!status) return '—'
|
|
|
+ return USER_STATUS_LABELS[status] ?? status
|
|
|
+}
|
|
|
+
|
|
|
+function userStatusTagType(status: string | undefined | null): 'success' | 'warning' | 'danger' | 'info' {
|
|
|
+ if (status === 'ACTIVE') return 'success'
|
|
|
+ if (status === 'PENDING') return 'warning'
|
|
|
+ if (status === 'DISABLED') return 'danger'
|
|
|
+ return 'info'
|
|
|
+}
|
|
|
+
|
|
|
// --- List Logic ---
|
|
|
const mappings = ref<MappingResponse[]>([])
|
|
|
const loading = ref(false)
|