diff --git a/src/views/modules/monitoring/audit-log.vue b/src/views/modules/monitoring/audit-log.vue index 32557ee..6128853 100644 --- a/src/views/modules/monitoring/audit-log.vue +++ b/src/views/modules/monitoring/audit-log.vue @@ -16,6 +16,9 @@ + + + @@ -32,9 +35,27 @@ logs: [ // 这里可以根据需要从后台获取真实数据 { id: 1, message: "日志1", timestamp: "2024-01-05 10:30:00" }, { id: 2, message: "日志2", timestamp: "2024-01-05 11:15:00" }, - ] + ], + chartOptions: { + title: { + text: '柱状图示例' + }, + tooltip: {}, + xAxis: { + data: ['类别1', '类别2', '类别3', '类别4', '类别5'] + }, + yAxis: {}, + series: [{ + name: '数量', + type: 'bar', + data: [5, 20, 36, 10, 10] + }] + } }; }, + mounted() { + this.renderChart() + }, methods: { fetchLogs() { // 模拟从后端获取日志数据的过程 @@ -57,7 +78,11 @@ // 将返回的日志数据赋值给logs数组 this.logs = response.data; }, 1000); - } + }, + renderChart() { + const myChart = echarts.init(this.$refs.myChart) + myChart.setOption(this.chartOptions) + } } }; diff --git a/src/views/modules/monitoring/chart-test.vue b/src/views/modules/monitoring/chart-test.vue new file mode 100644 index 0000000..4e1c60a --- /dev/null +++ b/src/views/modules/monitoring/chart-test.vue @@ -0,0 +1,38 @@ + + + + + + 数据上报 + {{ lineCardTitle }} + + 运行情况 + 应用情况 + + + + + + + + + + + + +