quanyawei
2023-10-26 41d3232a6ffd25d9d0f3612b59d17e3515b5bb89
src/components/Wind/Map.vue
@@ -1428,24 +1428,25 @@
      return bgColorList
    },
    deviceDetail () {
      console.log('this.farterItem', this.farterItem)
      console.log('this.farterItem', this.clickmac)
      console.log('this.childerItem', this.childerItem)
      this.monitorPointInfo = this.farterItem
      this.$router.push({
        name: 'deviceDetail',
        params: {
          monitorPointInfo: this.farterItem,
          device: this.clickmac,
          device: this.childerItem,
          macName: this.clickmac,
          indexs: this.indexsLaber,
          items: [this.clickmac.latitude, this.clickmac.longitude]
          items: [this.childerItem.latitude, this.childerItem.longitude]
        },
        query: {
          monitorPointInfo: JSON.stringify(this.farterItem),
          device: JSON.stringify(this.clickmac),
          device: JSON.stringify(this.childerItem),
          macName: this.clickmac,
          indexs: this.indexsLaber,
          items: [this.clickmac.latitude, this.clickmac.longitude]
          items: [this.childerItem.latitude, this.childerItem.longitude]
        }
      })
    },
@@ -1480,14 +1481,18 @@
              .openPopup()
            return
          }
          this.childerItem.name = res.data.name
          let colorliststyleBgColor = this.styleBgColor(res.data)
          console.log('colorliststyleBgColor', colorliststyleBgColor)
          let deviceDetails = res.data
          let windTip = 'inline'
          let windDeg = 0
          let windDir = ''
          let dushu = deviceDetails.a01008 === '-' ? '-' : JSON.parse(deviceDetails.a01008)
            .toFixed(0)
          let level = deviceDetails.a01007 === '0.0' ? '-' : WWindUtil.WindtoLevel(deviceDetails.a01007).level
          let levelNumber = deviceDetails.a01007 === '-' ? '0.0' : Number(deviceDetails.a01007)
            .toFixed(1)
          let level = deviceDetails.a01007 === '0.0' ? '-' : WWindUtil.WindtoLevel(levelNumber).name
          console.log('level', level)
          if (deviceDetails.a01008) {
            var windDirs = Number(
@@ -1495,22 +1500,31 @@
            )
            // console.log(windDirs)
            windDeg = windDirs
            windTip = 'inline'
            if (windDirs === 0 || windDirs === '-') {
              windDir = '北风'
              windDir = '-'
              windTip = 'none'
            } else if (windDirs > 0 && windDirs < 90) {
              windDir = '东北风'
              windTip = 'inline'
            } else if (windDirs === 90) {
              windDir = '东风'
              windTip = 'inline'
            } else if (windDirs > 90 && windDirs < 180) {
              windDir = '东南风'
              windTip = 'inline'
            } else if (windDirs === 180) {
              windDir = '南风'
              windTip = 'inline'
            } else if (windDirs > 180 && windDirs < 270) {
              windDir = '西南风'
              windTip = 'inline'
            } else if (windDirs === 270) {
              windDir = '西风'
              windTip = 'inline'
            } else if (windDirs > 270 && windDirs < 360) {
              windDir = '西北风'
              windTip = 'inline'
            }
          }
          // 请求数据更新弹框内容
@@ -1613,14 +1627,14 @@
          <div class='windBox'>
            <div style="position: relative;width: 50%;text-align: center;color: #999;border-right: 1px dotted #999;" clss='windIcon'>
              <img style="width:140px; height:140px" src=${this.compassBg}>
              <img style="width: 40px;height: 40px;position: absolute;left: 51%;top: 49%;transform: translate(-50%, -50%) rotate(${windDeg}deg)"
              <img style="width: 40px;height: 40px;position: absolute;left: 51%;top: 49%;transform: translate(-50%, -50%) rotate(${windDeg}deg);display: ${windTip};"
                src=${this.compassDirection}
              >
            </div>
            <div class='windInfor'>
              <div>风向: ${windDir} (${dushu}℃)</div>
              <div>风速: ${deviceDetails.a01007}m/s</div>
              <div>等级: ${level}级</div>
              <div>风向: ${windDir} ( ${dushu} ° )</div>
              <div>风速: ${levelNumber} m/s</div>
              <div>等级: ${level}</div>
            </div>
          </div>