<template>
  <el-row class="map-warpper" :gutter="16">
    <el-col class="map-left" :span="8">
      <div class="performance-com card-item"><Performance /></div>
      <div class="card-item rank-list"><RankList /></div>
    </el-col>
    <el-col :span="9">
      <div class="map-middle">
        <div class="card-item map-item"><Map /></div>
      </div>
    </el-col>
    <el-col :span="7">
      <div class="map-right">
        <div class="performance-com card-item"><InvestmentProgress /></div>
        <div class="card-item incom-graphic"><Income /></div>
      </div>
    </el-col>
  </el-row>

  <!-- 卡片信息展示 -->
  <div class="card-list" :gutter="16">
    <el-col class="card-item"><StrongArmyCard /></el-col>
    <el-col class="card-item"
      ><CardItem
        title="军民协同创新"
        :infoList="list"
        :toPage="dataCenterRouter.INNOVATION"
    /></el-col>
    <el-col class="card-item"><Industrial /></el-col>
    <el-col class="card-item"
      ><CardItem
        :infoList="list2x"
        title="资源开放共享"
        :toPage="dataCenterRouter.RESORCE_SHARE"
    /></el-col>
    <el-col class="card-item"><SystemConstruct /></el-col>
  </div>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import Performance from "./model/Performance/index.vue";
import RankList from "./model/RankList/index.vue";
import Map from "./model/Map/index.vue";
import InvestmentProgress from "./model/InvestmentProgress/index.vue";
import Income from "./model/Income/index.vue";
import StrongArmyCard from "./model/CardList/strongArmy.vue";
import CardItem from "./model/CardList/index.vue";
import Industrial from "./model/CardList/industrial.vue";
import SystemConstruct from "./model/CardList/systemConstruct.vue";
import { DataCenterRouter } from "@/route/dataCenter";

import Mock from "./cradMock";
import { mapState } from "vuex";

export default defineComponent({
  components: {
    Performance,
    RankList,
    Map,
    InvestmentProgress,
    Income,
    StrongArmyCard,
    CardItem,
    Industrial,
    SystemConstruct,
  },
  setup() {},
  computed: {
    ...mapState({
      curDataType: (state) => state.curDataType,
    }),
    list() {
      return Mock[this.curDataType].list;
    },
    list2x() {
      return Mock[this.curDataType].list2x;
    },
  },

  data() {
    return {
      dataCenterRouter: DataCenterRouter,
    };
  },
});
</script>
<style lang="scss" scoped>
.card-item {
  background: #fff;
  border-radius: 5px;
  padding: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 2px 2px 10px #04223d10;

  // &:hover {
  //   // transform: translateY(-5px);
  //   transition: all 0.2s;

  // }
}

.map-warpper {
  height: 640px;
  box-sizing: border-box;
  flex: 1;
  .map-left {
    box-sizing: border-box;
    .rank-list {
      margin-top: 16px;
      height: 312px;
      box-sizing: border-box;
    }
  }
  .map-middle {
    height: 640px;
    box-sizing: border-box;
    display: flex;
    .card-item {
      padding: 0;
    }
    .map-item {
      width: 100%;
    }
  }
  .map-right {
    box-sizing: border-box;
    .incom-graphic {
      margin-top: 16px;
      height: 312px;
      box-sizing: border-box;
    }
  }
}

// 卡片信息展示
.card-list {
  margin-top: 16px;
  box-sizing: border-box;
  display: flex;
  .el-col {
    flex: 1;
    margin-right: 16px;
    height: 310px;
    &:last-of-type {
      margin-right: 0;
    }
  }
}
</style>
