From 67e6aa0067bcbb1fa81faf28ccdc02201a80f11c Mon Sep 17 00:00:00 2001 From: gcii <3440626@qq.com> Date: Fri, 23 Aug 2019 11:55:05 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E9=A1=B5=E9=9D=A2=E4=BD=BF=E7=94=A8=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=8A=9F=E8=83=BD=E5=90=8E=E4=B8=8D=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E4=BC=9A=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E6=A0=B9=E7=9B=AE=E5=BD=95=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index d2a91ad7c..02c4f8510 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -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; } From 18786fc669909c89317dfe79e26e35a76d6bde09 Mon Sep 17 00:00:00 2001 From: gcii <3440626@qq.com> Date: Fri, 23 Aug 2019 14:05:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index 02c4f8510..df53d3c0f 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -1196,7 +1196,7 @@ return false; } for (var i = 0; i < nodes.length; i++) { - if (nodes[i].level == 0 || nodes[i].id == 100) { + if (nodes[i].level == 0) { $.modal.msgError("不能选择根节点(" + nodes[i].name + ")"); return false; }