<template>
  <div>
  <el-input v-model="receiverName" placeholder="请选择收件人1111" clearable="true">
    <template slot="append">
      <el-button
        type="primary"
        icon="el-icon-plus"
        size="mini"
        @click="handleSelect" >
        选择人员</el-button>
    </template>
  </el-input>
  <el-input v-model="receiverAccount" />

    <!-- 选择人员对话框 -->
    <select-user-by-dept ref="selectUserByDept" :title="title" :open="open" :inputName="receiverName" :inputAccount="receiverAccount" append-to-body @ok="selectOK"/>

  </div>

</template>

<script>
  import SelectUserByDept from "@/components/SelectRen/selectUserByDept";

    export default {
      name: "send1",
      components: {SelectUserByDept},
      data() {
        return {
          title:'根据部门选择人员',
          open:false,
          receiverName: "",
          receiverAccount: ""
        }
      },
      methods:{
        /** 写信中的 选择人员 按钮弹窗操作 */
        handleSelect() {
          this.$refs.selectUserByDept.childOpen=true;
          this.open = true;
          this.title = "选择收件人";
        },
        selectOK(zh, xm) {
          // this.receiverAccount = zh;
          this.receiverName=xm;
          this.open=false;
        }
      }
    }
</script>

<style scoped>

</style>
