搜索遍历是广度优先的,因此queue要先reverse一下
@ -161,6 +161,7 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, {
result.push(node);
result = result.concat(self._getChildren(node));
});
queue.reverse();
while (BI.isNotEmptyArray(queue)) {
var node = queue.pop();
var pNode = this.tree.search(this.tree.getRoot(), node.pId, "id");
@ -170,6 +170,7 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, {