Merge remote-tracking branch 'origin/demo' into demo
| | |
| | | </div> |
| | | <a-row class="p5" v-if="showMonitor" justify="center" align="middle"> |
| | | <!-- <a-spin :spinning="spinning"> --> |
| | | <Jessibuca v-if="airPortUrl" :videoUrl="airPortUrl" width="100%" height="300px" /> |
| | | <Jessibuca v-if="airPortUrl" @timeout="airTimeout" :videoUrl="airPortUrl" width="100%" height="300px" /> |
| | | <!-- </a-spin> --> |
| | | </a-row> |
| | | <!-- 飞机--> |
| | |
| | | </a-button> |
| | | </a-col> |
| | | <a-col span="11"> |
| | | <a-button :disabled="deviceInfo.device?.mode_code == 14 || !deviceInfo.device?true:false" :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary" size="small" |
| | | <a-button :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary" size="small" |
| | | @click="openDeviceSetting"> |
| | | 操作 |
| | | </a-button> |
| | |
| | | <!-- 飞机直播 --> |
| | | <a-row class="p5" v-if="showAircraft"> |
| | | <!-- <a-spin :spinning="spinning"> --> |
| | | <Jessibuca v-if="aircraftUrl" :videoUrl="aircraftUrl" width="100%" height="300px" /> |
| | | <Jessibuca v-if="aircraftUrl" @timeout="flyTimeout" :videoUrl="aircraftUrl" width="100%" height="300px" /> |
| | | <!-- </a-spin> --> |
| | | </a-row> |
| | | <!-- 飞机图标信息 --> |
| | |
| | | message.error(error) |
| | | }) |
| | | } |
| | | // 机场视频超时说明可能直播被关闭需要重新开启直播 |
| | | const airTimeout = () => { |
| | | try { |
| | | onStart() |
| | | } catch (e) { |
| | | onClose() |
| | | } |
| | | } |
| | | const flyTimeout = () => { |
| | | try { |
| | | flyOnStart() |
| | | } catch (e) { |
| | | closeFly() |
| | | } |
| | | } |
| | | // 设备开始播放 |
| | | const onStart = async () => { |
| | | airPortUrl.value = '' |
| | | const videoId = droneList.value[droneIndex.value].value + '/' + cameraList.value[cameraIndex.value].value + '/' + videoList.value[videoIndex.value].value |
| | | const streamId = droneList.value[droneIndex.value].value + '-' + cameraList.value[cameraIndex.value].value + '-' + videoList.value[videoIndex.value].value |
| | | const liveURL = config.rtmpURL + streamId |
| | |
| | | store.state.deviceStatusEvent.deviceOnline = {} as DeviceStatus |
| | | } |
| | | if (Object.keys(data.deviceOffline).length !== 0) { |
| | | // deviceTsaUpdateHook.removeMarker(data.deviceOffline.sn) |
| | | if ((data.deviceOffline.sn === osdVisible.value.sn) || (osdVisible.value.is_dock && data.deviceOffline.sn === osdVisible.value.gateway_sn)) { |
| | | osdVisible.value.visible = false |
| | | store.commit('SET_OSD_VISIBLE_INFO', osdVisible) |
| | | } |
| | | store.state.deviceStatusEvent.deviceOffline = {} |
| | | } |
| | | }, |
| | |
| | | closeOsdWindow, |
| | | openDroneControl, |
| | | openFlySetting, |
| | | openDeviceSetting |
| | | openDeviceSetting, |
| | | airTimeout, |
| | | flyTimeout |
| | | } |
| | | } |
| | | }) |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onMounted, onUnmounted, ref, defineProps } from 'vue' |
| | | import { onMounted, onUnmounted, ref, defineProps, defineEmits } from 'vue' |
| | | import Jessibuca from '../../../public/jessibuca/jessibuca' |
| | | const props = defineProps({ |
| | | videoUrl: { |
| | |
| | | default: '200px' |
| | | } |
| | | }) |
| | | const emits = defineEmits(['timeout']) |
| | | let jessibuca: null | Jessibuca = null |
| | | const container = ref(null) |
| | | const buffer = ref(null) |
| | |
| | | |
| | | jessibuca.on('timeout', function () { |
| | | console.log('timeout') |
| | | emits('timeout') |
| | | }) |
| | | |
| | | jessibuca.on('start', function () { |
| | |
| | | await UnBind(v) |
| | | }) |
| | | store.commit('SET_OSD_VISIBLE_INFO', { ...query, visible: false }) |
| | | store.commit('SET_SELECT_WAYLINE_INFO', {}) |
| | | store.commit('SET_SELECT_DOCK_INFO', {}) |
| | | root.$router.push('/' + ERouterName.PROJECT_LIST) |
| | | } |
| | | return { |
| | |
| | | } |
| | | type Pagination = TableState['pagination'] |
| | | |
| | | const workspaceId = computed(() => store.state.common.projectId) |
| | | const workspaceId = computed(() => store.state.common.projectId || localStorage.getItem(ELocalStorageKey.WorkspaceId)) |
| | | const editableData: UnwrapRef<Record<string, Device>> = reactive({}) |
| | | const current = ref([EDeviceTypeName.Aircraft]) |
| | | |
| | |
| | | |
| | | const route = useRoute() |
| | | const store = useMyStore() |
| | | const workspaceId = ref(localStorage.getItem(ELocalStorageKey.WorkspaceId)!) |
| | | const workspaceId = computed(() => store.state.common.projectId || localStorage.getItem(ELocalStorageKey.WorkspaceId)) |
| | | const hmsVisible = new Map<string, boolean>() |
| | | const deviceInfo = computed(() => store.state.deviceState.deviceInfo) |
| | | const dockInfo = computed(() => store.state.deviceState.dockInfo) |
| | |
| | | }) |
| | | |
| | | const root = getRoot() |
| | | const workspaceId = computed(() => store.state.common.projectId) |
| | | const workspaceId = computed(() => store.state.common.projectId || localStorage.getItem(ELocalStorageKey.WorkspaceId)) |
| | | const deleteTip = ref(false) |
| | | const deleteWaylineId = ref<string>('') |
| | | const canRefresh = ref(true) |
| | |
| | | pagination.page++ |
| | | getWaylines() |
| | | }, 1000) |
| | | console.log(workspaceId.value) |
| | | }) |
| | | |
| | | function getWaylines () { |
| | |
| | | function selectRoute (wayline: WaylineFile) { |
| | | loading.value = true |
| | | getWayLineFile(workspaceId.value, wayline.id).then(res => { |
| | | console.log(res, 'res') |
| | | store.commit('SET_SELECT_WAYLINE_INFO', wayline) |
| | | initKmlFile(res.data) |
| | | }).finally(() => { |
| | |
| | | fileData.append('file', file, file.name) |
| | | await importKmzFile(workspaceId.value, fileData).then((res) => { |
| | | if (res.code === 0) { |
| | | message.success(`${file.name} file uploaded successfully`) |
| | | message.success(`${file.name} 文件上传成功`) |
| | | canRefresh.value = true |
| | | pagination.total = 0 |
| | | pagination.page = 1 |
| | |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import Sidebar from '/@/components/common/sidebar.vue' |
| | | import { EBizCode, ERouterName } from '/@/types' |
| | | import { EBizCode, ELocalStorageKey, ERouterName } from '/@/types' |
| | | import { getRoot } from '/@/root' |
| | | import { useMyStore } from '/@/store' |
| | | import { useConnectWebSocket } from '/@/hooks/use-connect-websocket' |
| | |
| | | |
| | | const root = getRoot() |
| | | const store = useMyStore() |
| | | const workspace_id = computed(() => store.state.common.projectId) |
| | | const workspace_id = computed(() => store.state.common.projectId || localStorage.getItem(ELocalStorageKey.WorkspaceId)) |
| | | const messageHandler = async (payload: any) => { |
| | | if (!payload) { |
| | | return |