2023-01-18 14:23:45 +08:00
|
|
|
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
2022-11-13 14:49:59 +08:00
|
|
|
|
|
|
|
// CrudSchema
|
|
|
|
const crudSchemas = reactive<VxeCrudSchema>({
|
|
|
|
primaryKey: 'id',
|
|
|
|
primaryType: 'seq',
|
2022-11-26 22:40:12 +08:00
|
|
|
primaryTitle: '日志编号',
|
2022-11-13 14:49:59 +08:00
|
|
|
action: true,
|
2022-12-06 15:26:52 +08:00
|
|
|
actionWidth: '100px',
|
2022-11-13 14:49:59 +08:00
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: '日志类型',
|
|
|
|
field: 'logType',
|
2022-11-16 23:15:14 +08:00
|
|
|
dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE,
|
2022-11-17 23:09:29 +08:00
|
|
|
dictClass: 'number'
|
2022-11-13 15:13:38 +08:00
|
|
|
},
|
2022-11-13 14:49:59 +08:00
|
|
|
{
|
|
|
|
title: '用户名称',
|
|
|
|
field: 'username',
|
|
|
|
isSearch: true
|
2022-07-18 19:06:37 +08:00
|
|
|
},
|
2022-11-13 14:49:59 +08:00
|
|
|
{
|
|
|
|
title: '登录地址',
|
|
|
|
field: 'userIp',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
2022-11-13 15:13:38 +08:00
|
|
|
title: '浏览器',
|
2022-12-06 15:26:52 +08:00
|
|
|
field: 'userAgent'
|
2022-11-13 14:49:59 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '登陆结果',
|
|
|
|
field: 'result',
|
2022-11-16 23:15:14 +08:00
|
|
|
dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT,
|
2022-11-17 23:09:29 +08:00
|
|
|
dictClass: 'number'
|
2022-07-18 19:06:37 +08:00
|
|
|
},
|
2022-11-13 14:49:59 +08:00
|
|
|
{
|
2022-11-16 23:15:14 +08:00
|
|
|
title: '登录日期',
|
2022-11-13 14:49:59 +08:00
|
|
|
field: 'createTime',
|
|
|
|
formatter: 'formatDate',
|
2022-11-16 23:15:14 +08:00
|
|
|
table: {
|
2022-12-06 15:26:52 +08:00
|
|
|
width: 150
|
2022-11-16 23:15:14 +08:00
|
|
|
},
|
2022-11-13 15:13:38 +08:00
|
|
|
search: {
|
2022-11-16 23:15:14 +08:00
|
|
|
show: true,
|
2022-11-13 15:13:38 +08:00
|
|
|
itemRender: {
|
|
|
|
name: 'XDataTimePicker'
|
|
|
|
}
|
|
|
|
}
|
2022-07-18 19:06:37 +08:00
|
|
|
}
|
2022-11-13 14:49:59 +08:00
|
|
|
]
|
|
|
|
})
|
|
|
|
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|