<template>
    <el-row >
        <el-tabs type="border-card"  @tab-click="handleClick" >
            <el-tab-pane label="数据维护"></el-tab-pane>
            <el-tab-pane label="统计分析"></el-tab-pane>
            <el-tab-pane label="角色管理"></el-tab-pane>
        </el-tabs>
        <el-col :span="24">
            <router-view></router-view>
        </el-col>
    </el-row>

</template>

<script>
    import {mapGetters, mapActions} from 'vuex'
    export default {
        data () {
            return {

            }
        },
        created: function () {
            this.$router.replace("/mainView/dataView");
        },
        mounted: function () {

        },
        computed: {
            ...mapGetters(
                    [""])
        },
        methods: {
            ...mapActions(
                    [""]),
            handleClick(tab, event) {
                console.log(tab, event);
                switch (tab.index){
                    case  "1":
                        this.$router.replace("/mainView/dataView");
                        break;
                    case  "2":
                        this.$router.replace("/mainView/statisticView");
                        break;
                    case  "3":
                        this.$router.replace("/mainView/privView");
                        break;
                }
            }
        }
    }
</script>
<style>
</style>