Forráskód Böngészése

index添加设备基本运行情况的报警数据

yuhan 1 éve%!(EXTRA string=óta)
szülő
commit
d2d4cd0dd0
1 módosított fájl, 5 hozzáadás és 3 törlés
  1. 5 3
      src/views/modules_guAn/visualization/index.vue

+ 5 - 3
src/views/modules_guAn/visualization/index.vue

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