diff --git a/src/views/system/logger/loginLog/columns.ts b/src/views/system/logger/loginLog/columns.ts index a0f8ae2..ff61f43 100644 --- a/src/views/system/logger/loginLog/columns.ts +++ b/src/views/system/logger/loginLog/columns.ts @@ -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: '创建时间', diff --git a/src/views/system/logger/operLog/columns.ts b/src/views/system/logger/operLog/columns.ts index d4e9c91..dbbad0c 100644 --- a/src/views/system/logger/operLog/columns.ts +++ b/src/views/system/logger/operLog/columns.ts @@ -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: '创建时间',