<template>
    <div class="main-contain">
        <div class="position">
            <bread-crumb :crumbs="crumbs"></bread-crumb>
        </div>
        <div class="app-container">
            <el-tabs v-model="activeName" @tab-click="handleClick">
                <el-tab-pane label="透析耗材" name="1">
                    <consumables></consumables>
                </el-tab-pane>
<!--                <el-tab-pane label="透析药品" name="second">-->
<!--                    <dialysis-drugs></dialysis-drugs>-->
<!--                </el-tab-pane>-->
                <el-tab-pane label="透析参数" name="2">
                    <dialysis-parameters></dialysis-parameters>
                </el-tab-pane>
                <el-tab-pane label="汇总" name="3">
                    <all-summary></all-summary>
                </el-tab-pane>
            </el-tabs>
        </div>
    </div>
</template>


<script>
import BreadCrumb from "@/xt_pages/components/bread-crumb";
import consumables from './components/consumables'
import dialysisDrugs from './components/dialysisDrugs'
import dialysisParameters from './components/dialysisParameters'
import allSummary from './components/allSummary'
export default {
    components:{
        BreadCrumb,
        consumables,
        dialysisDrugs,
        dialysisParameters,
        allSummary
    },
    data(){
        return{
            crumbs: [
                { path: false, name: "透析管理" },
                { path: false, name: "耗材药品" }
            ],
            activeName:'1'
        }
    },
    methods:{
        handleClick(){}
    },
    beforeRouteEnter: (to, from, next) => {
        next(vm => {
            if(from.query.type){
                vm.activeName = from.query.type
            }
        });
    },
}
</script>
