| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import MachineLeft from './components/MachineLeft/MachineLeft.vue' |
| | | import MachineRight from './components/MachineRight/MachineRight.vue'; |
| | | import MachineLeft from '@/views/SignMachineNest/MachineLeft/MachineLeft.vue' |
| | | import MachineRight from '@/views/SignMachineNest/MachineRight/MachineRight.vue'; |
| | | import { useConnectWebSocket } from '../../utils/websocket/connect-websocket'; |
| | | import { getWebsocketUrl } from '@/websocket/util/config'; |
| | | import { EBizCode } from '@/utils/staticData/enums.js'; |
| | |
| | | |
| | | const messageHandler = (result) => { |
| | | let payload = JSON.parse(result) // 为了兼容聊天消息 |
| | | // console.log('payload', payload) |
| | | if (!payload) return |
| | | switch (payload.biz_code) { |
| | | case EBizCode.GatewayOsd: { |
| | |
| | | getFlightStatistics(singleUavHome.value.device_sn).then(res => { |
| | | if (res.data.code !== 0) return; |
| | | const result = res.data.data; |
| | | console.log(result); |
| | | console.log(result); |
| | | store.commit('setSingleTotal', result); |
| | | }) |
| | | }; |
| | |
| | | onUnmounted(() => { |
| | | connectWs?.value?.close(); |
| | | }); |
| | | </script> |
| | | </script> |