Compare commits
2 Commits
346bcdea22
...
e2da209f39
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2da209f39 | ||
|
|
0b67f34a89 |
@ -27,8 +27,17 @@
|
||||
<el-table-column prop="packageName" label="数据包名称"></el-table-column>
|
||||
<el-table-column prop="operationType" label="操作类型"></el-table-column>
|
||||
<el-table-column prop="operationTime" label="操作时间" :formatter="formatDate"></el-table-column>
|
||||
<el-table-column prop="userName" label="用户名"></el-table-column>
|
||||
<el-table-column prop="userIp" label="IP"></el-table-column>
|
||||
<el-table-column prop="userName" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.userName || 'admin' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="userAgent" label="客户端信息">
|
||||
<template slot-scope="scope">
|
||||
{{ formatUserAgent(scope.row.userAgent) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
@current-change="handleLogPageChange"
|
||||
@ -67,6 +76,7 @@ import {
|
||||
Tooltip
|
||||
} from 'element-ui'
|
||||
import dataPackageApi from '@/js/api/dataPackageApi';
|
||||
|
||||
Vue.use(Select)
|
||||
Vue.use(Option)
|
||||
Vue.use(Input)
|
||||
@ -174,7 +184,33 @@ export default {
|
||||
unitIndex++;
|
||||
}
|
||||
return `${size.toFixed(2)} ${units[unitIndex]}`;
|
||||
},
|
||||
formatUserAgent(agent) {
|
||||
if (!agent) return '未知';
|
||||
// 简化显示,可根据需要调整
|
||||
// if (agent.includes('Chrome')) return 'Chrome';
|
||||
// if (agent.includes('Firefox')) return 'Firefox';
|
||||
// if (agent.includes('Safari')) return 'Safari';
|
||||
// if (agent.includes('Edge')) return 'Edge';
|
||||
return agent.substring(0, 50) + (agent.length > 50 ? '...' : ''); // 截断过长的UA
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 分页居中 */
|
||||
.el-pagination {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* 可选:调整分页按钮样式 */
|
||||
.el-pagination.is-background .btn-next,
|
||||
.el-pagination.is-background .btn-prev,
|
||||
.el-pagination.is-background .el-pager li {
|
||||
margin: 0 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
@ -3,8 +3,8 @@ module.exports = {
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
port: 8080,
|
||||
proxy: 'http://127.0.0.1:8081'
|
||||
// proxy: 'http://38.54.94.107:28081'
|
||||
// proxy: 'http://127.0.0.1:8081'
|
||||
proxy: 'http://38.54.94.107:28081'
|
||||
},
|
||||
chainWebpack: config => {
|
||||
config.plugin('html')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user