<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="申请委外维修" name="first">
        <Tab1 ref="Tab1" />
      </el-tab-pane>
      <el-tab-pane label="验收委外维修" name="second">
        <Tab2 ref="Tab2" />
      </el-tab-pane>
     
    </el-tabs>
  </div>
</template>
<script>
import Tab1 from './tabPage/tab1.vue'
import Tab2 from './tabPage/tab2.vue'
 
import Cookies from 'js-cookie'
import { GetDataByName } from '@/api/common'
export default {
  name: 'SubcontractingMainten',
  components: {
    Tab1, Tab2 
  },
  data() {
    return {
      activeName: 'first'
    }
  },
  created() {},
  methods: {
    handleClick(item) {
      if (item.name == 'first') {
        this.$refs.Tab1.get_select_list()
        this.$refs.Tab1.get_table_data1()
        this.$refs.Tab1.get_auto_buttons()
       
        
      } else if (item.name == 'second') {
        this.$refs.Tab2.get_select_list()
         this.$refs.Tab2.get_table_data1() 
         this.$refs.Tab2.get_auto_buttons()

 
        
        
      }  
    }
  }
}
</script>

<style lang="scss" scoped>
  .search{margin-bottom: 10px;}
  .export{float: right;}
</style>
