|
|
@@ -40,128 +40,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 飞机OSD -->
|
|
|
- <div v-if="osdVisible.visible && !osdVisible.is_dock" v-drag-window class="osd-panel fz12">
|
|
|
- <div class="pl5 pr5 flex-align-center flex-row flex-justify-between"
|
|
|
- style="border-bottom: 1px solid #515151; height: 18%;">
|
|
|
- <div class="drag-title">
|
|
|
- <span>{{ osdVisible.callsign }}</span>
|
|
|
- </div>
|
|
|
- <a class="fz16" style="color: white;" @click="() => osdVisible.visible = false">
|
|
|
- <CloseOutlined />
|
|
|
- </a>
|
|
|
- </div>
|
|
|
- <div style="height: 82%;">
|
|
|
- <div class="osd">
|
|
|
- <a-row>
|
|
|
- <a-col span="4">
|
|
|
- <a-tooltip :title="osdVisible.model">
|
|
|
- <div style="width: 90%;" class="flex-column flex-align-center flex-justify-center">
|
|
|
- <span><a-image :src="M30" :preview="false" /></span>
|
|
|
- <span>{{ osdVisible.model }}</span>
|
|
|
- </div>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="20">
|
|
|
- <span>
|
|
|
- 飞行状态:
|
|
|
- </span>
|
|
|
- <span>
|
|
|
- {{ getTextByModeCode(deviceInfo.device.mode_code) }}
|
|
|
- </span>
|
|
|
- <div class="openLiveButton" @click="state.deviceLiveStatus = true" v-if="!state.deviceLiveStatus">
|
|
|
- 开启直播
|
|
|
- </div>
|
|
|
- <div class="openLiveButton" @click="state.deviceLiveStatus = false" v-else>
|
|
|
- 关闭直播
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <DeviceLive :sn="osdVisible.sn" v-if="state.deviceLiveStatus" />
|
|
|
- <a-row>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="GPS卫星数">
|
|
|
- <span>
|
|
|
- GPS
|
|
|
- <WifiOutlined />
|
|
|
- </span>
|
|
|
- <span class="ml10">{{ deviceInfo.device.position_state.gps_number }}</span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="RTK">
|
|
|
- <span>
|
|
|
- RTK
|
|
|
- </span>
|
|
|
- <span class="ml10">{{ deviceInfo.device.position_state.rtk_number }}</span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="电量">
|
|
|
- <span>电量</span>
|
|
|
- <span class="ml10">
|
|
|
- {{ deviceInfo.device.battery.capacity_percent + '%' }}
|
|
|
- </span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="风向速度">
|
|
|
- <span>W.S</span>
|
|
|
- <span class="ml10">{{ deviceInfo.device.wind_speed === str ? str : (deviceInfo.device.wind_speed /
|
|
|
- 10).toFixed(2) + ' m/s' }}</span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="海拔高度">
|
|
|
- <span>ASL</span>
|
|
|
- <span class="ml10">
|
|
|
- {{ deviceInfo.device.height === str ? str : deviceInfo.device.height.toFixed(2) + ' m' }}
|
|
|
- </span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="离地高度">
|
|
|
- <span>ALT</span>
|
|
|
- <span class="ml10">
|
|
|
- {{ deviceInfo.device.elevation === str ? str : deviceInfo.device.elevation.toFixed(2) + ' m' }}
|
|
|
- </span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="水平速度">
|
|
|
- <span>H.S</span>
|
|
|
- <span class="ml10">
|
|
|
- {{ deviceInfo.device.horizontal_speed === str ? str :
|
|
|
- deviceInfo.device.horizontal_speed.toFixed(2) + ' m/s' }}
|
|
|
- </span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- <a-col span="6">
|
|
|
- <a-tooltip title="当前高度">
|
|
|
- <span>H</span>
|
|
|
- <span class="ml10">
|
|
|
- {{ deviceInfo.device.home_distance === str ? str : deviceInfo.device.home_distance.toFixed(2) + ' m'
|
|
|
- }}
|
|
|
- </span>
|
|
|
- </a-tooltip>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="battery-slide" v-if="deviceInfo.device.battery.remain_flight_time !== 0">
|
|
|
- <div style="background: #535759;" class="width-100"></div>
|
|
|
- <div class="capacity-percent" :style="{ width: deviceInfo.device.battery.capacity_percent + '%' }"></div>
|
|
|
- <div class="return-home" :style="{ width: deviceInfo.device.battery.return_home_power + '%' }"></div>
|
|
|
- <div class="landing" :style="{ width: deviceInfo.device.battery.landing_power + '%' }"></div>
|
|
|
- <div class="white-point" :style="{ left: deviceInfo.device.battery.landing_power + '%' }"></div>
|
|
|
- <div class="battery" :style="{ left: deviceInfo.device.battery.capacity_percent + '%' }">
|
|
|
- {{ Math.floor(deviceInfo.device.battery.remain_flight_time / 60) }}:
|
|
|
- {{ 10 > (deviceInfo.device.battery.remain_flight_time % 60) ? '0' :
|
|
|
- '' }}{{ deviceInfo.device.battery.remain_flight_time % 60 }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <OsdInfoModal type="MANUAL" :osdInfo="osdVisible" :deviceInfo="deviceInfo"
|
|
|
+ v-if="osdVisible.visible && !osdVisible.is_dock" />
|
|
|
<!-- 机场OSD -->
|
|
|
<div v-if="osdVisible.visible && osdVisible.is_dock" v-drag-window class="osd-panel fz12">
|
|
|
<div class="drag-title fz16 pl5 pr5 flex-align-center flex-row flex-justify-between"
|
|
|
@@ -527,6 +407,7 @@ import {
|
|
|
} from '../utils/map-layer-utils'
|
|
|
import { postElementsReq } from '/@/api/layer'
|
|
|
import { MapDoodleType, MapElementEnum } from '/@/constants/map'
|
|
|
+import OsdInfoModal from '/@/components/onLineDevice/components/InfoModal.vue'
|
|
|
import { useGMapManage } from '/@/hooks/use-g-map'
|
|
|
import { useGMapCover } from '/@/hooks/use-g-map-cover'
|
|
|
import { useMouseTool } from '/@/hooks/use-mouse-tool'
|
|
|
@@ -554,7 +435,6 @@ import {
|
|
|
} from '@ant-design/icons-vue'
|
|
|
import { EDeviceTypeName, ELocalStorageKey } from '../types'
|
|
|
import DockControlPanel from './g-map/DockControlPanel.vue'
|
|
|
-import DeviceLive from './deviceLive/index.vue'
|
|
|
import { useDockControl } from './g-map/use-dock-control'
|
|
|
import DroneControlPanel from './g-map/DroneControlPanel.vue'
|
|
|
import { useConnectMqtt } from './g-map/use-connect-mqtt'
|
|
|
@@ -563,7 +443,6 @@ import FlightAreaActionIcon from './flight-area/FlightAreaActionIcon.vue'
|
|
|
import { EFlightAreaType } from '../types/flight-area'
|
|
|
import { useFlightArea } from './flight-area/use-flight-area'
|
|
|
import { useFlightAreaDroneLocationEvent } from './flight-area/use-flight-area-drone-location-event'
|
|
|
-import { getTextByModeCode } from '/@/utils/index'
|
|
|
|
|
|
export default defineComponent({
|
|
|
components: {
|
|
|
@@ -585,9 +464,9 @@ export default defineComponent({
|
|
|
RobotFilled,
|
|
|
ArrowUpOutlined,
|
|
|
ArrowDownOutlined,
|
|
|
+ OsdInfoModal,
|
|
|
DockControlPanel,
|
|
|
DroneControlPanel,
|
|
|
- DeviceLive,
|
|
|
CarryOutOutlined,
|
|
|
RocketOutlined,
|
|
|
LivestreamOthers,
|
|
|
@@ -609,7 +488,6 @@ export default defineComponent({
|
|
|
currentType: '',
|
|
|
coverIndex: 0,
|
|
|
isFlightArea: false,
|
|
|
- deviceLiveStatus: false,// 设备直播状态
|
|
|
})
|
|
|
|
|
|
// 点击切换地图类型
|
|
|
@@ -859,7 +737,11 @@ export default defineComponent({
|
|
|
setLayers(req)
|
|
|
const coordinates = req.resource.content.geometry.coordinates
|
|
|
updateCoordinates('gcj02-wgs84', req);
|
|
|
- await postElementsReq(shareId.value, req)
|
|
|
+ const data = {
|
|
|
+ ...req,
|
|
|
+ }
|
|
|
+ data.resource.content.geometry.coordinates = [...data.resource.content.geometry.coordinates, 0];
|
|
|
+ await postElementsReq(shareId.value, data)
|
|
|
obj.setExtData({ id: req.id, name: req.name })
|
|
|
const title = coordinates.map((item: any, index: number) => {
|
|
|
if (index < 2) {
|
|
|
@@ -1170,7 +1052,6 @@ export default defineComponent({
|
|
|
closeLivestreamAgora,
|
|
|
qualityStyle,
|
|
|
selectFlightAreaAction,
|
|
|
- getTextByModeCode,
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
@@ -1262,12 +1143,6 @@ export default defineComponent({
|
|
|
background-color: rgba(0, 0, 0, 0.8);
|
|
|
}
|
|
|
|
|
|
-.openLiveButton {
|
|
|
- padding: 5px;
|
|
|
- border: 1px solid #5c5c5c;
|
|
|
- cursor: pointer;
|
|
|
-}
|
|
|
-
|
|
|
.osd>div:not(.dock-control-panel) {
|
|
|
margin-top: 5px;
|
|
|
padding: 5px;
|