From ad8f813f5eddd66740b4e09801e4ea02ddf70a4a Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 19 二月 2025 15:58:22 +0800
Subject: [PATCH] 继续优化报表

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs |  429 +++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 300 insertions(+), 129 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
index 3512cd2..e376a27 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -20,16 +20,19 @@
             RegistBulkSetEvents();
         }
 
-
-
         #region 妯″瀷浜嬩欢
+
+        /// <summary>
+        /// 鑾峰彇妯″瀷浜嬩欢
+        /// </summary>
+        public event Func<XhsSchemeVmo, Task<Yw.Model.HydroModelInfo>> GetModelEvent;
 
         /// <summary>
         /// 鍒锋柊妯″瀷浜嬩欢
         /// </summary>
         public event Func<Task<Yw.Model.HydroModelInfo>> RefreshModelEvent;
 
-        #endregion
+        #endregion 妯″瀷浜嬩欢
 
         #region 鏂规浜嬩欢
 
@@ -37,12 +40,13 @@
         /// 鏇存柊鏂规浜嬩欢
         /// </summary>
         public event Action<XhsSchemeVmo> UpdateSchemeEvent;
+
         /// <summary>
         /// 绉婚櫎鏂规浜嬩欢
         /// </summary>
         public event Action<XhsSchemeVmo> RemoveSchemeEvent;
 
-        #endregion
+        #endregion 鏂规浜嬩欢
 
         #region 宸ュ喌浜嬩欢
 
@@ -50,20 +54,23 @@
         /// 鏂板宸ュ喌浜嬩欢
         /// </summary>
         public event Action<HydroWorkingVmo> AppendWorkingEvent;
+
         /// <summary>
         /// 鏇存柊宸ュ喌浜嬩欢
         /// </summary>
         public event Action<HydroWorkingVmo> UpdateWorkingEvent;
+
         /// <summary>
         /// 绉婚櫎宸ュ喌浜嬩欢
         /// </summary>
         public event Action<HydroWorkingVmo> RemoveWorkingEvent;
+
         /// <summary>
         /// 閲嶈浇宸ュ喌浜嬩欢
         /// </summary>
         public event Action<Dictionary<HydroWorkingVmo, bool>> ReloadWorkingEvent;
 
-        #endregion
+        #endregion 宸ュ喌浜嬩欢
 
         private HStation.Vmo.XhsProjectVmo _project = null;//椤圭洰
         private HStation.Vmo.XhsProjectSiteVmo _projectSite = null;//椤圭洰绔�
@@ -258,7 +265,7 @@
             return helper.GetPropStatusDbList();
         }
 
-        #endregion
+        #endregion 灞炴�х姸鎬�
 
         #region 鏇存敼鐘舵��
 
@@ -307,7 +314,7 @@
             return helper.GetRemoveParters();
         }
 
-        #endregion
+        #endregion 鏇存敼鐘舵��
 
         #region BIM鎺т欢
 
@@ -351,7 +358,7 @@
             this.tabPageBimface.Controls.Add(bimfaceCtrl);
         }
 
-        #endregion
+        #endregion BIM鎺т欢
 
         #region Q3d鎺т欢
 
@@ -388,7 +395,7 @@
             this.tabPageQ3d.Controls.Add(q3dCtrl);
         }
 
-        #endregion
+        #endregion Q3d鎺т欢
 
         #region 灞炴�ф帶浠�
 
@@ -530,7 +537,7 @@
             _propertyCtrl?.UpdateRows();
         }
 
-        #endregion
+        #endregion 灞炴�ф帶浠�
 
         #region 閫夋嫨鏋勪欢
 
@@ -700,7 +707,7 @@
             return helper.GetSourceList();
         }
 
-        #endregion
+        #endregion 鍙鍒楄〃
 
         #region 瑙嗗浘鍒楄〃
 
@@ -737,7 +744,7 @@
             return helper.GetVisual(code);
         }
 
