|
@@ -59,6 +59,7 @@ import {
|
|
|
import FeaturePointsPlottingEvent from "../units/map/FeaturePointsPlottingEvent.js";
|
|
|
import FeaturePolygonPlottingEvent from "../units/map/FeaturePolygonPlottingEvent.js";
|
|
|
import HeatMap from "../units/map/HeatMap.js";
|
|
|
+import AddGraphicsEvent from "../units/map/AddGraphicsEvent.js";
|
|
|
export default {
|
|
|
name: "mapJK",
|
|
|
setup(){
|
|
@@ -91,6 +92,7 @@ export default {
|
|
|
let draw_GeometryMeshPrismEffectEvent = null;
|
|
|
let symbolPathPipeEvent = null;
|
|
|
let symbolPointCubeEvent = null;
|
|
|
+ let addGraphicsEvent = null;
|
|
|
let featurePointsPlottingEvent = null;
|
|
|
let currentShowGridId = null;
|
|
|
onMounted(() =>{
|
|
@@ -1447,6 +1449,10 @@ export default {
|
|
|
})
|
|
|
messages.forEach(message => {
|
|
|
if(message.overall == "SAFE"){
|
|
|
+ addGraphics({
|
|
|
+ "id": message.uavid+'_conflict',
|
|
|
+ "status": "hide"
|
|
|
+ });
|
|
|
pathPipe({
|
|
|
"id": message.uavid+'_conflict',
|
|
|
"status": "hide"
|
|
@@ -1455,8 +1461,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"safe",
|
|
@@ -1469,23 +1475,36 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"conflict",
|
|
|
data:message.nearestAircraft
|
|
|
}
|
|
|
});
|
|
|
+ debugger
|
|
|
+ addGraphics({
|
|
|
+ id: message.uavid+'_conflict',
|
|
|
+ status: "show",
|
|
|
+ data: {
|
|
|
+ "geometry": { "type": "point", "x": message.nearestAircraft.conflictPoint[0], "y": message.nearestAircraft.conflictPoint[1], "z": message.nearestAircraft.conflictPoint[2] },
|
|
|
+ "attributes": { "name": "碰撞点位" }
|
|
|
+ }
|
|
|
+ });
|
|
|
pathPipe({
|
|
|
"id": message.uavid+'_conflict',
|
|
|
"status": "show",
|
|
|
"paths":[message.nearestAircraft.conflictPath],
|
|
|
"color": "#FF0000",
|
|
|
"intensity": 1.5,
|
|
|
- "pipeRadius": 6
|
|
|
+ "pipeRadius": 10
|
|
|
});
|
|
|
}else{
|
|
|
+ addGraphics({
|
|
|
+ "id": message.uavid+'_conflict',
|
|
|
+ "status": "hide"
|
|
|
+ });
|
|
|
pathPipe({
|
|
|
"id": message.uavid+'_conflict',
|
|
|
"status": "hide"
|
|
@@ -1497,8 +1516,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"noFlyZone",
|
|
@@ -1511,8 +1530,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"routeDeviate",
|
|
@@ -1525,8 +1544,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"electricityWarning",
|
|
@@ -1539,8 +1558,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"collision",
|
|
@@ -1553,8 +1572,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"clearZone",
|
|
@@ -1566,8 +1585,8 @@ export default {
|
|
|
id:message.id,
|
|
|
uavid:message.uavid,
|
|
|
status:message.routeInfoVO.status == 3?"hide":"show",
|
|
|
- duration:message.time + 1000,
|
|
|
- //duration:3000,
|
|
|
+ //duration:message.time + 100,
|
|
|
+ duration:2100,
|
|
|
point:message.position_cj,
|
|
|
uavInfo: {
|
|
|
type:"safe",
|
|
@@ -1844,13 +1863,13 @@ export default {
|
|
|
status: params.status,
|
|
|
data:routeList.points
|
|
|
});
|
|
|
- routeList.uavList.forEach((item) =>{
|
|
|
+ routeList.conflictList.forEach((item) =>{
|
|
|
item.status = params.status =="show"?1:3
|
|
|
})
|
|
|
//先加载所有的无人机和航线
|
|
|
getRealFlyPoint({
|
|
|
status: params.status,
|
|
|
- flyList:params.status=="show"?routeList.uavList:routeList.uavList
|
|
|
+ flyList:params.status=="show"?routeList.conflictList:routeList.conflictList
|
|
|
})
|
|
|
|
|
|
}
|
|
@@ -1944,6 +1963,32 @@ export default {
|
|
|
})
|
|
|
m_map.add(symbolPointCubeEvent.graphicsLayer);
|
|
|
}
|
|
|
+
|
|
|
+ function addGraphics(params){
|
|
|
+ let status = params.status;
|
|
|
+ let id = params.id;
|
|
|
+ if(status == "hide"){
|
|
|
+ let idGraphic = m_view.graphics.find(item => item.id === id);
|
|
|
+ if(idGraphic){
|
|
|
+ m_view.graphics.remove(idGraphic);
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let idGraphic = m_view.graphics.find(item => item.id === id);
|
|
|
+ if(idGraphic && JSON.stringify(params.data.geometry) == JSON.stringify(idGraphic.geometry)){
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ m_view.graphics.remove(idGraphic);
|
|
|
+ addGraphicsEvent = new AddGraphicsEvent({
|
|
|
+ id,
|
|
|
+ view:m_view,
|
|
|
+ data:params.data,
|
|
|
+ imgType:params.imgType
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
function featurePointsPlotting(params){
|
|
|
let status = params.status;
|
|
|
let f_layer = m_map.layers.find(item => item.id === "featurePointsPlottingEvent");
|
|
@@ -1956,7 +2001,8 @@ export default {
|
|
|
//params.data = Path.paths_point;
|
|
|
featurePointsPlottingEvent = new FeaturePointsPlottingEvent({
|
|
|
view:m_view,
|
|
|
- data:params.data
|
|
|
+ data:params.data,
|
|
|
+ imgType:params.imgType
|
|
|
})
|
|
|
m_map.add(featurePointsPlottingEvent.featureLayer);
|
|
|
}
|