字典管理
一、数据字典
1.接口说明
接口描述 |
数据字典接口 |
接口地址 |
/system/dicSet/getDicItemByCode |
方法 |
POST |
请求体 |
x-www-form-urlencoded |
返回值 |
Json |
2.业务参数
参数名 |
类型 |
必填 |
示例值 |
描述 |
code |
String |
是 |
nodeState |
数据字典里的字典集代码 |
3.调用成功后的返回值
返回JSON参数
[
{
createTime: "2019-05-11 18:21:34"
creator: "赵峡策"
creatorId: "ewsd0001"
creatorOrgId: 3
language: ""
modifier: "赵峡策"
modifierId: "ewsd0001"
modifyTime: "2019-07-11 22:15:04"
puuid: "8E84BEB3C575471E9C9B45DBA5D3FD40"
remark: ""
selected: ""
sort: 1
text: "是"
uuid: "44545ACC2EFC45DFB6583A6BCDA395E1"
value: "public.whether01"
valueColour: null
},
{
createTime: "2019-05-11 02:21:48"
creator: "赵峡策"
creatorId: "ewsd0001"
creatorOrgId: 3
language: null
modifier: "赵峡策"
modifierId: "ewsd0001"
modifyTime: "2019-07-11 22:10:18"
puuid: "8E84BEB3C575471E9C9B45DBA5D3FD40"
remark: null
selected: null
sort: 2
text: "否"
uuid: "8AD973D237CC4B4B8E43DF6B3EA7C93A"
value: "public.whether02"
valueColour: null
}
]
数据字典接口示例
<div class="topjui-col-sm6">
<label class="topjui-form-label">节点状态</label>
<div class="topjui-input-block">
<input data-toggle="topjui-combobox" name="state"
data-options="prompt:'节点状态',
url:'/system/dicSet/getDicItemByCode?code=nodeState', //code参数就是数据字典的字典集代码
panelHeight:60">
</div>
</div>
二、树形字典
1.接口说明
接口描述 |
树形字典接口 |
接口地址 |
/system/codeItem/getListByCodeSetIdAndLevelId |
方法 |
POST |
请求体 |
x-www-form-urlencoded |
返回值 |
Json |
2.业务参数
参数名 |
类型 |
必填 |
示例值 |
描述 |
codeSetId |
String |
是 |
AGA |
树形字典里的体系代码 |
levelId |
String |
是 |
1 |
层级 |
3.接口说明
接口描述 |
树形字典接口 |
接口地址 |
/system/codeItem/getListByPid |
方法 |
POST |
请求体 |
x-www-form-urlencoded |
返回值 |
Json |
4.业务参数
参数名 |
类型 |
必填 |
示例值 |
描述 |
pid |
String |
是 |
pid={id} |
父节点ID |
说明:url跟expandUrl必须同时使用,否则无效
树形接口示例
<input type="text" name="zone"
data-toggle="topjui-combotree"
data-options="required:true,
prompt:'必填',
url:'/system/codeItem/getListByCodeSetIdAndLevelId?codeSetId=AGA&levelId=3',
expandUrl:'/system/codeItem/getListByPid?pid={id}'">
5.调用成功后的返回值
返回JSON参数
[
{
attributes: null
checked: null
children: null
code: ""
codeSetId: "AGA"
createTime: "2017-02-14 10:46:45"
creator: "系统管理员"
creatorId: "admin"
creatorOrgId: 0
iconCls: ""
id: "71A1A800E8BC4BE99E7EDF6591E88244"
levelId: 3
modifier: "系统管理员"
modifierId: "admin"
modifyTime: "2017-03-19 15:47:44"
pid: "31643765E6824628BBB51AEB99949E2B"
remark: null
sort: 1
state: "closed"
status: null
text: "中国"
type: null
url: null
uuid: "4028b4815a368a28015a3a83e1c1018c"
}
]