-        #endregion
+        #endregion 瑙嗗浘鍒楄〃
 
         #region 鏄庣粏鎺т欢
 
@@ -839,7 +846,7 @@
             ShowVisualListCtrl();
         }
 
-        #endregion
+        #endregion 鏄庣粏鎺т欢
 
         #region 鏋勪欢鏄剧ず
 
@@ -890,7 +897,7 @@
 
         #endregion 鏋勪欢鏄剧ず
 
-        #endregion
+        #endregion 鏋勪欢鏄庣粏
 
         #region 涓�閿樉闅�
 
@@ -940,6 +947,7 @@
 
         //淇濆瓨閿佸畾瀵硅薄
         private object _locker_save = new();
+
         private bool _isSaving = false;//姝e湪淇濆瓨
 
         //淇濆瓨
@@ -982,10 +990,8 @@
 
             WaitFormHelper.ShowWaitForm("姝e湪淇濆瓨锛岃绋嶅悗...");
 
-
             var bol = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance
                 .Update(_hydroInfo, addParterList, updateParterList, removeParters);
-
 
             if (!bol)
             {
@@ -1608,7 +1614,7 @@
             }
         }
 
-        #endregion
+        #endregion 鎵归噺閰嶇疆
 
         #region 鏋勪欢鏌ヨ
 
@@ -1751,7 +1757,7 @@
             markHelper.Set();
         }
 
-        #endregion
+        #endregion 妯″瀷鏍囨敞
 
         #region 棰滆壊鍒嗙骇
 
@@ -1833,7 +1839,7 @@
             gradingHelper.Set();
         }
 
-        #endregion
+        #endregion 棰滆壊鍒嗙骇
 
         #region 浜哄伐鍒锋柊
 
@@ -2513,8 +2519,7 @@
             UpdatePropertyCtrl();
         }
 
-
-        #endregion
+        #endregion 鍘嬪姏鍒囨崲
 
         #region 璇勪环瑙勫垯
 
@@ -2567,7 +2572,7 @@
             ShowEvaluationDlg();
         }
 
-        #endregion
+        #endregion 璇勪环瑙勫垯
 
         #region 姘村姏璁$畻
 
@@ -2681,49 +2686,194 @@
             Calcu();
         }
 
-        #endregion
+        #endregion 姘村姏璁$畻
 
         #region 瀵煎嚭鎶ュ憡
 
