修改台账管理页面 优化实时数据
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
<div id="rmsp" :style="`height:${vh};overflow: hidden;`">
|
||||
<div class="bx" id="rms"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- <el-button
|
||||
style="position: absolute; right: 10px; top: 0px; z-index: 20000"
|
||||
@@ -86,7 +85,14 @@ export default {
|
||||
titles: "",
|
||||
vh: null,
|
||||
vw: null,
|
||||
echartlist: null
|
||||
echartlist: null,
|
||||
myChartess: null,
|
||||
myChartess1: null,
|
||||
myChartess2: null,
|
||||
myChartess3: null,
|
||||
myChartess4: null,
|
||||
myChartess5: null,
|
||||
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -123,20 +129,32 @@ export default {
|
||||
// this.$rms = $("#rms").eq(0);
|
||||
this.query();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.backbxlb()
|
||||
},
|
||||
methods: {
|
||||
backbxlb() {
|
||||
this.waveDatas = []
|
||||
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; }
|
||||
|
||||
if (this.echartlist.length > 0) {
|
||||
echarts.disconnect([this.myChartess,this.myChartess1,this.myChartess2,this.myChartess3,this.myChartess4,this.myChartess5])
|
||||
|
||||
this.waveDatas = []
|
||||
this.echartlist.forEach(item => {
|
||||
item.dispose(); // 销毁echarts实例
|
||||
// if (this.echartlist.length > 0) {
|
||||
|
||||
// this.waveDatas = []
|
||||
// this.echartlist.forEach(item => {
|
||||
// item.dispose(); // 销毁echarts实例
|
||||
|
||||
|
||||
})
|
||||
// })
|
||||
|
||||
|
||||
}
|
||||
// }
|
||||
},
|
||||
download() {
|
||||
// 转换成canvas
|
||||
@@ -1182,7 +1200,8 @@ export default {
|
||||
myChartes.resize();
|
||||
this.loading = false;
|
||||
}, 500);
|
||||
this.echartlist.push(myChartes)
|
||||
// this.echartlist.push(myChartes)
|
||||
this.myChartess=myChartes
|
||||
//第一个波形图数据绘制完毕后,绘制后续的波形图
|
||||
if (waveDatas !== null && waveDatas.length > 1) {
|
||||
let waveDatasTemp = waveDatas.slice(1);
|
||||
@@ -1557,7 +1576,8 @@ export default {
|
||||
myChartes.resize();
|
||||
this.loading = false;
|
||||
}, 500);
|
||||
this.echartlist.push(myChartes)
|
||||
// this.echartlist.push(myChartes)
|
||||
this[`myChartess${step}`]=myChartes
|
||||
echarts.connect([myChartes1, myChartes]);
|
||||
},
|
||||
//根据多个值的比较返回其中最大值
|
||||
|
||||
@@ -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])
|
||||
},
|
||||
//根据多个值的比较返回其中最大值
|
||||
|
||||
@@ -132,12 +132,13 @@ const open = async (row: any) => {
|
||||
})
|
||||
}
|
||||
const bxhandleClick = (tab: any) => {
|
||||
if (shushiboxiRef.value) shushiboxiRef.value.backbxlb()
|
||||
if (rmsboxiRef.value) rmsboxiRef.value.backbxlb()
|
||||
|
||||
loading.value = true
|
||||
if (tab.name == 'ssbx') {
|
||||
if (rmsboxiRef.value) rmsboxiRef.value.backbxlb()
|
||||
bxactiveName.value = 'ssbx'
|
||||
} else if (tab.name == 'rmsbx') {
|
||||
if (shushiboxiRef.value) shushiboxiRef.value.backbxlb()
|
||||
bxactiveName.value = 'rmsbx'
|
||||
}
|
||||
setTimeout(() => {
|
||||
@@ -173,6 +174,8 @@ const AdvancedAnalytics = () => {
|
||||
})
|
||||
}
|
||||
const changeView = () => {
|
||||
if (shushiboxiRef.value) shushiboxiRef.value.backbxlb()
|
||||
if (rmsboxiRef.value) rmsboxiRef.value.backbxlb()
|
||||
showBoxi.value = false
|
||||
setTimeout(() => {
|
||||
showBoxi.value = true
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<!-- image -->
|
||||
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
||||
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fullUrl(fieldValue)]"
|
||||
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fieldValue]"
|
||||
:src="fieldValue.length > 100 ? fieldValue : fullUrl(fieldValue)"></el-image>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user