| | |
| | | v-for="(val, key, i) in defaultMonitorItems" |
| | | :key="i" |
| | | style="flex: 1; display: flex" |
| | | |
| | | > |
| | | <span style="width: 33%; font-size: 0.9rem" @click="chuan(val)">{{ |
| | | val.sensorCode | sensorFilter |
| | |
| | | // this.macLng = this.$route.query.items |
| | | // this.monitorPointInfo = this.$route.params.monitorPointInfo |
| | | this.monitorPointInfo = JSON.parse(this.$route.query.monitorPointInfo) |
| | | this.deviceName = this.$route.query.device.name |
| | | var obj = JSON.parse(this.$route.query.device) |
| | | this.deviceName = obj.name |
| | | this.regionCode = this.$store.state.regionCode |
| | | // this.regionCode = this.$store.state.regionCode |
| | | this.sensorLayout() |
| | |
| | | var socketUrl |
| | | if (this.equipment === 'car') { |
| | | socketUrl = 'http://47.99.64.149:8081/cruiserWebsocket/' + this.macName |
| | | // socketUrl = 'http://192.168.0.33:8081/cruiserWebsocket/' + this.macName |
| | | // socketUrl = 'http://192.168.0.11:8081/cruiserWebsocket/' + this.macName |
| | | } else { |
| | | socketUrl = 'http://47.99.64.149:8081/singleDevice/' + this.macName |
| | | // socketUrl = 'http://192.168.0.4:8081/singleDevice/' + this.macName |
| | | // socketUrl = 'http://192.168.0.11:8081/singleDevice/' + this.macName |
| | | } |
| | | // 替换http为WS |
| | | socketUrl = socketUrl.replace('https', 'ws').replace('http', 'ws') |
| | |
| | | // console.log(1); |
| | | // if (JSON.parse(msg.data).名称) { |
| | | that.wsData2 = JSON.parse(msg.data) |
| | | // console.log(msg.data, 'data2') |
| | | console.log(that.wsData2, 'that.wsData2') |
| | | // that.wsData2.on('click',function (params) { |
| | | // console.log(params); |
| | | // }) |
| | |
| | | // 判断PM2.5的超标预警 |
| | | if (e1Data > 250) { |
| | | that.e1Bg = require('@/assets/images/level0_circle5.gif') |
| | | that.coreMonitorItems[0].bg=5 |
| | | that.coreMonitorItems[0].bg = 5 |
| | | } else if (e1Data > 150) { |
| | | that.coreMonitorItems[0].bg=4 |
| | | that.coreMonitorItems[0].bg = 4 |
| | | that.e1Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e1Data > 115) { |
| | | that.coreMonitorItems[0].bg=3 |
| | | that.coreMonitorItems[0].bg = 3 |
| | | that.e1Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e1Data > 75) { |
| | | that.coreMonitorItems[0].bg=2 |
| | | that.coreMonitorItems[0].bg = 2 |
| | | that.e1Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e1Data > 35) { |
| | | that.coreMonitorItems[0].bg=1 |
| | | that.coreMonitorItems[0].bg = 1 |
| | | that.e1Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | // console.log(that.coreMonitorItems[0].bg,'bg'); |
| | |
| | | } |
| | | // 判断PM10的超标预警 |
| | | if (e2Data > 420) { |
| | | that.coreMonitorItems[1].bg=5 |
| | | that.coreMonitorItems[1].bg = 5 |
| | | that.e2Bg = require('@/assets/images/level0_circle5.gif') |
| | | } else if (e2Data > 350) { |
| | | that.coreMonitorItems[1].bg=4 |
| | | that.coreMonitorItems[1].bg = 4 |
| | | that.e2Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e2Data > 250) { |
| | | that.coreMonitorItems[1].bg=3 |
| | | that.coreMonitorItems[1].bg = 3 |
| | | that.e2Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e2Data > 150) { |
| | | that.coreMonitorItems[1].bg=2 |
| | | that.coreMonitorItems[1].bg = 2 |
| | | that.e2Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e2Data > 50) { |
| | | that.coreMonitorItems[1].bg=1 |
| | | that.coreMonitorItems[1].bg = 1 |
| | | that.e2Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | that.e2Bg = require('@/assets/images/level0_circle0.gif') |
| | | } |
| | | // 判断CO的超标预警 |
| | | if (e10Data > 90) { |
| | | that.coreMonitorItems[4].bg=5 |
| | | that.coreMonitorItems[4].bg = 5 |
| | | that.e10Bg = require('@/assets/images/level0_circle5.gif') |
| | | } else if (e10Data > 60) { |
| | | that.coreMonitorItems[4].bg=4 |
| | | that.coreMonitorItems[4].bg = 4 |
| | | that.e10Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e10Data > 35) { |
| | | that.coreMonitorItems[4].bg=3 |
| | | that.coreMonitorItems[4].bg = 3 |
| | | that.e10Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e10Data > 10) { |
| | | that.coreMonitorItems[4].bg=2 |
| | | that.coreMonitorItems[4].bg = 2 |
| | | that.e10Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e10Data > 5) { |
| | | that.coreMonitorItems[4].bg=1 |
| | | that.coreMonitorItems[4].bg = 1 |
| | | that.e10Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | that.e10Bg = require('@/assets/images/level0_circle0.gif') |
| | | } |
| | | // 判断SO2的超标预警 |
| | | if (e11Data > 1600) { |
| | | that.coreMonitorItems[3].bg=5 |
| | | that.coreMonitorItems[3].bg = 5 |
| | | that.e11Bg = require('@/assets/images/level0_circle5.gif') |
| | | } else if (e11Data > 800) { |
| | | that.coreMonitorItems[3].bg=4 |
| | | that.coreMonitorItems[3].bg = 4 |
| | | that.e11Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e11Data > 650) { |
| | | that.coreMonitorItems[3].bg=3 |
| | | that.coreMonitorItems[3].bg = 3 |
| | | that.e11Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e11Data > 500) { |
| | | that.coreMonitorItems[3].bg=2 |
| | | that.coreMonitorItems[3].bg = 2 |
| | | that.e11Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e11Data > 150) { |
| | | that.coreMonitorItems[3].bg=1 |
| | | that.coreMonitorItems[3].bg = 1 |
| | | that.e11Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | that.e11Bg = require('@/assets/images/level0_circle0.gif') |
| | | } |
| | | // 判断O3的超标预警 |
| | | if (e15Data > 800) { |
| | | that.coreMonitorItems[5].bg=5 |
| | | that.coreMonitorItems[5].bg = 5 |
| | | that.e15Bg = require('@/assets/images/level0_circle5.gif') |
| | | } else if (e15Data > 400) { |
| | | that.coreMonitorItems[5].bg=4 |
| | | that.coreMonitorItems[5].bg = 4 |
| | | that.e15Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e15Data > 300) { |
| | | that.coreMonitorItems[5].bg=3 |
| | | that.coreMonitorItems[5].bg = 3 |
| | | that.e15Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e15Data > 200) { |
| | | that.coreMonitorItems[5].bg=2 |
| | | that.coreMonitorItems[5].bg = 2 |
| | | that.e15Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e15Data > 160) { |
| | | that.coreMonitorItems[5].bg=1 |
| | | that.coreMonitorItems[5].bg = 1 |
| | | that.e15Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | that.e15Bg = require('@/assets/images/level0_circle0.gif') |
| | | } |
| | | // 判断NO2的超标预警 |
| | | if (e16Data > 2340) { |
| | | that.coreMonitorItems[2].bg=5 |
| | | that.coreMonitorItems[2].bg = 5 |
| | | that.e16Bg = require('@/assets/images/level0_circle5.gif') |
| | | } else if (e16Data > 1200) { |
| | | that.coreMonitorItems[2].bg=4 |
| | | that.coreMonitorItems[2].bg = 4 |
| | | that.e16Bg = require('@/assets/images/level0_circle4.gif') |
| | | } else if (e16Data > 700) { |
| | | that.coreMonitorItems[2].bg=3 |
| | | that.coreMonitorItems[2].bg = 3 |
| | | that.e16Bg = require('@/assets/images/level0_circle3.gif') |
| | | } else if (e16Data > 200) { |
| | | that.coreMonitorItems[2].bg=2 |
| | | that.coreMonitorItems[2].bg = 2 |
| | | that.e16Bg = require('@/assets/images/level0_circle2.gif') |
| | | } else if (e16Data > 100) { |
| | | that.coreMonitorItems[2].bg=1 |
| | | that.coreMonitorItems[2].bg = 1 |
| | | that.e16Bg = require('@/assets/images/level0_circle1.gif') |
| | | } else { |
| | | that.e16Bg = require('@/assets/images/level0_circle0.gif') |