import BUS from '@/bus';

const homeMixin = {
    data () {
        return {
            orgId: '',
        }
    },
    mounted () {
        this.listenerBus();
    },
    methods: {
        listenerBus() {
            const vm = this;
            BUS.$on('orgChanged', data => {
                if (data) {
                    vm.orgId = data;
                    vm.loadData();
                }
            });
        },
    }
}

export default homeMixin;