Browse Source

修复部分情况节点不展开问题。

pull/168/head
RuoYi 5 years ago
parent
commit
6aed57056c
  1. 8
      ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

8
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@ -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…
Cancel
Save