<template>
  <div>
    <Input v-model="this.orgName" icon="ios-world" placeholder="请选择组织" style="width: 200px" @click.native="select()" disabled></Input>
  </div>
</template>
<script>
import SelectOrgTree from "./SelectOrgTree";
export default{
  name: 'SelectOrg',
  components:{

  },
  props:{
    orgId:{
      type: String,
      default(){
        return '';
      }
    },
    orgName:{
      type: String,
      default(){
        return '';
      }
    },
  },
  data(){
    return{

    }
  },
  computed:{

  },
  created:function(){

  },
  beforeMount:function(){

  },
  mounted:function(){

  },
  beforeDestroy:function(){

  },
  destroyed:function(){

  },
  methods:{
    select() {
      new this.$pageModal(
        SelectOrgTree,
        {
          props: {
            orgId: this.orgId,
            orgName: this.orgName
          }
        }, (data) => {
          this.orgId = data.orgId;
          this.orgName = data.orgName;
          this.$emit("change", data);
        }
      );
    },
  },
  watch:{

  },
  directives:{

  }
}
</script>