-        private async void barBtnExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        //鍒涘缓鎵撳嵃淇℃伅
+        private async Task<SimulationPrintViewModel> CreatePrintInfo()
         {
-            if (_visual == null)
+            if (_project == null)
             {
-                SelectInputSource();
-                if (_visual == null)
+                return default;
+            }
+            if (_hydroInfo == null)
+            {
+                return default;
+            }
+
+            #region 宸ュ喌鍒楄〃
+
+            var allWorkingList = GetCheckedWorkingList();
+            if (allWorkingList == null || allWorkingList.Count < 1)
+            {
+                var working = GetWorking();
+                if (working == null)
                 {
-                    TipFormHelper.ShowWarn("璇烽�夋嫨鏋勪欢鍚庨噸璇曪紒");
-                    return;
+                    TipFormHelper.ShowWarn("璇疯绠楁垨閫夋嫨宸ュ喌鍚庨噸璇曪紒");
+                    return default;
                 }
+                allWorkingList = new List<HydroWorkingVmo>() { working };
             }
-            HydroVisualInfo visual = _visual;
-            if (_visual is HydroLinkInfo linkInfo)
+
+            #endregion 宸ュ喌鍒楄〃
+
+            #region 閫夋嫨鑺傜偣
+
+            var selectedNode = GetSelectNode();
+            if (selectedNode == null)
             {
-                var visualListHelper = GetVisualListHelper();
-                visual = visualListHelper.GetVisual(linkInfo.StartCode);
+                return default;
             }
+
+            #endregion 閫夋嫨鑺傜偣
+
+            var vm = new SimulationPrintViewModel();
+
+            #region 椤圭洰
+
+            vm.Project = new SimulationPrintProjectViewModel(_project);
+            if (_hydroInfo == null)
+            {
+                return vm;
+            }
+
+            #endregion 椤圭洰
+
+            #region 姘存车鍒楄〃
+
+            vm.PumpList = _hydroInfo.Pumps?.Select(x =>
+                {
+                    var pump = new SimulationPrintPumpViewModel(x);
+                    return pump;
+                }).ToList();
+
+            #endregion 姘存车鍒楄〃
+
+            #region 闄勫姞淇℃伅
 
             var allMonitorList = await GetMonitorList();
-            var working = GetWorking();
-            var calcuResult = GetCalcuResult();
+            var allEvaluationList = await GetEvaluationList();
 
-            var dlg = new SimulationWorkingReportDlg();
-            dlg.ReloadDataEvent += (vm) =>
+            #endregion 闄勫姞淇℃伅
+
+            #region 鍩虹妯″瀷
+
+            var baseHydroInfo = _hydroInfo;
+            if (_scheme != null)
             {
-                var fileName = FileDialogHelper.SaveWordDoc("瀵煎嚭Word鎶ュ憡");
-                if (string.IsNullOrEmpty(fileName))
+                baseHydroInfo = await GetModelEvent?.Invoke(null);
+            }
+            var baseHydroInfoRhs = baseHydroInfo.Adapt<Yw.Model.HydroModelInfo>();
+
+            #endregion 鍩虹妯″瀷
+
+            #region 閬嶅巻宸ュ喌
+
+            vm.WorkingList = new List<SimulationPrintWorkingViewModel>();
+            foreach (var working in allWorkingList)
+            {
+                baseHydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo);
+                var calcuResult = baseHydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList);
+
+                var printWorking = new SimulationPrintWorkingViewModel(working);
+                vm.WorkingList.Add(printWorking);
+
+                //绮惧害璇勪及
+                printWorking.Accuracy = SimulationPrintAccuracyHelper.Create(baseHydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                //姘存车鍒嗘瀽
+                printWorking.PumpAnaly = SimulationPrintPumpAnalyHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                //鐩戞祴鍒嗘瀽
+                printWorking.MonitorAnaly = SimulationPrintMonitorAnalyHelper.Create(baseHydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                //鑳借�楀垎鏋�
+                printWorking.EnergyAnaly = HydroEnergyAnalyHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                //鎹熷け缁熻
+                printWorking.LossStatistics = HydroLossStatisticsHelper.Create(baseHydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                //鎹熷け鏇茬嚎
+                printWorking.LossCurve = HydroLossCurveHelper.Create(baseHydroInfoRhs, working, selectedNode, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+            }
+
+            #endregion 閬嶅巻宸ュ喌
+
+            #region 鏂规澶勭悊
+
+            if (_scheme != null)
+            {
+                var hydroInfo = _hydroInfo;
+                var hydroInfoRhs = hydroInfo.Adapt<Yw.Model.HydroModelInfo>();
+                vm.Scheme = new SimulationPrintSchemeViewModel(_scheme);
+                foreach (var working in allWorkingList)
                 {
-                    return;
+                    hydroInfoRhs.UpdateWorkingInfo(working.WorkingInfo);
+                    var calcuResult = hydroInfoRhs.Calcu(Yw.EPAnet.CalcuMode.MinorLoss, _calcuPressModeIsHead, allEvaluationList);
+
+                    var printWorking = new SimulationPrintWorkingViewModel(working);
+                    vm.Scheme.WorkingList.Add(printWorking);
+
+                    //绮惧害璇勪及
+                    printWorking.Accuracy = SimulationPrintAccuracyHelper.Create(hydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                    //姘存车鍒嗘瀽
+                    printWorking.PumpAnaly = SimulationPrintPumpAnalyHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                    //鐩戞祴鍒嗘瀽
+                    printWorking.MonitorAnaly = SimulationPrintMonitorAnalyHelper.Create(hydroInfoRhs, allMonitorList, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                    //鑳借�楀垎鏋�
+                    printWorking.EnergyAnaly = HydroEnergyAnalyHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                    //鎹熷け缁熻
+                    printWorking.LossStatistics = HydroLossStatisticsHelper.Create(hydroInfoRhs, working, calcuResult, _calcuPressModeIsHead, allEvaluationList);
+                    //鎹熷け鏇茬嚎
+                    printWorking.LossCurve = HydroLossCurveHelper.Create(hydroInfoRhs, working, selectedNode, calcuResult, _calcuPressModeIsHead, allEvaluationList);
                 }
-                var reportHelper = new HStation.ReportFile.SimulationWorkingReportHelper();
-                reportHelper.Create(fileName, vm);
-                TipFormHelper.ShowInfo("瀵煎嚭鎴愬姛锛�");
-            };
-            dlg.SetBindingData(_project, _hydroInfo, allMonitorList, working, calcuResult, visual);
-            dlg.ShowDialog();
+            }
+
+            #endregion 鏂规澶勭悊
+
+            return vm;
         }
 
-        #endregion
+        //瀵煎嚭word
+        private async void barBtnExportWord_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        {
+            var printInfo = await CreatePrintInfo();
+            var printDlg = new HStation.WinFrmUI.XtraForm1();
+            printDlg.SetBindingData(printInfo);
+            printDlg.ShowDialog();
+            /*    if (_visual == null)
+                {
+                    SelectInputSource();
+                    if (_visual == null)
+                    {
+                        TipFormHelper.ShowWarn("璇烽�夋嫨鏋勪欢鍚庨噸璇曪紒");
+                        return;
+                    }
+                }
+                HydroVisualInfo visual = _visual;
+                if (_visual is HydroLinkInfo linkInfo)
+                {
+                    var visualListHelper = GetVisualListHelper();
+                    visual = visualListHelper.GetVisual(linkInfo.StartCode);
+                }
+
+                var allMonitorList = await GetMonitorList();
+                var working = GetWorking();
+                var calcuResult = GetCalcuResult();
+
+                var dlg = new SimulationWorkingReportDlg();
+                dlg.ReloadDataEvent += (vm) =>
+                {
+                    var fileName = FileDialogHelper.SaveWordDoc("瀵煎嚭Word鎶ュ憡");
+                    if (string.IsNullOrEmpty(fileName))
+                    {
+                        return;
+                    }
+                    var reportHelper = new HStation.ReportFile.SimulationWorkingReportHelper();
+                    reportHelper.Create(fileName, vm);
+                    TipFormHelper.ShowInfo("瀵煎嚭鎴愬姛锛�");
+                };
+                dlg.SetBindingData(_project, _hydroInfo, allMonitorList, working, calcuResult, visual);
+                dlg.ShowDialog();*/
+        }
+
+        #endregion 瀵煎嚭鎶ュ憡
 
         #region 褰撳墠宸ュ喌
 
@@ -2788,7 +2938,7 @@
             AddWorking();
         }
 
-        #endregion
+        #endregion 褰撳墠宸ュ喌
 
         #region 閫夋嫨宸ュ喌
 
@@ -2885,7 +3035,7 @@
             dlg.ShowDialog();
         }
 
-        #endregion
+        #endregion 閫夋嫨宸ュ喌
 
         #region 鐩戞祴鍒嗘瀽
 
@@ -2970,7 +3120,7 @@
             ShowMonitorAnalyListCtrl();
         }
 
