<template>
    <div>
       <newKeepManage v-if="disabledMange"></newKeepManage>
       <newPersonal v-else></newPersonal>
    </div>
</template>


<script>
    import newKeepManage from './group-keepManage'
    import newPersonal from './personal-keepManage.vue'
    import { mapGetters, mapMutations, mapActions } from 'vuex'
    export default {
        components:{
            newKeepManage,
            newPersonal
        },
        data() {
            return {
                disabledMange:true
            }
        },
        mounted() {
            this.getRoleData();
            
        },
        methods: {
            ...mapGetters(['userInfo']),
        getRoleData(){
            if (this.userInfo().roleName.indexOf('运营经理') != -1 || this.userInfo().roleName.indexOf('管理员') != -1) {
                this.disabledMange = true
            }else{
                this.disabledMange = false
            }
        },
        },
    }

</script>