- 注册时间
- 2017-4-2
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 295
- 精华
- 0
- 帖子
- 68
|
代码:
<div> <!-- class="mini-fit" -->
<ul id="tree2" class="mini-tree" style="padding:5px;"
showTreeIcon="true" textField="mname" idField="mid" parentField="pid" resultAsTree="false"
showCheckBox="true" checkRecursive="true" checkedField="checked" expandOnLoad="true" autoCheckParent="false" allowSelect="true" enableHotTrack="false">
</ul>
</div>
tree2.load("getAllRoleMenus?roleid="+record.roleid);
返回的json是:
[
{
"checked": true,
"mid": 1,
"mname": "人员信息维护"
},
{
"checked": true,
"mid": 2,
"mname": "用工信息维护"
},
{
"checked": true,
"mid": 3,
"mname": "系统设置"
},
{
"checked": true,
"mid": 4,
"mname": "综合查询"
},
{
"checked": true,
"mid": 11,
"mname": "人员信息录入",
"pid": 1
},
{
"checked": true,
"mid": 12,
"mname": "人员信息修改",
"pid": 1
},
{
"checked": true,
"mid": 13,
"mname": "人员面试评估",
"pid": 1
},
{
"checked": true,
"mid": 21,
"mname": "用工单位信息维护",
"pid": 2
},
{
"mid": 22,
"mname": "查看用工单位信息",
"pid": 2
},
{
"checked": true,
"mid": 23,
"mname": "用工信息维护",
"pid": 2
},
{
"checked": true,
"mid": 24,
"mname": "查看用工信息",
"pid": 2
},
{
"checked": true,
"mid": 31,
"mname": "系统用户维护",
"pid": 3
},
{
"checked": true,
"mid": 33,
"mname": "系统角色维护",
"pid": 3
},
{
"checked": true,
"mid": 35,
"mname": "常用字典维护",
"pid": 3
},
{
"checked": true,
"mid": 36,
"mname": "中国行政区域",
"pid": 3
},
{
"checked": true,
"mid": 41,
"mname": "人员查询",
"pid": 4
},
{
"mid": 42,
"mname": "用工情况查询",
"pid": 4
}
]
按道理mid为22和42的前面不应该被勾选中的。但是实际显示效果是全部被选中了。
|
|