2024-10-18 23:09:48 +08:00
|
|
|
import { reactive } from 'vue';
|
|
|
|
import { $t } from '@/plugins/i18n';
|
|
|
|
|
|
|
|
// 表格列
|
|
|
|
export const columns: TableColumnList = [
|
|
|
|
{ type: 'selection', align: 'left' },
|
|
|
|
{ type: 'index', index: (index: number) => index + 1, label: '序号', width: 60 },
|
|
|
|
// 用户名
|
2024-10-19 01:18:38 +08:00
|
|
|
{ label: $t('userLoginLog_username'), prop: 'username', width: 180 },
|
2024-10-18 23:09:48 +08:00
|
|
|
// 登录Ip
|
2024-10-23 13:46:46 +08:00
|
|
|
{ label: $t('userLoginLog_ipAddress'), prop: 'ipAddress', width: 130 },
|
2024-10-19 01:18:38 +08:00
|
|
|
// 登录Ip归属地
|
2024-10-25 10:13:42 +08:00
|
|
|
{ label: $t('userLoginLog_ipRegion'), prop: 'ipRegion', width: 160 },
|
2024-10-18 23:09:48 +08:00
|
|
|
// 登录时代理
|
2024-10-23 13:46:46 +08:00
|
|
|
{ label: $t('userLoginLog_userAgent'), prop: 'userAgent' },
|
2024-10-19 00:04:25 +08:00
|
|
|
// 操作类型
|
2024-10-19 03:20:30 +08:00
|
|
|
{ label: $t('userLoginLog_type'), prop: 'type', width: 130 },
|
2024-10-19 01:18:38 +08:00
|
|
|
// 标识客户端是否是通过Ajax发送请求的
|
2024-10-19 02:37:05 +08:00
|
|
|
{ label: $t('userLoginLog_xRequestedWith'), prop: 'xRequestedWith', width: 150 },
|
2024-10-19 01:18:38 +08:00
|
|
|
// 登录token
|
2024-10-19 02:37:05 +08:00
|
|
|
{ label: $t('userLoginLog_token'), prop: 'token', width: 200 },
|
2024-10-18 23:09:48 +08:00
|
|
|
{ label: $t('table.updateTime'), prop: 'updateTime', sortable: true, width: 160 },
|
|
|
|
{ label: $t('table.createTime'), prop: 'createTime', sortable: true, width: 160 },
|
2024-10-30 23:52:58 +08:00
|
|
|
{ label: $t('table.createUser'), prop: 'createUser', slot: 'createUser', width: 130 },
|
|
|
|
{ label: $t('table.updateUser'), prop: 'updateUser', slot: 'updateUser', width: 130 },
|
2024-10-19 01:18:38 +08:00
|
|
|
{ label: $t('table.operation'), fixed: 'right', width: 160, slot: 'operation' },
|
2024-10-18 23:09:48 +08:00
|
|
|
];
|
|
|
|
|
2024-10-19 01:18:38 +08:00
|
|
|
// 添加规则
|
2024-10-19 02:37:05 +08:00
|
|
|
export const rules = reactive({});
|