Compare commits

..

2 Commits

Author SHA1 Message Date
yuxin-pc
e2da209f39 Update DataPackage.vue
展示字段调整
2025-06-10 14:11:47 +08:00
yuxin-pc
0b67f34a89 Update vue.config.js
在线版配置
2025-06-10 14:11:38 +08:00
2 changed files with 41 additions and 5 deletions

View File

@ -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>

View File

@ -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')