审计日志

main
code_nan 2024-01-05 20:57:15 +08:00
parent 59fb58e644
commit 933a36712f
2 changed files with 72 additions and 1 deletions

View File

@ -0,0 +1,69 @@
<template>
<div>
<el-select v-model="selectedAccount" placeholder="选择账号">
<el-option
v-for="account in accounts"
:key="account.id"
:label="account.name"
:value="account.id"
></el-option>
</el-select>
<el-button @click="fetchLogs"></el-button>
<el-table :data="logs" v-if="logs.length > 0">
<el-table-column prop="id" label="日志ID"></el-table-column>
<el-table-column prop="message" label="日志内容"></el-table-column>
<el-table-column prop="timestamp" label="时间戳"></el-table-column>
</el-table>
</div>
</template>
<script>
export default {
data() {
return {
accounts: [
{ id: 1, name: "子账号1" },
{ id: 2, name: "子账号2" },
//
],
selectedAccount: null,
logs: [ //
{ id: 1, message: "日志1", timestamp: "2024-01-05 10:30:00" },
{ id: 2, message: "日志2", timestamp: "2024-01-05 11:15:00" },
]
};
},
methods: {
fetchLogs() {
//
// 使axiosHTTP
// selectedAccount
const accountId = this.selectedAccount;
const url = accountId ? `/logs?accountId=${accountId}` : "/logs";
//
// const response = {
// data: [
// { id: 1, message: "1", timestamp: "2024-01-05 10:30:00" },
// { id: 2, message: "2", timestamp: "2024-01-05 11:15:00" },
// //
// ]
// };
//
setTimeout(() => {
// logs
this.logs = response.data;
}, 1000);
}
}
};
</script>
<style scoped>
.audit-log {
padding: 20px;
}
</style>

View File

@ -6,13 +6,15 @@
<!-- <iframe src="../../../../public/index.html" width="100%" :style="{height:calHeight}" ></iframe>--> <!-- <iframe src="../../../../public/index.html" width="100%" :style="{height:calHeight}" ></iframe>-->
<!-- <iframe src="http://www.baidu.com/" width="100%" :style="{height:calHeight}" ></iframe>--> <!-- <iframe src="http://www.baidu.com/" width="100%" :style="{height:calHeight}" ></iframe>-->
<!-- 摄像头分布图 --> <!-- 摄像头分布图 -->
<!-- 观澜lng: 114.036331, lat: 22.730421 -->
<div > <div >
<baidu-map <baidu-map
class="map" class="map"
:scroll-wheel-zoom="true" :scroll-wheel-zoom="true"
:double-click-zoom="false" :double-click-zoom="false"
@zoomend="mouseEvent" @zoomend="mouseEvent"
:center="{lng: 103.943382, lat: 30.750594 }" :center="{lng: 114.036331, lat: 22.730421 }"
:zoom="zoom"> :zoom="zoom">
<bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation> <bm-navigation anchor="BMAP_ANCHOR_TOP_RIGHT"></bm-navigation>
<bm-marker <bm-marker