| | |
| | | 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); |
| | | // }) |