level 3
风雪no_yes
楼主

后台传过来的数据是[{id:'1',pId:'0',isParent:true,type:'rtu',name:'test'},{id:'1',pId:'1',type:'tpoint',name:'测量点1'},{id:'2',pId:'1',type:'tpoint',name:'测量点2'},{id:'2',pId:'0',isParent:true,type:'rtu',name:'t'},{id:'3',pId:'2',type:'tpoint',name:'测量点3'}]但为何父节点都有加号,而且可以无限点击产生一样的子节点
一开始打开是这样

setting里写的是var setting = {
data: {
simpleData: {
enable: true,
idKey: "id",
pIdKey: "PId"
}
},
edit: {
enable: true
},
async: {
enable: true,
url:webPath+"/rtu/RtuConfig.action?getAllRtu&myRandom=new Date()",
autoParam:["id","name","type"],
dataFilter: filter
},
callback: {
onClick: zTreeOnClick,
onRightClick: OnRightClick
}
};
