mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-04-22 22:22:51 +08:00
parent
2fa8b56f9c
commit
6b63250039
@ -64,9 +64,11 @@
|
|||||||
<el-table-column :label="$t('登录名')" prop="loginUserName" sortable="custom" width="150" />
|
<el-table-column :label="$t('登录名')" prop="loginUserName" sortable="custom" width="150" />
|
||||||
<el-table-column :label="$t('客户端IP')" prop="createdClientIp" show-overflow-tooltip sortable="custom" width="200">
|
<el-table-column :label="$t('客户端IP')" prop="createdClientIp" show-overflow-tooltip sortable="custom" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<template v-if="ips && ips.length > 0 && row.createdClientIp">
|
||||||
<p>{{ row.createdClientIp }}</p>
|
<p>{{ row.createdClientIp }}</p>
|
||||||
<p>{{ this.ips.filter((x) => x.ip === row.createdClientIp)[0]?.region ?? '...' }}</p>
|
<p>{{ this.ips.filter((x) => x.ip === row.createdClientIp)[0]?.region ?? '...' }}</p>
|
||||||
</template>
|
</template>
|
||||||
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('操作系统')" align="center" prop="os" width="150" />
|
<el-table-column :label="$t('操作系统')" align="center" prop="os" width="150" />
|
||||||
<el-table-column :label="$t('用户代理')" prop="createdUserAgent" show-overflow-tooltip sortable="custom" />
|
<el-table-column :label="$t('用户代理')" prop="createdUserAgent" show-overflow-tooltip sortable="custom" />
|
||||||
@ -117,7 +119,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async dataChange(data) {
|
async dataChange(data) {
|
||||||
this.apis = []
|
this.apis = []
|
||||||
const ips = data.data.rows?.map((x) => x.createdClientIp)
|
const ips = data.data.rows?.map((x) => x.createdClientIp) ?? []
|
||||||
const res = await Promise.all([
|
const res = await Promise.all([
|
||||||
ips && ips.length > 0 ? http.get(`http://ip.line92.xyz/?ip=${ips.join('&ip=')}`) : new Promise((x) => x({ data: [] })),
|
ips && ips.length > 0 ? http.get(`http://ip.line92.xyz/?ip=${ips.join('&ip=')}`) : new Promise((x) => x({ data: [] })),
|
||||||
])
|
])
|
||||||
|
@ -134,8 +134,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('客户端IP')" prop="createdClientIp" show-overflow-tooltip sortable="custom" width="200">
|
<el-table-column :label="$t('客户端IP')" prop="createdClientIp" show-overflow-tooltip sortable="custom" width="200">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
<template v-if="ips && ips.length > 0 && row.createdClientIp">
|
||||||
<p>{{ row.createdClientIp }}</p>
|
<p>{{ row.createdClientIp }}</p>
|
||||||
<p>{{ this.ips.filter((x) => x.ip === row.createdClientIp)[0]?.region ?? '...' }}</p>
|
<p>{{ ips.filter((x) => x.ip === row.createdClientIp)[0]?.region ?? '...' }}</p>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<na-col-operation
|
<na-col-operation
|
||||||
@ -215,7 +217,7 @@ export default {
|
|||||||
this.apis = []
|
this.apis = []
|
||||||
const ownerIds = data.data.rows?.filter((x) => x.ownerId).map((x) => x.ownerId)
|
const ownerIds = data.data.rows?.filter((x) => x.ownerId).map((x) => x.ownerId)
|
||||||
const apiCrcs = data.data.rows?.map((x) => x.apiPathCrc32)
|
const apiCrcs = data.data.rows?.map((x) => x.apiPathCrc32)
|
||||||
const ips = data.data.rows?.map((x) => x.createdClientIp)
|
const ips = data.data.rows?.map((x) => x.createdClientIp) ?? []
|
||||||
const res = await Promise.all([
|
const res = await Promise.all([
|
||||||
ownerIds && ownerIds.length > 0
|
ownerIds && ownerIds.length > 0
|
||||||
? this.$API.sys_user.query.post({
|
? this.$API.sys_user.query.post({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user