From a6de3afdb8b75630db5cad1018e4c3bd7aafae36 Mon Sep 17 00:00:00 2001 From: DIAMOND <276397553@qq.com> Date: Tue, 26 Dec 2023 16:56:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=9B=B7=E8=BE=BE=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/earthMap/edit/EarthComp.vue | 31 ++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/views/earthMap/edit/EarthComp.vue b/src/views/earthMap/edit/EarthComp.vue index ecf7fa9..244e2fb 100644 --- a/src/views/earthMap/edit/EarthComp.vue +++ b/src/views/earthMap/edit/EarthComp.vue @@ -1694,11 +1694,11 @@ }, }; if (item.labelAttr == 4) { - console.log("雷达",item); + // console.log("雷达",item); that.statusByNodeId.set(item.id, 1); that.addLabelNodeToTree(item, models, objConfig3, type); } else { - console.log("微波",item); + // console.log("微波",item); that.statusByNodeId.set(item.id, -10); that.addLabelNodeToTree(item, models, objConfig3, type); const device = that.hostDeviceMapById.get(data.deviceId); @@ -1713,6 +1713,7 @@ addLabelNodeToTree(item, models, objConfig3, type) { const that = this; + //微波 if (item.labelAttr == 10) { if (type == 2) { let childs1 = models.children; @@ -1729,7 +1730,30 @@ let childs2 = parentNode.children; childs2[2].children.push(objConfig3); } - } else if (item.labelAttr == 4) { + + } + //雷达 + else if(item.labelAttr == 4){ + if (type == 2) { + let childs1 = models.children; + for (const child of childs1) { + if ('node_' + item.lineId == child.ref) { + child.children[1].children.push(objConfig3); + } + } + } else { + const parentNode = that.nodeConfigByRef.get('node_' + item.lineId); + if (!parentNode) { + return; + } + let childs2 = parentNode.children; + childs2[1].children.push(objConfig3); + } + } + //雷达(已弃用) + else if (item.labelAttr == 4) { + console.log("leida"); + if (type == 2) { let childs3 = models.children; for (const child of childs3) { @@ -1741,6 +1765,7 @@ } } else { const parentNode1 = that.nodeConfigByRef.get('nodeSecondary_' + item.lineId); + // console.log("nodeSecondary_",parentNode1); if (!parentNode1) { return; }