<template>
  <div class="userManage">
    <orgTree @after-op="afterOp" @node-select="nodeSelect" class="orgTree" :isAddUserBtn="true"></orgTree>
    <workSpace ref="workSpace"></workSpace>
  </div>
</template>

<script>
  import workSpace from './module/workSpace.vue'
  import orgTree from '../module/orgTree.vue'
  export default {
    name: 'index',
    components: {
      workSpace,
      orgTree,
    },
    methods: {
      afterOp() {
        this.$refs.workSpace.getList()
      },
      nodeSelect(node) {
        this.$refs.workSpace.orgId = node ? node.id : 0
        this.$refs.workSpace.getList()
      },
    },
  }
</script>

<style scoped lang="less">
  .userManage {
    display: flex;
    justify-content: space-between;
    .orgTree {
      margin-right: 20px;
    }
  }
</style>
