diff --git a/SparkClient.sln.DotSettings.user b/SparkClient.sln.DotSettings.user index b08fda8..a0a0497 100644 --- a/SparkClient.sln.DotSettings.user +++ b/SparkClient.sln.DotSettings.user @@ -32,6 +32,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded diff --git a/SparkDB.db b/SparkDB.db index b479cf2..15e69da 100644 Binary files a/SparkDB.db and b/SparkDB.db differ diff --git a/ViewModel/Grading/GradingResultVM.cs b/ViewModel/Grading/GradingResultVM.cs index 2857c57..c30edc8 100644 --- a/ViewModel/Grading/GradingResultVM.cs +++ b/ViewModel/Grading/GradingResultVM.cs @@ -1044,7 +1044,7 @@ public class GradingResultVM : BaseViewModel { RowDetail row = new RowDetail(); row.itemName = GetName(testItemId); - + ViewportData.mockSel(testItemId); var data = DtResults.Where(x => x.TestItemId == testItemId).FirstOrDefault(); row.Avg = data != null ? data.Avg : ""; row.Dev = data != null ? data.Dev : ""; diff --git a/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs b/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs index 4a3824e..cfdc8be 100644 --- a/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs +++ b/Views/UserControl/ViewportData/Helper/ViewportHelperPro.cs @@ -425,22 +425,22 @@ public class ViewportHelperPro return result; } - public static List GenerateLineTextModelsByType(string type, Color4? textColor = null, + public static List GenerateLineTextModelsByType(PlaneType type, Color4? textColor = null, bool showAll = false) { - var planType = ViewportManager.DicValueParamToFacet[type]; + List entities = new List(); string planCode = ""; ViewportManager.ViewportTriangle.ForEach(e => { - if (e.PlaneType == planType && (e.PlaneCode==planCode || string.IsNullOrEmpty(planCode))) + if (e.PlaneType == type && (e.PlaneCode==planCode || string.IsNullOrEmpty(planCode))) { planCode = e.PlaneCode; entities.Add(e); } }); - - return GenerateLineTextModels(entities, textColor, showAll); + + return entities; } /// diff --git a/Views/UserControl/ViewportData/Helper/ViewportManager.cs b/Views/UserControl/ViewportData/Helper/ViewportManager.cs index c0789dd..03b6335 100644 --- a/Views/UserControl/ViewportData/Helper/ViewportManager.cs +++ b/Views/UserControl/ViewportData/Helper/ViewportManager.cs @@ -134,7 +134,29 @@ public class ViewportManager } ChooseAddModels.Clear(); } - + + public static void MockSelectFacet(string planTypeStr) + { + PlaneType planeType = PlaneType.Crown; + if (DicValueParamToFacet.ContainsKey(planTypeStr)) + { + planeType = DicValueParamToFacet[planTypeStr]; + } + else + { + ClearDicModels(); + return; + } + + List entities = ViewportHelperPro.GenerateLineTextModelsByType(planeType); + if (entities.Count <= 0) + { + ClearDicModels(); + } + ChooseTriangleCode = entities[0].TriangleCode; + ResetChooseAddModels(); + } + #region 面 - 数据固定绑定 // 选中面 -> 数据 public static Dictionary DicFacetToValueParam = new Dictionary() diff --git a/Views/UserControl/ViewportData/ViewportData.cs b/Views/UserControl/ViewportData/ViewportData.cs index 80122ab..3400c71 100644 --- a/Views/UserControl/ViewportData/ViewportData.cs +++ b/Views/UserControl/ViewportData/ViewportData.cs @@ -196,4 +196,10 @@ public class ViewportData return false; } } + + public void mockSel(string planKey) + { + ViewportManager.MockSelectFacet(planKey); + } + } \ No newline at end of file