From 726380cec4dd999ba515b569248ac9fd8e55c2f6 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 27 Sep 2024 11:17:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A1=8C=E6=94=BF=E5=8C=BA?= =?UTF-8?q?=E5=88=92=E6=A0=91=E4=BB=A5=E5=8F=8A=E4=B8=9A=E5=8A=A1=E5=88=86?= =?UTF-8?q?=E7=BB=84=E6=A0=91=E7=9A=84=E8=87=AA=E5=8A=A8=E5=B1=95=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../redisMsg/RedisPushStreamResponseListener.java | 1 - web_src/src/components/common/GroupTree.vue | 15 ++++++++++++--- web_src/src/components/common/RegionTree.vue | 9 ++++++--- web_src/src/components/group.vue | 14 +++++++------- web_src/src/components/region.vue | 14 ++++++++------ 5 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamResponseListener.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamResponseListener.java index dc18f0d8..5c64ad35 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamResponseListener.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/RedisPushStreamResponseListener.java @@ -29,7 +29,6 @@ public class RedisPushStreamResponseListener implements MessageListener { @Autowired private ThreadPoolTaskExecutor taskExecutor; - private Map responseEvents = new ConcurrentHashMap<>(); public interface PushStreamResponseEvent{ diff --git a/web_src/src/components/common/GroupTree.vue b/web_src/src/components/common/GroupTree.vue index f4d6ac01..88a5945e 100755 --- a/web_src/src/components/common/GroupTree.vue +++ b/web_src/src/components/common/GroupTree.vue @@ -29,7 +29,7 @@ > - {{''}} + {{''}} @@ -57,6 +57,7 @@ export default { return { props: { label: "name", + id: "treeId" }, showCode: false, searchSrt: "", @@ -128,6 +129,7 @@ export default { } }).then((res) => { console.log("移除成功") + console.log(node) if (this.onChannelChange) { this.onChannelChange() } @@ -275,6 +277,7 @@ export default { if (this.onChannelChange) { this.onChannelChange() } + console.log(node) node.loaded = false node.expand(); }else { @@ -333,14 +336,18 @@ export default { }) }, refreshNode: function (node) { + console.log(node) node.loaded = false node.expand(); }, refresh: function (id) { + console.log("刷新节点: " + id) // 查询node let node = this.$refs.veTree.getNode(id) - node.loaded = false - node.expand(); + if (node) { + node.loaded = false + node.expand(); + } }, addGroup: function (id, node) { this.$refs.groupEdit.openDialog({ @@ -352,6 +359,7 @@ export default { parentId: node.data.id, businessGroup: node.level > 2 ? node.data.businessGroup: node.data.deviceId, },form => { + console.log(node) node.loaded = false node.expand(); }, id); @@ -359,6 +367,7 @@ export default { editGroup: function (id, node) { console.log(node) this.$refs.groupEdit.openDialog(node.data,form => { + console.log(node) node.parent.loaded = false node.parent.expand(); }, id); diff --git a/web_src/src/components/common/RegionTree.vue b/web_src/src/components/common/RegionTree.vue index 2224db4b..97fac821 100755 --- a/web_src/src/components/common/RegionTree.vue +++ b/web_src/src/components/common/RegionTree.vue @@ -29,7 +29,7 @@ > - {{''}} + {{''}} @@ -337,8 +337,11 @@ export default { refresh: function (id) { // 查询node let node = this.$refs.veTree.getNode(id) - node.loaded = false - node.expand(); + if (node) { + node.loaded = false + node.expand(); + } + }, addRegion: function (id, node) { diff --git a/web_src/src/components/group.vue b/web_src/src/components/group.vue index cc17cb85..b2134261 100755 --- a/web_src/src/components/group.vue +++ b/web_src/src/components/group.vue @@ -113,6 +113,7 @@ export default { total: 0, loading: false, loadSnap: {}, + groupDeviceId: "", groupId: "", businessGroup: "", multipleSelection: [] @@ -175,12 +176,10 @@ export default { } }, rowDblclick: function (row, rowIndex) { - if (row.gbParentId) { - this.$refs.groupTree.refresh(row.gbParentId) - } + }, add: function (row) { - if (!this.groupId) { + if (!this.groupDeviceId) { this.$message.info({ showClose: true, message: "请选择左侧行政区划节点" @@ -204,7 +203,7 @@ export default { method: 'post', url: `/api/common/channel/group/add`, data: { - parentId: this.groupId, + parentId: this.groupDeviceId, businessGroup: this.businessGroup, channelIds: channels } @@ -261,7 +260,7 @@ export default { }) this.getChannelList() // 刷新树节点 - this.$refs.groupTree.refresh(this.groupId) + this.$refs.groupTree.refresh(this.groupDeviceId) }else { this.$message.error({ showClose: true, @@ -292,8 +291,9 @@ export default { treeNodeClickEvent: function (device, data, isCatalog) { }, - chooseIdChange: function (id, businessGroup) { + chooseIdChange: function (id, deviceId, businessGroup) { this.groupId = id; + this.groupDeviceId = deviceId; this.businessGroup = businessGroup; }, } diff --git a/web_src/src/components/region.vue b/web_src/src/components/region.vue index acdd8aba..21a2f047 100755 --- a/web_src/src/components/region.vue +++ b/web_src/src/components/region.vue @@ -114,6 +114,7 @@ export default { loading: false, loadSnap: {}, regionId: "", + regionDeviceId: "", multipleSelection: [] }; }, @@ -175,12 +176,12 @@ export default { } }, rowDblclick: function (row, rowIndex) { - if (row.gbCivilCode) { - this.$refs.regionTree.refresh(row.gbCivilCode) - } + // if (row.gbCivilCode) { + // this.$refs.regionTree.refresh(row.gbCivilCode) + // } }, add: function (row) { - if (!this.regionId) { + if (!this.regionDeviceId) { this.$message.info({ showClose: true, message: "请选择左侧行政区划节点" @@ -204,7 +205,7 @@ export default { method: 'post', url: `/api/common/channel/region/add`, data: { - civilCode: this.regionId, + civilCode: this.regionDeviceId, channelIds: channels } }).then((res)=> { @@ -290,7 +291,8 @@ export default { treeNodeClickEvent: function (device, data, isCatalog) { }, - chooseIdChange: function (id) { + chooseIdChange: function (id, deviceId) { + this.regionDeviceId = deviceId; this.regionId = id; }, }