-        #endregion
+        #endregion 鐩戞祴鍒嗘瀽
 
         #region 宸ュ喌鍒嗘瀽
 
@@ -2993,6 +3143,27 @@
                     }
                 }
             }
+        }
+
+        //鑾峰彇閫夋嫨鑺傜偣
+        private HydroNodeInfo GetSelectNode()
+        {
+            if (_visual == null)
+            {
+                SelectInputSource();
+                if (_visual == null)
+                {
+                    TipFormHelper.ShowWarn("璇烽�夋嫨鏋勪欢鍚庨噸璇曪紒");
+                    return null;
+                }
+            }
+            HydroVisualInfo visual = _visual;
+            if (_visual is HydroLinkInfo linkInfo)
+            {
+                var visualListHelper = GetVisualListHelper();
+                visual = visualListHelper.GetVisual(linkInfo.StartCode);
+            }
+            return visual as HydroNodeInfo;
         }
 
         //绮惧害璇勪及
@@ -3048,12 +3219,18 @@
         }
 
         //鑳芥晥鍒嗘瀽
-        private async void barBtnWorkingPower_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        private async void barBtnEnergyAnaly_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            var allMonitorList = await GetMonitorList();
-            var workingCheckedListHelper = GetWorkingCheckedListHelper();
-            var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList();
-            if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1)
+            if (_hydroInfo == null)
+            {
+                return;
+            }
+
+            var isHead = _calcuPressModeIsHead;
+            var allEvaluationList = await GetEvaluationList();
+
+            var workingList = GetCheckedWorkingList();
+            if (workingList == null || workingList.Count < 1)
             {
                 var workingHelper = GetWorkingHelper();
                 if (!workingHelper.Initialized)
@@ -3061,24 +3238,29 @@
                     TipFormHelper.ShowWarn("璇疯绠楀悗閲嶈瘯锛�");
                     return;
                 }
