quanyawei
2023-10-08 31636073e0330e0f94adca0c17c6629b2fab45c5
fix:接口修改
4 files modified
545 ■■■■ changed files
src/components/Wind/Map.vue 397 ●●●● patch | view | raw | blame | history
src/views/UVA/index1.vue 6 ●●●● patch | view | raw | blame | history
src/views/UVA/index1Copy.vue 2 ●●● patch | view | raw | blame | history
src/views/deviceDetail/index.vue 140 ●●●● patch | view | raw | blame | history
src/components/Wind/Map.vue
@@ -13,8 +13,7 @@
        class="left"
        :class="{ click: changeColor === index }"
        @click="change(index)"
        >{{ item }}</span
      >
      >{{ item }}</span>
      <!-- <span class="middle" @click="toggleWindState()">{{ windStateText }}</span> -->
      <span class="right">{{ times }}秒</span>
      <span class="dropDown">
@@ -23,170 +22,170 @@
          :src="require('@/assets/images/regionalOverview/realTimeImg.png')"
          alt=""
          @click="turnState"
        />
        >
        <span class="text_Time">{{ dateFormat }}</span>
        <img class="drop-icon" :src="turnImg" alt="" @click="turnState" />
        <img class="drop-icon" :src="turnImg" alt="" @click="turnState">
      </span>
    </div>
    <div class="topDate" style="height: 60px">
      <div class="jdt" id="eventPro">
      <div id="eventPro" class="jdt">
        <div class="mouseDiv">
          <span class="inText"></span>
          <div class="sjDiv"></div>
          <span class="inText" />
          <div class="sjDiv" />
        </div>
        <div class="mouseDiv2">
          <span class="inText2"></span>
          <div class="sjDiv2"></div>
          <span class="inText2" />
          <div class="sjDiv2" />
        </div>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
        <li />
      </div>
      <div class="timeDiv" style="position: relative">
        <ul id="timeUl">
          <li style="width: 0.83%"></li>
          <li></li>
          <li></li>
          <li style="width: 0.83%" />
          <li />
          <li />
          <li>03</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>06</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>09</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>12</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>15</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>18</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>21</li>
          <li></li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li />
          <!--          -->
          <li></li>
          <li></li>
          <li />
          <li />
          <li>03</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>06</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>09</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>12</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>15</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>18</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>21</li>
          <li></li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li />
          <!--          -->
          <li></li>
          <li></li>
          <li />
          <li />
          <li>03</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>06</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>09</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>12</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>15</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>18</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>21</li>
          <li></li>
          <li></li>
          <li />
          <li />
          <li>00</li>
        </ul>
        <div
@@ -197,7 +196,7 @@
          "
          class="dayDiv"
        >
          <p class="p1"></p>
          <p class="p1" />
          <p style="position: relative">
            <span
              class="borderLine"
@@ -208,8 +207,8 @@
                height: 47px;
                bottom: 0;
              "
            ></span>
            <span class="p2"></span>
            />
            <span class="p2" />
            <span
              class="borderLine"
              style="
@@ -219,9 +218,9 @@
                height: 47px;
                bottom: 0;
              "
            ></span>
            />
          </p>
          <p class="p3"></p>
          <p class="p3" />
        </div>
      </div>
    </div>
@@ -264,9 +263,10 @@
              :value="item.value"
            />
          </el-select>
          <el-button type="primary" @click="alertData(PageSize, currentPage)"
            >查询</el-button
          >
          <el-button
            type="primary"
            @click="alertData(PageSize, currentPage)"
          >查询</el-button>
        </div>
      </div>
      <el-table
@@ -314,9 +314,10 @@
        @current-change="handleCurrentChange"
      />
      <div slot="footer" class="dialog-footer">
        <el-button size="mini" @click="alarmTableVisible = false"
          >关 闭</el-button
        >
        <el-button
          size="mini"
          @click="alarmTableVisible = false"
        >关 闭</el-button>
      </div>
    </el-dialog>
  </div>
