From 427a7404bc5de2fedd3759667de4a2c39f1cefe0 Mon Sep 17 00:00:00 2001 From: "2248356998 qq.com" <2248356998@qq.com> Date: Thu, 11 Sep 2025 19:05:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0UI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Directory.Build.props | 6 ++-- .../Driver/Collect/CollectBase.cs | 1 - .../Components/QuickActions.razor.css | 2 +- .../Device/DeviceRuntimeInfo1.razor.cs | 34 ++++++++++++++----- .../Layout/MainLayout.razor.cs | 2 +- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 6a86186c9..607d55b37 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,9 +1,9 @@ - 10.11.37 - 10.11.37 - 10.11.37 + 10.11.38 + 10.11.38 + 10.11.38 10.11.5 10.11.4 8.0.20 diff --git a/src/Gateway/ThingsGateway.Gateway.Application/Driver/Collect/CollectBase.cs b/src/Gateway/ThingsGateway.Gateway.Application/Driver/Collect/CollectBase.cs index cfccd0bfb..b6c3adbd9 100644 --- a/src/Gateway/ThingsGateway.Gateway.Application/Driver/Collect/CollectBase.cs +++ b/src/Gateway/ThingsGateway.Gateway.Application/Driver/Collect/CollectBase.cs @@ -12,7 +12,6 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json.Linq; -using System; using System.Collections.Concurrent; using ThingsGateway.Common.Extension; diff --git a/src/Gateway/ThingsGateway.Gateway.Razor/Components/QuickActions.razor.css b/src/Gateway/ThingsGateway.Gateway.Razor/Components/QuickActions.razor.css index 844f09443..f86956a7a 100644 --- a/src/Gateway/ThingsGateway.Gateway.Razor/Components/QuickActions.razor.css +++ b/src/Gateway/ThingsGateway.Gateway.Razor/Components/QuickActions.razor.css @@ -48,7 +48,7 @@ } /*切换高度*/ .quickactions-list.is-open { - height: 300px; + height: 200px; } .quickactions-header { diff --git a/src/Gateway/ThingsGateway.Gateway.Razor/Pages/GatewayMonitorPage/Device/DeviceRuntimeInfo1.razor.cs b/src/Gateway/ThingsGateway.Gateway.Razor/Pages/GatewayMonitorPage/Device/DeviceRuntimeInfo1.razor.cs index d85c1df40..2a07caa69 100644 --- a/src/Gateway/ThingsGateway.Gateway.Razor/Pages/GatewayMonitorPage/Device/DeviceRuntimeInfo1.razor.cs +++ b/src/Gateway/ThingsGateway.Gateway.Razor/Pages/GatewayMonitorPage/Device/DeviceRuntimeInfo1.razor.cs @@ -76,18 +76,34 @@ public partial class DeviceRuntimeInfo1 : IDisposable { return; } - await DialogService.Show(new DialogOption() - { - IsScrolling = false, - ShowMaximizeButton = true, - Size = Size.ExtraExtraLarge, - Title = DeviceRuntime.Name, - Component = BootstrapDynamicComponent.CreateComponent(driver, new Dictionary() + var renderFragment = BootstrapDynamicComponent.CreateComponent(driver, new Dictionary() { {nameof(IDriverUIBase.Driver),DeviceRuntime.Driver}, - }) - }); + }).Render(); + if (renderFragment != null) + { + var option = new WinBoxOption() + { + Title = DeviceRuntime.Name, + ContentTemplate = renderFragment, + Max = false, + Width = "80%", + Height = "80%", + Top = "0%", + Left = "10%", + Background = "var(--bb-primary-color)", + Overflow = true + }; + await WinBoxService.Show(option); + } + } + + [Inject] + [NotNull] + private WinBoxService? WinBoxService { get; set; } + + #endif [Inject] diff --git a/src/ThingsGateway.Server/Layout/MainLayout.razor.cs b/src/ThingsGateway.Server/Layout/MainLayout.razor.cs index 3595e5902..7a73032cc 100644 --- a/src/ThingsGateway.Server/Layout/MainLayout.razor.cs +++ b/src/ThingsGateway.Server/Layout/MainLayout.razor.cs @@ -126,7 +126,7 @@ public partial class MainLayout : IDisposable if (context is TabItem tabItem) { await WinboxRender(tabItem.ChildContent, tabItem.Text); - await _tab.RemoveTab(tabItem); + //await _tab.RemoveTab(tabItem); } } [Inject]