<template>
  <div class="camera-info-container">
    <div class="area">
      <img src="@/assets/image/comprehensive/cameraIcon1.png" alt="" />
      <div class="info">
        <div>高杆摄像头</div>
        <div><span class="green">{{info.highOnlineNum}} </span> / {{info.highNum}}</div>
      </div>
    </div>
    <div class="area">
      <img src="@/assets/image/comprehensive/cameraIcon2.png" alt="" />
      <div class="info">
        <div>中杆摄像头</div>
        <div><span class="green">{{info.middleOnlineNum}} </span> / {{info.middleNum}}</div>
      </div>
    </div>
    <div class="area">
      <img src="@/assets/image/comprehensive/cameraIcon3.png" alt="" />
      <div class="info">
        <div>低杆摄像头</div>
        <div><span class="green">0 </span> / 25</div>
      </div>
    </div>
    <div class="area">
      <img src="@/assets/image/comprehensive/cameraIcon4.png" alt="" />
      <div class="info">
        <div>一体化杆</div>
        <div><span class="green">0 </span> / 25</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data(){
    return{
      info:{
        highNum:0,
        highOnlineNum:0,
        middleNum:0,
        middleOnlineNum:0,
      }
    }
  },
  mounted(){
      window.requestSDK('/sddnWeiHe/device/deviceStatistics', {}, {}, 'post').then((res) => {
        this.info = res.data
      })
  }
}
</script>

<style lang="scss" scoped>
.camera-info-container {
  position: absolute;
  top: px-to-rem(55);
  left: calc(50% - px-to-rem(364));
  width: px-to-rem(728);
  height: px-to-rem(72);
  background: url('@/assets/image/comprehensive/cameraBg.png') no-repeat 0 0 / 100% 100%;
  display: flex;
  align-items: center;
  .area {
    display: flex;
    align-items: center;
    img {
      width: px-to-rem(95);
      height: px-to-rem(75);
    }
    .info {
      font-weight: bold;
      font-size: px-to-rem(16);
      color: #ffffff;
      .green {
        color: #81ff78;
        font-size: px-to-rem(18);
      }
    }
  }
}
</style>