修改台账管理页面 优化实时数据
This commit is contained in:
@@ -72,7 +72,14 @@ export default {
|
||||
vh: null,
|
||||
vw: null,
|
||||
zoom: '',
|
||||
echartlist: null
|
||||
echartlist: [null, null, null, null, null, null, null, null],
|
||||
myChartess: null,
|
||||
myChartess1: null,
|
||||
myChartess2: null,
|
||||
myChartess3: null,
|
||||
myChartess4: null,
|
||||
myChartess5: null,
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -110,20 +117,36 @@ export default {
|
||||
this.query()
|
||||
})
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.backbxlb()
|
||||
},
|
||||
methods: {
|
||||
backbxlb() {
|
||||
|
||||
if (this.echartlist.length > 0) {
|
||||
console.log(123111);
|
||||
this.waveDatas = []
|
||||
this.echartlist.forEach(item => {
|
||||
item.dispose(); // 销毁echarts实例
|
||||
if(this.myChartess){this.myChartess.dispose(); this.myChartess=null; }
|
||||
if(this.myChartess1){this.myChartess1.dispose(); this.myChartess1=null; }
|
||||
if(this.myChartess2){this.myChartess2.dispose(); this.myChartess2=null; }
|
||||
if(this.myChartess3){this.myChartess3.dispose(); this.myChartess3=null; }
|
||||
if(this.myChartess4){this.myChartess4.dispose(); this.myChartess4=null; }
|
||||
if(this.myChartess5){this.myChartess5.dispose(); this.myChartess5=null; }
|
||||
|
||||
echarts.disconnect([this.myChartess,this.myChartess1,this.myChartess2,this.myChartess3,this.myChartess4,this.myChartess5])
|
||||
|
||||
|
||||
})
|
||||
// this.echartlist.forEach(item => {
|
||||
// if (item) {
|
||||
// item.dispose(); // 销<><E99480>echarts实例
|
||||
// echarts.disconnect(item)
|
||||
// item=null
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
// })
|
||||
// setTimeout(()=>{
|
||||
// console.log("🚀 ~ backbxlb ~ this.echartlist:", this.echartlist)
|
||||
|
||||
// },1000)
|
||||
|
||||
},
|
||||
download() {
|
||||
// 转换成canvas
|
||||
@@ -241,7 +264,7 @@ export default {
|
||||
},
|
||||
//获取横向一个波形的全部数据,包括瞬时波形的一次、二次值,如果是电压的话,还需要计算出对应的最大最小值
|
||||
fliteWaveData(wp, step) {
|
||||
|
||||
|
||||
let shunData = wp.listWaveData
|
||||
let pt = Number(wp.pt) / 1000
|
||||
let ct = Number(wp.ct)
|
||||
@@ -413,7 +436,7 @@ export default {
|
||||
},
|
||||
//开始画图
|
||||
initWave(waveDatas, time, type, severity, isOpen) {
|
||||
this.echartlist = []
|
||||
|
||||
//清除之前增加的div
|
||||
// $("#wave ~ .bx1").remove();
|
||||
$('div.bx1').remove()
|
||||
@@ -814,7 +837,8 @@ export default {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
this.echartlist.push(myChartes)
|
||||
// this.echartlist[0]=(myChartes)
|
||||
this.myChartess=myChartes
|
||||
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
if (waveDatas !== null && waveDatas.length > 1) {
|
||||
@@ -1165,7 +1189,9 @@ export default {
|
||||
myChartes.resize()
|
||||
this.loading = false
|
||||
}, 400)
|
||||
this.echartlist.push(myChartes)
|
||||
// this.echartlist[step]=(myChartes)
|
||||
this[`myChartess${step}`]=myChartes
|
||||
|
||||
echarts.connect([myChartes1, myChartes])
|
||||
},
|
||||
//根据多个值的比较返回其中最大值
|
||||
|
||||
Reference in New Issue
Block a user