feat: 消息中心-站内信管理
This commit is contained in:
105
src/pages/system/log/login/config.tsx
Normal file
105
src/pages/system/log/login/config.tsx
Normal file
@@ -0,0 +1,105 @@
|
||||
import type {
|
||||
ProColumns,
|
||||
ProDescriptionsItemProps,
|
||||
} from '@ant-design/pro-components';
|
||||
import dayjs from 'dayjs';
|
||||
import type { LoginLogVO } from '@/services/system/log/login';
|
||||
export const baseTenantColumns: ProColumns<LoginLogVO>[] = [
|
||||
{
|
||||
title: '日志编号',
|
||||
dataIndex: 'id',
|
||||
tip: '日志编号',
|
||||
width: 100,
|
||||
hideInSearch: true, // 在搜索表单中隐藏
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
dataIndex: 'logType',
|
||||
hideInSearch: true, // 在搜索表单中隐藏
|
||||
tip: '操作类型', // 提示信息
|
||||
},
|
||||
{
|
||||
title: '操作模块',
|
||||
dataIndex: 'type',
|
||||
hideInSearch: true, // 在搜索表单中隐藏
|
||||
},
|
||||
{
|
||||
title: '用户名称',
|
||||
dataIndex: 'username',
|
||||
},
|
||||
{
|
||||
title: '登录地址',
|
||||
dataIndex: 'userIp',
|
||||
},
|
||||
|
||||
{
|
||||
title: '浏览器',
|
||||
dataIndex: 'userAgent',
|
||||
hideInSearch: true, // 在搜索表单中隐藏
|
||||
},
|
||||
{
|
||||
title: '登录结果',
|
||||
dataIndex: 'result',
|
||||
hideInSearch: true,
|
||||
},
|
||||
{
|
||||
title: '登录日期',
|
||||
dataIndex: 'createTime',
|
||||
valueType: 'dateRange',
|
||||
search: {
|
||||
transform: (value) => {
|
||||
return {
|
||||
[`createTime[0]`]: dayjs(value[0])
|
||||
.startOf('day')
|
||||
.format('YYYY-MM-DD HH:mm:ss'),
|
||||
[`createTime[1]`]: dayjs(value[1])
|
||||
.endOf('day')
|
||||
.format('YYYY-MM-DD HH:mm:ss'),
|
||||
};
|
||||
},
|
||||
},
|
||||
render: (_, record: LoginLogVO) =>
|
||||
dayjs(record.createTime).format('YYYY-MM-DD HH:mm:ss'),
|
||||
},
|
||||
];
|
||||
|
||||
export const descriptionsColumns = (): ProDescriptionsItemProps<
|
||||
Record<string, any>,
|
||||
'text'
|
||||
>[] => [
|
||||
{
|
||||
title: '日志编号',
|
||||
key: 'id',
|
||||
dataIndex: 'id',
|
||||
},
|
||||
{
|
||||
title: '操作类型',
|
||||
key: 'logType',
|
||||
dataIndex: 'logType',
|
||||
},
|
||||
{
|
||||
title: '用户名称',
|
||||
key: 'username',
|
||||
dataIndex: 'username',
|
||||
},
|
||||
{
|
||||
title: '登录地址',
|
||||
key: 'userIp',
|
||||
dataIndex: 'userIp',
|
||||
},
|
||||
{
|
||||
title: '浏览器',
|
||||
key: 'userAgent',
|
||||
dataIndex: 'userAgent',
|
||||
},
|
||||
{
|
||||
title: '登录结果',
|
||||
key: 'result',
|
||||
dataIndex: 'result',
|
||||
},
|
||||
{
|
||||
title: '登录日期',
|
||||
key: 'createTime',
|
||||
dataIndex: 'createTime',
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user