<template>
    <HcTabsSimple :cur="tabsKey" :datas="tabsData" @tabClick="tabsClick">
        <template #tab-pricetype>
            <HcTabPriceType :cur="tabsKey" :type="1" v-if="tabsKey==='pricetype'"/>
        </template>
        <template #tab-tasktype>
            <HcTabTaskType :cur="tabsKey" :type="2" v-if="tabsKey==='tasktype'"/>
        </template>
        <template #tab-price>
            <HcTabPrice :cur="tabsKey" :type="3" v-if="tabsKey==='price'"/>
        </template>
        <template #tab-reimbursement>
            <HcTabReimbursement :cur="tabsKey" :type="4" v-if="tabsKey==='reimbursement'"/>
        </template>
        <template #tab-cost>
            <HcTabCost :cur="tabsKey" :type="5" v-if="tabsKey==='cost'"/>
        </template>
        <template #tab-approve>
            <HcTabApprove :cur="tabsKey" :type="6" v-if="tabsKey==='approve'"/>
        </template>
        <template #tab-invoice>
            <HcTabInvoice :cur="tabsKey" :type="7" v-if="tabsKey==='invoice'"/>
        </template>
        <template #tab-other>
            <HcTabOther :cur="tabsKey" :type="11" v-if="tabsKey==='other'"/>
        </template>
    </HcTabsSimple>
</template>

<script setup>
import {ref, watch, onMounted} from "vue";
import HcTabPriceType from "./components/tab-price-type.vue";
import HcTabTaskType from "./components/tab-task-type.vue";
import HcTabPrice from "./components/tab-price.vue";
import HcTabReimbursement from "./components/tab-reimbursement.vue";
import HcTabCost from "./components/tab-cost.vue";
import HcTabApprove from "./components/tab-approve.vue";
import HcTabInvoice from "./components/tab-invoice.vue";
import HcTabOther from './components/tab-other.vue'


//类型处理
const tabsKey = ref('pricetype')
const tabsData = ref([
    {icon: 'bar-chart-box', label: '财务费用字典', key: 'pricetype'},
    {icon: 'tools', label: '任务类型字典', key: 'tasktype'},
    {icon: 'sun-cloudy', label: '岗位类型字典', key: 'price'},
    {icon: 'sun-cloudy', label: '报销类型字典', key: 'reimbursement'},
    {icon: 'sun-cloudy', label: '成本测算类型', key: 'cost'},
    {icon: 'sun-cloudy', label: '审批流程', key: 'approve'},
    {icon: 'sun-cloudy', label: '发票字典', key: 'invoice'},
    {icon: 'sun-cloudy', label: '其他', key: 'other'},

])
//渲染完成
onMounted(() => {

})
const tabsClick = (key) => {
    tabsKey.value = key
}


</script>

<style lang="scss" scoped>

</style>

<style lang="scss">

</style>
