diff --git a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js index 216fafc0960f514287e519ef15211f9ce0ac2518..199e294c0f9d141712abf7803451d86f33c792d9 100644 --- a/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js +++ b/fast-develop-web/fast-develop-editor/src/fast-develop/src/js/module/editor/resource_tree.js @@ -293,21 +293,24 @@ layui.define(['element', 'api', 'amis', 'schema', 'listener', 'api', 'jqgrid', ' treeconf(utils.contextData.trees_settings[utils.contextData.currentTreeId]); } - function refreshTabContentData(){ - var tree = getTree() + function refreshTabContentData(tree){ + // var tree = getTree(); + let currentTreeId = utils.contextData.currentTreeId; $.each(resource_tabs_obj.option.tabIdContentFn, function(index, item){ - var oldTreeNode = item.data.option.treeNode; - item.data.option.treeNode = selectedPath(tree, oldTreeNode.id); + if(index.indexOf(currentTreeId)>-1){ + var oldTreeNode = item.data.option.treeNode; + item.data.option.treeNode = selectedPath(tree, oldTreeNode.id); + } }) } function selectedNode(data){ - debugger + // debugger //1、刷新树,渲染追加新增的节点 reloadResource(data); - refreshTabContentData(); // 2、根据参数获取树节点 - var tree = getTree() + var tree = getTree(); + refreshTabContentData(tree); if(data && data.id){ let node = selectedPath(tree, data.id);