<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="35" v-if="checkPermi(['clue:setting:intention-status'])">
        <IntentionStatus v-if="tabIndex == 35" />
      </el-tab-pane>
      <el-tab-pane label="额外支出项" :name="36" v-if="checkPermi(['clue:setting:extra-fee'])">
        <ExtraFeeType v-if="tabIndex == 36" />
      </el-tab-pane>
      <el-tab-pane label="其他费用项" :name="37" v-if="checkPermi(['clue:setting:other-pay'])">
        <OtherPayType v-if="tabIndex == 37" />
      </el-tab-pane>
      <el-tab-pane label="常规设置" :name="40" v-if="checkPermi(['clue:setting:general-setting'])">
        <GeneralSet v-if="tabIndex == 40" :appType="appStore.getAppInfo?.instanceType" />
      </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 IntentionStatus from './Comp/IntentionStatus.vue'
import ExtraFeeType from './Comp/ExtraFeeType.vue'
import OtherPayType from './Comp/OtherPayType.vue'
import GeneralSet from './Comp/GeneralSet.vue'
import { checkPermi } from '@/utils/permission'

import { useAppStore } from '@/store/modules/app'

const appStore = useAppStore()

const tabIndex = ref(0)
</script>

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