This commit is contained in:
chengdandan 2023-02-27 15:22:01 +08:00
commit dac4205654
22 changed files with 339 additions and 140 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -201,14 +201,14 @@ export default {
}
]
};
// myChart.setOption(option);
// window.addEventListener('resize', function() {
// myChart.resize();
// });
this.$nextTick(() => {
myChart.setOption(option)
myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
})
});
// this.$nextTick(() => {
// myChart.setOption(option)
// myChart.resize();
// })
}
},
mounted() {

View File

@ -124,14 +124,14 @@ export default {
}
]
};
// myChart.setOption(option);
// window.addEventListener('resize', function() {
// myChart.resize();
// });
this.$nextTick(() => {
myChart.setOption(option)
myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
})
});
// this.$nextTick(() => {
// myChart.setOption(option)
// myChart.resize();
// })
}
},
mounted() {

View File

@ -140,15 +140,14 @@ export default {
],
series: this.getMessage(newVal, title)
};
// nextTick(() => {})
this.$nextTick(() => {
console.log("this.$refs.lineChart.style.width",this.$refs.lineChart.style.width)
myChart.setOption(option)
// window.addEventListener('resize', function () {
myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
// });
})
});
// this.$nextTick(() => {
// myChart.setOption(option)
// myChart.resize();
// })

View File

