<template>
  <div style="background-color: #fff;padding: 20px;" class="boxMinHeight">
    <el-tabs v-model="activeName">
      <el-tab-pane label="结果分析" name="1">
        <analyse ref="analyse"></analyse>
      </el-tab-pane>
      <el-tab-pane label="个人年度统计" name="2">
        <statistics></statistics>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import analyse from '@/views/statement/analyse';
import statistics from '@/views/statement/statistics';
export default {
  name: 'statement',
  components: {
    analyse,statistics
  },
  data() {
    return {
      activeName:'1'
    };
  },
  activated(){
    if(this.activeName=='1'){
      this.$refs.analyse.getData();
    }
  },
  created() {
    if(this.$route.query.index){
      this.activeName=this.$route.query.index
    }
  }
};
</script>

<style>

</style>
