mirror of https://gitee.com/y_project/RuoYi.git
修复部分情况节点不展开问题。
parent
3f17e54cf9
commit
6aed57056c
|
@ -1263,9 +1263,11 @@ var table = {
|
|||
var treeId = $("#treeId").val();
|
||||
tree = $.fn.zTree.init($("#" + options.id), setting, data);
|
||||
$._tree = tree;
|
||||
var nodes = tree.getNodesByParam("level", options.expandLevel - 1);
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
tree.expandNode(nodes[i], true, false, false);
|
||||
for (var i = 0; i < options.expandLevel; i++) {
|
||||
var nodes = tree.getNodesByParam("level", i);
|
||||
for (var j = 0; j < nodes.length; j++) {
|
||||
tree.expandNode(nodes[j], true, false, false);
|
||||
}
|
||||
}
|
||||
var node = tree.getNodesByParam("id", treeId, null)[0];
|
||||
$.tree.selectByIdName(treeId, node);
|
||||
|
|
Loading…
Reference in New Issue