Merge pull request #1667 from jumpserver/dev

[Bugfix] 修复点击资产报错
This commit is contained in:
老广 2018-08-09 21:07:40 -05:00 committed by GitHub
commit fa0bd85fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -194,9 +194,10 @@ function addTreeNode() {
$.post(url, {}, function (data, status){
if (status === "success") {
var newNode = {
id: data["key"],
name: data["value"],
id: data["id"],
pId: parentNode.node_id
node_id: data["id"],
pId: parentNode.id
};
newNode.checked = zTree.getSelectedNodes()[0].checked;
zTree.addNodes(parentNode, 0, newNode);