feat(admin): show login device model and short id

This commit is contained in:
zhx 2026-05-07 16:10:10 +08:00
parent 2647354e41
commit 864502db1c

View File

@ -45,6 +45,7 @@ const query = reactive({
const columns = [
{ dataIndex: 'appPlatform', key: 'appPlatform', title: '平台', width: 120 },
{ dataIndex: 'user', key: 'user', title: '用户', width: 240 },
{ dataIndex: 'sysModel', key: 'sysModel', title: '机型', width: 160 },
{ dataIndex: 'deviceId', key: 'deviceId', title: '设备ID', width: 220 },
{ dataIndex: 'ip', key: 'ip', title: 'IP', width: 160 },
{ dataIndex: 'ipLocation', key: 'ipLocation', title: 'IP地区', width: 220 },
@ -55,10 +56,10 @@ const columns = [
{ dataIndex: 'actions', key: 'actions', title: '操作', width: 220 },
];
const tableScroll = computed(() => ({ x: 1820 }));
const tableScroll = computed(() => ({ x: 1980 }));
function getUserId(record: Record<string, any>) {
return String(record.userProfile?.id || record.id || record.userId || '');
return String(record.userProfile?.id || record.userId || record.id || '');
}
function getUserName(record: Record<string, any>) {
@ -73,6 +74,16 @@ function getUserAvatar(record: Record<string, any>) {
return record.userProfile?.userAvatar || record.userAvatar || '';
}
function getUserShortId(record: Record<string, any>) {
return (
record.userProfile?.account ||
record.userProfile?.actualAccount ||
record.userProfile?.ownSpecialId?.account ||
record.account ||
''
);
}
function getVipStatusName(record: Record<string, any>) {
return record.userProfile?.vipStatusName || record.vipStatusName || '';
}
@ -177,9 +188,13 @@ loadData(true);
<div class="user-copy">
<span class="user-name">{{ getUserName(record) }}</span>
<span class="user-sub">ID {{ getUserId(record) || '-' }}</span>
<span class="user-sub">短ID {{ getUserShortId(record) || '-' }}</span>
</div>
</button>
</template>
<template v-else-if="column.key === 'sysModel'">
{{ record.sysModel || '-' }}
</template>
<template v-else-if="column.key === 'ip'">
<a
:href="`https://www.ip138.com/iplookup.asp?ip=${record.ip}&action=2`"