<template>
  <div class="construct-container">
    <div class="construct-left">
      <div class="tag-image">
        <img src="@/assets/images/建设.png" />
      </div>
      <div class="construct-left-map">
        <Map />
      </div>
    </div>
    <div class="construct-right">
      <div>
        <div class="info-title">项目概况</div>
        <div>
          <CommonTotal :numberList="projectList" />
        </div>
      </div>
      <div>
        <div class="info-title">投资完成情况</div>
        <div>
          <CommonTotal :numberList="investmentList" />
        </div>
      </div>
      <div>
        <div class="info-title">投资完成情况</div>
        <div class="progress">
          <div><CircleProgress /></div>
          <div class="investment-progress">
            <span>19.72/58.42亿元</span>
            <div class="progress-image">
              <div class="progress-show-value"></div>
              <div
                class="progress-show-value-rel"
                :style="{ width: `${33.8}%` }"
              ></div>
            </div>
          </div>
        </div>
      </div>
      <div>
        <div class="info-title">投资回收完成情况</div>
        <div>
          <CommonTotal :numberList="recycleList" />
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import Map from "@/components/CommonMap.vue";
import CommonTotal from "@/components/CommonTotal.vue";
import { reactive, ref, onMounted, onUnmounted } from "vue";
import CircleProgress from "./CircleProgress.vue";
const projectList = reactive([
  { title: "总个数（个）", value: "59" },
  { title: "总投资（亿元）", value: "2733.35" },
  { title: "总规模（公里）", value: "5116.72" },
]);
const investmentList = reactive([
  { title: "10月完成投资（亿元）", value: "0" },
  { title: "2025年完成投资（亿元）", value: "19.725" },
  { title: "累计完成投资（亿元）", value: "807.56" },
]);
// recycleList
const recycleList = reactive([
  { title: "10月完成投资（亿元）", value: "0" },
  { title: "2025年完成投资（亿元）", value: "2.98" },
  { title: "完成率", value: "50.2%" },
]);
</script>

<style scoped lang="less">
.construct-container {
  display: flex;
  .construct-left {
    flex: 1;
    height: 100%;
    .tag-image {
      img {
        .vw(width, 85);
      }
    }
    .construct-left-map {
      .vh(height, 700);
      .vh(padding-top, 4);
    }
  }
  .construct-right {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .info-title {
      .vw(width, 180);
      .vh(height, 30);
      .vh(line-height, 30);
      .vw(margin-left,20);
      .font(20);
      .vw(padding-left,23);
      text-align: left;
      color: #fff;
      font-family: YouSheBiaoTiYuan;
      background-image: url("@/assets/images/tag.png");
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
      background-size: 100% 100%;
    }
    .progress {
      display: flex;
      align-items: center;
      .vw(margin-left, 10);
      .investment-progress {
        display: flex;
        flex-direction: column;
        align-items: end;
        span {
          .vh(margin-bottom,-20);
          font-family: "DIN";
        }
        .progress-image {
          .vw(width,520);
          .vh(height,85);
          background-image: url("@/assets/images/箭头.png");
          background-repeat: no-repeat;
          background-position: center;
          background-size: 100% 100%;
          position: relative;
          .progress-show-value {
            position: absolute;
            .vh(top,26);
            .vw(left,65);
            width: 85%;
            height: 30%;
            background-image: url(/src/assets/images/baseRate.png);
            background-size: 100% 100%;
            background-repeat: no-repeat;
          }
          .progress-show-value-rel {
            height: 100%;
            background-image: url("@/assets/images/baseRateRel.png");
            background-size: auto 100%;
            -webkit-transform: skew(-30deg);
            transform: skew(-30deg);
            position: absolute;
            .vh(top,26);
            .vw(left,65);
            height: 30%;
            max-width: 83%;
            background-image: url(/src/assets/images/baseRateRel.png);
            background-size: 100% 100%;
            background-repeat: no-repeat;
          }
        }
      }
    }
  }
}
</style>
