This commit is contained in:
sjl
2025-02-26 19:44:27 +08:00
parent 8be96ca64e
commit 37cf3dfdd7

View File

@@ -943,6 +943,24 @@ const handleTest = async (val: string) => {
dialogTitle.value = val dialogTitle.value = val
if (val === '手动检测') { if (val === '手动检测') {
if (!socketClient.Instance) {
console.error('WebSocket 客户端实例不存在');
return;
}
socketClient.Instance.connect();
dataSocket.socketServe = socketClient.Instance;
dataSocket.socketServe.registerCallBack('aaa', (res: { code: number; }) => {
// 处理来自服务器的消息
//console.log('Received message:', res)
// 根据需要在这里添加更多的处理逻辑
if (res.code === 20000) {
ElMessage.error(message.message)
loading.close()
} else {
webMsgSend.value = res
}
})
if (testType === 'reTest') { if (testType === 'reTest') {
ElMessageBox.confirm('请选择复检检测方式', '设备复检', ElMessageBox.confirm('请选择复检检测方式', '设备复检',
{ {