().GetDeviceMethods(devId);
+ OtherMethods.AddOrUpdate(devId,data);
+ }
else
OtherMethods = new();
}
RenderFragment GetRenderFragment(VariableEditInput context)
{
+ if(!OtherMethods.ContainsKey(context.DeviceId))
+ {
+ DeviceChanged(context.DeviceId);
+ }
+
RenderFragment renderFragment = null;
renderFragment +=
@
@@ -247,17 +255,24 @@
@(context.Description(x => x.WriteExpressions))
+
+ @if(OtherMethods.ContainsKey(context.DeviceId))
+ {
+
- @(context.Description(x => x.OtherMethod))
- @(context.Description(x => x.OtherMethod))
+ u)
ItemValue=@(u =>u)
HideDetails=@("auto") Height="30"
- Dense>
-
-
+ Dense>
+
+
+
+ }
+
diff --git a/src/ThingsGateway.Web.Page/Page/DeviceStatusPage.razor b/src/ThingsGateway.Web.Page/Page/DeviceStatusPage.razor
index 75ac27c54..ee808ff53 100644
--- a/src/ThingsGateway.Web.Page/Page/DeviceStatusPage.razor
+++ b/src/ThingsGateway.Web.Page/Page/DeviceStatusPage.razor
@@ -357,7 +357,6 @@
-
@code {
private string _collectDeviceGroup;
private string _uploadDeviceGroup;
@@ -369,19 +368,21 @@
List _uploadDeviceCores = new();
void collectDeviceQuery()
{
- _collectDeviceCores = CollectDeviceHostService.CollectDeviceCores.WhereIf(!_collectDeviceGroup.IsNullOrEmpty(), a => a.Device.DeviceGroup == _collectDeviceGroup).ToList();
+ _collectDeviceCores = CollectDeviceHostService?.CollectDeviceCores?.WhereIf(!_collectDeviceGroup.IsNullOrEmpty(), a => a.Device.DeviceGroup == _collectDeviceGroup).ToList();
}
void uploadDeviceQuery()
{
- _uploadDeviceCores = UploadDeviceHostService.UploadDeviceCores.WhereIf(!_uploadDeviceGroup.IsNullOrEmpty(), a => a.Device.DeviceGroup == _uploadDeviceGroup).ToList();
+ _uploadDeviceCores = UploadDeviceHostService?.UploadDeviceCores?.WhereIf(!_uploadDeviceGroup.IsNullOrEmpty(), a => a.Device.DeviceGroup == _uploadDeviceGroup).ToList();
}
protected override async Task OnParametersSetAsync()
{
_collectDeviceGroups = CollectDeviceService.GetCacheList()?.Select(a => a.DeviceGroup)?.Where(a => a != null).Distinct()?.ToList();
_uploadDeviceGroups = UploadDeviceService.GetCacheList()?.Select(a => a.DeviceGroup)?.Where(a => a != null).Distinct()?.ToList();
+ collectDeviceQuery();
+ uploadDeviceQuery();
await base.OnParametersSetAsync();
}
-
+
private bool isDownExport;
[Inject]
IJSRuntime JS { get; set; }
@@ -424,8 +425,7 @@
DelayTimer.Elapsed += timer_Elapsed;
DelayTimer.AutoReset = true;
DelayTimer.Start();
- collectDeviceQuery();
- uploadDeviceQuery();
+
return base.OnInitializedAsync();
}
private BootstrapDynamicComponent _importComponent;
@@ -459,6 +459,7 @@
isRestart = true;
StateHasChanged();
await Task.Run(async () => await CollectDeviceHostService.UpDeviceThread(devId));
+ collectDeviceQuery();
}
}
catch (Exception ex)
@@ -480,6 +481,7 @@
isRestart = true;
StateHasChanged();
await Task.Run(() => UploadDeviceHostService.UpDeviceThread(devId));
+ uploadDeviceQuery();
}
}
catch (Exception ex)
@@ -512,6 +514,8 @@
StateHasChanged();
await Task.Run(async () => await CollectDeviceHostService.RestartDeviceThread());
+ collectDeviceQuery();
+ uploadDeviceQuery();
}
}
finally
diff --git a/src/ThingsGateway.sln b/src/ThingsGateway.sln
index 716447bd2..a32e858bf 100644
--- a/src/ThingsGateway.sln
+++ b/src/ThingsGateway.sln
@@ -66,6 +66,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EventSource", "EventSource"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThingsGateway.RabbitMQ", "Plugins\ThingsGateway.RabbitMQ\ThingsGateway.RabbitMQ.csproj", "{7D38A1C3-56FA-41CE-B541-9FF1B5A632F7}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThingsGateway.Foundation.Adapter.Siemens", "Plugins\ThingsGateway.Foundation.Adapter.Siemens\ThingsGateway.Foundation.Adapter.Siemens.csproj", "{A0C38DE3-56FD-4ECC-9599-372A4716A4C8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThingsGateway.Siemens", "Plugins\ThingsGateway.Siemens\ThingsGateway.Siemens.csproj", "{12D7E735-8DA0-47FB-849F-84C965E4C746}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Siemens", "Siemens", "{98BB0E39-0629-4619-A01B-4BEB0F8DE879}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -218,6 +224,22 @@ Global
{7D38A1C3-56FA-41CE-B541-9FF1B5A632F7}.Release|Any CPU.Build.0 = Release|Any CPU
{7D38A1C3-56FA-41CE-B541-9FF1B5A632F7}.Release|x86.ActiveCfg = Release|Any CPU
{7D38A1C3-56FA-41CE-B541-9FF1B5A632F7}.Release|x86.Build.0 = Release|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Debug|x86.Build.0 = Debug|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Release|x86.ActiveCfg = Release|Any CPU
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8}.Release|x86.Build.0 = Release|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Debug|x86.Build.0 = Debug|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Release|Any CPU.Build.0 = Release|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Release|x86.ActiveCfg = Release|Any CPU
+ {12D7E735-8DA0-47FB-849F-84C965E4C746}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -246,6 +268,9 @@ Global
{4141C657-56B0-40D9-BA52-9F53A6D9E338} = {D64E48AD-2937-4227-8270-63AEF3008374}
{968A381B-E354-4089-984D-7B32DF2A470D} = {D1DFBF11-65DE-49C8-9AE9-BFDFB66E129A}
{7D38A1C3-56FA-41CE-B541-9FF1B5A632F7} = {968A381B-E354-4089-984D-7B32DF2A470D}
+ {A0C38DE3-56FD-4ECC-9599-372A4716A4C8} = {98BB0E39-0629-4619-A01B-4BEB0F8DE879}
+ {12D7E735-8DA0-47FB-849F-84C965E4C746} = {98BB0E39-0629-4619-A01B-4BEB0F8DE879}
+ {98BB0E39-0629-4619-A01B-4BEB0F8DE879} = {D1DFBF11-65DE-49C8-9AE9-BFDFB66E129A}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {C44BAB06-0E6E-46A5-84A1-C9C94533DD4D}