模块:
MesIconsController
服务地址示例:http://127.0.0.1:8980
返回格式:CommonResp(result/message/data)
登录会话:请求携带__ajax=json、__sid={token}
/js/a/mes/mesIcons/icons| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| __ajax | 是 | string | 固定 json |
| __sid | 是 | string | 登录会话 token |
| title | 否 | string | 按模块名称模糊查询(一般 PDA 不传) |
| mode | 否 | string | 按模块标识查询(一般 PDA 不传) |
返回扁平或分组 由后台 系统设置 → 参数设置 中
mes.icons.grouped控制,PDA 无需传额外参数。
0= 扁平列表(兼容旧版);1= 按分类分组(默认)。
curl --location --request POST 'http://127.0.0.1:8980/js/a/mes/mesIcons/icons?__ajax=json&__sid=b998858e224b469c84ca6d0711565f6a'
成功(分组,mes.icons.grouped = 1)
{
"result": "true",
"message": "成功",
"data": [
{
"categoryId": "1677000000000000001",
"title": "仓储管理",
"sort": 10,
"children": [
{
"title": "来料检",
"mode": "227",
"img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/xxx.png"
},
{
"title": "生产入库",
"mode": "240",
"img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/yyy.png"
}
]
},
{
"categoryId": "1000000000000000001",
"title": "其他",
"sort": 9999,
"children": [
{
"title": "来料报检",
"mode": "40",
"img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/zzz.png"
}
]
}
]
}
成功(扁平,mes.icons.grouped = 0,兼容旧版 PDA)
{
"result": "true",
"message": "成功",
"data": [
{
"title": "来料检",
"mode": "227",
"img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/xxx.png"
},
{
"title": "打包",
"mode": "231",
"img": "http://127.0.0.1:8980/js/userfiles/fileupload/202307/yyy.png"
}
]
}
成功(无可见模块)
{
"result": "true",
"message": "成功",
"data": []
}
分组模式(mes.icons.grouped = 1)data[]:
| 字段名 | 类型 | 说明 |
|---|---|---|
| categoryId | string | 分类 ID |
| title | string | 分类名称 |
| sort | int | 排序值,升序展示 |
| children | array | 该分类下可见模块列表 |
children[] 模块对象:
| 字段名 | 类型 | 说明 |
|---|---|---|
| title | string | 模块名称 |
| mode | string | 模块标识,PDA 用于跳转对应功能页 |
| img | string | 模块图标完整 URL;无图时为服务器 host |
扁平模式(mes.icons.grouped = 0)data[]:
| 字段名 | 类型 | 说明 |
|---|---|---|
| title | string | 模块名称 |
| mode | string | 模块标识 |
| img | string | 模块图标完整 URL |
auth 权限过滤,用户无权限的模块不返回。1000000000000000001)。mes.icons.grouped 后,建议清理缓存或重启应用后生效。| 参数键名 | 参数名称 | 参数值 | 说明 |
|---|---|---|---|
| mes.icons.grouped | PDA功能模块按分类分组 | 0 | 扁平列表,兼容旧版 PDA |
| mes.icons.grouped | PDA功能模块按分类分组 | 1 | 按分类分组,新版 PDA 两级菜单(默认) |