修正数据管理的内容显示,修正类别自定义错误日志
This commit is contained in:
parent
d336f8302a
commit
507339d4f7
@ -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";
|
||||
|
||||
@ -314,7 +314,7 @@ namespace NavisworksTransport.UI.WPF.ViewModels
|
||||
{
|
||||
if (logisticsModel?.NavisworksItem == null)
|
||||
{
|
||||
LogManager.Error($"[ModelSettingsViewModel] 异常:试图加载空的物流模型或NavisworksItem!");
|
||||
// 正常情况:清除选择时传入null,无需处理
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -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" +
|
||||
"是否继续?",
|
||||
"确认清空数据",
|
||||
|
||||
@ -66,8 +66,8 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="路径数量:" Style="{StaticResource ParameterLabelStyle}" Width="100"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Content="{Binding PathCount}" Style="{StaticResource InfoTextStyle}"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="碰撞记录:" Style="{StaticResource ParameterLabelStyle}" Width="100"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="{Binding CollisionRecordCount}" Style="{StaticResource InfoTextStyle}"/>
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="检测记录:" Style="{StaticResource ParameterLabelStyle}" Width="100"/>
|
||||
<Label Grid.Row="2" Grid.Column="1" Content="{Binding DetectionRecordCount}" Style="{StaticResource InfoTextStyle}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- 数据操作按钮 -->
|
||||
@ -75,7 +75,7 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav
|
||||
<Button Content="💾 备份数据"
|
||||
Command="{Binding BackupDataCommand}"
|
||||
Style="{StaticResource ActionButtonStyle}"
|
||||
ToolTip="导出所有路径、碰撞记录和截图到备份文件"/>
|
||||
ToolTip="导出所有路径、检测记录和截图到备份文件"/>
|
||||
|
||||
<Button Content="📂 恢复数据"
|
||||
Command="{Binding RestoreDataCommand}"
|
||||
@ -90,7 +90,7 @@ NavisworksTransport 系统管理页签视图 - 采用与其他页签一致的Nav
|
||||
<Button Content="🗑️ 清空数据"
|
||||
Command="{Binding ClearAllDataCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
ToolTip="清空所有路径和碰撞记录(谨慎使用)"/>
|
||||
ToolTip="清空所有路径和检测记录(谨慎使用)"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- 自动备份设置 -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user