mirror of https://gitee.com/y_project/RuoYi.git
修复添加用户页面使用搜索功能后不选择部门会默认选择根目录的bug
parent
478520572c
commit
67e6aa0067
|
@ -1191,8 +1191,12 @@
|
|||
// 不允许根父节点选择
|
||||
notAllowParents: function(_tree) {
|
||||
var nodes = _tree.getSelectedNodes();
|
||||
if(nodes.length == 0){
|
||||
$.modal.msgError("请选择节点后提交");
|
||||
return false;
|
||||
}
|
||||
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 + ")");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue