<template>
  <Tabs ref="tabs" :value="tabName" @on-click="changeTab">
    <TabPane label="发起申请" name="0" >
      <workflowWorkbench v-if="tabName == '0'"></workflowWorkbench>
    </TabPane>
    <TabPane label="我的申请" name="1">
      <workflowApplyedList v-if="tabName == '1'"></workflowApplyedList>
    </TabPane>
    <TabPane label="草稿箱" name="2">
      <workflowDraftBoxList v-if="tabName == '2'"></workflowDraftBoxList>
    </TabPane>
  </Tabs>
</template>

<script>
  import workflowApplyedList from './workflow-applyed-list.vue'
  import workflowWorkbench from './workflow-workbench.vue'
  import workflowDraftBoxList from './workflow-draftBox-list.vue'

  let $this;
  export default {
    name: 'workflowIndex',
    components: {
      workflowApplyedList,
      workflowWorkbench,
      workflowDraftBoxList,
    },
    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>
