<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')})`,
      }"
    >
      <ul>
        <li v-for="(item, i) in data" :key="i">
          <div>
            <img
              :src="require(`@/assets/images/wulianwang/${item.img}`)"
              alt=""
            />
            <p>{{ item.name }}</p>
          </div>
          <div>
            <span>{{ item.num }}/2</span>
            <p>启用/停用</p>
          </div>
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
export default {
  components: {},
  data() {
    return {
      data: [
        {
          name: "监控",
          num: "1676",
          img: "5.png",
          color: "#0ad5ff",
        },
        {
          name: "消防",
          num: "16",
          img: "6.png",
          color: "#66B0C9",
        },
        {
          name: "监测",
          num: "1676",
          img: "7.png",
          color: "#269F98",
        },
        {
          name: "功能",
          num: "316",
          img: "8.png",
          color: "#269F98",
        },
      ],
    };
  },
  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: #269f98;
      font-size: 30px;
      display: inline-block;
    }
  }
}
.con {
  background-position: top left;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  padding-top: 10px;

  > ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    li {
      width: 50%;
      padding: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      > div {
        flex: 1;
        text-align: center;
        > p {
          margin-bottom: 20px;
        }
        > img {
          width: 50%;
          margin: 10px 0;
        }
      }
      span {
        font-size: 26px;
        color: #269f98;
        margin-top: 4px;
      }

      &::before {
        content: "";
        display: inline-block;
        position: absolute;
        opacity: 0.5;
        background: linear-gradient(
          270deg,
          rgba(102, 176, 201, 0.1) 0%,
          #66b0c9 50%,
          rgba(102, 176, 201, 0.1) 100%
        );
      }
      &:nth-of-type(1) {
        &::before {
          content: "";
          bottom: 0;
          left: 0;
          width: 100%;
          height: 1px;
        }
      }
      &:nth-of-type(2) {
        &::before {
          content: "";
          bottom: 0;
          left: 0;
          height: 100%;
          width: 1px;
          background: linear-gradient(
            0deg,
            rgba(102, 176, 201, 0.1) 0%,
            #66b0c9 30%,
            #66b0c9 64%,
            rgba(102, 176, 201, 0.1) 100%
          );
        }
      }
      &:nth-of-type(3) {
        &::before {
          content: "";
          bottom: 0;
          right: 0;
          height: 100%;
          width: 1px;
          background: linear-gradient(
            0deg,
            rgba(102, 176, 201, 0.1) 0%,
            #66b0c9 30%,
            #66b0c9 64%,
            rgba(102, 176, 201, 0.1) 100%
          );
        }
      }
      &:nth-of-type(4) {
        &::before {
          content: "";
          top: 0;
          left: 0;
          width: 100%;
          height: 1px;
        }
      }
    }
  }
}
</style>
