<template>
  <div class="m-container">
    <h2>
      <div class="squrt"></div>
      特殊规则默认值
    </h2>
    <div class="m-core">
      <!-- navMenu -->
      <tab-router v-model.trim="activeIndex" @tab-click="handleClick">
        <el-tab-pane
          label="乐团参数"
          lazy
          name="1"
          v-if="permission('/platformDayaTeamRules')"
        >
          <dayaTeamRules :isPlatform='true' v-if="activeIndex==1"/>
        </el-tab-pane>

        <el-tab-pane
          label="商品库存规则"
          lazy
          name="3"
          v-if="permission('/platformGoodsRules')"
        >
          <goodsRules :isPlatform='true' v-if="activeIndex==3"/>
        </el-tab-pane>
        <el-tab-pane
          label="其他参数设置"
          lazy
          name="4"
          v-if="permission('/platformOtherRules')"
        >
          <otherRules v-if="activeIndex == 4" :isPlatform='true'/>
        </el-tab-pane>
      </tab-router>
    </div>
  </div>
</template>
<script>
import overallManager from "@/views/categroyManager/generalSettings/overallManager";
import dayaTeamRules from "./components/dayaTeamRules";
import goodsRules from "./components/goodsRules";
import institutionRules from "./components/institutionRules";
import otherRules from './components/otherRules'
import { permission } from "@/utils/directivePage";
export default {
  components: {
    goodsRules,
    institutionRules,
    overallManager,
    dayaTeamRules,
    otherRules
  },
  name: "baseRulersManager",
  data() {
    return {
      activeIndex: "1",
    };
  },
  methods: {
    handleClick(val) {
      this.activeIndex = val.name;
    },
    permission(str){
      return permission (str)
    }
  },
};
</script>
<style lang="scss" scoped>
/deep/.m-container {
  padding: 0 10px 40px;
}
</style>
