<template>
  <div>
    <el-tabs v-model="tabIndex" type="border-card">
      <el-tab-pane label="线索属性" :name="0" v-if="checkPermi(['clue:setting:clue-props'])">
        <FieldClue v-if="tabIndex == 0" />
      </el-tab-pane>
      <el-tab-pane label="成交属性" :name="10" v-if="checkPermi(['clue:setting:order-props'])">
        <FieldOrder v-if="tabIndex == 10" />
      </el-tab-pane>
      <el-tab-pane label="线索来源" :name="15" v-if="checkPermi(['clue:setting:clue-resource'])">
        <ClueSource v-if="tabIndex == 15" />
      </el-tab-pane>
      <!-- <el-tab-pane
        label="线索获取规则"
        :name="20"
        v-if="checkPermi(['clue:setting:clue-get-rules'])"
      >
        <ClueGet v-if="tabIndex == 20" />
      </el-tab-pane> -->
      <!-- <el-tab-pane
        label="线索分配规则"
        :name="30"
        v-if="checkPermi(['clue:setting:clue-send-rules'])"
      >
        <ClueSend v-if="tabIndex == 30" />
      </el-tab-pane> -->
      <el-tab-pane label="常规设置" :name="40" v-if="checkPermi(['clue:setting:general-setting'])">
        <GeneralSet v-if="tabIndex == 40" />
      </el-tab-pane>
      <el-tab-pane label="消息通知" :name="50" v-if="checkPermi(['mall:setting:prod'])">
        <MsgSend v-if="tabIndex == 50" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script setup name="ClueSetting">
import FieldClue from './Comp/FieldClue.vue'
import FieldOrder from './Comp/FieldOrder.vue'
import ClueSource from './Comp/ClueSource.vue'
// import ClueGet from './Comp/ClueGet.vue'
// import ClueSend from './Comp/ClueSend.vue'
import MsgSend from './Comp/MsgSend.vue'
import GeneralSet from './Comp/GeneralSet.vue'
import { checkPermi } from '@/utils/permission'

const tabIndex = ref(0)
</script>

<style lang="scss" scoped></style>
