<template>
  <el-tabs v-model="source" @tab-click="handleChangeSource">
    <el-tab-pane v-for="item in sourceOptions" :key="item.key" :label="item.label" :name="item.key">
      <el-tabs v-model="tabIndex" tab-position="left" class="profile-tabs">
        <el-tab-pane label="精选题" :name="1" v-if="checkPermi(['question:vip-data:jx'])">
          <SimpleData v-if="tabIndex == 1" :source="source" />
        </el-tab-pane>
        <el-tab-pane label="密卷" :name="2" v-if="checkPermi(['question:vip-data:mj'])">
          <SecretData v-if="tabIndex == 2" :source="source" />
        </el-tab-pane>
      </el-tabs>
    </el-tab-pane>
  </el-tabs>
</template>

<script setup name="VipData">
import { checkPermi } from '@/utils/permission'
import SimpleData from './conponents/SimpleData.vue'
import SecretData from './conponents/SecretData.vue'

const tabIndex = ref(1)
const source = ref('XJ')
const sourceOptions = [
  { key: 'XJ', label: '寻驾' },
  { key: 'JKJL', label: '驾考精灵' },
  { key: 'YDT', label: '驾校一点通' },
  { key: 'JKBD', label: '驾考宝典' }
]
const handleChangeSource = () => {}
</script>

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