修改树无内容提示

This commit is contained in:
wenc000 2019-09-04 11:25:05 +08:00
parent 09eebe843b
commit 8ce8c0db08

View File

@ -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') {