<template>
  <el-tabs :stretch="true" v-model="activeName" @tab-click="handleClick('fp')">
      <el-tab-pane :label="item.label" :name="item.name" v-for="(item,index) in tabs" >
        <component :is="item.tableComp" :ref="item.ref" :height="height" :queryParam="queryParam" :list="tabsData[item.name]"/>
      </el-tab-pane>
    </el-tabs>
</template>

<script>
import HTable from "@/views/hbao/comps/HTable.vue";
export default {
  name: 'HTabs',
  components:{HTable},
  data(){
    return {
      activeName:'fp',
      tabs:[
        {name:'fp',label:'工作分配',tableComp:'HTable',ref:'fpRef'},
        {name:'js',label:'工作接收',tableComp:'HTable',ref:'jsRef'},
        {name:'hb',label:'工作回报',tableComp:'HTable',ref:'hbRef'},
        // {name:'gd',label:'派工单',tableComp:'Hgd',ref:'gdRef'},
      ],
      height:0,
      queryParam:{},
      tabsData:[],
    }
  },
  methods:{
    handleClick(actName){
      if (actName!=='fp'){
        this.activeName=actName
      }
    }
  }
}
</script>

<style scoped>
.el-tabs__item {
  color: white;
  font-family: 'Arial', sans-serif; /* 设置字体为Arial */
  font-size: 24px; /* 设置字体大小为16px */
  font-weight: bold; /* 设置字体为粗体 */
}
</style>
