<template>
  <el-row class="map-warpper" :gutter="16">
    <el-col class="map-left" :span="8">
      <div class="footer-item card-item">
        <TargetBar />
      </div>
    </el-col>
    <el-col :span="16">
      <el-row class="map-right card-item">
        <el-col :span="12">
          <TotalContrac />
        </el-col>
        <el-col :span="11" :offset="1">
          <Activity />
        </el-col>
      </el-row>
    </el-col>
  </el-row>

  <!-- foot -->
  <el-row class="footer-warpper" :gutter="16">
    <el-col class="map-right" :span="16">
      <div class="footer-item card-item">
        <PlatformInfo />
      </div>
    </el-col>

    <el-col class="map-left" :span="8">
      <div class="business-extend footer-item card-item">
        <Facility />
      </div>
    </el-col>
  </el-row>
</template>
<script lang="ts">
import { defineComponent } from "vue";
import TargetBar from "./model/TargetBar/index.vue";
import Activity from "./model/Activity/index.vue";
import TotalContrac from "./model/TotalContrac/index.vue";
import PlatformInfo from "./model/PlatformInfo/index.vue";
import Facility from "./model/Facility/index.vue";

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

/**
 * 资源共享
 */
export default defineComponent({
  components: {
    TargetBar,
    Activity,
    TotalContrac,
    PlatformInfo,
    Facility,
  },
  setup() {},
  computed: {
    ...mapState({
      curDataType: (state) => state.curDataType,
    }),
    industryCardItems() {
      return Mock[this.curDataType].industryCardItems;
    },
    extendCardItems() {
      return Mock[this.curDataType].extendCardItems;
    },
  },
  data() {
    return {};
  },
});
</script>
<style lang="scss" scoped>
.card-item {
  background-color: #197ded15;
  border: 1px solid #125ba3;
  border-radius: 5px;
  padding: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
  height: 100%;
  box-sizing: border-box;
}

.map-warpper {
  box-sizing: border-box;
  .map-right {
    padding-bottom: 0;
  }
}
.footer-warpper {
  margin-top: 20px;
  .business-extend {
    min-height: 430px;
    height: 100%;
  }
}
</style>
