<template>
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="前方三月需求计划" name="first">
      <Sygdxqjh :height="height" :list="list" />
    </el-tab-pane>
    <el-tab-pane label="线表信息" name="second">
      <Xbjh :height="height" :list="list1" />
    </el-tab-pane>
    <el-tab-pane label="批量信息" name="third">
      <Plxx :height="height" :list="list2" />
    </el-tab-pane>
    <el-tab-pane label="板材需求" name="">
      <Bcxq :height="height" :list="list4" />
    </el-tab-pane>
    <el-tab-pane label="跨位信息" name="fourth">
      <Kwxx :height="height" :list="list3" />
    </el-tab-pane>
  </el-tabs>
</template>

<script>
import Sygdxqjh from "@/views/dashboard/components/fd/child/sygdxqjh.vue";
import Xbjh from "@/views/dashboard/components/fd/child/xbjh.vue";
import Plxx from "@/views/dashboard/components/fd/child/plxx.vue";
import Kwxx from "@/views/dashboard/components/fd/child/kwxx.vue";
import Bcxq from "@/views/dashboard/components/fd/child/bcxq.vue";

export default {
  name:'Tabs',
  components: {Bcxq, Kwxx, Plxx, Xbjh, Sygdxqjh},
  props:{
    data:Object
  },
  data(){
    return {
      activeName: 'first',
      height: '500px',
      list:[],
      list1:[],
      list2:[],
      list3:[],
      list4:[],
    }
  },
  created() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods:{
    showData(fd){
      this.list1=this.data.list1
      this.list2=this.data.list2
      this.list3=this.data.list3
      this.list4=this.data.list4
    },
    handleClick(tab, event) {

    },
    getHeight() {
      this.height = window.innerHeight - 718+'px'
    },
  }
}
</script>
