|
@@ -47,9 +47,10 @@ export default {
|
|
|
label: "功率因数",
|
|
|
},
|
|
|
],
|
|
|
+ title:'电压',
|
|
|
type: "fuhe_after",
|
|
|
unit:'',
|
|
|
- currentChartId: "负荷",
|
|
|
+ currentChartId: 1,
|
|
|
currentChartTitle: "负荷",
|
|
|
yData: new Array(30).fill("-"),
|
|
|
xData: new Array(30).fill("-"),
|
|
@@ -196,24 +197,23 @@ export default {
|
|
|
idChange(id) {
|
|
|
console.log("left", id);
|
|
|
// 数据清空
|
|
|
- this.paiqidata = new Array(30).fill("-");
|
|
|
- this.chouqidata = new Array(30).fill("-");
|
|
|
+ this.yData = new Array(30).fill("-");
|
|
|
this.xData = new Array(30).fill("-");
|
|
|
// 关闭以前的websocket
|
|
|
- this.websocket.close();
|
|
|
+ // this.websocket.close();
|
|
|
// 开启一个新的
|
|
|
- // this.websocket = new WebSocket(`ws://${this.websocketIP}/hbase/ws/belt/${id}`);
|
|
|
- // this.initWebSocket();
|
|
|
+ this.websocket = new WebSocket(`ws://${this.websocketIP}/hbase/ws/belt/62`);
|
|
|
+ this.initWebSocket();
|
|
|
},
|
|
|
// 选择要展示的参数
|
|
|
selectParm() {
|
|
|
for (let i in this.parmoptions) {
|
|
|
if (this.parmoptions[i].id == this.currentChartId) {
|
|
|
- this.currentChartTitle = this.parmoptions[i].label;
|
|
|
+ this.title = this.parmoptions[i].label;
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- switch (currentChartId) {
|
|
|
+ switch (this.currentChartId) {
|
|
|
case '1':
|
|
|
this.unit = "kvar";
|
|
|
this.type = "fuhe_after";
|