API
Component

Config ($UI/comp/config/components/config/config)

使用范围:UI2

Contents

component Config ($UI/comp/config/components/config/config) extends BindComponent

Constructor Top

  Config ()
  Config ( options)

Methods Top

JSON getConfig (String name, String grouping, String path, String range)
JSON getOrgConfig (String name, String grouping, String path, String range)

Constructor details Top

public Config ()

public Config ( options)

构造函数

Inherited from ViewComponent

	
		参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
	 

Parameters

options

参数选项

Methods Detail Top

public JSON getConfig (String name, String grouping, String path, String range)

获取系统配置

Parameters

String name

配置,可以指定为模糊查询。传入123查询name=123的配置,传入123%查询name like 123%的配置

String grouping

分组,用于sql查询

String path

路径,支持传入多个,逗号分隔

String range

范围,path参数不为空时生效,self取自身,nearest取最近,all取全部,默认为nearest

Return Value

JSON

返回配置数组
结构如下:

[{ name : 配置 label : 配置名称 grouping : 分组 content : 配置内容,JSON格式 path : 路径 }]

public JSON getOrgConfig (String name, String grouping, String path, String range)

按组织获取系统配置

Parameters

String name

配置,可以指定为模糊查询。传入123查询name=123的配置,传入123%查询name like 123%的配置

String grouping

分组,用于sql查询

String path

路径,支持传入多个组织的fid或id,逗号分隔。如果传入的是人员id,查找配置的顺序为,先找人员的配置,然后找主岗的配置

String range

范围,path参数不为空时生效,self取自身,nearest取最近,all取全部,默认为nearest

Return Value

JSON

返回配置数组
结构如下:

[{ name : 配置 label : 配置名称 grouping : 分组 content : 配置内容,JSON格式 path : 路径 }]