<template>
  <div class="data-home-index">
    <baseBg :name-val="'trace'" top-title="全程溯源管理系统">
      <template #center>
        <el-row style="width: 100%; height: 100%">
          <el-col :span="6" class="left-charts">
            <div class="left-charts-item">
              <customBack top-title="溯源码数据统计" :top-postion="'left'">
                <template #back>
                  <codeNumCharts></codeNumCharts>
                </template>
              </customBack>
            </div>
            <div class="left-charts-item">
              <customBack top-title="追溯主体类型统计" :top-postion="'left'">
                <template #back>
                  <principalTypeCharts></principalTypeCharts>
                </template>
              </customBack>
            </div>
            <div class="left-charts-item">
              <customBack top-title="追溯产品分类" :top-postion="'left'">
                <template #back>
                  <productTypeCharts></productTypeCharts>
                </template>
              </customBack>
            </div>
          </el-col>
          <el-col :span="12">
            <centerMap></centerMap>
          </el-col>
          <el-col :span="6" class="right-charts">
            <div class="right-charts-item">
              <customBack top-title="溯源主体信息统计" :top-postion="'right'">
                <template #back>
                  <mainPartCharts></mainPartCharts>
                </template>
              </customBack>
            </div>
            <div class="right-charts-item">
              <customBack top-title="溯源码数据统计" :top-postion="'right'">
                <template #back>
                  <traceBarCharts></traceBarCharts>
                </template>
              </customBack>
            </div>
            <div class="right-charts-item">
              <customBack top-title="最新溯源检测信息" :top-postion="'right'">
                <template #back>
                  <detectionCharts></detectionCharts>
                </template>
              </customBack>
            </div>
          </el-col>
        </el-row>
      </template>
    </baseBg>
  </div>
</template>
<script setup>
import centerMap from '@/components/centerMap.vue';
import codeNumCharts from './components/codeNumCharts.vue';
import mainPartCharts from './components/mainPartCharts.vue';
import principalTypeCharts from './components/principalTypeCharts.vue';
import productTypeCharts from './components/productTypeCharts.vue';
import traceBarCharts from './components/traceBarCharts.vue';
import detectionCharts from './components/detectionCharts.vue';
</script>
<style lang="scss" scoped>
.data-home-index {
  .left-charts {
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    flex-direction: column;
  }
  .left-charts-item {
    width: 100%;
    height: calc((100% - 30px) / 3);
  }

  .right-charts {
    display: flex;
    justify-content: space-around;
    width: 100%;
    height: 100%;
    flex-direction: column;
  }
  .right-charts-item {
    width: 100%;
    height: calc((100% - 30px) / 3);
  }
}
</style>
