mirror of
https://gitee.com/ssssssss-team/magic-boot.git
synced 2026-04-26 00:00:04 +08:00
59 lines
1.1 KiB
Vue
59 lines
1.1 KiB
Vue
<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>
|