wuyouming666
2024-08-02 66ad819bd2e08f900f6b6249e74c74e9c761e4a6
UI-Project/src/views/UnLoadGlass/Landingindicationtwo.vue
@@ -114,6 +114,7 @@
    console.error(error);
  }
};
let socket =null; 
const socketUrl = `ws://${WebSocketHost}:${host}/api/unLoadGlass/api/talk/unloadglass3`;
// 定义消息处理函数,更新 receivedData 变量
@@ -143,18 +144,15 @@
  }
});
};
// 初始化 WebSocket,并传递消息处理函数
onMounted(() => {
  fetchFlowCardId(); // 获取数据
  socket =  initializeWebSocket(socketUrl, handleMessage);
});
onUnmounted(() => {
  console.log("关闭了")
    if (socket) {
  closeWebSocket(socket);
    }
});
const showCustomAlert = (downGlassInfoList) => {
  let tableContent = '<table border="1" style="border-collapse: collapse; width: 100%;">';
  tableContent += '<tr><th style="background-color: #f2f2f2;">玻璃ID</th><th style="background-color: #f2f2f2;">膜系</th><th style="background-color: #f2f2f2;">厚度</th><th style="background-color: #f2f2f2;">宽度</th><th style="background-color: #f2f2f2;">高度</th></tr>';