@@ -339,7 +340,7 @@
    weidu: Number,
    jingdu: Number,
    monitorPointId: Number,
    monitorPointIds: Array,
    monitorPointIds: Array
  },
  data() {
    return {
@@ -388,70 +389,70 @@
      factorOptions: [
        {
          label: '全部因子',
          value: 'all',
          value: 'all'
        },
        {
          label: 'PM10',
          value: 'PM10',
          value: 'PM10'
        },
        {
          label: 'PM2.5',
          value: 'PM2.5',
          value: 'PM2.5'
        },
        {
          label: 'SO2',
          value: 'SO2',
          value: 'SO2'
        },
        {
          label: 'NO2',
          value: 'NO2',
          value: 'NO2'
        },
        {
          label: 'CO',
          value: 'CO',
          value: 'CO'
        },
        {
          label: 'O3',
          value: 'O3',
        },
          value: 'O3'
        }
      ],
      alertOptions: [
        {
          label: '全部报警类型',
          value: 'all',
          value: 'all'
        },
        {
          label: '超限',
          value: 'overrun',
          value: 'overrun'
        },
        {
          label: '突然高',
          value: 'sudden',
          value: 'sudden'
        },
        {
          label: '超过国控站点100%',
          value: 'state100',
          value: 'state100'
        },
        {
          label: '超过国控站点150%',
          value: 'state150',
          value: 'state150'
        },
        {
          label: '超过国控站点250%',
          value: 'state250',
          value: 'state250'
        },
        {
          label: '超过市区均值100%',
          value: 'city100',
          value: 'city100'
        },
        {
          label: '超过市区均值150%',
          value: 'city150',
          value: 'city150'
        },
        {
          label: '超过市区均值250%',
          value: 'city250',
        },
          value: 'city250'
        }
      ],
      currentDate: '',
      turnImg: require('@/assets/images/regionalOverview/dropDown.png'),
