Commit 576490cb authored by 鲁鑫's avatar 鲁鑫

资源删除控制

parent eac39b97
......@@ -523,8 +523,15 @@
_self.id = null;
var node = _self.treeManager.getSelected();
if (node) {
var hasChildren = node.data.hasChildren;
if (hasChildren > 0){
Public.tip("先删除子节点数据!");
return false
}
var parentId = node.data[opt.parentIDFieldName];
if (parentId == opt.parentId) {//删除的是根节点
Public.tip("不能删除根节点数据!");
return false
_self.reload();
} else {
_self._refreshNode(parentId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment