From 507339d4f76fd848ac0a7abac1bfbe11f057be93 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Thu, 19 Feb 2026 20:47:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=95=B0=E6=8D=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E7=9A=84=E5=86=85=E5=AE=B9=E6=98=BE=E7=A4=BA=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=B1=BB=E5=88=AB=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Core/Database/BackupManager.cs | 4 ++-- src/UI/WPF/ViewModels/ModelSettingsViewModel.cs | 2 +- .../WPF/ViewModels/SystemManagementViewModel.cs | 16 ++++++++-------- src/UI/WPF/Views/SystemManagementView.xaml | 8 ++++---- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Core/Database/BackupManager.cs b/src/Core/Database/BackupManager.cs index d63f177..3d992d6 100644 --- a/src/Core/Database/BackupManager.cs +++ b/src/Core/Database/BackupManager.cs @@ -235,7 +235,7 @@ namespace NavisworksTransport.Core.Database info.PathRoutesCount = GetTableCount("PathRoutes"); info.PathPointsCount = GetTableCount("PathPoints"); info.PathEdgesCount = GetTableCount("PathEdges"); - info.ClashResultsCount = GetTableCount("ClashDetectiveResults"); + info.DetectionRecordsCount = GetTableCount("CollisionDetectionRecords"); info.ScreenshotsCount = GetTableCount("CollisionReportScreenshots"); return info; @@ -272,7 +272,7 @@ namespace NavisworksTransport.Core.Database public int PathRoutesCount { get; set; } public int PathPointsCount { get; set; } public int PathEdgesCount { get; set; } - public int ClashResultsCount { get; set; } + public int DetectionRecordsCount { get; set; } public int ScreenshotsCount { get; set; } public string FileSizeFormatted => $"{FileSize / 1024} KB"; diff --git a/src/UI/WPF/ViewModels/ModelSettingsViewModel.cs b/src/UI/WPF/ViewModels/ModelSettingsViewModel.cs index a5a165e..7bb17b4 100644 --- a/src/UI/WPF/ViewModels/ModelSettingsViewModel.cs +++ b/src/UI/WPF/ViewModels/ModelSettingsViewModel.cs @@ -314,7 +314,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels { if (logisticsModel?.NavisworksItem == null) { - LogManager.Error($"[ModelSettingsViewModel] 异常:试图加载空的物流模型或NavisworksItem!"); + // 正常情况:清除选择时传入null,无需处理 return; } diff --git a/src/UI/WPF/ViewModels/SystemManagementViewModel.cs b/src/UI/WPF/ViewModels/SystemManagementViewModel.cs index 132b190..5dbac2f 100644 --- a/src/UI/WPF/ViewModels/SystemManagementViewModel.cs +++ b/src/UI/WPF/ViewModels/SystemManagementViewModel.cs @@ -124,7 +124,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels set => SetProperty(ref _pathCount, value); } - public string CollisionRecordCount + public string DetectionRecordCount { get => _collisionRecordCount; set => SetProperty(ref _collisionRecordCount, value); @@ -932,14 +932,14 @@ namespace NavisworksTransport.UI.WPF.ViewModels var dbInfo = pathDatabase.Backup.GetDatabaseInfo(); DatabaseVersion = dbInfo.VersionFormatted; PathCount = dbInfo.PathRoutesCount.ToString(); - CollisionRecordCount = dbInfo.ClashResultsCount.ToString(); - LogManager.Debug($"数据库状态: 版本{dbInfo.VersionFormatted}, 路径{dbInfo.PathRoutesCount}, 点{dbInfo.PathPointsCount}, 边{dbInfo.PathEdgesCount}, 碰撞{dbInfo.ClashResultsCount}"); + DetectionRecordCount = dbInfo.DetectionRecordsCount.ToString(); + LogManager.Debug($"数据库状态: 版本{dbInfo.VersionFormatted}, 路径{dbInfo.PathRoutesCount}, 点{dbInfo.PathPointsCount}, 边{dbInfo.PathEdgesCount}, 碰撞{dbInfo.DetectionRecordsCount}"); } else { DatabaseVersion = "未连接"; PathCount = "--"; - CollisionRecordCount = "--"; + DetectionRecordCount = "--"; } } catch (Exception ex) @@ -985,7 +985,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels $"包含数据:\n" + $"- 路径: {info.PathRoutesCount} 条\n" + $"- 路径点: {info.PathPointsCount} 个\n" + - $"- 碰撞记录: {info.ClashResultsCount} 条\n" + + $"- 检测记录: {info.DetectionRecordsCount} 条\n" + $"- 截图: {info.ScreenshotsCount} 张", "备份成功", System.Windows.MessageBoxButton.OK, @@ -1073,7 +1073,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels $"当前数据:\n" + $"- 路径: {info.PathRoutesCount} 条\n" + $"- 路径点: {info.PathPointsCount} 个\n" + - $"- 碰撞记录: {info.ClashResultsCount} 条\n" + + $"- 检测记录: {info.DetectionRecordsCount} 条\n" + $"- 截图: {info.ScreenshotsCount} 张\n\n" + $"请重新启动 Navisworks 以加载恢复的数据。", "恢复成功", @@ -1132,7 +1132,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels $"路径数量: {info.PathRoutesCount} 条\n" + $"路径点: {info.PathPointsCount} 个\n" + $"路径边: {info.PathEdgesCount} 条\n" + - $"碰撞记录: {info.ClashResultsCount} 条\n" + + $"检测记录: {info.DetectionRecordsCount} 条\n" + $"截图: {info.ScreenshotsCount} 张", "检查结果", System.Windows.MessageBoxButton.OK, @@ -1177,7 +1177,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels // 双重确认 var result1 = System.Windows.MessageBox.Show( - "⚠️ 警告:此操作将永久删除所有路径和碰撞记录!\n\n" + + "⚠️ 警告:此操作将永久删除所有路径和检测记录!\n\n" + "建议先备份数据。\n\n" + "是否继续?", "确认清空数据", diff --git a/src/UI/WPF/Views/SystemManagementView.xaml b/src/UI/WPF/Views/SystemManagementView.xaml index 7170970..a1c32bc 100644 --- a/src/UI/WPF/Views/SystemManagementView.xaml +++ b/src/UI/WPF/Views/SystemManagementView.xaml @@ -66,8 +66,8 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav