2023-02-11 00:44:00 +08:00
|
|
|
import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
|
|
|
|
|
|
|
|
// CrudSchema
|
|
|
|
const crudSchemas = reactive<VxeCrudSchema>({
|
|
|
|
primaryKey: 'id',
|
2023-03-07 16:22:40 +08:00
|
|
|
primaryType: 'id',
|
2023-02-11 00:44:00 +08:00
|
|
|
primaryTitle: '日志编号',
|
|
|
|
action: true,
|
|
|
|
actionWidth: '100px',
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
title: '日志类型',
|
|
|
|
field: 'logType',
|
|
|
|
dictType: DICT_TYPE.SYSTEM_LOGIN_TYPE,
|
|
|
|
dictClass: 'number'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '用户名称',
|
|
|
|
field: 'username',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '登录地址',
|
|
|
|
field: 'userIp',
|
|
|
|
isSearch: true
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '浏览器',
|
|
|
|
field: 'userAgent'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '登陆结果',
|
|
|
|
field: 'result',
|
|
|
|
dictType: DICT_TYPE.SYSTEM_LOGIN_RESULT,
|
|
|
|
dictClass: 'number'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: '登录日期',
|
|
|
|
field: 'createTime',
|
|
|
|
formatter: 'formatDate',
|
|
|
|
table: {
|
|
|
|
width: 150
|
|
|
|
},
|
|
|
|
search: {
|
|
|
|
show: true,
|
|
|
|
itemRender: {
|
|
|
|
name: 'XDataTimePicker'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
})
|
|
|
|
export const { allSchemas } = useVxeCrudSchemas(crudSchemas)
|