服务管理布局

This commit is contained in:
ym1026
2025-09-17 15:31:35 +08:00
parent 680be6155f
commit 27ca787fc5
4 changed files with 11 additions and 7 deletions

View File

@@ -93,8 +93,11 @@ export default {
},
mounted() {},
beforeUnmount() {
this.faultChart = null
window.removeEventListener('resize', this.handleResize)
if (this.faultChart) {
this.faultChart.dispose()
this.faultChart = null
}
},
methods: {
@@ -130,6 +133,9 @@ export default {
drawLineChart(activeKey) {
this.getChargeData(activeKey)
if(this.faultChart){
this.faultChart.dispose()
}
const chartDom = document.getElementById('alarm-chart')
let faultChart = this.$echarts.init(chartDom)
this.faultChart = faultChart

View File

@@ -154,7 +154,6 @@ export default {
},
drawLineChart(activeKey) {
console.log(this.$refs.charge)
// const labelCount = Math.floor(500 / 30);
this.getChargeData(activeKey)
if(this.chargeChart){

View File

@@ -243,10 +243,9 @@ export default {
<style lang="scss" scoped>
.service {
height: 100%;
padding: 0 20px;
.content-table {
height: calc(100% - 70px);
padding: 10px;
height: calc(100% - 92px);
}
}
</style>

View File

@@ -14,7 +14,7 @@ module.exports = defineConfig({
proxy: {
'/api': {
// 代理前缀,可以自定义(如 '/api'
target: 'http://192.168.0.187:19801', // 目标服务器地址
target: 'http://192.168.0.187:19800', // 目标服务器地址
changeOrigin: true, // 是否改变请求源(跨域必备)
pathRewrite: {
'^/api': '' // 重写路径,去掉 '/api' 前缀