登录日志、操作日志列表样式

This commit is contained in:
陈红丽 2024-11-21 15:27:00 +08:00
parent b2a8770eae
commit 6b97736de8
2 changed files with 105 additions and 118 deletions

View File

@ -6,73 +6,69 @@ export const columns = [
title: 'ID',
dataIndex: 'id',
fixed: 'left',
width: 50,
width: 100
},
{
title: '操作用户',
dataIndex: 'username',
width: 100,
title: '访客',
align:'left',
customRender({ record }) {
return h('div', [
h('div',{
style: {marginBottom:'5px'}
}, record.username),
h('div',{
style: { marginBottom:'5px'}
}, record.ip),
h('div', record.location),
])
}
},
{
title: '请求ip',
dataIndex: 'ip',
width: 100,
title: '请求接口',
align:'left',
customRender({ record }) {
return h('div', [
h(Tag,
{
type: 'info',
style: {marginBottom:'5px'}
},
{
default: () => (record.requestMethod),
}),
h('div', '接口:'+record.url),
])
}
},
{
title: '浏览器',
dataIndex: 'browser',
width: 100,
},
{
title: '操作系统',
dataIndex: 'os',
width: 100,
},
{
title: '操作类型',
dataIndex: 'typeText',
width: 100,
title: '接口响应',
align:'left',
customRender({ record }) {
return h('div', [
h('span', '状态:'),
h(Tag,
{
color: record.status == 0 ? 'success' : 'error',
style: {marginBottom:'5px'}
},
{
default: () => (record.status == 0 ? '正常' : '异常'),
}),
h('div', '请求耗时:'+record.consumeTime+'ms'),
])
}
},
{
title: '操作来源',
dataIndex: 'sourceText',
width: 100,
},
{
title: '请求方式',
dataIndex: 'requestMethod',
width: 100,
},
{
title: '请求URL',
dataIndex: 'url',
width: 100,
},
{
title: '请求地区',
dataIndex: 'location',
width: 100,
},
{
title: '请求耗时',
dataIndex: 'consumeTime',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
align:'left',
customRender({ record }) {
return h(
Tag,
{
color: record.status == 0 ? 'success' : 'error',
},
{
default: () => (record.status == 0 ? '正常' : '异常'),
},
);
},
width: 100,
return h('div', [
h('div', '系统:'+record.os),
h('div', '类型:'+record.typeText),
h('div', '来源:'+record.sourceText),
])
}
},
{
title: '创建时间',

View File

@ -6,78 +6,69 @@ export const columns = [
title: 'ID',
dataIndex: 'id',
fixed: 'left',
width: 50,
},
{
title: '日志标题',
dataIndex: 'title',
width: 100,
},
{
title: '操作用户',
dataIndex: 'createUser',
width: 100,
title: '访客',
align:'left',
customRender({ record }) {
return h('div', [
h('div',{
style: {marginBottom:'5px'}
}, record.createUser),
h('div',{
style: { marginBottom:'5px'}
}, record.ip),
h('div', record.location),
])
}
},
{
title: '请求ip',
dataIndex: 'ip',
width: 140,
title: '请求接口',
align:'left',
customRender({ record }) {
return h('div', [
h(Tag,
{
type: 'info',
style: {marginBottom:'5px'}
},
{
default: () => (record.requestMethod),
}),
h('div', '接口:'+record.url),
h('div', '名称:'+record.title),
])
}
},
{
title: '浏览器',
dataIndex: 'browser',
width: 100,
},
{
title: '操作系统',
dataIndex: 'os',
width: 100,
},
{
title: '操作类型',
dataIndex: 'typeText',
width: 100,
title: '接口响应',
align:'left',
customRender({ record }) {
return h('div', [
h('span', '状态:'),
h(Tag,
{
color: record.status == 0 ? 'success' : 'error',
style: {marginBottom:'5px'}
},
{
default: () => (record.status == 0 ? '正常' : '异常'),
}),
h('div', '请求耗时:'+record.consumeTime+'ms'),
])
}
},
{
title: '操作来源',
dataIndex: 'sourceText',
width: 100,
},
{
title: '请求方式',
dataIndex: 'requestMethod',
width: 100,
},
{
title: '请求URL',
dataIndex: 'url',
width: 150,
},
{
title: '请求地区',
dataIndex: 'location',
width: 100,
},
{
title: '请求耗时',
dataIndex: 'consumeTime',
width: 100,
},
{
title: '状态',
dataIndex: 'status',
align:'left',
customRender({ record }) {
return h(
Tag,
{
color: record.status == 0 ? 'success' : 'error',
},
{
default: () => (record.status == 0 ? '正常' : '异常'),
},
);
},
width: 100,
return h('div', [
h('div', '系统:'+record.os),
h('div', '类型:'+record.typeText),
h('div', '来源:'+record.sourceText),
])
}
},
{
title: '创建时间',