<template>
  <div class="global">
    <div class="mainContainer">
      <div class="tab">
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane label="最新粮情检查记录" name="NewGrain" />
          <el-tab-pane label="全部粮情检查记录" name="AllGrain" />

        </el-tabs>
      </div>
      <div id="main">

        <router-view id="mainRight" />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: 'NewGrain',
  data() {
    return {
      activeName: 'NewGrain'
    }
  },
  mounted() {
    this.activeName = this.$route.name
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event)
      this.$router.push(tab.name)
    }
  }
}
</script>
