<template>
  <div class="m-container">
    <h2>
      乐团修改
    </h2>
    <div class="m-core">
      <!-- navMenu -->
      <el-tabs v-model="activeIndex"
               type="card"
               @tab-click="handleClick">
        <el-tab-pane label="基本信息"
                     name="1">
          <teamBaseInfo v-if="acitveStatus[0]" />
        </el-tab-pane>
        <el-tab-pane label="缴费调整"
                     name="2">
          <resetSound v-if="acitveStatus[1]" />
        </el-tab-pane>
        <el-tab-pane label="班级调整"
                     name="3">
          <resetClass v-if="acitveStatus[2]" />
        </el-tab-pane>
        <el-tab-pane label="新增排课"
                     name="4">
          <coursePlan :teamid='teamid'
                      v-if="acitveStatus[3]" />
          <!-- <lookCourse /> -->
        </el-tab-pane>
        <!-- <el-tab-pane label="新增小班课"
                     name="5">
          <improvement :teamid='teamid' />
        </el-tab-pane> -->
      </el-tabs>
    </div>
  </div>
</template>
<script>
import teamBaseInfo from '@/views/teamBuild/components/teamBaseInfo'
import resetSound from '@/views/resetTeaming/components/resetSound'
import resetClass from '@/views/teamDetail/components/resetClass'
import coursePlan from '@/views/teamBuild/teamSeting/components/coursePlan'
import lookCourse from '@/views/teamBuild/teamSeting/components/lookCourse'
import improvement from '@/views/teamBuild/teamSeting/components/improvementClass'
export default {
  components: { teamBaseInfo, resetSound, resetClass, coursePlan, lookCourse, improvement },
  data () {
    return {
      activeIndex: '1',
      acitveStatus: [true, false, false, false, false, false, false],
      teamid: ''
    }
  },
  created () {
    this.activeIndex = sessionStorage.getItem('resetCode') || '1';
    this.teamid = this.$route.query.id;
    console.log(this.teamid)
  },
  beforeDestroy () {
    sessionStorage.setItem('setStep', 0)
    sessionStorage.setItem('resetCode', 1)
  },
  mounted () {

  }, methods: {
    handleClick (val) {
      this.activeIndex = val.name
      this.acitveStatus[val.name - 1] = true

    }
  },
}
</script>
<style lang="scss">
</style>