guoshipeng
2023-07-06 63c0ecf98f3705b4c70e4bafee5f325966a5777b
src/views/deviceDetail/index.vue
@@ -37,7 +37,6 @@
            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
@@ -471,7 +470,8 @@
    // 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()
@@ -710,10 +710,10 @@
      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')
@@ -730,7 +730,7 @@
        // 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);
        // })