From e7bdcc1f8ddf95ca4b0bb08fbcd962a8d8a2b83a Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Tue, 6 Sep 2022 16:31:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=89=E6=8B=A9=E9=80=9A?= =?UTF-8?q?=E9=81=93=E6=97=B6=E9=BB=98=E8=AE=A4=E8=8A=82=E7=82=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/bean/ParentPlatform.java | 2 +- web_src/src/components/ParentPlatformList.vue | 3 ++- web_src/src/components/dialog/chooseChannel.vue | 7 +++++-- .../dialog/chooseChannelForCatalog.vue | 7 +++++-- web_src/src/components/dialog/getCatalog.vue | 16 ++++++++++++---- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/ParentPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/ParentPlatform.java index c8ab2e84..b056cc71 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/ParentPlatform.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/ParentPlatform.java @@ -53,7 +53,7 @@ public class ParentPlatform { /** * 设备国标编号 */ - @Schema(description = "11111") + @Schema(description = "设备国标编号") private String deviceGBId; /** diff --git a/web_src/src/components/ParentPlatformList.vue b/web_src/src/components/ParentPlatformList.vue index 0cd517dd..61e93fc8 100644 --- a/web_src/src/components/ParentPlatformList.vue +++ b/web_src/src/components/ParentPlatformList.vue @@ -143,7 +143,8 @@ export default { }); }, chooseChannel: function(platform) { - this.$refs.chooseChannelDialog.openDialog(platform.serverGBId, platform.name, platform.catalogId, platform.treeType, this.initData) + console.log("platform.name: " + platform.name) + this.$refs.chooseChannelDialog.openDialog(platform.serverGBId,platform.deviceGBId, platform.name, platform.catalogId, platform.treeType, this.initData) }, initData: function() { this.getPlatformList(); diff --git a/web_src/src/components/dialog/chooseChannel.vue b/web_src/src/components/dialog/chooseChannel.vue index ad911e8c..e0e79c3a 100644 --- a/web_src/src/components/dialog/chooseChannel.vue +++ b/web_src/src/components/dialog/chooseChannel.vue @@ -8,7 +8,7 @@ - + @@ -60,6 +60,7 @@ export default { tabActiveName: "gbChannel", catalogTabActiveName: "catalog", platformId: "", + platformDeviceId: "", catalogId: "", catalogName: "", currentCatalogId: "", @@ -73,8 +74,10 @@ export default { }; }, methods: { - openDialog(platformId, platformName, defaultCatalogId, treeType, closeCallback) { + openDialog(platformId, platformDeviceId, platformName, defaultCatalogId, treeType, closeCallback) { + console.log("defaultCatalogId: " + defaultCatalogId) this.platformId = platformId + this.platformDeviceId = platformDeviceId this.platformName = platformName this.defaultCatalogId = defaultCatalogId this.showDialog = true diff --git a/web_src/src/components/dialog/chooseChannelForCatalog.vue b/web_src/src/components/dialog/chooseChannelForCatalog.vue index 4303a2f5..c634b77d 100644 --- a/web_src/src/components/dialog/chooseChannelForCatalog.vue +++ b/web_src/src/components/dialog/chooseChannelForCatalog.vue @@ -38,7 +38,7 @@ import catalogEdit from './catalogEdit.vue' export default { name: 'chooseChannelForCatalog', - props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange', 'treeType'], + props: ['platformId', 'platformDeviceId', 'platformName', 'defaultCatalogId', 'catalogIdChange', 'treeType'], created() { this.chooseId = this.defaultCatalogId; this.defaultCatalogIdSign = this.defaultCatalogId; @@ -171,6 +171,7 @@ export default { }); }, loadNode: function(node, resolve){ + console.log("this.platformDeviceId: " + this.platformDeviceId) if (node.level === 0) { resolve([ { @@ -179,7 +180,7 @@ export default { type: -1 },{ name: this.platformName, - id: this.platformId, + id: this.platformDeviceId, type: 0 } ]); @@ -298,6 +299,8 @@ export default { return false; }, nodeClickHandler: function (data, node, tree){ + console.log(data) + console.log(node) this.chooseId = data.id; this.chooseName = data.name; if (this.catalogIdChange)this.catalogIdChange(this.chooseId, this.chooseName); diff --git a/web_src/src/components/dialog/getCatalog.vue b/web_src/src/components/dialog/getCatalog.vue index 62bacdb8..fdc26de1 100644 --- a/web_src/src/components/dialog/getCatalog.vue +++ b/web_src/src/components/dialog/getCatalog.vue @@ -77,6 +77,7 @@ export default { }, methods: { openDialog(catalogIdResult) { + console.log(this.chooseId) this.showDialog = true this.catalogIdResult = catalogIdResult }, @@ -107,9 +108,6 @@ export default { }, loadNode: function(node, resolve){ - - - if (node.level === 0) { this.$axios({ method:"get", @@ -124,7 +122,7 @@ export default { resolve([ { name: this.platformName, - id: this.platformId, + id: res.data.data.deviceGBId, type: 0 } ]); @@ -142,9 +140,19 @@ export default { this.chooseId = data.id; }, close: function() { + this.chooseId = null; this.showDialog = false; }, submit: function() { + console.log(this.chooseId) + if (this.chooseId === null) { + this.$message({ + showClose: true, + message: '未选择任何节点,', + type: 'warning' + }); + return; + } if (this.catalogIdResult)this.catalogIdResult(this.chooseId) this.showDialog = false; },