-                var dlg = new SimulationSingleWorkingEnergyDlg();
-                dlg.SetBindingData(workingHelper.Working, workingHelper.HydroInfo, allMonitorList, workingHelper.CalcuResult);
+                var dlg = new SimulationEnergyAnalyDlg();
+                dlg.SetBindingData(workingHelper.HydroInfo, workingHelper.Working, workingHelper.CalcuResult, isHead, allEvaluationList);
                 dlg.ShowDialog();
+                return;
             }
-            else
-            {
-                var dlg = new SimulationMultiWorkingEnergyDlg();
-                dlg.SetBindingData(_hydroInfo, allMonitorList, allCheckedWorkingList);
-                dlg.ShowDialog();
-            }
+            var workingDlg = new SimulationEnergyAnalyWorkingDlg();
+            workingDlg.SetBindingData(_hydroInfo, workingList, isHead, allEvaluationList);
+            workingDlg.ShowDialog();
         }
 
         //鎹熷け缁熻
-        private void barBtnWorkingLossStatistics_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        private async void barBtnWorkingLossStatistics_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            var workingCheckedListHelper = GetWorkingCheckedListHelper();
-            var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList();
-            if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1)
+            if (_hydroInfo == null)
+            {
+                return;
+            }
+            var hydroInfo = _hydroInfo.Adapt<Yw.Model.HydroModelInfo>();
+            var isHead = _calcuPressModeIsHead;
+            var allEvaluationList = await GetEvaluationList();
+
+            var workingList = GetCheckedWorkingList();
+            if (workingList == null || workingList.Count < 1)
             {
                 var workingHelper = GetWorkingHelper();
                 if (!workingHelper.Initialized)
@@ -3086,16 +3268,15 @@
                     TipFormHelper.ShowWarn("璇疯绠楀悗閲嶈瘯锛�");
                     return;
                 }
-                var dlg = new HydroSingleWorkingLossStatisticsDlg();
-                dlg.SetBindingData(workingHelper.HydroInfo);
+                var dlg = new HydroLossStatisticsDlg();
+                dlg.SetBindingData(hydroInfo, workingHelper.Working, workingHelper.CalcuResult, isHead, allEvaluationList);
                 dlg.ShowDialog();
+                return;
             }
