<template>
<div class="layout-no-cols right-list-toolbar">
  <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="内容统计" name="contentCount">
      <content-count :active-name="activeName"></content-count>
    </el-tab-pane>
    <el-tab-pane label="推送统计" name="pushCount">
      <push-count :active-name="activeName"></push-count>
    </el-tab-pane>
    <el-tab-pane label="综合增量统计" name="comprehensive">
      <comprehensive-inc-stat :active-name="activeName"></comprehensive-inc-stat>
    </el-tab-pane>
    <el-tab-pane label="综合统计" name="contentData">
      <content-data-stat :active-name="activeName"></content-data-stat>
    </el-tab-pane>
  </el-tabs>
</div>
</template>
<script>
import PushCountStat from '../stat/components/PushCountStat.vue'
import ContentCountStat from '../stat/components/ContentCountStat.vue'
import comprehensiveIncStat from '../stat/reports/comprehensiveIncStat.vue'
import contentDataStat from '../stat/reports/contentDataStat.vue'
export default {
  components: {
    'push-count': PushCountStat,
    'content-count': ContentCountStat,
    'comprehensive-inc-stat': comprehensiveIncStat,
    'content-data-stat': contentDataStat
  },
  data() {
    return {
      activeName: 'contentCount'// 选中菜单名称
    }
  },
  mounted() {},
  methods: {
    handleClick(tab) {
      this.activeName = tab.name
      this.$router.replace(`/socialmedia/mediaStat/${tab.name}`)
    }
  }
}
</script>
