<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.loginRules"
        >
          <loginRules v-if="activeIndex == 6" />
        </el-tab-pane>
        <el-tab-pane
          label="学练宝定价"
          lazy
          name="3"
          v-if="permissionList.groupMarkPrice"
        >
          <groupMarkPrice v-if="activeIndex == 3" />
        </el-tab-pane>
        <el-tab-pane
          label="平台参数"
          lazy
          name="2"
          v-if="permissionList.overallManager"
        >
          <overallManager v-if="activeIndex == 2" />
        </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 loginRules from "@/views/courseRulersManager/components/loginRules";
import overallManager from "./generalSettings/overallManager";
import groupMarkPrice from "./generalSettings/groupMarkPrice";
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,
    loginRules,
    groupMarkPrice,
    // 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"),
        loginRules: permission("/globalConfig/loginRules"),
        groupMarkPrice: permission("/globalConfig/groupMarkPrice")
      }
    };
  },
  methods: {
    handleClick(val) {
      this.activeIndex = val.name;
    }
  }
};
</script>
<style lang="scss" scoped>
// ::v-deep .m-container {
//   padding: 0 10px 40px;
// }
</style>
