From 6b97736de8991c3915e924e5707aa6a9a4225519 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Thu, 21 Nov 2024 15:27:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=97=A5=E5=BF=97=E3=80=81?= =?UTF-8?q?=E6=93=8D=E4=BD=9C=E6=97=A5=E5=BF=97=E5=88=97=E8=A1=A8=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/logger/loginLog/columns.ts | 110 +++++++++---------- src/views/system/logger/operLog/columns.ts | 113 +++++++++----------- 2 files changed, 105 insertions(+), 118 deletions(-) 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: '创建时间',