<template>
  <div class="auto col-sm-12 form-group form-input-group" style="width: 20%">
    <label>公司：</label>
    <res-select :restype='orgrestype'
                @res-select="getorg"
                :parentresid="orgresid"
                :initresid='orgresid1'>
    </res-select>
    <label>部门：</label>
    <res-select :restype='deprestype'
                @res-select="getdep"
                :parentresid="depresid"
                :initresid='initresid'>
    </res-select>
    <label>人员：</label>
    <res-select :restype='userrestype'
                @res-select="getuser"
                :parentresid="depresid"
                :initresid='initresid'>
    </res-select>
  </div>
</template>
<script>
  export default {
    title: '资源选择测试',
    props: {
    },
    data () {
      return {
        orgrestype:'organization',
        orgresid:[this.$login.f.orgid],
        orgresid1:["114"],
        deprestype:'department',
        depresid:[],
        userrestype:'user',
        userresid:[],
      }
    },
    ready () {
    },
    methods:{
      getorg (obj) {
        console.log("选中组织的数据",obj)
        this.depresid=obj
      },
      getdep(obj) {
        console.log("选中部门的数据",obj)
        this.userresid=obj
      },
      getuser(obj) {
        console.log("选中用户的数据",obj)
      },
    },
    watch: {

    },
  }
</script>
