var a = $("#sys_roleAdd_pid").combotree(‘tree‘).tree(‘getChecked‘,‘indeterminate‘);
var b = $("#sys_roleAdd_pid").combotree(‘tree‘).tree(‘getChecked‘);
a.push.apply(a,b);
console.log(a);
var resourceArrayIds=[];
for(var i=0;i<a.length;i++){
resourceArrayIds.push(a[i].id);
}
var resourceIds = resourceArrayIds.join(‘,‘);
alert(resourceIds);
时间: 2024-12-11 18:48:18