-            else
-            {
-                var dlg = new HydroMultiWorkingLossStatisticsDlg();
-                dlg.SetBindingData(_hydroInfo, allCheckedWorkingList);
-                dlg.ShowDialog();
-            }
+
+            var workingDlg = new HydroLossStatisticsWorkingDlg();
+            workingDlg.SetBindingData(hydroInfo, workingList, isHead, allEvaluationList);
+            workingDlg.ShowDialog();
         }
 
         //缁煎悎鍒嗘瀽
@@ -3149,35 +3330,35 @@
 
         #region 鎹熷け鏇茬嚎
 
-        //鍗曞伐鍐垫崯澶辨洸绾挎帶浠�
-        private HydroSingleWorkingLossCurveInteropCtrl _singleWorkingLossCurveCtrl = null;
+        //鎹熷け鏇茬嚎浜や簰鎺т欢
+        private HydroLossCurveInteropCtrl _lossCurveInteropCtrl = null;
 
-        //鑾峰彇鍗曞伐鍐垫崯澶辨洸绾挎帶浠�
-        private HydroSingleWorkingLossCurveInteropCtrl GetSingleWorkingLossCurveCtrl()
+        //鑾峰彇鎹熷け鏇茬嚎浜や簰鎺т欢
+        private HydroLossCurveInteropCtrl GetLossCurveInteropCtrl()
         {
-            if (_singleWorkingLossCurveCtrl == null)
+            if (_lossCurveInteropCtrl == null)
             {
-                _singleWorkingLossCurveCtrl = new HydroSingleWorkingLossCurveInteropCtrl();
-                _singleWorkingLossCurveCtrl.Dock = DockStyle.Fill;
-                _singleWorkingLossCurveCtrl.HydroClickEvent += (code) =>
+                _lossCurveInteropCtrl = new HydroLossCurveInteropCtrl();
+                _lossCurveInteropCtrl.Dock = DockStyle.Fill;
+                _lossCurveInteropCtrl.HydroClickEvent += (code) =>
                 {
                     var visual = GetVisual(code);
                     SelectVisual(visual, eSimulationVisualSource.None);
                 };
-                _singleWorkingLossCurveCtrl.HydroSpecialDisplayEvent += (list) =>
+                _lossCurveInteropCtrl.HydroSpecialDisplayEvent += (list) =>
                 {
                     _bimfaceCtrl?.SetLogicOutlineGlowEffect(list);
                 };
-                _singleWorkingLossCurveCtrl.HydroCancelSpecialDisplayEvent += () =>
+                _lossCurveInteropCtrl.HydroCancelSpecialDisplayEvent += () =>
                 {
                     _bimfaceCtrl?.RemoveLogicOutlineGlowEffect();
                 };
             }
-            return _singleWorkingLossCurveCtrl;
+            return _lossCurveInteropCtrl;
         }
 
