<template>
  <div class="global">
    <div class="mainContainer">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane
          label="最新设施检查记录"
          name="NewFacilities"
        ></el-tab-pane>
        <el-tab-pane
          label="全部设施检查记录"
          name="AllFacilities"
        ></el-tab-pane>
        <el-tab-pane label="设施维修改造" name="Maintenance"></el-tab-pane>
      </el-tabs>
        <div id="main">

        <router-view />
      </div>
    </div>
  </div>
</template>
<script>
export default {
  name: "FacilitiesTabs",
  data() {
    return {
      activeName: "NewFacilities",
    }
  },
  methods: {
    handleClick(tab, event) {
      this.$router.push({
        name: tab.name,
      })
    },
  },
  mounted() {
    this.activeName = this.$route.name
  },
}
</script>
<style lang="scss">
</style>