jQuery MiniUI
标题:
checked tree显示不对
[打印本页]
作者:
cxhold
时间:
2018-8-9 11:47:10
标题:
checked tree显示不对
代码:
<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的前面不应该被勾选中的。但是实际显示效果是全部被选中了。
作者:
cxhold
时间:
2018-8-9 11:51:09
[attach]11200[/attach]这是显示效果?为什么啊?谢谢!
作者:
cxhold
时间:
2018-8-9 12:02:40
搞出来了,我的设置有问题。应该是checkRecursive="false"
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2