<template>
  <Tabs ref="tabs" :value="tabName" @on-click="changeTab">
    <TabPane label="我的待办" name="0" >
      <workflowUpcomingList v-if="tabName == '0'"></workflowUpcomingList>
    </TabPane>
    <TabPane label="我的已办" name="1">
      <workflowDoneList v-if="tabName == '1'"></workflowDoneList>
    </TabPane>
    <!--<TabPane label="我的申请" name="2">
      <workflowApplyList v-if="tabName == '2'"></workflowApplyList>
    </TabPane>-->
  </Tabs>
</template>

<script>
  import workflowUpcomingList from './workflow-upcoming-list.vue'
  import workflowDoneList from './workflow-done-list.vue'
  import workflowApplyList from '../apply-list/workflow-applyed-list.vue'

  let $this;
  export default {
    name: 'workflowIndex',
    components: {
      workflowUpcomingList,
      workflowDoneList,
      workflowApplyList,
    },
    data() {
      return {
        pageSize: 10,
        tabName:'0'
      }
    },
    methods: {
      changeTab(name){
        this.tabName = name;
      }
    },
    mounted() {
      $this = this;
      this.tabName = this.$route.params.name?this.$route.params.name:'0';
    }
  }
</script>

<style>

</style>