-        //鍗曞伐鍐垫崯澶辨洸绾挎帶浠舵槸鍚﹀彲瑙�
-        private bool IsSingleWorkingLossCurveCtrlVisible
+        //鎹熷け鏇茬嚎鎺т欢鏄惁鍙
+        private bool IsLossCurveInteropCtrlVisible
         {
             get
             {
@@ -3185,7 +3366,7 @@
                 {
                     if (this.controlContainerBottom.Controls.Count > 0)
                     {
-                        if (this.controlContainerBottom.Controls[0] is HydroSingleWorkingLossCurveInteropCtrl)
+                        if (this.controlContainerBottom.Controls[0] is HydroLossCurveInteropCtrl)
                         {
                             return true;
                         }
@@ -3195,43 +3376,43 @@
             }
         }
 
-        //鏄剧ず鍗曞伐鍐垫崯澶辨洸绾挎帶浠�
-        private void ShowSingleWorkingLossCurveCtrl(Yw.Model.HydroModelInfo hydroInfo, HydroCalcuResult calcuResult, HydroVisualInfo visual)
+        //鏄剧ず鎹熷け鏇茬嚎鎺т欢
+        private void ShowLossCurveInteropCtrl
+            (
+                Yw.Model.HydroModelInfo hydroInfo,
+                HydroWorkingVmo working,
+                HydroNodeInfo node,
+                HydroCalcuResult calcuResult = null,
+                bool isHead = false,
+                List<HydroEvaluationVmo> allEvaluationList = null
+            )
         {
-            var singleWorkingLossCurveCtrl = GetSingleWorkingLossCurveCtrl();
-            if (!IsSingleWorkingLossCurveCtrlVisible)
+            var ctrl = GetLossCurveInteropCtrl();
+            if (!IsLossCurveInteropCtrlVisible)
             {
                 this.controlContainerBottom.Controls.Clear();
-                this.controlContainerBottom.Controls.Add(singleWorkingLossCurveCtrl);
+                this.controlContainerBottom.Controls.Add(ctrl);
                 this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible;
                 this.docPnlBottom.Text = "鎹熷け鏇茬嚎";
                 this.docPnlBottom.Height = 350;
             }
-            singleWorkingLossCurveCtrl.SetBindingData(hydroInfo, calcuResult, visual);
+            ctrl.SetBindingData(hydroInfo, working, node, calcuResult, isHead, allEvaluationList);
         }
 
         //鎹熷け鏇茬嚎
-        private void barBtnWorkingLossCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
+        private async void barBtnLossCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
         {
-            if (_visual == null)
+            var node = GetSelectNode();
+            if (node == null)
             {
-                SelectInputSource();
-                if (_visual == null)
-                {
-                    TipFormHelper.ShowWarn("璇烽�夋嫨鏋勪欢鍚庨噸璇曪紒");
-                    return;
-                }
-            }
-            HydroVisualInfo visual = _visual;
-            if (_visual is HydroLinkInfo linkInfo)
-            {
-                var visualListHelper = GetVisualListHelper();
-                visual = visualListHelper.GetVisual(linkInfo.StartCode);
+                return;
             }
 
-            var workingCheckedListHelper = GetWorkingCheckedListHelper();
-            var allCheckedWorkingList = workingCheckedListHelper.GetCheckedWorkingList();
-            if (allCheckedWorkingList == null || allCheckedWorkingList.Count < 1)
+            var isHead = _calcuPressModeIsHead;
+            var allEvaluationList = await GetEvaluationList();
+
+            var workingList = GetCheckedWorkingList();
+            if (workingList == null || workingList.Count < 1)
             {
                 var workingHelper = GetWorkingHelper();
                 if (!workingHelper.Initialized)
@@ -3239,21 +3420,16 @@
                     TipFormHelper.ShowWarn("璇疯绠楀悗閲嶈瘯锛�");
                     return;
                 }
-                ShowSingleWorkingLossCurveCtrl(workingHelper.HydroInfo, workingHelper.CalcuResult, visual);
+                ShowLossCurveInteropCtrl(workingHelper.HydroInfo, workingHelper.Working, node, workingHelper.CalcuResult, isHead, allEvaluationList);
+                return;
             }
-            else
-            {
-                var dlg = new HydroMultiWorkingLossCurveDlg();
-                dlg.HydroClickEvent += (code) =>
-                {
-                    SelectVisual(code, eSimulationVisualSource.None);
-                };
-                dlg.SetBindingData(_hydroInfo, allCheckedWorkingList, visual);
-                dlg.ShowDialog();
-            }
+
+            var dlg = new HydroLossCurveMultiWorkingDlg();
+            dlg.SetBindingData(_hydroInfo, workingList, node, _calcuPressModeIsHead, allEvaluationList);
+            dlg.ShowDialog();
         }
 
-        #endregion
+        #endregion 鎹熷け鏇茬嚎
 
         #region 鏂规绠$悊
 
@@ -3329,10 +3505,5 @@
         }
 
         #endregion 鏂规绠$悊
-
-
-
-
-
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3