Browse Source

修复雷达显示

master
DIAMOND 9 months ago
parent
commit
a6de3afdb8
  1. 31
      src/views/earthMap/edit/EarthComp.vue

31
src/views/earthMap/edit/EarthComp.vue

@ -1694,11 +1694,11 @@
}, },
}; };
if (item.labelAttr == 4) { if (item.labelAttr == 4) {
console.log("雷达",item); // console.log("",item);
that.statusByNodeId.set(item.id, 1); that.statusByNodeId.set(item.id, 1);
that.addLabelNodeToTree(item, models, objConfig3, type); that.addLabelNodeToTree(item, models, objConfig3, type);
} else { } else {
console.log("微波",item); // console.log("",item);
that.statusByNodeId.set(item.id, -10); that.statusByNodeId.set(item.id, -10);
that.addLabelNodeToTree(item, models, objConfig3, type); that.addLabelNodeToTree(item, models, objConfig3, type);
const device = that.hostDeviceMapById.get(data.deviceId); const device = that.hostDeviceMapById.get(data.deviceId);
@ -1713,6 +1713,7 @@
addLabelNodeToTree(item, models, objConfig3, type) { addLabelNodeToTree(item, models, objConfig3, type) {
const that = this; const that = this;
//
if (item.labelAttr == 10) { if (item.labelAttr == 10) {
if (type == 2) { if (type == 2) {
let childs1 = models.children; let childs1 = models.children;
@ -1729,7 +1730,30 @@
let childs2 = parentNode.children; let childs2 = parentNode.children;
childs2[2].children.push(objConfig3); 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) { if (type == 2) {
let childs3 = models.children; let childs3 = models.children;
for (const child of childs3) { for (const child of childs3) {
@ -1741,6 +1765,7 @@
} }
} else { } else {
const parentNode1 = that.nodeConfigByRef.get('nodeSecondary_' + item.lineId); const parentNode1 = that.nodeConfigByRef.get('nodeSecondary_' + item.lineId);
// console.log("nodeSecondary_",parentNode1);
if (!parentNode1) { if (!parentNode1) {
return; return;
} }

Loading…
Cancel
Save