@@ -462,11 +463,11 @@
      chooseTime: false,
      dateInfo: '', // 选择的日期
      timeInfo: '', // 选择的时间
      nyr: '', // 选择的年月日
      nyr: '' // 选择的年月日
    }
  },
  computed: {
    ...mapGetters(['regionCode']),
    ...mapGetters(['regionCode'])
  },
  watch: {
    dateValue(n, o) {
@@ -475,7 +476,7 @@
    },
    regionCode(newCode, oldCode) {
      this.timerKey = newCode // 用于监听code变化重新渲染子组件
    },
    }
  },
  mounted() {
    this.currentHour()
@@ -682,7 +683,7 @@
      }
      // 鼠标移入移出事件
      for (let i = 0; i < lis.length; i++) {
        lis[i].onmouseenter = function () {
        lis[i].onmouseenter = function() {
          // console.log('mouseenter', i)
          // mouseDiv.style.left = (1.36986 * (i - 1) + 0.68493) + '%'
          mouseDiv.style.transform = 'translateX(-50%)'
@@ -693,13 +694,13 @@
          inText.innerHTML = times + ':00'
          // console.log(mouseDiv)
        }
        lis[i].onmouseleave = function () {
        lis[i].onmouseleave = function() {
          mouseDiv.style.display = 'none'
          // console.log('移出事件', i)
        }
      }
      for (let i = 0; i < timeLis.length; i++) {
        timeLis[i].onmouseenter = function () {
        timeLis[i].onmouseenter = function() {
          // console.log('mouseenter', i)
          // mouseDiv.style.left = (1.36986 * (i - 2) + 0.68493) + '%'
          mouseDiv.style.left = 1.36986 * i + '%'
@@ -710,7 +711,7 @@
          inText.innerHTML = times + ':00'
          // console.log(mouseDiv)
        }
        timeLis[i].onmouseleave = function () {
        timeLis[i].onmouseleave = function() {
          mouseDiv.style.display = 'none'
          // console.log('移出事件', i)
        }
@@ -995,7 +996,7 @@
    deviceMaker() {
      // 遍历所有图层
      if (this.map) {
        this.map.eachLayer(function (layer) {
        this.map.eachLayer(function(layer) {
          // 卸载之前的风场图层
          if (
            !layer._container &&
@@ -1015,8 +1016,8 @@
          organizationId: this.$store.state.orgId,
          regionCode: this.$store.state.regionCode,
          chooseTime: this.chooseTime,
          time: this.nyr,
        },
          time: this.nyr
        }
      }).then((data) => {
        // console.log('五分钟设备数据')
        console.log(data, 'tata')
@@ -1341,23 +1342,23 @@
          // iconUrl: require('@/assets/icon/ico2.png'),
          iconSize: [60, 60],
          iconAnchor: [30, 48],
          className: 'my-device',
          className: 'my-device'
        })
        // 添加标记到地图
        L.marker([lat, lng], {
          icon: blueIcon,
          icon: blueIcon
        }).addTo(group)
        // console.log(JSON.parse(this.keys[i]))
        var myIcon = L.divIcon({
          html: this.keys[i],
          className: 'my-div-icon',
          iconSize: [60, 60],
          iconAnchor: [40, 40],
          iconAnchor: [40, 40]
        })
        var marker = L.marker([lat, lng], { icon: myIcon }).addTo(group)
        // 给标记添加鼠标移入事件,mouseover事件会冒泡
        var _this = this
        marker.on('mouseover', function (e) {
        marker.on('mouseover', function(e) {
          this.noneData = false
          // $.getJSON('http://47.99.64.149:8080/historyFiveMinutely/queryPopDataByMac', { 'mac': keyData[i].mac, chooseTime: this.chooseTime, time: this.nyr }, (res) => {
          //   var data = JSON.stringify(res.data).replace(/,/g, `<br>`).replace(/{|}|"/g, '')
@@ -1371,8 +1372,8 @@
              params: {
                mac: keyData[i].mac,
                chooseTime: _this.chooseTime,
                time: _this.nyr,
              },
                time: _this.nyr
              }
            })
            .then((res) => {
              if (res.message == '操作目标不存在') {
@@ -1407,7 +1408,7 @@
            })
        })
        // 给标记点添加鼠标移出事件
        marker.on('mouseout', function (e) {
        marker.on('mouseout', function(e) {
          this.noneData = false
          this.bindPopup().closePopup()
        })
@@ -1425,8 +1426,8 @@
        method: 'get',
        params: {
          regionCode: 130900,
          sensorCode: 'a34002',
        },
          sensorCode: 'a34002'
        }
      })
        .then((res) => {
          // console.log('国控站信息')
@@ -1441,19 +1442,19 @@
              // iconUrl:require('@/assets/images/tl_PM10.png'),
              iconSize: [55, 55],
              iconAnchor: [13, 21],
              className: 'my-device',
              className: 'my-device'
            })
            // 添加标记到地图
            L.marker([glat, glng], {
              icon: gIcon,
              icon: gIcon
            }).addTo(group)
            var myIcon = L.divIcon({
              html: gkData[i].data,
              className: 'my-div-icon-g',
              iconSize: 30,
              iconSize: 30
            })
            L.marker([glat, glng], {
              icon: myIcon,
              icon: myIcon
            }).addTo(group)
          }
        })
@@ -1485,7 +1486,7 @@
      // const that = this
      // 遍历所有图层
      if (this.map) {
        this.map.eachLayer(function (layer) {
        this.map.eachLayer(function(layer) {
          // 卸载之前的风场图层
          if (
            !layer._container &&
@@ -1522,7 +1523,7 @@
      this.getParamsData()
      setTimeout(() => {
        $.getJSON(
          'http://47.99.64.149:8080/screen_api_v2/screen/windAndDeviceDataByArea',
          'http://47.99.64.149:8080/api/screen_api_v2/screen/windAndDeviceDataByArea',
          { monitorPointId: this.$store.state.monitorPointId },
          (data) => {
            // 遍历所有图层
@@ -1608,7 +1609,7 @@
        zoom: 14,
        zoomControl: false, // 缩放组件
        attributionControl: false, // 去掉右下角logol
        crs: L.CRS.EPSG3857, // 设置坐标类型,EPSG3857伪墨卡托投影,EPSG3395,墨卡托投影坐标 EPSG4326 WGS84
        crs: L.CRS.EPSG3857 // 设置坐标类型,EPSG3857伪墨卡托投影,EPSG3395,墨卡托投影坐标 EPSG4326 WGS84
      })
      // 定义图层样式
      L.tileLayer(
@@ -1671,7 +1672,7 @@
      //   console.log(this.monitorPointId)
      // 遍历所有图层
      if (this.map) {
        this.map.eachLayer(function (layer) {
        this.map.eachLayer(function(layer) {
          // 卸载之前的风场图层
          if (
            !layer._container &&
@@ -1697,8 +1698,8 @@
        params: {
          monitorPointIds: this.monitorPointIds.toString(),
          chooseTime: this.chooseTime,
          time: this.nyr,
        },
          time: this.nyr
        }
      })
        .then((res) => {
          // console.log('新风场数据')
@@ -1723,7 +1724,7 @@
              // velocityType: 'Global Wind',
              velocityType: 'GBR Wind',
              displayPosition: 'bottomleft',
              displayEmptyString: 'No wind data',
              displayEmptyString: 'No wind data'
            },
            data: res.data[0], // 数据  格式可参照
            // data: data2,
@@ -1743,8 +1744,8 @@
              '#345B1B',
              '#186303',
              '#175103',
              '#053F03',
            ],
              '#053F03'
            ]
            // colorScale: ['#053F03', '#053F03', '#053F03', '#053F03', '#053F03', '#053F03', '#053F03', '#053F03']
          })
          velocityLayer.addTo(this.map) // 添加到图上
@@ -1770,8 +1771,8 @@
          startTime: this.dateValue[0],
          endTime: this.dateValue[1],
          index: this.factorValue,
          alarmType: this.alartValue,
        },
          alarmType: this.alartValue
        }
      }).then((res) => {
        // console.log('分页数据')
        // console.log(res)
@@ -1832,8 +1833,8 @@
    },
    closeAlarmTableVisible() {
      this.$store.state.alarmTableVisible = false
    },
  },
    }
  }
}
</script>
src/views/UVA/index1.vue
@@ -139,7 +139,7 @@
    getTimeAreaData(item, index) {
      this.asideData.activeAreaKey = -1
      this.asideData.activeKey = index
      axios.get('http://47.99.64.149:8081/uav/queryTimeSlot', {
      axios.get('http://47.99.64.149:8081/api/uav/queryTimeSlot', {
        params: {
          organizationId: this.$store.state.orgId,
          date: item
@@ -196,7 +196,7 @@
        this.map.remove(this.textMarkers.markers)
      }
      this.asideData.activeAreaKey = index
      axios.get('http://47.99.64.149:8081/uav/queryDataByBatch', {
      axios.get('http://47.99.64.149:8081/api/uav/queryDataByBatch', {
        params: {
          batch: item.batch
        },
@@ -371,7 +371,7 @@
    },
    // 获取组织下存在飞行记录的日期
    getDate() {
      axios.get('http://47.99.64.149:8081/uav/queryDate', {
      axios.get('http://47.99.64.149:8081/api/uav/queryDate', {
        params: {
          organizationId: this.$store.state.orgId
        },
src/views/UVA/index1Copy.vue
@@ -241,7 +241,7 @@
    },
    // 获取组织下存在飞行记录的日期
    getDate() {
      axios.get('http://47.99.64.149:8081/uav/test', {
      axios.get('http://47.99.64.149:8081/api/uav/test', {
        params: {
          batch: '2021-07-08 01:00:00'
        },
src/views/deviceDetail/index.vue
@@ -41,12 +41,13 @@
            <span style="width: 33%; font-size: 0.9rem" @click="chuan(val)">{{
              val.sensorCode | sensorFilter
            }}</span>
            <span style="width: 33%; height: 0.9rem; font-size: 0.9rem"
              ><el-progress
                :text-inside="true"
                :percentage="val.alarm"
                :color="val.colour"
                style="width: 100%"
            <span
              style="width: 33%; height: 0.9rem; font-size: 0.9rem"
            ><el-progress
              :text-inside="true"
              :percentage="val.alarm"
              :color="val.colour"
              style="width: 100%"
            /></span>
            <span style="width: 34%; text-align: right; font-size: 0.9rem">{{
              val.value
@@ -74,7 +75,7 @@
            "
          >
            <div style="position: relative">
              <img style="width: 5.5rem; height: 5.5rem" :src="compassBg" />
              <img style="width: 5.5rem; height: 5.5rem" :src="compassBg">
              <img
                style="
                  font-size: 2rem;
@@ -91,7 +92,7 @@
                :style="{
                  transform: 'translate(-50%, -50%) rotate(' + windDeg + 'deg)',
                }"
              />
              >
            </div>
            <div style="text-align: center; font-size: 1rem">
              <div>{{ windDir }}</div>
@@ -122,19 +123,18 @@
      <el-header
        class="title0"
        style="text-align: center; display: unset !important; margin-top: 10px"
        ><h1
          style="
      ><h1
        style="
            text-align: center;
            text-align: center;
            margin: 0;
            padding-top: 20px;
            font-size: 1.2rem;
          "
          @click="websocketData()"
        >
          {{ deviceName ? deviceName : '停机' }}
        </h1></el-header
        @click="websocketData()"
      >
        {{ deviceName ? deviceName : '停机' }}
      </h1></el-header>
      <el-main
        style="
          padding-left: 0;
@@ -159,6 +159,7 @@
            <div
              v-for="(val, key, i) in coreMonitorItems"
              :key="i"
              ref="test"
              style="
                position: relative;
                width: 33%;
@@ -166,7 +167,6 @@
                font-size: 0.9rem;
              "
              class="circleWH"
              ref="test"
            >
              <!--              <div style="position: relative;width: 155px;height: 155px;margin: 0px auto;" :class="{'alarmBg5':val.bg === 5,'alarmBg4':val.bg === 4,'alarmBg3':val.bg === 3,'alarmBg2':val.bg === 2,'alarmBg1':val.bg === 1,'alarmBg0':val.bg === 0,}">-->
              <div
@@ -237,7 +237,7 @@
                  padding-right: 10px;
                  font-size: 0.9rem;
                "
              ></div>
              />
            </div>
          </div>
        </div>
@@ -265,24 +265,24 @@
        >
          <div style="height: 100%; display: flex; flex-direction: column">
            <div style="height: 30%">
              <h3 style="text-align: center; font-size: 0.9rem" v-if="macLat">
              <h3 v-if="macLat" style="text-align: center; font-size: 0.9rem">
                <span>坐标:</span> {{ macLat }}, {{ macLng }}
              </h3>
              <h3 style="font-size: 0.9rem">实时监测超标预警</h3>
            </div>
            <div style="height: 70%">
              <!--              padding-top: 4%-->
              <img :src="url1" alt="" style="width: 70%" />
              <img :src="url1" alt="" style="width: 70%">
            </div>
            <div>
              <img style="width: 75%" :src="url2" alt="" />
              <img style="width: 75%" :src="url2" alt="">
            </div>
          </div>
        </div>
        <div
          v-if="monitorPointInfo"
          class="right1"
          style="height: 40%; display: flex; flex-direction: column"
          v-if="monitorPointInfo"
        >
          <h3 style="text-align: center; font-size: 0.9rem">设备列表</h3>
          <ul
@@ -306,9 +306,9 @@
          </ul>
        </div>
        <div
          v-else
          class="right1"
          style="height: 40%; display: flex; flex-direction: column"
          v-else
        >
          <h3 style="text-align: center; font-size: 0.9rem">标准值</h3>
          <ul
@@ -349,10 +349,10 @@
  },
  filters: {
    // 过滤器替换websocket实时数据的key值
    sensorFilter: function (value) {
    sensorFilter: function(value) {
      if (!value) return ''
      return json[value]
    },
    }
  },
  props: {},
  data() {
@@ -363,7 +363,7 @@
      url2: require('@/assets/images/alarmstate-1.png'),
      bg: {
        backgroundImage: 'url(' + require('@/assets/images/bg1.png') + ')',
        backgroundRepeat: 'round',
        backgroundRepeat: 'round'
      },
      wsData1: null,
      wsData2: null,
@@ -387,12 +387,12 @@
      // 报警等级
      alarmLevel: null,
      alarmLevelDome: {
        a05024: '[0, 160, 200, 300, 400, 800]', //臭氧
        a21004: '[0, 100, 200, 700, 1200, 2340]', //二氧化氮
        a21005: '[0, 5, 10, 35, 60, 90]', //一氧化碳
        a21026: '[0, 150, 500, 650, 800, 1600]', //二氧化硫
        a34002: '[0, 50, 150, 250, 350, 420]', //PM10
        a34004: '[0, 35, 75, 115, 150, 250]', //PM2.5
        a05024: '[0, 160, 200, 300, 400, 800]', // 臭氧
        a21004: '[0, 100, 200, 700, 1200, 2340]', // 二氧化氮
        a21005: '[0, 5, 10, 35, 60, 90]', // 一氧化碳
        a21026: '[0, 150, 500, 650, 800, 1600]', // 二氧化硫
        a34002: '[0, 50, 150, 250, 350, 420]', // PM10
        a34004: '[0, 35, 75, 115, 150, 250]' // PM2.5
      }, // 假设报警等级
      // 报警进度条
      alarmProgress: {},
@@ -432,15 +432,15 @@
        CO2: '',
        SO2: '',
        CO: '',
        O3: '',
      },
        O3: ''
      }
    }
  },
  // 计算属性 类似于data概念
  computed: {
    leftaSide() {
      return this.$store.state.leftaSide
    },
    }
  },
  // 监控data中的数据变化
  watch: {
@@ -452,7 +452,7 @@
      // this.myChart.resize()
      this.myChart = null
      // this.drawChart()
    },
    }
  },
  // 生命周期 - 创建完成(可以访问当前 this 实例)
  created() {
@@ -556,8 +556,8 @@
          url: '/organizationLayout/getLayoutByMac',
          method: 'get',
          params: {
            mac: this.macName,
          },
            mac: this.macName
          }
        })
          .then((res) => {
            console.log(res, '因子布局接口')
@@ -585,8 +585,8 @@
        .get('http://121.43.179.139:8080/screen_api_v2/screen/alarm-levels', {
          params: {
            mac: this.macName,
            primaryKey: this.macName,
          },
            primaryKey: this.macName
          }
        })
        .then((res) => {
          this.alarmLevels = res.data
@@ -600,7 +600,7 @@
    // 获得实时日期更新
    getTime() {
      var _this = this // 声明一个变量指向Vue实例this,保证作用域一致
      this.timer = setInterval(function () {
      this.timer = setInterval(function() {
        _this.currentTime = // 修改数据date
          _this.appendZero(new Date().getFullYear()) +
          '-' +
@@ -649,8 +649,8 @@
        url: '/deviceInfo/getHourlyAqi',
        method: 'get',
        params: {
          mac: this.macName,
        },
          mac: this.macName
        }
      })
        .then((res) => {
          // console.log('以下是getHourlyAqi请求的返回')
@@ -669,8 +669,8 @@
        method: 'get',
        params: {
          sensorCode: this.chartSensorKey[0].sensorCode,
          mac: this.macName,
        },
          mac: this.macName
        }
      })
        .then((res) => {
          // console.log(res,'123');
@@ -709,10 +709,10 @@
      // 拼写URL
      var socketUrl
      if (this.equipment === 'car') {
        socketUrl = 'http://47.99.64.149:8081/cruiserWebsocket/' + this.macName
        socketUrl = 'http://47.99.64.149:8081/api/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://47.99.64.149:8081/api/singleDevice/' + this.macName
        // socketUrl = 'http://192.168.0.11:8081/singleDevice/' + this.macName
      }
      // 替换http为WS
@@ -720,13 +720,13 @@
      this.ws = new WebSocket(socketUrl)
      this.ws.onopen = function () {
      this.ws.onopen = function() {
        console.log('websocket开启成功')
      }
      console.log(2)
      // this.ws.send('{"mac":' + '"' + this.macName + '"' + ',"accountIdInfo":' + this.$store.state.accountId + '}')
      // 获得消息事件
      this.ws.onmessage = function (msg) {
      this.ws.onmessage = function(msg) {
        // console.log(1);
        // if (JSON.parse(msg.data).名称) {
        that.wsData2 = JSON.parse(msg.data)
@@ -1200,8 +1200,8 @@
        url: '/deviceInfo/queryAlarmByMac',
        method: 'get',
        params: {
          mac: this.macName,
        },
          mac: this.macName
        }
      })
        .then((res) => {
          console.log(res, 'res')
@@ -1239,12 +1239,12 @@
            Color: 'white',
            textStyle: {
              // 主标题文本样式{"fontSize": 18,"fontWeight": "bolder","color": "#333"}
              color: '#fff',
            },
              color: '#fff'
            }
          },
          grid: {
            top: 50,
            bottom: 25,
            bottom: 25
          },
          tooltip: {
            // formatter:function(res){
@@ -1259,9 +1259,9 @@
              type: 'cross',
              label: {
                backgroundColor: '#6a7985',
                color: '#fff',
              },
            },
                color: '#fff'
              }
            }
          },
          xAxis: {
            type: 'category',
@@ -1269,17 +1269,17 @@
            data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
            axisLine: {
              lineStyle: {
                color: '#fff',
              },
            },
                color: '#fff'
              }
            }
          },
          yAxis: {
            type: 'value',
            axisLine: {
              lineStyle: {
                color: '#fff',
              },
            },
                color: '#fff'
              }
            }
          },
          series: [
            {
@@ -1289,29 +1289,29 @@
                normal: {
                  show: true,
                  position: 'top',
                  color: '#fff',
                },
              },
            },
          ],
                  color: '#fff'
                }
              }
            }
          ]
        }
        that.myChart.setOption(option)
        setTimeout(function () {
          window.onresize = function () {
        setTimeout(function() {
          window.onresize = function() {
            that.myChart.resize()
          }
        }, 200)
      } else {
        console.log('容器为空')
      }
    },
    }
    // circles() {
    //   for (let index = this.circle; index < 100; index++) {
    //     index++
    //     this.circle++
    //   }
    // }
  }, // 如果页面有keep-alive缓存功能,这个函数会触发
  } // 如果页面有keep-alive缓存功能,这个函数会触发
}
</script>
<style scoped>