From 65752fcffafa02c5f646d0a6207c85bf81284b73 Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期四, 28 七月 2022 10:20:52 +0800
Subject: [PATCH] 统计查询
---
src/components/giantTree/index.vue | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/src/components/giantTree/index.vue b/src/components/giantTree/index.vue
index 356d6d2..c04cbae 100644
--- a/src/components/giantTree/index.vue
+++ b/src/components/giantTree/index.vue
@@ -18,7 +18,9 @@
@onExpand="itemExpand"
@onCollapse="itemCollapse"
@onShowPic="showCameraPic"
+ :search="search"
/>
+ <div class="empty" v-if="!node.length">鏆傛棤鎽勫儚鏈烘暟鎹�,璇锋坊鍔犳憚鍍忔満!</div>
<div class="dialog-box-bg" v-show="showDialog" @click="hideDialogBox"></div>
<div
class="dialog-box"
@@ -85,6 +87,10 @@
default: function () {
return {};
},
+ },
+ search: {
+ type: Boolean,
+ default: false,
},
},
data() {
@@ -287,7 +293,9 @@
this.showDialog = true;
},
itemClick(evt, treeId, treeNode) {
+ console.log("click");
this.TreeDataPool.selectedNode = treeNode;
+ this.TreeDataPool.activeNode = treeNode;
this.TreeDataPool.treeType = this.treeName;
// 澶氶��
@@ -313,8 +321,11 @@
// this.TreeDataPool.updateZTreeCheckNodes([treeNode]);
// },
itemCheck(evt, treeId, treeNode) {
- this.TreeDataPool.selectedNode = treeNode;
+ if (treeNode) {
+ this.TreeDataPool.selectedNode = treeNode;
+ }
this.TreeDataPool.treeType = this.treeName;
+
// 澶氶��
// this.ztreeObj.checkNode(treeNode, true, false, false);
let checkedNodes = this.ztreeObj.getCheckedNodes(true);
@@ -325,6 +336,7 @@
// 淇濆瓨涓�浠芥暟鎹�
this.TreeDataPool.activeTreeData = this.ztreeObj.getNodes();
+ this.$emit("itemChecked", treeNode);
},
//灞曞紑
itemExpand(e, id, node) {
@@ -402,10 +414,14 @@
}
.tree-menu {
// max-width: 350px;
+ min-height: 92px;
overflow-x: auto;
overflow-y: hidden;
margin-bottom: 4px;
}
+.empty {
+ line-height: 76px;
+}
.tree-menu::-webkit-scrollbar {
/*婊氬姩鏉℃暣浣撴牱寮�*/
width: 4px; /*楂樺鍒嗗埆瀵瑰簲妯珫婊氬姩鏉$殑灏哄*/
--
Gitblit v1.8.0