Skip to content

部门


image

介绍

搜索或者层级选择部门

API

Props

参数名描述类型默认值
status状态'default' |'disabled'| 'hide'| 'readonly''default'
title标题string-
showLabel显示标题booleantrue
width字段占比'25%'|'50%'|'75%'|'100%''100%'
labelWidth标签宽度string-
value默认值string[]-
placeholder占位提示string'请输入'
name数据字段string-
multiple支持多选booleanfalse
allowClear允许清除booleanfalse
api数据API,如果不做配置,将使用我们提供的默认接口string-
searchApi搜索API,如果不做配置,将使用我们提供的默认接口string-
openSearchOrgInfoByApi通过API查询已选部门名称、部门全路径booleanfalse
searchOrgInfoByApi通过API查询已选部门名称、部门全路径, api地址string-
fieldNames字段名string-
orgLevelArr默认展开组织层级string[]-
showNextLevel下级按钮显示条件Functionfunction showNextLevel(ctx, params) { return true; }
baseStyle自定义样式 , 表格整体自定义样式string-
customClass类名绑定 , 绑定类的名称string-
boxStyle盒模型 , margin,border,padding设置BoxStyle-
uniqueKey唯一标识 , 组件的唯一标识string-
extra补充说明string-
tip气泡提醒string-
validate校验Validate-

Events

事件名描述参数
onChange值发生改变时ctx
params: {orgName: string, orgCode:string}

常见场景配置

限制可选部门,在部门数据中增加disabled字段设置为true

javascript

{
  fullName:"海信集团"
  isLeaf:true,
  orgCode:"HC12198889",
  orgName:"海信集团",
  disbaled:true // disbaled为true,部门不可选择
}

下级按钮是否展示

javascript

function showNextLevel(ctx, params) {  
  if(params.orgCode === "HC12198889"){
    return false; // 返回false此部门下级按钮不展示
  }
  return true; 
}