| | |
| | | <script setup> |
| | | import { onBeforeUnmount, onMounted, onUnmounted, reactive, ref } from 'vue' |
| | | import { useRouter } from 'vue-router' |
| | | import { host, WebSocketHost } from '@/utils/constants' |
| | | import request from '@/utils/request' |
| | | import { closeWebSocket, initializeWebSocket } from '@/utils/WebSocketService' |
| | | // import { ref } from 'vue' |
| | |
| | | } |
| | | } |
| | | let socket = null |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks` |
| | | const socketUrl = `ws://${window.ipConfig.serverUrl}/api/cacheGlass/api/talk/edgTasks` |
| | | // 定义消息处理函数,更新 receivedData 变量 |
| | | const handleMessage = (data) => { |
| | | // 更新 tableData 的数据 |