feat: 管理后台IP归属地——移植ip2region离线库,登录日志/访问埋点/看板最近访问统一显示归属地

This commit is contained in:
Hermes Agent
2026-09-16 07:45:23 +08:00
parent c5e12c67fa
commit c549eb532d
6 changed files with 74 additions and 31 deletions
+3
View File
@@ -48,6 +48,9 @@
<template #default="{ row }">{{ row.method || '-' }}</template>
</el-table-column>
<el-table-column prop="ip" label="IP" width="120" />
<el-table-column label="归属地" width="110">
<template #default="{ row }">{{ row.ipLoc || '—' }}</template>
</el-table-column>
<el-table-column label="结果 / 路径" min-width="150" show-overflow-tooltip>
<template #default="{ row }">
<template v-if="row.kind === 'login'">
+2 -1
View File
@@ -8,7 +8,8 @@
<el-table :data="list" stripe v-loading="loading" size="small">
<template v-if="tab === 'login'">
<el-table-column label="时间" width="160"><template #default="{ row }">{{ fmt(row.createdAt) }}</template></el-table-column>
<el-table-column label="用户" width="140"><template #default="{ row }">{{ row.userName || '未知用户' }}</template></el-table-column>
<el-table-column label="用户" width="120"><template #default="{ row }">{{ row.userName || '未知用户' }}</template></el-table-column>
<el-table-column label="归属地" width="110"><template #default="{ row }">{{ row.ipLoc || '—' }}</template></el-table-column>
<el-table-column prop="type" label="类型" width="80" />
<el-table-column prop="method" label="方式" width="120" />
<el-table-column prop="ip" label="IP" width="120" />