|
|
|
@ -5518,9 +5518,6 @@ export default { |
|
|
|
this.contextMenu.visible = false; |
|
|
|
|
|
|
|
// 使用 drillPick 获取重叠/接近位置的所有实体(11x11 像素拾取区域,便于选中重叠或接近的图形) |
|
|
|
const drillPicks = this.viewer.scene.drillPick(click.position, 20, 11, 11); |
|
|
|
const pickList = []; |
|
|
|
const seenEntities = new Set(); |
|
|
|
|
|
|
|
const pickedObject = this.viewer.scene.pick(click.position) |
|
|
|
const drillPicks = this.viewer.scene.drillPick(click.position, 20, 11, 11); |
|
|
|
@ -5539,14 +5536,14 @@ export default { |
|
|
|
let platformId = 0 |
|
|
|
let platformName = '平台' |
|
|
|
if (pickedEntity.properties) { |
|
|
|
const now = Cesium.JulianDate.now(); |
|
|
|
// 尝试直接获取 |
|
|
|
if (pickedEntity.properties.platformId) { |
|
|
|
platformId = pickedEntity.properties.platformId.getValue ? pickedEntity.properties.platformId.getValue(now) : pickedEntity.properties.platformId |
|
|
|
} |
|
|
|
if (pickedEntity.properties.platformName) { |
|
|
|
platformName = pickedEntity.properties.platformName.getValue ? pickedEntity.properties.platformName.getValue(now) : pickedEntity.properties.platformName |
|
|
|
} |
|
|
|
const now = Cesium.JulianDate.now(); |
|
|
|
// 尝试直接获取 |
|
|
|
if (pickedEntity.properties.platformId) { |
|
|
|
platformId = pickedEntity.properties.platformId.getValue ? pickedEntity.properties.platformId.getValue(now) : pickedEntity.properties.platformId |
|
|
|
} |
|
|
|
if (pickedEntity.properties.platformName) { |
|
|
|
platformName = pickedEntity.properties.platformName.getValue ? pickedEntity.properties.platformName.getValue(now) : pickedEntity.properties.platformName |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
entityData = { |
|
|
|
@ -5701,23 +5698,11 @@ export default { |
|
|
|
if (dbId && dbId.getValue) dbId = dbId.getValue(); |
|
|
|
const ids = this._routeWaypointIdsByRoute && this._routeWaypointIdsByRoute[rId]; |
|
|
|
const waypointIndex = ids && dbId != null ? ids.indexOf(dbId) : -1; |
|
|
|
const routeWps = this._routeWaypointsByRoute && this._routeWaypointsByRoute[rId]; |
|
|
|
const wp = routeWps && waypointIndex >= 0 ? routeWps[waypointIndex] : null; |
|
|
|
const hp = wp ? this.parseHoldParams(wp) : null; |
|
|
|
const holdSpeed = hp && hp.holdSpeed != null ? Number(hp.holdSpeed) : null; |
|
|
|
if (rId != null) entityData = { |
|
|
|
type: 'routeWaypoint', |
|
|
|
routeId: rId, |
|
|
|
dbId, |
|
|
|
waypointIndex, |
|
|
|
speed: wp && wp.speed != null ? Number(wp.speed) : null, |
|
|
|
holdSpeed, |
|
|
|
pointType: wp && (wp.pointType || wp.point_type) |
|
|
|
}; |
|
|
|
if (rId != null) entityData = { type: 'routeWaypoint', routeId: rId, dbId, waypointIndex }; |
|
|
|
} else if (isLine) { |
|
|
|
let rId = props.routeId; |
|
|
|
if (rId && rId.getValue) rId = rId.getValue(); |
|
|
|
if (rId) entityData = {type: 'route', routeId: rId}; |
|
|
|
if (rId) entityData = { type: 'route', routeId: rId }; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -5727,28 +5712,13 @@ export default { |
|
|
|
if (parts.length >= 4) { |
|
|
|
const routeId = parts[2]; |
|
|
|
const segIdx = parseInt(parts[3], 10); |
|
|
|
if (!isNaN(segIdx)) { |
|
|
|
const routeWps = this._routeWaypointsByRoute && this._routeWaypointsByRoute[routeId]; |
|
|
|
const holdWp = routeWps && routeWps[segIdx] ? routeWps[segIdx] : null; |
|
|
|
const hp = holdWp ? this.parseHoldParams(holdWp) : null; |
|
|
|
const holdSpeed = hp && hp.holdSpeed != null ? Number(hp.holdSpeed) : null; |
|
|
|
entityData = { |
|
|
|
type: 'routeWaypoint', |
|
|
|
routeId, |
|
|
|
waypointIndex: segIdx, |
|
|
|
dbId: holdWp && holdWp.id != null ? holdWp.id : null, |
|
|
|
speed: holdWp && holdWp.speed != null ? Number(holdWp.speed) : 800, |
|
|
|
holdSpeed, |
|
|
|
pointType: holdWp && (holdWp.pointType || holdWp.point_type), |
|
|
|
fromHold: true |
|
|
|
}; |
|
|
|
} |
|
|
|
if (!isNaN(segIdx)) entityData = { type: 'routeWaypoint', routeId, waypointIndex: segIdx, fromHold: true }; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 航线实体在 allEntities 中可能没有 routeId,从 id 解析 |
|
|
|
if (entityData && entityData.type === 'route' && entityData.id && !entityData.routeId) { |
|
|
|
entityData = {...entityData, routeId: entityData.id.replace('route-line-', '')}; |
|
|
|
entityData = { ...entityData, routeId: entityData.id.replace('route-line-', '') }; |
|
|
|
} |
|
|
|
for (const pick of drillPicks) { |
|
|
|
const pickedEntity = pick.id || pick.object; |
|
|
|
@ -10873,6 +10843,14 @@ export default { |
|
|
|
if (ed.type === 'platformIcon' && ed.id) { |
|
|
|
toggleAll('platformIcon') |
|
|
|
} |
|
|
|
|
|
|
|
if (ed.type === 'routePlatform' && ed.routeId != null) { |
|
|
|
toggleAll('route') |
|
|
|
return |
|
|
|
} |
|
|
|
if (ed.type === 'platformIcon' && ed.id) { |
|
|
|
toggleAll('platformIcon') |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/** 右键菜单:切换威力区显示/隐藏 */ |
|
|
|
@ -14320,3 +14298,4 @@ export default { |
|
|
|
color: #f78989; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|
|
|
|
|