From 8f4fa452f2dab50818025ef8b0d76ae4a09976a5 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sat, 30 Dec 2023 12:38:40 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E9=80=9A=E9=81=93=E9=A1=B5=E9=9D=A2=E6=8C=89=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E5=88=86=E7=BB=84=E5=B1=95=E7=A4=BA=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web_src/src/components/channelList.vue | 9 ++++----- web_src/src/components/common/DeviceTree.vue | 7 ------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/web_src/src/components/channelList.vue b/web_src/src/components/channelList.vue index e5ea7ab0e..246568504 100755 --- a/web_src/src/components/channelList.vue +++ b/web_src/src/components/channelList.vue @@ -40,7 +40,7 @@ - + @@ -235,8 +235,7 @@ export default { mounted() { if (this.deviceId) { this.deviceService.getDevice(this.deviceId, (result) => { - this.device = result; - + this.device = result.data; }, (error) => { console.log("获取设备信息失败") console.error(error) @@ -469,8 +468,8 @@ export default { } }).then((res) => { if (res.data.code === 0) { - this.total = res.data.total; - this.deviceChannelList = res.data.list; + this.total = res.data.data.total; + this.deviceChannelList = res.data.data.list; // 防止出现表格错位 this.$nextTick(() => { this.$refs.channelListTable.doLayout(); diff --git a/web_src/src/components/common/DeviceTree.vue b/web_src/src/components/common/DeviceTree.vue index c701bf0fd..bbbab51c4 100755 --- a/web_src/src/components/common/DeviceTree.vue +++ b/web_src/src/components/common/DeviceTree.vue @@ -56,14 +56,12 @@ export default { } }, handleContextMenu(event,data,node,element) { - console.log("右键点击事件") let deviceNode = this.$refs.gdTree.getNode(data.userData.deviceId) if(typeof (this.contextMenuEvent) == "function") { this.contextMenuEvent(deviceNode.data.userData, event, data.userData, data.type === 2) } }, loadNode: function(node, resolve){ - console.log(this.device) if (node.level === 0) { if (this.device) { let node = { @@ -77,11 +75,9 @@ export default { resolve([node]) }else { this.deviceService.getAllDeviceList((data)=>{ - console.log(data) if (data.length > 0) { let nodeList = [] for (let i = 0; i < data.length; i++) { - console.log(data[i].name) let node = { name: data[i].name || data[i].deviceId, isLeaf: false, @@ -106,7 +102,6 @@ export default { let channelArray = [] this.deviceService.getTree(node.data.userData.deviceId, node.data.id, this.onlyCatalog, catalogData =>{ - console.log(catalogData) channelArray = channelArray.concat(catalogData) this.channelDataHandler(channelArray, resolve) },(endCatalogData) => { @@ -126,11 +121,9 @@ export default { }else { if (item.id.length > 14) { let channelType = item.id.substring(10, 13) - console.log("channelType: " + channelType) if (channelType === '215' || channelType === '216') { type = 2; } - console.log(type) if (item.basicData.ptztype === 1 ) { // 1-球机;2-半球;3-固定枪机;4-遥控枪机 type = 4; }else if (item.basicData.ptztype === 2) {