Browse Source

更新切换echart变形问题

develop
little4 2 months ago
parent
commit
deb986461e
  1. 13
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/analysis/index.vue
  2. 12
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue

13
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/analysis/index.vue

@ -77,7 +77,14 @@ export default {
}
},
mounted() {
window.addEventListener("resize", async () => {
let self = this;
window.addEventListener("resize", () => {
self.refresh();
});
},
methods:{
async refresh(){
console.log('更新坐标')
this.isKeep = false;
await delay(100)
this.$refs.refMuliple.myChart.resize();
@ -94,9 +101,7 @@ export default {
this.$refs.refRealWayDay.myChart.resize();
this.$refs.refRealWay.myChart.resize();
})
});
},
methods:{
},
bind(){
const _search = this.$refs.refSearch.getQuery();
const _progress = this.$refs.refProgress.getQuery();

12
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/index.vue

@ -1,8 +1,8 @@
<template>
<div class="TrafficFlow">
<el-tabs class="full_tab" v-model="activeName">
<el-tabs class="full_tab" v-model="activeName" @change="onTabChange">
<el-tab-pane label="感知事件分析" name="first" class="tab_con">
<EventDetectionAnalysis />
<EventDetectionAnalysis ref="refAna" />
</el-tab-pane>
<el-tab-pane label="感知事件统计" name="second" class="tab_con">
<EventDetectionStatistics />
@ -25,6 +25,14 @@ export default {
return {
activeName:'first'
}
},
methods: {
onTabChange(e){
console.log(e)
if(e === 'first'){
this.$refs.refAna.refresh();
}
}
}
};
</script>

Loading…
Cancel
Save