<template>
    <div class="h-full flex flex-col disease-index">
        <van-tabs shrink type="card" class="shrink-0 doc-tab-round"
            v-model:active="activeTab">
            <van-tab :title="`${diseaseName}信息`"></van-tab>
            <van-tab :title="`${diseaseName}管理`"></van-tab>
        </van-tabs>
        <div class="pt-3"></div>
        <div class="grow pb-3 overflow-y-auto">
            <DiseaseList :diseaseType="diseaseType" v-if="activeTab == 0"/>
            <DiseaseVisit :diseaseType="diseaseType" v-if="activeTab == 1"/>
        </div>
    </div>
</template>

<script>
import DiseaseList from './List.vue'
import DiseaseVisit from './Visit.vue'

export default {
    components: {
        DiseaseList,
        DiseaseVisit
    },
    inject: ['residentInfo'],
    props: {
        diseaseName: String,
        diseaseType: Number
    },
    data() {
        return {
            activeTab: 0
        }
    }
}
</script>

<style lang="less" scoped>
:deep(.card-back-1) {
    border-radius: 12px;
    background: linear-gradient(to bottom, #FFC9D3, #FFE9E9);
    .title {
        color: #8E2A4A;
    }
}
:deep(.card-back-2) {
    border-radius: 12px;
    background: linear-gradient(to bottom, #FFD8BC, #FFF0E9);
    .title {
        color: #8E562A;
    }
}
:deep(.card-back-3) {
    border-radius: 12px;
    background: linear-gradient(to bottom, #B3F5F7, #FFFFE9);
    .title {
        color: #2A8E75;
    }
}
</style>
