|
@@ -42,7 +42,7 @@
|
|
<running-state :data="eqRealData"></running-state>
|
|
<running-state :data="eqRealData"></running-state>
|
|
</div>
|
|
</div>
|
|
<div class="center-bottom-right">
|
|
<div class="center-bottom-right">
|
|
- <equipment-info :data="eqRealData"></equipment-info>
|
|
|
|
|
|
+ <equipment-info :data="eqRealData" :alarmData="newAlarmData"></equipment-info>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -103,6 +103,7 @@ export default {
|
|
eqRealData: [],
|
|
eqRealData: [],
|
|
curveData: [],
|
|
curveData: [],
|
|
websock: null,
|
|
websock: null,
|
|
|
|
+ newAlarmData: null
|
|
}
|
|
}
|
|
},
|
|
},
|
|
destroyed () {
|
|
destroyed () {
|
|
@@ -161,13 +162,14 @@ export default {
|
|
console.log(redata);
|
|
console.log(redata);
|
|
// 接收数据之后操作
|
|
// 接收数据之后操作
|
|
this.eqRealData = redata['设备实时值']
|
|
this.eqRealData = redata['设备实时值']
|
|
- this.curveData = redata['设备实时值']
|
|
|
|
|
|
+ this.curveData = redata['设备历史值']
|
|
|
|
+ this.newAlarmData = redata['最新一条报警信息']
|
|
},
|
|
},
|
|
// websocket连接后发送数据(send发送)
|
|
// websocket连接后发送数据(send发送)
|
|
websocketonopen () {
|
|
websocketonopen () {
|
|
console.log("WebSocket连接成功");
|
|
console.log("WebSocket连接成功");
|
|
// let actions = {} // 请根据实际项目需要进行修改
|
|
// let actions = {} // 请根据实际项目需要进行修改
|
|
- this.websocketsend()
|
|
|
|
|
|
+ // this.websocketsend()
|
|
},
|
|
},
|
|
// 数据发送
|
|
// 数据发送
|
|
websocketsend (d) {
|
|
websocketsend (d) {
|