修复添加用户页面使用搜索功能后不选择部门会默认选择根目录的bug

dep_wangsr
gcii 5 years ago committed by Limy
parent fd445b1ab8
commit 78e5cfdda5

@ -1191,8 +1191,12 @@
// 不允许根父节点选择 // 不允许根父节点选择
notAllowParents: function(_tree) { notAllowParents: function(_tree) {
var nodes = _tree.getSelectedNodes(); var nodes = _tree.getSelectedNodes();
if(nodes.length == 0){
$.modal.msgError("请选择节点后提交");
return false;
}
for (var i = 0; i < nodes.length; i++) { for (var i = 0; i < nodes.length; i++) {
if (nodes[i].level == 0) { if (nodes[i].level == 0 || nodes[i].id == 100) {
$.modal.msgError("不能选择根节点(" + nodes[i].name + ""); $.modal.msgError("不能选择根节点(" + nodes[i].name + "");
return false; return false;
} }

Loading…
Cancel
Save