From a1b6e56427fa7279e65afc880b7124c6cf289177 Mon Sep 17 00:00:00 2001
From: mk1990 <153958232@qq.com>
Date: 星期一, 28 三月 2022 10:11:13 +0800
Subject: [PATCH] 1. 修改control.vue 报Invalid prop: type check failed for prop "column". Expected Number with value 1, got String with value "1". 2. 修改control.vue Error: [vue-clipboards] Invalid value. Please use a valid value. 3. 修改DeviceList.vue 刷新时报 [Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "loading"

---
 src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java
index 895e6de..affce9d 100644
--- a/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java
+++ b/src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java
@@ -17,15 +17,15 @@
 	/**
 	 * 妫灄鐨勬墍鏈夎妭鐐�
 	 */
-	private final ImmutableMap<Integer, T> nodeMap;
+	private final ImmutableMap<String, T> nodeMap;
 
 	/**
 	 * 妫灄鐨勭埗鑺傜偣ID
 	 */
-	private final Map<Integer, Object> parentIdMap = Maps.newHashMap();
+	private final Map<String, Object> parentIdMap = Maps.newHashMap();
 
 	public ForestNodeManager(List<T> nodes) {
-		nodeMap = Maps.uniqueIndex(nodes, INode::getId);
+		nodeMap = Maps.uniqueIndex(nodes, INode::getChannelId);
 	}
 
 	/**
@@ -46,7 +46,7 @@
 	 *
 	 * @param parentId 鐖惰妭鐐笽D
 	 */
-	public void addParentId(int parentId) {
+	public void addParentId(String parentId) {
 		parentIdMap.put(parentId, "");
 	}
 
@@ -58,7 +58,7 @@
 	public List<T> getRoot() {
 		List<T> roots = new ArrayList<>();
 		nodeMap.forEach((key, node) -> {
-			if (node.getParentId() == null || parentIdMap.containsKey(node.getId())) {
+			if (node.getParentId() == null || parentIdMap.containsKey(node.getChannelId())) {
 				roots.add(node);
 			}
 		});

--
Gitblit v1.8.0