<template>
  <div class="crop-area">
    <Model :title="titles">
      <div class="content">
        <div
          style="display: flex; margin-top: 10px; width: 46%; margin-left: 16px"
          v-for="v in list"
          :key="v.name"
        >
          <img class="img" :src="v.img" alt="" />
          <div class="num-bg">
            <div class="titl-color">{{ v.name }}</div>
            <div class="number">{{ v.value }}</div>
          </div>
        </div>
      </div>
    </Model>
  </div>
</template>

<script>
import Model from "../model.vue";
import img1 from "@/assets/image/tkzz_ic@2x.png";
import img2 from "@/assets/image/ggyps_ic@2x.png";
import img3 from "@/assets/image/tjdlgc_ic@2x.png";
import img4 from "@/assets/image/fhybhgc_ic@2x.png";
import img5 from "@/assets/image/ntspdgc_ic@2x.png";
import img6 from "@/assets/image/qtgc_ic@2x.png";

export default {
  name: "area",
  components: { Model },
  props: {
    title: "随县",
  },
  data() {
    return {
      list: [
        {
          name: "田块整治",
          value: "100%",
          img: img1,
        },
        {
          name: "灌溉与排水工程",
          value: "90%",
          img: img2,
        },
        {
          name: "田间道路工程",
          value: "90%",
          img: img3,
        },
        {
          name: "防护与保护工程",
          value: "90%",
          img: img4,
        },
        {
          name: "农田输配电工程",
          value: "90%",
          img: img5,
        },
        {
          name: "其他工程",
          value: "90%",
          img: img6,
        },
        {
          name: "地力提升工程",
          value: "90%",
          img: img4,
        },
        {
          name: "科技推广工程",
          value: "90%",
          img: img1,
        },
      ],
      titles: "2023年工程进展"
    };
  },
  created() {
    if (this.title == "新街镇") {
      this.titles = "2023年高标准农田建设";
      this.list = [
        {
          name: "建设规模",
          value: "13141亩",
          img: img1,
        },
        {
          name: "农田整治",
          value: "1952.33亩",
          img: img2,
        },
      ];
    }
  },
};
</script>

<style lang="less" scoped>
.crop-area {
  margin-top: 10px;

  .content {
    display: flex;
    // justify-content: space-evenly;
    flex-wrap: wrap;
    height: 251px;
    margin-top: 20px;
  }

  .img {
    width: 50px;
    height: 50px;
  }

  .titl-color {
    color: #d4edfd;
    font-size: 14px;
  }

  .number {
    color: #02feff;
    font-size: 18px;
    text-shadow: 0px 0px 2px #00a7ff;
    font-family: "zcool";
  }

  .num-bg {
    width: 80%;
    height: 46px;
    text-align: left;
    background: linear-gradient(
      90deg,
      rgba(2, 254, 255, 0.47) 0%,
      rgba(2, 62, 112, 0) 100%
    );
    border-radius: 0px 0px 0px 0px;
    opacity: 0.7;
    padding-left: 20px;
  }
}

@font-face {
  font-family: zcool;
  src: url("@/styles/fonts/zcoo.TTF");
}
</style>
