<template>
  <div class="m-container">
    <h2>
      <div class="squrt"></div>
      全局配置
    </h2>
    <div class="m-core">
      <!-- navMenu -->
        <tab-router
          v-model.trim="activeIndex"
          type="card"
          @tab-click="handleClick"
        >
          <el-tab-pane
            label="参数设置"
            lazy
            name="6"
            v-if="permissionList.overallManager"
          >
            <overallManager v-if="activeIndex == 6" />
          </el-tab-pane>
          <el-tab-pane
            label="收费分润配置"
            lazy
            name="7"
            v-if="permissionList.overallManagerTwo"
          >
            <overallManagerTwo v-if="activeIndex == 7" />
          </el-tab-pane>
          <el-tab-pane
            label="节假日设置"
            lazy
            name="8"
            v-if="permissionList.holidaySetting"
          >
            <holidaySetting v-if="activeIndex == 8" />
          </el-tab-pane>
          <el-tab-pane
            label="预警课酬设置"
            lazy
            name="12"
            v-if="permissionList.earlyWarning"
          >
            <earlyWarning v-if="activeIndex == 12" />
          </el-tab-pane>
        </tab-router>
    </div>
  </div>
</template>
<script>
// import musicalManager from "./specialSetup/musicalManager";
// import musicalManagerOut from "./specialSetup/musicalManagerOut";
// import typesManager from "./specialSetup/typesManager";
// import courseTimerSetting from "./specialSetup/courseTimerSetting";
// import discountManage from "./specialSetup/discountManage";
// import chargesList from "./specialSetup/chargesList";
// import musicCourseFee from "./specialSetup/musicCourseFee";
// import jobTemplateSetting from "./specialSetup/jobTemplateSetting";
// import errorManager from "./generalSettings/errorManager";
import overallManager from "./generalSettings/overallManager";
import overallManagerTwo from "./generalSettings/overallManagerTwo";
import holidaySetting from "./generalSettings/holidaySetting";
import earlyWarning from "./generalSettings/earlyWarning";
import { permission } from "@/utils/directivePage";
export default {
  components: {
    overallManager,
    overallManagerTwo,
    holidaySetting,
    // musicalManager,
    // musicalManagerOut,
    // typesManager,
    // discountManage,
    // jobTemplateSetting,
    // errorManager,
    // chargesList,
    // musicCourseFee,
    // courseTimerSetting
    earlyWarning
  },
  name: "globalConfig",
  data() {
    return {
      activeIndex:"6",
      permissionList: {
        overallManager: permission("/globalConfig/overallManager"),
        overallManagerTwo: permission("/globalConfig/overallManagerTwo"),
        holidaySetting: permission("/globalConfig/holidaySetting"),
        earlyWarning: permission("/globalConfig/earlyWarning"),
      }
    };
  },
  methods: {
    handleClick(val) {
      this.activeIndex = val.name;
    }
  }
};
</script>
<style lang="scss" scoped>
// /deep/.m-container {
//   padding: 0 10px 40px;
// }
</style>
