<template>
  <basic-container class="base">
    <el-tabs v-model="activeName">
      <el-tab-pane label="服务承接" name="taskCenter"> </el-tab-pane>
      <el-tab-pane label="我的任务" name="myTask" v-if="config"></el-tab-pane>
    </el-tabs>
    <div class="content-box" >
      <el-scrollbar style="height:100%" class="content-scroll-bar">
        <component :is="activeName"></component>
      </el-scrollbar>
    </div>
  </basic-container>
</template>

<script>
import taskCenter from './taskCenter.vue'
import myTask from './myTask.vue'
import {getConfig} from '@/api/taskManagement/myTask'

export default {
  components:{taskCenter,myTask},
  props:{},
  data(){
    return{
      activeName:"taskCenter",
      config:false,
    };
  },
  methods: {
    async getConfig(){
      const res = await getConfig()
      if(res.data.code === 0){
        this.config = res.data.data.config
      }
    }
  },
  created() {
    this.getConfig()
  }
};
</script>

<style scoped>
.content-box{
  overflow: auto;
}
</style>

<!--<style>-->
<!--body .content-scroll-bar {-->
<!--  overflow-x: hidden;-->
<!--}-->
<!--</style>-->
