<template>
  <el-row class="footer-warpper" :gutter="16">
    <el-col class="map-left" :span="8">
      <div class="business-extend footer-item card-item">
        <Outline />
      </div>
    </el-col>

    <el-col class="map-right" :span="16">
      <div class="footer-item card-item">
        <Munitions />
      </div>
    </el-col>
  </el-row>

  <!-- foot -->
  <el-row class="map-warpper" :gutter="16">
    <el-col class="map-left" :span="8">
      <div class="footer-item card-item">
        <Platform />
      </div>
    </el-col>
    <el-col class="map-right" :span="16">
      <el-row :gutter="16">
        <el-col :span="12">
          <div class="economic-construct card-item">
            <ScientificInvestment />
          </div>
        </el-col>
        <el-col :span="12">
          <div class="card-item">
            <MapTitle text="工作运行与政策制度体系" />
            <div class="card-item-xbox" v-for="(citys, idx) in city" :key="idx">
              <div class="xbox-tit">{{ citys.tit }}</div>
              <div class="xbox-content user_line">
                <div class="Progress">
                  <p>{{ citys.municipal }}</p>
                  <div class="percent">{{ citys.municipalnum }}%</div>

                  <el-progress
                    type="circle"
                    :percentage="citys.municipalnum"
                    :width="iswidth"
                    :show-text="false"
                    :stroke-width="10"
                  ></el-progress>
                </div>
                <div class="Progress">
                  <p>{{ citys.county }}</p>
                  <div class="yellow">{{ citys.countynum }}%</div>

                  <el-progress
                    type="circle"
                    :percentage="citys.countynum"
                    color="#fac858"
                    :width="iswidth"
                    :stroke-width="10"
                    :show-text="false"
                  ></el-progress>
                </div>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>
    </el-col>
  </el-row>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import Platform from "./model/Platform/index.vue";
import Outline from "./model/Outline/index.vue";
import Munitions from "./model/Munitions/index.vue";
import ScientificInvestment from "./model/ScientificInvestment/index.vue";
import MapTitle from "@/components/mapTitle/index.vue";
import Mock from "./mock";
import { mapState } from "vuex";
/**
 * 五大体系建设
 */

export default defineComponent({
  components: {
    Platform,
    Outline,
    Munitions,
    ScientificInvestment,
    MapTitle,
  },
  setup() {},
  computed: {
    ...mapState({
      curDataType: (state) => state.curDataType,
    }),
    industryCardItems() {
      return Mock[this.curDataType].industryCardItems;
    },
    city() {
      return Mock[this.curDataType].city;
    },
  },
  data() {
    return {
      iswidth: 100,
    };
  },
});
</script>
<style lang="scss" scoped>
// ::v-deep .Progress .el-progress__text {
//   position: relative;
//   top: -20px;
//   left: 75px;
//   font-size: 18px;
//   color: #4198ff;
// }
// ::v-deep .Progress .el-progress__text span {
//   font-size: 20px;
// }
.card-item {
  background-color: #197ded15;
  border: 1px solid #125ba3;
  border-radius: 5px;
  padding: 15px 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  height: 100%;
  box-sizing: border-box;

  .card-item-xbox {
    margin: 15px 0;
    padding: 8px 15px;
    font-size: 14px;
    color: rgba(65, 152, 255, 1);
    .xbox-tit {
      margin-bottom: 8px;
    }
  }
  .xbox-content {
    height: 150px;
    box-sizing: border-box;
    background-color: #197ded15;
    border-radius: 4px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 4px;
    .Progress {
      flex: 1;
      text-align: center;
      position: relative;
      p {
        color: #fff;
        position: absolute;
        top: 25px;
        right: 16%;
        font-size: 14px;
      }
      .percent {
        color: #4198ff;
        position: absolute;
        top: 60px;
        right: 14%;
        font-size: 16px;
      }
      .yellow {
        color: #fac858;
        position: absolute;
        top: 60px;
        right: 14%;
        font-size: 16px;
      }
    }
  }
  .user_line {
    &:last-of-type {
      position: relative;
      &::before {
        position: absolute;
        content: " ";
        top: 43px;
        left: 53%;
        height: 50%;
        width: 1px;
        border-right: 1px dashed rgba(23, 129, 223, 0.2);
      }
    }
  }
}

.map-warpper {
  box-sizing: border-box;
  .economic-construct {
    flex: 1;
  }
  .map-right {
    .card-item {
      flex: 1;
    }
  }
}
.footer-warpper {
  margin-bottom: 20px;
}
</style>
