| | |
| | | <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>M30</span> |
| | | <span>{{ DEVICE_NAME[`${osdVisible.device_domain}-${osdVisible.device_type}-${osdVisible.device_sub_type}`] }}</span> |
| | | </div> |
| | | </a-tooltip> |
| | | </div> |
| | | <div class="osd flex-1"> |
| | | <a-row class="mr-20" align="middle"> |
| | | <a-col span="9" |
| | | :style="!deviceInfo.device || deviceInfo.device?.mode_code === EModeCode.Disconnected ? 'color: red; font-weight: 700;' : 'color: rgb(25,190,107)'"> |
| | | {{ !deviceInfo.device ? EModeText[EModeCode.Disconnected] : EModeText[deviceInfo.device?.mode_code] |
| | | :style="deviceInfo.device || deviceInfo.device?.mode_code !== EModeCode.Disconnected ? 'color: rgb(25,190,107)' : deviceInfo.dock.basic_osd?.drone_in_dock === 0 ?'color: red; font-weight: 700;': '' "> |
| | | <!-- DroneInDockEnum[deviceInfo.dock.basic_osd?.drone_in_dock] --> |
| | | {{ deviceInfo.device ? EModeText[deviceInfo.device?.mode_code] : (deviceInfo.dock.basic_osd?.drone_in_dock === 1) ? '舱内关机' : EModeText[EModeCode.Disconnected] |
| | | }}</a-col> |
| | | <a-col span="15"> |
| | | <div style="width:100%;padding:0 5px;background-color: #5d5f61;color: #fff;font-size: 10px;">{{deviceInfo.device?.mode_code == 14 || !deviceInfo.device ? 'N/A' : '当前正常'}}</div> |
| | |
| | | </a-button> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row v-if="deviceInfo.device?.mode_code != 14 && deviceInfo.device" class="p5" align="middle" justify="space-between"> |
| | | <a-row class="p5" align="middle" justify="space-between"> |
| | | <a-col span="24"> |
| | | <a-button :class="[openDroneControl ? 'active-color' : 'unactive-color']" class="width-100" type="primary" |
| | | size="small" @click="openDeviceSetting"> |
| | | 操作 |
| | | 飞行控制 |
| | | </a-button> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | import { getLiveCapacity, startLivestream, stopLivestream } from '/@/api/manage' |
| | | import { |
| | | DeviceOsd, DeviceStatus, DockOsd, EGear, EModeCode, GatewayOsd, EDockModeCode, EDockModeText, EModeText, |
| | | NetworkStateQualityEnum, NetworkStateTypeEnum, RainfallEnum, DroneInDockEnum |
| | | NetworkStateQualityEnum, NetworkStateTypeEnum, RainfallEnum, DroneInDockEnum, DEVICE_NAME |
| | | } from '/@/types/device' |
| | | import pin from '/@/assets/icons/pin-2d8cf0.svg' |
| | | import M30 from '/@/assets/icons/m30.png' |
| | |
| | | // 关闭窗口 |
| | | const closeOsdWindow = () => { |
| | | store.commit('SET_OSD_VISIBLE_INFO', false) |
| | | showAircraft.value = false |
| | | aircrafIndex.value = -1 |
| | | aircraftUrl.value = '' |
| | | showMonitor.value = false |
| | | airPortUrl.value = '' |
| | | airPortOption.value = false |
| | | showMonitor.value = false |
| | | } |
| | | |
| | | // 打开监控权限 |
| | |
| | | if (showMonitor.value) { |
| | | loadVideo() |
| | | } else { |
| | | onClose() |
| | | airPortUrl.value = '' |
| | | // onClose() |
| | | } |
| | | } |
| | | // 打开飞机监控 |
| | |
| | | if (showAircraft.value) { |
| | | loadDroneVideo(type) |
| | | } else { |
| | | closeFly() |
| | | aircraftUrl.value = '' |
| | | // closeFly() |
| | | } |
| | | } |
| | | // 加载该设备的视频信息 |
| | |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | showMonitor.value = false |
| | | airPortUrl.value = '' |
| | | message.error(error) |
| | | }) |
| | | } |
| | |
| | | } |
| | | }) |
| | | .catch(error => { |
| | | showAircraft.value = false |
| | | aircrafIndex.value = -1 |
| | | message.error(error) |
| | | }) |
| | | } |
| | |
| | | try { |
| | | onStart() |
| | | } catch (e) { |
| | | onClose() |
| | | airPortUrl.value = '' |
| | | // onClose() |
| | | } |
| | | } |
| | | const flyTimeout = () => { |
| | | try { |
| | | flyOnStart() |
| | | } catch (e) { |
| | | closeFly() |
| | | aircraftUrl.value = '' |
| | | // closeFly() |
| | | } |
| | | } |
| | | // 设备开始播放 |
| | |
| | | const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0' |
| | | const streamId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '-' + aircraSelected.value + '-' + 'normal-0' |
| | | const liveURL = config.rtmpURL + streamId |
| | | console.log('飞机设备播放事件触发') |
| | | await startLivestream({ |
| | | url: liveURL, |
| | | video_id: videoId, |
| | |
| | | } = useDockControl() |
| | | // 关闭设备控制方法 |
| | | const closeOperate = (sn: string) => { |
| | | airPortOption.value = false |
| | | if (deviceInfo.dock.basic_osd?.mode_code === 2) { |
| | | onCloseControlPanel(sn) |
| | | } else { |
| | |
| | | str, |
| | | EDockModeCode, |
| | | EDockModeText, |
| | | DEVICE_NAME, |
| | | EModeText, |
| | | dockControlPanelVisible, |
| | | setDockControlPanelVisible, |