vue树形结构获取键值

把键值文件放入

引入控件

  import { getTypeValue } from '@/api/dict/dictValue/index';

  

点击搜索,打开弹窗

        <el-form-item label="机构名称" placeholder="请选择机构" prop="orgName">
          <el-input readonly type="text" v-model="form.orgName">
            <el-button slot="append" icon="el-icon-search" @click="openDepartDialog()"></el-button>
          </el-input>
        </el-form-item>

  

 打开控件事件,关闭控件事件

      openDepartDialog() {
        this.dialogDepartVisible = true
      },
      closeDepartDialog(depart) {
        console.log(depart)
        this.form.orgName = depart.label
        this.form.code = depart.id
        this.form.departId = depart.id
        this.dialogDepartVisible = false
      },

  

 

关闭弹窗按钮

    <el-dialog title="选择机构" width="30%" :visible.sync="dialogDepartVisible">
      <depart-selector @closeDepartDialog="closeDepartDialog" ref="departSelector"></depart-selector>
      <span slot="footer" class="dialog-footer">
        <el-button class="filter-item"  style="margin-left: 10px;" @click="handlerAddDepart" type="primary" icon="edit">添加</el-button>
      </span>
    </el-dialog>

  

 

 

转载于:https://www.cnblogs.com/tabCtrlShift/p/9041275.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值