修复了添加设备OpcUa服务器地址为空的问题,修复了Opc后台服务退出的问题

This commit is contained in:
2025-07-10 21:24:20 +08:00
parent d1b99188d5
commit 1f4772ef3f
2 changed files with 142 additions and 86 deletions

View File

@@ -76,6 +76,9 @@ public partial class DevicesViewModel : ViewModelBase
return;
}
if (device.ProtocolType == ProtocolType.OpcUA)
device.OpcUaEndpointUrl = $"opc.tcp://{device.Ip}:{device.Prot}";
await _deviceRepository.Add(device);
}
catch (Exception e)