From 8ce8c0db08b76c84b8110ed7995332d7dc99ebf1 Mon Sep 17 00:00:00 2001 From: wenc000 <450292408@qq.com> Date: Wed, 4 Sep 2019 11:25:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=91=E6=97=A0=E5=86=85?= =?UTF-8?q?=E5=AE=B9=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/tree/tree.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cloud-common-plugin/src/main/resources/templates/tree/tree.html b/cloud-common-plugin/src/main/resources/templates/tree/tree.html index 2b13208..533e780 100644 --- a/cloud-common-plugin/src/main/resources/templates/tree/tree.html +++ b/cloud-common-plugin/src/main/resources/templates/tree/tree.html @@ -95,9 +95,6 @@ function initSelectNodes() { showSelectNodes(); var nodes = zTree.getNodes(); - if(nodes.length == 0) { - top.DialogBox.msg('暂无数据'); - } for(var i = 0, item = nodes[i]; item = nodes[i++];) { for(var j = 0, node = selectedNodes[j]; node = selectedNodes[j++];) { if(item[selectTree.primaryKey] == node[selectTree.primaryKey]) { @@ -196,6 +193,11 @@ } }, onAsyncSuccess: function(event, treeId, treeNode, msg) { + var nodes = zTree.getNodes(); + if(nodes.length == 0) { + top.DialogBox.msg('暂无数据'); + return; + } // 自动打钩 if(selectTree.check.enable) { if(typeof(treeNode) != 'undefined') {