<template>
  <div class="el-scrollbar__wrap wrap-white padding-20">
    <el-tabs v-model="activeName">
      <el-tab-pane label="待办事项" name="todoList"style="height: calc(100vh - 210px)" lazy>
        <todo-list
          i="todoList"
          :index="activeName"
          :num="num"
        />
      </el-tab-pane>
      <el-tab-pane label="已办" name="historyList" style="height: calc(100vh - 210px)" lazy>
        <history-list
          i="historyList"
          :index="activeName"
        />
      </el-tab-pane>
      <el-tab-pane label="我发起的" name="applyList" style="height: calc(100vh - 210px)" lazy>
        <apply-list
          i="applyList"
          :index="activeName"
        />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>
<script>
  import todoList from '../../../flowable/task/TodoList'
  import historyList from '../../../flowable/task/HistoryList'
  import applyList from '../../../flowable/task/ApplyList'

  export default {
    components: {
      todoList,
      historyList,
      applyList
    },
    data () {
      // eslint-disable-next-line no-unused-expressions,no-unused-vars
      var num = this.$route.query.num
      return {
        activeName: 'todoList',
        num: num
      }
    },
    created () {
      if (this.$route.query.activeName) {
        this.activeName = this.$route.query.activeName
      }
    },
    methods: {
    }
  }
</script>
