<template>
  <div id="node3">
    <div class="title">今日小区智能硬件数据统计</div>
    <div class="table">
      <div :class="bgHover==1?'active':''"  @mouseenter="divHover(1)">
        <div>小区门禁开启</div>
        <div>{{ hardwaremap.communityCount }}</div>
      </div>
      <div :class="bgHover==2?'active':''"  @mouseenter="divHover(2)">
        <div>单元门开启</div>
        <div>{{ hardwaremap.unitCount }}</div>
      </div>
      <div :class="bgHover==3?'active':''"  @mouseenter="divHover(3)">
        <div>访客车辆进入数量</div>
        <div>{{ hardwaremap.visitorCount }}</div>
      </div>
      <div :class="bgHover==4?'active':''"  @mouseenter="divHover(4)">
        <div>公区摄像头查看</div>
        <div>{{ hardwaremap.publicCameraCount }}</div>
      </div>
      <div :class="bgHover==5?'active':''"  @mouseenter="divHover(5)">
        <div>单元门远程监控查看</div>
        <div>{{ hardwaremap.remoteMonitoringCount }}</div>
      </div>
      <div :class="bgHover==6?'active':''"  @mouseenter="divHover(6)">
        <div>单元门远程开门</div>
        <div>{{ hardwaremap.remoteUnitCount }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      bgHover:"",

    };
  },
  props: ["hardwaremap"],
 
  methods:{
       divHover(index) {
      this.bgHover = index;
    }
  }
};
</script>

<style lang="scss" scoped>
#node3 {
  position: relative;
  .title {
    text-align: center;
    padding: 3% 0 30px 0;
    color: #a4b6c5;
  }
  .table {
    display: flex;
    flex-flow: row wrap;
    border: 1px solid #a4b6c5;
    width: 302px;
    margin: 0 auto;
    > div {
      width: 100px;
      height: 100px;
      border: 1px solid #a4b6c5;
      display: flex;
      flex-flow: column nowrap;
      justify-content: center;
      align-items: center;
      &:hover {
        cursor: pointer;
      }
      div {
        color: #a4b6c5;
        margin: 5px;
        font-size: 13px;
        text-align: center;
      }
    }
    .active {
      outline: 2px solid #53f9ff;
      z-index: 1;
      div {
        color: #53f9ff;
        text-align: center;
      }
    }
  }
}
</style>
