<template>
  <div class="body">
    <vTitle
      ><span>网点视频监控</span><span class="time">2021 / 11 / 25</span></vTitle
    >
    <div
      class="con"
      :style="{
        backgroundImage: `url(${require('@/assets/images/jiankong/bg.png')})`,
      }"
    >
      <div class="top">
        <div>
          <img :src="require(`@/assets/images/jiankong/top.png`)" alt="" />
          <div class="center content">
            <span>1900</span>
            <span>运行中的摄像头</span>
          </div>
        </div>
        <div>
          <img
            :src="require(`@/assets/images/jiankong/right_icon.png`)"
            alt=""
          />
          <div class="content">
            <span>2000</span>
            <span>摄像头总数</span>
          </div>
        </div>
      </div>
      <ul>
        <li v-for="(item, i) in data" :key="i">
          <img :src="require(`@/assets/images/jiankong/${item.img}`)" alt="" />
          <span>{{ item.num }}</span>
          <span>{{ item.name }}</span>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      data: [
        {
          name: "正常",
          num: "1676",
          img: "1.png",
          color: "#0ad5ff",
        },
        {
          name: "故障",
          num: "16",
          img: "2.png",
          color: "#66B0C9",
        },
        {
          name: "室内",
          num: "1676",
          img: "3.png",
          color: "#E0B822",
        },
        {
          name: "室外",
          num: "316",
          img: "4.png",
          color: "#E0B822",
        },
      ],
    };
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.content {
  flex: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  justify-content: space-between;
  > span {
    width: 100%;
    font-size: 16px;
    text-align: center;
    &:first-of-type {
      color: #e0b822;
      font-size: 30px;
      display: inline-block;
    }
  }
}
.con {
  background-position: top left;
  background-size: 100% 70%;
  background-repeat: no-repeat;
  padding-top: 10px;
  .top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    > div {
      &:first-of-type {
        flex: 2;
        padding: 30px;
        position: relative;
        > img {
          width: 100%;
        }
        .center {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
        }
      }
      &:last-of-type {
        flex: 1;
        > img {
          width: 80%;
        }
      }
    }
  }
  > ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    li {
      width: 24%;
      margin: 10px 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      position: relative;
      > span {
        font-size: 16px;
        &:first-of-type {
          font-size: 26px;
          color: #e0b822;
          margin-top: 4px;
        }
      }
      > img {
        width: 50%;
        margin: 10px 0;
      }
      &:not(&:last-of-type) {
        &::before {
          content: "";
          display: inline-block;
          width: 1px;
          height: 100%;
          position: absolute;
          top: 0;
          right: 0;
          opacity: 0.5;
          background: linear-gradient(
            0,
            rgba(102, 176, 201, 0.1) 0%,
            #66b0c9 30%,
            #66b0c9 64%,
            rgba(102, 176, 201, 0.1) 100%
          );
        }
      }
    }
  }
}
</style>
