|
|
@ -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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|