刘妍 4 days ago
commit c4ba5fb7e5

@ -49,6 +49,7 @@ const airPort = ref({
latitude: null,
longitude: null,
mode_code: null,
gateway: null,
});
const activeProject = ref('')
const DESIGN_WIDTH = 1912
@ -107,6 +108,7 @@ const connectionCallback = () => {
airPort.value.latitude = rs.data.latitude;
airPort.value.longitude = rs.data.longitude;
airPort.value.mode_code = rs.data.mode_code;
airPort.value.gateway = rs.gateway;
}
}
});

@ -791,12 +791,10 @@
//
//
let homeStartGraphic;
// let homeStartGraphic;
let homeStartGraphicLive;
//
// let homeStartGraphicLive;
let flyStartGraphic;
let graphic = null;
// //
@ -3116,6 +3114,7 @@
}
// //
let position = [props.homeAirport.longitude, props.homeAirport.latitude, 70];
console.log(1111111111111111111,position,props.homeAirport)
let airportImg =
props.homeAirport.mode_code == 4
? '/projecthome/work_airport.png'
@ -3125,14 +3124,17 @@
? '/projecthome/work_airport_live.png'
: '/projecthome/standby_airport_live.png';
//
let homeStartGraphic = graphicLayer.getGraphicById(`${props.homeAirport.gateway}`);
let homeStartGraphicLive = graphicLayer.getGraphicById(`${props.homeAirport.gateway}Live`);
if (homeStartGraphic && homeStartGraphicLive) {
homeStartGraphic.position = position;
homeStartGraphic.image = airportImg;
homeStartGraphicLive.position = position;
homeStartGraphicLive.image = airportLiveImg;
} else {
homeStartGraphic = new mars3d.graphic.BillboardEntity({
id: 'set-home-airport',
let newHomeStartGraphic = new mars3d.graphic.BillboardEntity({
id: `${props.homeAirport.gateway}`,
position: position,
style: {
image: airportImg,
@ -3151,8 +3153,8 @@
},
},
});
homeStartGraphicLive = new mars3d.graphic.BillboardEntity({
id: 'set-home-airport-live',
let newHomeStartGraphicLive = new mars3d.graphic.BillboardEntity({
id: `${props.homeAirport.gateway}Live`,
position: position,
style: {
image: airportLiveImg,
@ -3172,17 +3174,17 @@
},
},
});
homeStartGraphic.on(mars3d.EventType.click, function (event) {
newHomeStartGraphic.on(mars3d.EventType.click, function (event) {
emits('clickAirPort');
});
homeStartGraphicLive.on(mars3d.EventType.click, function (event) {
newHomeStartGraphicLive.on(mars3d.EventType.click, function (event) {
emits('changeAirportLive', true);
if (props.homeAirport.mode_code == 4) {
emits('changeUAVLive', true);
}
});
graphicLayer.addGraphic(homeStartGraphic);
graphicLayer.addGraphic(homeStartGraphicLive);
graphicLayer.addGraphic(newHomeStartGraphic);
graphicLayer.addGraphic(newHomeStartGraphicLive);
}
};
//

Loading…
Cancel
Save