Skip to content

Commit

Permalink
🎨 日志展示列微调
Browse files Browse the repository at this point in the history
  • Loading branch information
Hccake committed Sep 18, 2020
1 parent 934e450 commit ecdbbec
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 24 deletions.
14 changes: 9 additions & 5 deletions src/views/log/adminaccesslog/AdminAccessLogPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ export default {
title: '追踪ID',
dataIndex: 'traceId',
},
{
title: '用户ID',
dataIndex: 'userId',
},
{
title: '用户名',
dataIndex: 'username',
Expand Down Expand Up @@ -110,6 +106,9 @@ export default {
{
title: '执行时长',
dataIndex: 'time',
customRender: function (text){
return text + ' ms'
}
},
{
title: '创建时间',
Expand All @@ -120,6 +119,11 @@ export default {
]
}
},
methods: {}
methods: {
onTimeChange (dates, dateStrings) {
this.queryParam.startTime = dateStrings[0]
this.queryParam.endTime = dateStrings[1]
}
}
}
</script>
47 changes: 28 additions & 19 deletions src/views/log/adminoperationlog/AdminOperationLogPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
</dict-text>
</template>
<template #expandedRowRender="record">
<p>params:</p>
<pre><div class="wordwrap" v-html="record.params"></div></pre>
<p>userAgent:</p>
{{record.userAgent}}}
<p>params:</p>
<pre><div class="wordwrap" v-html="record.params"></div></pre>
<p>userAgent:</p>
{{ record.userAgent }}}
</template>
</a-table>
</div>
Expand All @@ -69,53 +69,57 @@ import { TablePageMixin } from '@/mixins'
export default {
name: 'AdminOperationLogPage',
mixins: [TablePageMixin],
data() {
data () {
return {
getPage: getPage,
columns: [
{
title: '#',
dataIndex: 'id',
dataIndex: 'id'
},
{
title: '追踪ID',
dataIndex: 'traceId',
dataIndex: 'traceId'
},
{
title: '日志消息',
dataIndex: 'msg',
dataIndex: 'msg'
},
{
title: '操作类型',
dataIndex: 'type',
scopedSlots: { customRender: 'type-slot' }
},
{
title: '访问IP地址',
title: '请求IP',
dataIndex: 'ip',
width: '105px'
},
{
title: '请求URI',
dataIndex: 'uri',
dataIndex: 'uri'
},
{
title: '请求方式',
dataIndex: 'method',
},
{
title: '操作状态',
dataIndex: 'status',
width: '50px',
scopedSlots: { customRender: 'status-slot' }
dataIndex: 'method'
},
{
title: '执行时长',
dataIndex: 'time',
customRender: function (text) {
return text + ' ms'
}
},
{
title: '操作人',
dataIndex: 'operator',
dataIndex: 'operator'
},
{
title: '操作状态',
dataIndex: 'status',
width: '50px',
scopedSlots: { customRender: 'status-slot' }
},
{
title: '创建时间',
Expand All @@ -126,7 +130,12 @@ export default {
]
}
},
methods: {}
methods: {
onTimeChange (dates, dateStrings) {
this.queryParam.startTime = dateStrings[0]
this.queryParam.endTime = dateStrings[1]
}
}
}
</script>

Expand Down

0 comments on commit ecdbbec

Please sign in to comment.