@ -110,14 +110,14 @@ export default {
]
};
// myChart.setOption(option);
// window.addEventListener('resize', function() {
// myChart.resize();
// });
this.$nextTick(() => {
myChart.setOption(option)
myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
})
});
// this.$nextTick(() => {
// myChart.setOption(option)
// myChart.resize();
// })
}
},
mounted() {

View File

@ -193,7 +193,7 @@ export default {
/deep/ .el-table{
height: 709px !important;
overflow-y: scroll;
z-index: 9999;
}
.el-table::-webkit-scrollbar { width: 0 !important }
.tableContent {

View File

@ -181,7 +181,7 @@ export default {
/deep/ .el-table{
height: 709px !important;
overflow-y: scroll;
z-index: 9999;
}
.el-table::-webkit-scrollbar { width: 0 !important }
.tableContent {

View File

@ -133,14 +133,14 @@ export default {
}
]
};
// myChart.setOption(option);
// window.addEventListener('resize', function () {
// myChart.resize();
// });
this.$nextTick(() => {
myChart.setOption(option)
myChart.setOption(option);
window.addEventListener('resize', function () {
myChart.resize();
})
});
// this.$nextTick(() => {
// myChart.setOption(option)
// myChart.resize();
// })
}
},
mounted() {

View File

@ -1,6 +1,5 @@
<template>
<div class="setion">
<p class="chartTitle"><span class="titleIcon"></span> {{ componentName }}{{ triggerType }}</p>
<div class="border">
<detailDialog />
<thermalChart :pageType="pageType" :list="dataArr" :status="triggerType" :title="title" />

View File

@ -112,7 +112,7 @@
<div class="border" v-if="echartArr.includes('均值图')">
<detailDialog />
<avgChart
ref="avgRefChart"
ref="avgChartRef"
:componentName="componentName"
:chartName="chartName"
:pageType="pageType"
@ -180,18 +180,15 @@ export default {
methods: {
//
getDataArr(val){
console.log("getDataArr",val)
this.newDataArr = val
this.getNewQueue(this.newDataArr)
},
getTotal(dataArr) {
return dataArr[0].type_data.reduce(function(prev, cur) {
if(this.title=='类型'){
return dataArr[0].type_data.reduce(function(prev, cur) {
return cur.quantity + prev;
}, 0);
// return dataArr[0].type_data((pre, cur) => {
// return pre + cur
// }, 0)
}, 0);
}
},
//
getNewQueue(val) {
@ -211,20 +208,21 @@ export default {
mounted() {},
watch: {
//
dataArr: {
handler(newVal) {
// console.log('dataArr', newVal);
if (newVal != undefined && newVal.length != 0) {
this.getNewQueue(newVal);
}
},
immediate: true
}
// cycleTimeData: {
// dataArr: {
// handler(newVal) {
// console.log(newVal);
// }
// // console.log('dataArr', newVal);
// if (newVal != undefined && newVal.length != 0) {
// this.getNewQueue(newVal);
// }
// },
// immediate: true
// }
// typeValue:{
// handler(newVal) {
// // console.log('dataArr', newVal);
// },
// immediate: true
// }
}
};

View File

@ -67,8 +67,8 @@ export default {
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
var ip = window.location.host.split(":")[0];
console.log("ip",ip)
const host = `ws://${ip}:10087`;
// const host = 'ws://172.16.1.168:10087/';
// const host = `ws://${ip}:10087`;
const host = 'ws://172.16.1.168:10087/';
const options = {
//

View File

@ -7,7 +7,7 @@
<!-- 断面 -->
<div class="plate1" ref="plate1">
<div
:class="sectionData.length <= 2 ? 'sectionBox' : 'section'"
:class="sectionData.length <= 1 ? 'sectionBox' : 'section'"
ref="section"
v-for="s in sectionData"
:key="s.analogAreaComponentId"
@ -20,7 +20,7 @@
</p>
<!-- <span class="downPull1" data-num="1" @click="sectionHandle(i)"></span> -->
</div>
<!-- <el-tabs> -->
<el-tabs >
<el-collapse v-model="acticveName" @change="handleChange">
<div style="position:relative" v-for="o in s.children" :key="o.analogAreaComponentId">
<div class="titleGnag"></div>
@ -69,7 +69,7 @@
:pageType="o.graphicType"
:triggerType="o.timeMode"
:componentName="o.componentName"
:dataArr="o.cycleStatistics"
:dataArr="o.cycleStatisticsData"
:echartArr="o.presentationForm"
:title="o.componentName.split('_')[0]"
:chartName="o.combinationName"
@ -78,7 +78,7 @@
</el-collapse-item>
</div>
</el-collapse>
<!-- </el-tabs> -->
</el-tabs>
</div>
</template>
</div>
@ -123,7 +123,7 @@ export default {
}
},
//
cycleStatistics: {
cycleStatisticsData: {
type: Array,
default() {
return [];
@ -174,14 +174,23 @@ export default {
methods: {
getNew() {
// this.idVal = ;
getComponentSection({ VideoId: this.$route.query.id }).then(res => {
getComponentSection({ VideoId: this.$route.query.id ,Number:10}).then(res => {
if (res.data.code == 200) {
console.log(res.data.data, '组件的数据');
// console.log(res.data.data, '');
this.componentList = res.data.data;
this.siftData();
}
});
},
//
handleChange() {
this.$nextTick(function () {
var myEvent = new Event("resize");
window.dispatchEvent(myEvent);
});
},
siftData() {
this.sectionArr = [];
this.sectionData = [];
@ -190,29 +199,76 @@ export default {
// console.log("val",val)
this.sectionArr.push(val.combinationName);
this.sectionArr = Array.from(new Set(this.sectionArr));
});
this.sectionData = this.sectionArr.map(item => {
item = { title: item, children: [] };
this.acticveName = [];
this.componentList.forEach(val => {
console.log("val",val)
if (item.title == val.combinationName) {
this.classify.push(val);
item.children.push(val);
if(val.timeMode=='周期统计'||this.cycleStatisticsData.length==0){
this.cycleStatisticsData = item.cycleStatisticsData
var _that = this
_that.componentList.forEach(ele => {
if ( ele.timeMode == '周期统计') {
if (ele.cycleStatisticsData.length == 10) {
ele.cycleStatisticsData.pop();
} else {
// item.time = item.time.split('.')[0];
// _that.typeCycleStatistics = item;
ele.cycleStatisticsData.unshift();
if(_that.$refs.typeChartRef2!=undefined){
for (let i = 0; i < _that.$refs.typeChartRef2.length; i++) {
let itemTypeChartRef2 = _that.$refs.typeChartRef2[i];
// console.log(_this.$refs.typeChartRef[i], '');
if (itemTypeChartRef2.length!=0&&itemTypeChartRef2.dataArr!= undefined && itemTypeChartRef2.dataArr.length != 0) {
// this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
_that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(_that.$refs.typeChartRef2[i].dataArr, _that.$refs.typeChartRef2[i].componentName.split('_')[0])
}
if (itemTypeChartRef2.echartArr.includes('数值')) {
_that.$refs.typeChartRef2[i].getDataArr(_that.$refs.typeChartRef2[i].dataArr)
}
// console.log(item,'');
if (itemTypeChartRef2.echartArr.includes('直方图')&&itemTypeChartRef2.$refs.barChartRef.drawBar) {
//
// console.log(item, '');
itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
if (itemTypeChartRef2.echartArr.includes('饼状图')&&itemTypeChartRef2.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef2.$refs.pieChartRef.drawPie(itemTypeChartRef2.dataArr[0])
}
// if (item.echartArr.includes('') && item.$refs.avgChartRef != undefined && item.dataArr.length != 0) {
// item.$refs.avgChartRef.drawBar(item.dataArr[0])
// }
if (itemTypeChartRef2.echartArr.includes('均值图') && itemTypeChartRef2.$refs.avgChartRef != undefined) {
itemTypeChartRef2.$refs.avgChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
}
}
}
}
}
});
}
if(val.timeMode=='周期时刻'||this.cycleTimeData.length==0){
this.cycleTimeData = item.cycleTimeData
}
}
this.acticveName.push([val.analogAreaComponentId]);
});
return item;
});
},
handleChange(val) {
// console.log(val);
// for (let i = 0; i < this.$refs.typeChartRef.length; i++) {
// console.log( "11111",this.$refs.typeChartRef[i].$refs.lineChartRef.style.width);
// }
},
//
sectionHandle(i) {
let sections = document.querySelectorAll('.section');
@ -234,8 +290,6 @@ export default {
}
},
channge(oldVal, newVal) {
console.log('old', oldVal);
console.log('newVal', newVal);
if (oldVal == 'second') {
this.sectionArr = [];
this.sectionData = [];
@ -271,7 +325,7 @@ export default {
handler(newVal) {
this.triggerList = newVal;
//
console.log(newVal, '触发数据');
// console.log(newVal, '');
var _this = this
if (newVal.length != 0 && _this.sectionData) {
_this.classify.forEach((ele, index) => {
@ -290,29 +344,34 @@ export default {
}
ele.trigger.unshift(item);
_this.$nextTick(() => {
for (let i = 0; i < _this.$refs.typeChartRef.length; i++) {
if(_this.$refs.typeChartRef1!=undefined){
for (let i = 0; i < _this.$refs.typeChartRef.length; i++) {
// console.log(_this.$refs.typeChartRef[i], '');
let item = _this.$refs.typeChartRef[i]
if (item.dataArr!= undefined && item.dataArr.length != 0) {
console.log("item.echartArr",item.echartArr)
if (item.echartArr.includes('时间曲线图')) {
let itemTypeChart = _this.$refs.typeChartRef[i]
if (itemTypeChart.dataArr!= undefined && itemTypeChart.dataArr.length != 0) {
if (itemTypeChart.echartArr.includes('时间曲线图')) {
_this.$refs.typeChartRef[i].$refs.lineChartRef.drawLine(_this.$refs.typeChartRef[i].dataArr, _this.$refs.typeChartRef[i].componentName.split('_')[0])
}
if (item.echartArr.includes('数值')) {
if (itemTypeChart.echartArr.includes('数值')) {
_this.$refs.typeChartRef[i].getDataArr(_this.$refs.typeChartRef[i].dataArr)
}
if (item.echartArr.includes('直方图') && item.componentName.split('_')[0]) {
if (itemTypeChart.echartArr.includes('直方图') && itemTypeChart.componentName.split('_')[0]) {
//
item.$refs.barChartRef.drawBar(item.dataArr[0])
itemTypeChart.$refs.barChartRef.drawBar(itemTypeChart.dataArr[0])
}
if (item.echartArr.includes('饼状图') && item.componentName.split('_')[0]) {
console.log(item, '饼图组件');
if (itemTypeChart.echartArr.includes('饼状图') && itemTypeChart.componentName.split('_')[0]) {
//
item.$refs.pieChartRef.drawPie(item.dataArr[0])
itemTypeChart.$refs.pieChartRef.drawPie(itemTypeChart.dataArr[0])
}
if (itemTypeChart.echartArr.includes('均值图') && itemTypeChart.$refs.avgChartRef != undefined) {
itemTypeChart.$refs.avgChartRef.drawBar(itemTypeChart.dataArr[0])
}
}
}
}
})
@ -329,12 +388,14 @@ export default {
handler(newVal) {
//
console.log(newVal, '周期时刻数据');
var that = this;
if (newVal.length != 0 && this.sectionData) {
that.classify.forEach((ele, index) => {
if (ele.cycleTimeData == undefined && ele.timeMode == '周期时刻') {
ele.cycleTimeData = [];
}
var thatN = this;
if (newVal!= undefined&&newVal.length != 0 && thatN.sectionData) {
thatN.classify.forEach((ele, index) => {
// if (ele.cycleTimeData == undefined && ele.timeMode == '') {
// ele.cycleTimeData = [];
// }else{
// }
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期时刻') {
if (ele.cycleTimeData.length == 10) {
@ -343,76 +404,216 @@ export default {
item.time = item.time.split('.')[0];
if (item.type_data != null) {
//
that.typeCycleTimeData = item;
thatN.typeCycleTimeData = item;
}
ele.cycleTimeData.unshift(item);
that.$nextTick(() => {
// thatN.$nextTick(() => {
if(thatN.$refs.typeChartRef1!=undefined){
// console.log("thatN.$refs.typeChartRef1",thatN.$refs.typeChartRef1)
//
for (let i = 0; i < that.$refs.typeChartRef1.length; i++) {
item = that.$refs.typeChartRef1[i]
if (item.dataArr.length != 0) {
for (let i = 0; i < thatN.$refs.typeChartRef1.length; i++) {
let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]
if (itemTypeChartRef1.length!=0&&itemTypeChartRef1.dataArr!= undefined && itemTypeChartRef1.dataArr.length != 0) {
that.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef1[i].dataArr, that.$refs.typeChartRef[i].componentName.split('_')[0])
if (item.$refs.barChartRef.drawBar) {
//
item.$refs.barChartRef.drawBar(item.dataArr[0])
} else if (item.$refs.pieChartRef.drawPie) {
//
item.$refs.pieChartRef.drawPie(item.dataArr[0])
if (itemTypeChartRef1.echartArr.includes('时间曲线图')) {
thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(thatN.$refs.typeChartRef1[i].dataArr, thatN.$refs.typeChartRef1[i].componentName.split('_')[0])
}
if (itemTypeChartRef1.echartArr.includes('数值')) {
thatN.$refs.typeChartRef1[i].getDataArr(thatN.$refs.typeChartRef1[i].dataArr)
}
if (itemTypeChartRef1.echartArr.includes('直方图') &&itemTypeChartRef1.$refs.barChartRef.drawBar) {
//
itemTypeChartRef1.$refs.barChartRef.drawBar(itemTypeChartRef1.dataArr[0])
}
if (itemTypeChartRef1.echartArr.includes('饼状图') &&itemTypeChartRef1.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef1.$refs.pieChartRef.drawPie(itemTypeChartRef1.dataArr[0])
}
if (itemTypeChartRef1.echartArr.includes('均值图') && itemTypeChartRef1.$refs.avgChartRef != undefined) {
itemTypeChartRef1.$refs.avgChartRef.drawBar(itemTypeChartRef1.dataArr[0])
}
}
}
});
}
// });
}
}
});
});
}else{
var _thatN= this
_thatN.classify.forEach((ele, index) => {
// if (ele.cycleTimeData == undefined && ele.timeMode == '') {
// ele.cycleTimeData = [];
// }else{
// }
// newVal.forEach(item => {
if (ele.timeMode == '周期时刻') {
if (ele.cycleTimeData.length == 10) {
ele.cycleTimeData.pop();
} else {
// item.time = item.time.split('.')[0];
// if (item.type_data != null) {
//
_thatN.typeCycleTimeData = item;
// }
// ele.cycleTimeData.unshift(item);
// _thatN.$nextTick(() => {
if(_thatN.$refs.typeChartRef1!=undefined){
// console.log("thatN.$refs.typeChartRef1",_thatN.$refs.typeChartRef1)
//
for (let i = 0; i < _thatN.$refs.typeChartRef1.length; i++) {
let itemTypeChartRef1 = thatN.$refs.typeChartRef1[i]
if (itemTypeChartRef1.length!=0&&itemTypeChartRef1.dataArr!= undefined && itemTypeChartRef1.dataArr.length != 0) {
if (itemTypeChartRef1.echartArr.includes('时间曲线图')) {
_thatN.$refs.typeChartRef1[i].$refs.lineChartRef.drawLine(_thatN.$refs.typeChartRef1[i].dataArr, _thatN.$refs.typeChartRef1[i].componentName.split('_')[0])
}
if (itemTypeChartRef1.echartArr.includes('数值')) {
_thatN.$refs.typeChartRef1[i].getDataArr(_thatN.$refs.typeChartRef1[i].dataArr)
}
if (itemTypeChartRef1.echartArr.includes('直方图') &&itemTypeChartRef1.$refs.barChartRef.drawBar) {
//
itemTypeChartRef1.$refs.barChartRef.drawBar(itemTypeChartRef1.dataArr[0])
}
if (itemTypeChartRef1.echartArr.includes('饼状图') &&itemTypeChartRef1.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef1.$refs.pieChartRef.drawPie(itemTypeChartRef1.dataArr[0])
}
if (itemTypeChartRef1.echartArr.includes('均值图') && itemTypeChartRef1.$refs.avgChartRef != undefined) {
itemTypeChartRef1.$refs.avgChartRef.drawBar(itemTypeChartRef1.dataArr[0])
}
}
}
}
// });
}
}
// });
});
}
},
immediate: true
},
cycleStatistics: {
//
cycleStatisticsData: {
handler(newVal) {
if (newVal.length != 0 && this.sectionData) {
this.componentList.forEach(ele => {
if (ele.cycleStatistics == undefined && ele.timeMode == '周期统计') {
ele.cycleStatistics = [];
}
var that = this;
if (newVal!= undefined&& newVal.length != 0 && that.sectionData) {
console.log("newVal",newVal)
that.componentList.forEach(ele => {
// if (ele.cycleStatisticsData == undefined && ele.timeMode == '') {
// ele.cycleStatisticsData = [];
// }else{
// // ele.cycleStatisticsData =
// }
console.log(" ele.cycleStatisticsData", ele.cycleStatisticsData)
newVal.forEach(item => {
if (ele.analogAreaComponentId == item.component_id && ele.timeMode == '周期统计') {
if (ele.cycleStatistics.length == 10) {
ele.cycleStatistics.pop();
if (ele.cycleStatisticsData.length == 10) {
ele.cycleStatisticsData.pop();
} else {
ele.cycleStatisticsData.unshift(item);
item.time = item.time.split('.')[0];
if (item.type_data != null) {
this.typeCycleStatistics = item;
that.typeCycleStatistics = item;
}
ele.cycleStatistics.unshift(item);
for (let i = 0; i < this.$refs.typeChartRef2.length; i++) {
item = that.$refs.typeChartRef2[i];
console.log(" ele.cycleStatisticsData", ele.cycleStatisticsData)
if(that.$refs.typeChartRef2!=undefined){
for (let i = 0; i < that.$refs.typeChartRef2.length; i++) {
let itemTypeChartRef2 = that.$refs.typeChartRef2[i];
// console.log(_this.$refs.typeChartRef[i], '');
if (item.dataArr.length != 0) {
this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
if (item.componentName.split('_')[0] == "类型") {
// console.log(item,'');
if (item.echartArr.includes('直方图')) {
//
console.log(item, '组件');
item.$refs.barChartRef.drawBar(item.dataArr[0])
} else if (item.echartArr.includes('饼状图')) {
//
item.$refs.pieChartRef.drawPie(item.dataArr[0])
if (itemTypeChartRef2.length!=0&&itemTypeChartRef2.dataArr!= undefined && itemTypeChartRef2.dataArr.length != 0) {
// this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(that.$refs.typeChartRef2[i].dataArr, that.$refs.typeChartRef2[i].componentName.split('_')[0])
}
if (itemTypeChartRef2.echartArr.includes('数值')) {
that.$refs.typeChartRef2[i].getDataArr(that.$refs.typeChartRef2[i].dataArr)
}
// console.log(item,'');
if (itemTypeChartRef2.echartArr.includes('直方图')&&itemTypeChartRef2.$refs.barChartRef.drawBar) {
//
// console.log(item, '');
itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
if (itemTypeChartRef2.echartArr.includes('饼状图')&&itemTypeChartRef2.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef2.$refs.pieChartRef.drawPie(itemTypeChartRef2.dataArr[0])
}
// if (item.echartArr.includes('') && item.$refs.avgChartRef != undefined && item.dataArr.length != 0) {
// item.$refs.avgChartRef.drawBar(item.dataArr[0])
// }
if (itemTypeChartRef2.echartArr.includes('均值图') && itemTypeChartRef2.$refs.avgChartRef != undefined) {
itemTypeChartRef2.$refs.avgChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
}
}
}
}
}
});
});
}
else{
var _that = this
_that.componentList.forEach(ele => {
if ( ele.timeMode == '周期统计') {
if (ele.cycleStatisticsData.length == 10) {
ele.cycleStatisticsData.pop();
} else {
// item.time = item.time.split('.')[0];
// _that.typeCycleStatistics = item;
ele.cycleStatisticsData.unshift();
if(_that.$refs.typeChartRef2!=undefined){
for (let i = 0; i < _that.$refs.typeChartRef2.length; i++) {
let itemTypeChartRef2 = _that.$refs.typeChartRef2[i];
// console.log(_this.$refs.typeChartRef[i], '');
if (itemTypeChartRef2.length!=0&&itemTypeChartRef2.dataArr!= undefined && itemTypeChartRef2.dataArr.length != 0) {
// this.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(this.$refs.typeChartRef2[i].dataArr, _this.$refs.typeChartRe2f[i].componentName.split('_')[0])
if (itemTypeChartRef2.echartArr.includes('时间曲线图')) {
_that.$refs.typeChartRef2[i].$refs.lineChartRef.drawLine(_that.$refs.typeChartRef2[i].dataArr, _that.$refs.typeChartRef2[i].componentName.split('_')[0])
}
if (itemTypeChartRef2.echartArr.includes('数值')) {
_that.$refs.typeChartRef2[i].getDataArr(_that.$refs.typeChartRef2[i].dataArr)
}
// console.log(item,'');
if (itemTypeChartRef2.echartArr.includes('直方图')&&itemTypeChartRef2.$refs.barChartRef.drawBar) {
//
// console.log(item, '');
itemTypeChartRef2.$refs.barChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
if (itemTypeChartRef2.echartArr.includes('饼状图')&&itemTypeChartRef2.$refs.pieChartRef.drawPie) {
//
itemTypeChartRef2.$refs.pieChartRef.drawPie(itemTypeChartRef2.dataArr[0])
}
// if (item.echartArr.includes('') && item.$refs.avgChartRef != undefined && item.dataArr.length != 0) {
// item.$refs.avgChartRef.drawBar(item.dataArr[0])
// }
if (itemTypeChartRef2.echartArr.includes('均值图') && itemTypeChartRef2.$refs.avgChartRef != undefined) {
itemTypeChartRef2.$refs.avgChartRef.drawBar(itemTypeChartRef2.dataArr[0])
}
}
}
}
}
}
});
}
}
}
// activeName: {

View File

@ -409,8 +409,8 @@ export default {
getDataByMqtt(url, topic, cIdNum) {
const clientId = "test_id_" + String(new Date().getTime()); //
// const host = 'ws://49.234.27.18:10087/'; // urlws://broker.emqx.io:8083/mqtt
const host = `ws://${ip}:10087`;
// const host = 'ws://172.16.1.168:10087/';
// const host = `ws://${ip}:10087`;
const host = 'ws://172.16.1.168:10087/';
const options = {
//

View File

@ -634,7 +634,9 @@ export default {
const temp = utf8decoder.decode(u8arr); //
var detId = [];
const msgN = JSON.parse(temp);
this.cycleStatisticsData = msgN;
this.cycleStatisticsData = msgN;
} catch (error) { }
break;
}