debug走完,数据还是没变化。
let result = getEleDatas(search);
//-------------------对结果过滤市本级节点------------------
function removeNodeForList(list){
if (list && list.length > 0){
for(let i =0;i<list.length;i++){
if(list[i]['children'] && list[i]['children'].length > 0){
removeNodeForList(list[i]['children']);
}else{
let code = list[i]['code'];
if(code && code.substr(4, 2) == '00'){
list.slice(i,1)
}
}
}
}
}
removeNodeForList(result);