<template>
  <div class="app-container tab-container">
    <div class="tab-content">
      <span class="right-top-line" />
      <span class="left-bottom-line" />
      <span class="right-bottom-line" />
      <ul class="tab-nav">
        <li :class="{ 'active-tab-nav': activeIndex == 0 }" @click="changeActiveTab(0)">馆藏年度统计<i /></li>
        <li :class="{ 'active-tab-nav': activeIndex == 1 }" @click="changeActiveTab(1)">馆藏月份统计<i /></li>
        <li :class="{ 'active-tab-nav': activeIndex == 2 }" @click="changeActiveTab(2)">传阅统计<i /></li>
        <!-- 最右侧装饰img -->
        <span class="tab-right-img" />
      </ul>
      <MiodTable :active-index="activeIndex" @tab-change="changeActiveTab" />
    </div>
  </div>
</template>

<script>
import MiodTable from './miodTable'

export default {
  name: 'MiodStatistics',
  components: {
    MiodTable
  },
  data() {
    return {
      activeIndex: 0,
      currentRecordId: null
    }
  },
  methods: {
    changeActiveTab(data) {
      this.activeIndex = data
      this.$emit('tab-change', data)
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
