|
@@ -53,9 +53,15 @@ import routeList from '../config/routeList.json'
|
|
|
import {
|
|
|
getAvoidRoute,
|
|
|
getBuildingPoint,
|
|
|
- getNoFlyPointInterface, getPowerInterface, getPowerPoint, getPowerPointByPolygon, getProxyToken,
|
|
|
+ getNoFlyPointInterface,
|
|
|
+ getPowerInterface,
|
|
|
+ getPowerPoint,
|
|
|
+ getPowerPointByFunnel,
|
|
|
+ getPowerPointByPolygon,
|
|
|
+ getProxyToken,
|
|
|
getRiverPointInterface,
|
|
|
- getRoadPointInterface, gridBaseInfo
|
|
|
+ getRoadPointInterface,
|
|
|
+ gridBaseInfo
|
|
|
} from "../service/http.js";
|
|
|
import FeaturePointsPlottingEvent from "../units/map/FeaturePointsPlottingEvent.js";
|
|
|
import FeaturePolygonPlottingEvent from "../units/map/FeaturePolygonPlottingEvent.js";
|
|
@@ -64,7 +70,7 @@ import AddGraphicsEvent from "../units/map/AddGraphicsEvent.js";
|
|
|
import GeometryMeshEffect from "../units/map/GeometryMeshEffect.js";
|
|
|
import QueryIn2D from "../units/map/QueryIn2D.js";
|
|
|
import AddFlowPathEvent from "../units/map/AddFlowPathEvent.js";
|
|
|
-import MoveCarEvent from "../units/map/MoveCarEvent.js";
|
|
|
+import MovePointStreamEvent from "../units/map/MovePointStreamEvent.js";
|
|
|
export default {
|
|
|
name: "mapJK",
|
|
|
setup(){
|
|
@@ -103,7 +109,7 @@ export default {
|
|
|
let currentShowGridId = null;
|
|
|
let realFlyPointDataQueue = [];
|
|
|
let addFlowPathEvent = null;
|
|
|
- let moveCarEvent = null;
|
|
|
+ let movePointEvent = null;
|
|
|
onMounted(() =>{
|
|
|
bus.on('CreateMap',() =>{
|
|
|
MapReady = $.Deferred();
|
|
@@ -308,12 +314,15 @@ export default {
|
|
|
case "FlowPathEffect":
|
|
|
flowPathEffect(params);
|
|
|
break;
|
|
|
- case "MoveCar":
|
|
|
- moveCar(params);
|
|
|
+ case "MovePoint":
|
|
|
+ movePoint(params);
|
|
|
break;
|
|
|
case "GetOccupyCube":
|
|
|
getOccupyCube(params);
|
|
|
break;
|
|
|
+ case "GetFunnelCube":
|
|
|
+ getFunnelCube(params);
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
function setBackground(params){
|
|
@@ -2491,7 +2500,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
|
|
|
- function moveCar(params){
|
|
|
+ function movePoint(params){
|
|
|
let status = params.status;
|
|
|
const connectFlyPointWebSocket = (status) => {
|
|
|
if(status === "show"){
|
|
@@ -2505,10 +2514,10 @@ export default {
|
|
|
};
|
|
|
flyPointSocket.onmessage = (messageEvent) => {
|
|
|
let messages = JSON.parse(messageEvent.data);
|
|
|
- if(moveCarEvent){
|
|
|
- moveCarEvent.update(messages)
|
|
|
+ if(movePointEvent){
|
|
|
+ movePointEvent.update(messages)
|
|
|
}else{
|
|
|
- moveCarEvent = new MoveCarEvent({
|
|
|
+ movePointEvent = new MovePointStreamEvent({
|
|
|
view:m_view,
|
|
|
map:m_map,
|
|
|
data:messages
|
|
@@ -2527,9 +2536,9 @@ export default {
|
|
|
}
|
|
|
}else{
|
|
|
if(flyPointSocket){
|
|
|
- // if(moveCarEvent){
|
|
|
- // moveCarEvent.clear();
|
|
|
- // moveCarEvent = null;
|
|
|
+ // if(movePointEvent){
|
|
|
+ // movePointEvent.clear();
|
|
|
+ // movePointEvent = null;
|
|
|
// }
|
|
|
flyPointSocket.close();
|
|
|
}
|
|
@@ -2618,6 +2627,66 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ function getFunnelCube(params){
|
|
|
+ let id = params.id;
|
|
|
+ let lastId = params.lastId;
|
|
|
+ let status = params.status;
|
|
|
+ let level = params.level;
|
|
|
+ let coneHeight = params.coneHeight;
|
|
|
+ let cylinderHeight = params.cylinderHeight;
|
|
|
+ let topRadius = params.topRadius;
|
|
|
+ let bottomRadius = params.bottomRadius;
|
|
|
+ let point = params.point;
|
|
|
+ if(status === "hide"){
|
|
|
+ showThreeCubeDetail({
|
|
|
+ id:params.id,
|
|
|
+ status:"hide"
|
|
|
+ });
|
|
|
+ currentShowGridId = null;
|
|
|
+ return
|
|
|
+ }
|
|
|
+ showThreeCubeDetail({
|
|
|
+ id:params.lastId,
|
|
|
+ status:"hide"
|
|
|
+ });
|
|
|
+ currentShowGridId = id;
|
|
|
+ getSixPowerByFunnel({
|
|
|
+ id,
|
|
|
+ lastId,
|
|
|
+ status,
|
|
|
+ coneHeight,
|
|
|
+ cylinderHeight,
|
|
|
+ level,
|
|
|
+ topRadius,
|
|
|
+ bottomRadius,
|
|
|
+ point
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function getSixPowerByFunnel(params){
|
|
|
+ getPowerPointByFunnel({
|
|
|
+ point:params.point,
|
|
|
+ coneHeight:params.coneHeight,
|
|
|
+ cylinderHeight:params.cylinderHeight,
|
|
|
+ level: params.level,
|
|
|
+ topRadius: params.topRadius,
|
|
|
+ bottomRadius: params.bottomRadius,
|
|
|
+ }).then(res =>{
|
|
|
+ let size = {
|
|
|
+ x:res.data.data.list[0].boxSize.latLength,
|
|
|
+ y:res.data.data.list[0].boxSize.lonLength,
|
|
|
+ z:res.data.data.list[0].boxSize.height
|
|
|
+ }
|
|
|
+ debugger
|
|
|
+ showThreeCubeDetail({
|
|
|
+ "id":params.id,
|
|
|
+ "status":params.status,
|
|
|
+ "size":size,
|
|
|
+ "points":res.data.data.list,
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
|
|
|
})
|
|
|
}
|