mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
升级magic-api 2.0 增加操作日志、登录日志
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<mb-search :where="tableOptions.where" @search="reloadTable" />
|
||||
<mb-table ref="table" v-bind="tableOptions" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
const table = ref()
|
||||
const tableOptions = reactive({
|
||||
url: 'log/oper/list',
|
||||
where: {
|
||||
createDate: {
|
||||
type: 'datetimerange',
|
||||
label: '创建时间',
|
||||
value: ''
|
||||
}
|
||||
},
|
||||
cols: [
|
||||
{
|
||||
field: 'apiName',
|
||||
title: '接口名'
|
||||
},
|
||||
{
|
||||
field: 'apiPath',
|
||||
title: '路径'
|
||||
},
|
||||
{
|
||||
field: 'apiMethod',
|
||||
title: '方法'
|
||||
},
|
||||
{
|
||||
field: 'userIp',
|
||||
title: 'ip'
|
||||
},
|
||||
{
|
||||
field: 'costTime',
|
||||
title: '耗时'
|
||||
},
|
||||
{
|
||||
field: 'userAgent',
|
||||
title: '用户代理'
|
||||
},
|
||||
{
|
||||
field: 'username',
|
||||
title: '操作人'
|
||||
},
|
||||
{
|
||||
field: 'createDate',
|
||||
title: '操作时间'
|
||||
}
|
||||
]
|
||||
})
|
||||
function reloadTable(){
|
||||
table.value.reloadList()
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user