diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue
index 2d3e2f9..bea832f 100644
--- a/src/components/Table/src/Table.vue
+++ b/src/components/Table/src/Table.vue
@@ -96,7 +96,7 @@
-
+
diff --git a/src/components/Table/src/hooks/useColumns.ts b/src/components/Table/src/hooks/useColumns.ts
index 7ca40aa..c488f8f 100644
--- a/src/components/Table/src/hooks/useColumns.ts
+++ b/src/components/Table/src/hooks/useColumns.ts
@@ -53,6 +53,8 @@ export function useColumns(propsRef: ComputedRef) {
.map((column: BasicColumn) => {
//默认 ellipsis 为true
column.ellipsis = typeof column.ellipsis === 'undefined' ? { tooltip: true } : false;
+ // align 默认为center
+ column.align = typeof column.align === 'undefined' ? 'center' : column.align;
const { edit } = column;
if (edit) {
column.render = renderEditCell(column);
diff --git a/src/views/system/logger/loginLog/columns.ts b/src/views/system/logger/loginLog/columns.ts
index 28afe01..b08cbff 100644
--- a/src/views/system/logger/loginLog/columns.ts
+++ b/src/views/system/logger/loginLog/columns.ts
@@ -11,59 +11,66 @@ export const columns = [
width: 100,
},
{
- label: '操作用户',
- prop: 'username',
+ label: '访客',
+ align:'left',
+ render(record){
+ return h('div', [
+ h('div',{
+ style: {marginBottom:'5px'}
+ }, record.row.username),
+ h('div',{
+ style: { marginBottom:'5px'}
+ }, record.row.ip),
+ h('div', record.row.location),
+ ])
+ }
},
{
- label: '请求IP',
- prop: 'ip',
+ label: '请求接口',
+ align:'left',
+ render(record){
+ return h('div', [
+ h(ElTag,
+ {
+ type: 'info',
+ style: {marginBottom:'5px'}
+ },
+ {
+ default: () => (record.row.requestMethod),
+ }),
+ h('div', '接口:'+record.row.url),
+
+ ])
+ }
},
{
- label: '浏览器',
- prop: 'browser',
- },
- {
- label: '操作系统',
- prop: 'os',
- },
- {
- label: '操作类型',
- prop: 'typeText',
+ label: '接口响应',
+ align:'left',
+ render(record){
+ return h('div', [
+ h('span', '状态:'),
+ h(ElTag,
+ {
+ type: record.row.status == 0 ? 'success' : 'danger',
+ style: {marginBottom:'5px'}
+ },
+ {
+ default: () => (record.row.status == 0 ? '正常' : '异常'),
+ }),
+ h('div', '请求耗时:'+record.row.consumeTime+'ms'),
+ ])
+ }
},
{
label: '操作来源',
- prop: 'sourceText',
- },
- {
- label: '请求方式',
- prop: 'requestMethod',
- },
- {
- label: '请求URL',
- prop: 'url',
- },
- {
- label: '请求地区',
- prop: 'location',
- },
- {
- label: '请求耗时',
- prop: 'consumeTime',
- },
- {
- label: '状态',
- prop: 'status',
- render(record) {
- return h(
- ElTag,
- {
- type: record.row.status == 0 ? 'success' : 'danger',
- },
- {
- default: () => (record.row.status == 0 ? '正常' : '异常'),
- },
- );
- },
+ align:'left',
+ render(record){
+ return h('div', [
+ h('div', '系统:'+record.row.os),
+ h('div', '类型:'+record.row.typeText),
+ h('div', '来源:'+record.row.sourceText),
+ ])
+ }
},
{
label: '创建时间',
diff --git a/src/views/system/logger/operLog/columns.ts b/src/views/system/logger/operLog/columns.ts
index bf01666..4362b0b 100644
--- a/src/views/system/logger/operLog/columns.ts
+++ b/src/views/system/logger/operLog/columns.ts
@@ -11,63 +11,66 @@ export const columns = [
width: 100,
},
{
- label: '日志标题',
- prop: 'title',
+ label: '访客',
+ align:'left',
+ render(record){
+ return h('div', [
+ h('div',{
+ style: {marginBottom:'5px'}
+ }, record.row.createUser),
+ h('div',{
+ style: { marginBottom:'5px'}
+ }, record.row.ip),
+ h('div', record.row.location),
+ ])
+ }
},
{
- label: '操作用户',
- prop: 'createUser',
+ label: '请求接口',
+ align:'left',
+ render(record){
+ return h('div', [
+ h(ElTag,
+ {
+ type: 'info',
+ style: {marginBottom:'5px'}
+ },
+ {
+ default: () => (record.row.requestMethod),
+ }),
+ h('div', '接口:'+record.row.url),
+ h('div', '名称:'+record.row.title),
+ ])
+ }
},
{
- label: '请求IP',
- prop: 'ip',
- },
- {
- label: '浏览器',
- prop: 'browser',
- },
- {
- label: '操作系统',
- prop: 'os',
- },
- {
- label: '操作类型',
- prop: 'typeText',
+ label: '接口响应',
+ align:'left',
+ render(record){
+ return h('div', [
+ h('span', '状态:'),
+ h(ElTag,
+ {
+ type: record.row.status == 0 ? 'success' : 'danger',
+ style: {marginBottom:'5px'}
+ },
+ {
+ default: () => (record.row.status == 0 ? '正常' : '异常'),
+ }),
+ h('div', '请求耗时:'+record.row.consumeTime+'ms'),
+ ])
+ }
},
{
label: '操作来源',
- prop: 'sourceText',
- },
- {
- label: '请求方式',
- prop: 'requestMethod',
- },
- {
- label: '请求URL',
- prop: 'url',
- },
- {
- label: '请求地区',
- prop: 'location',
- },
- {
- label: '请求耗时',
- prop: 'consumeTime',
- },
- {
- label: '状态',
- prop: 'status',
- render(record) {
- return h(
- ElTag,
- {
- type: record.row.status == 0 ? 'success' : 'danger',
- },
- {
- default: () => (record.row.status == 0 ? '正常' : '异常'),
- },
- );
- },
+ align:'left',
+ render(record){
+ return h('div', [
+ h('div', '系统:'+record.row.os),
+ h('div', '类型:'+record.row.typeText),
+ h('div', '来源:'+record.row.sourceText),
+ ])
+ }
},
{
label: '创建时间',