<!--
 * @Author: your name
 * @Date: 2021-10-21 17:51:22
 * @LastEditTime: 2021-10-26 09:42:11
 * @LastEditors: Please set LastEditors
 * @Description: 生产经营页面
 * @FilePath: \hyyfScreen\src\views\Production\Production.vue
-->
<template>
  <div class="production">
    <div class="production-row">
      <div class="production-row-side">
        <pro-board :title="'存栏结构'">
          <chart-amount-pie :data="AmountPieData"></chart-amount-pie>
        </pro-board>
      </div>
      <div class="production-row-middle">
        <pro-board :title="'重要指标'"></pro-board>
      </div>
      <div class="production-row-side">
        <pro-board :title="'工作看板'"></pro-board>
      </div>
    </div>
    <div class="production-row">
      <div>中左</div>
      <div>中中</div>
      <div>中右</div>
    </div>
    <div class="production-row">
      <div>下左</div>
      <div>下中</div>
      <div>下右</div>
    </div>
  </div>
</template>

<script>
import ProBoard from './board/ProBoard.vue'
import ChartAmountPie from './board/ChartAmountPie.vue'

export default {
  name: "Production",
  data() {
    return {
      AmountPieData: [
        {
          farmId: 1,
          id: 1,
          month: 10,
          rate: 1,
          stockName: "总存栏",
          stockQuantity: 1000,
          stockType: "total_stock",
          subareaId: 9,
          year: 2021,
        },
        {
          farmId: 1,
          id: 2,
          month: 10,
          rate: 0.01,
          stockName: "母猪存栏",
          stockQuantity: 10,
          stockType: "sow_stock",
          subareaId: 9,
          year: 2021,
        },
        {
          farmId: 1,
          id: 3,
          month: 10,
          rate: 0.09,
          stockName: "公猪存栏",
          stockQuantity: 90,
          stockType: "boar_stock",
          subareaId: 9,
          year: 2021,
        },
        {
          farmId: 1,
          id: 4,
          month: 10,
          rate: 0.1,
          stockName: "哺乳仔猪存栏",
          stockQuantity: 100,
          stockType: "grice_stock",
          subareaId: 9,
          year: 2021,
        },
        {
          farmId: 1,
          id: 5,
          month: 10,
          rate: 0.1,
          stockName: "保育猪存栏",
          stockQuantity: 100,
          stockType: "piglet_stock",
          subareaId: 9,
          year: 2021,
        },
        {
          farmId: 1,
          id: 6,
          month: 10,
          rate: 0.1,
          stockName: "育肥猪存栏",
          stockQuantity: 100,
          stockType: "fatpig_stock",
          subareaId: 9,
          year: 2021
        }
      ]
    }
  },
  components: {
    ProBoard,
    ChartAmountPie
  }
}
</script>

<style scoped>
.production {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}
/* 每一行 */
.production-row {
  background-color: #fff;
  height: 30%;
  /* 行内布局 */
  width: 100%;
  display: flex;
  justify-content: space-between;
}
/* 行 —— 两边 */
.production-row-side {
  width: 25%;
}
/* 行 —— 中间 */
.production-row-middle {
  background-color: rgb(218, 116, 116);
  width: 45%;
}
</style>