wei
2021-10-14 9ab5bd54fadd8fc9c542b48c99a117a4e182669b
HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -179,6 +179,7 @@
                double tt = 0;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt);
                tt *= 100;//乘以100,小于1无法加载echart
                tt = Math.Round(tt, 2);
                list.Add(ene.name, tt.ToString());
            }
            myEchartsView_Pie.ShowWithOption(new EchartsOption_Pie().InitDateJson(list));
@@ -506,10 +507,13 @@
            row.Y = btnLine.Bottom;
            view.AddChidren(row);
            //记录需要更新的更新按钮
            listButton_value.Add(row.btnValue);
        }
        /// <summary>
        /// 记录需要更新的更新按钮
        /// </summary>
        public List<Button> listButton_value = new List<Button>();
        /// <summary>
@@ -530,7 +534,7 @@
                            var newValue = updataTemp.GetAttrState(FunctionAttributeKey.Power);
                            //if (newValue != btn.Text)
                            {
                                btn.Text = newValue;
                                btn.Text = Math.Round(double.Parse(newValue), 2).ToString();
                                UpdataValue();
                            }
                        }
@@ -553,17 +557,20 @@
            Dictionary<string, string> list = new Dictionary<string, string>();//饼图数据
            foreach (var ene in bodyView.energyList)
            {
                double power = 0;
                double power = 0.00;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out power);
                power = Math.Round(power, 2);
                totalValue += power;
                int realTimePower = 0;
                int.TryParse(ene.GetAttrState(FunctionAttributeKey.Power), out realTimePower);
                double realTimePower = 0;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.Power), out realTimePower);
                realtimeValue += realTimePower;
                realtimeValue = Math.Round(realtimeValue, 2);
                #region 饼图数据
                double tt = 0;
                double tt = 0.00;
                double.TryParse(ene.GetAttrState(FunctionAttributeKey.TotalElectricity), out tt);
                tt = Math.Round(tt, 2);
                tt *= 100;//乘以100,小于1无法加载echart
                list.Add(ene.name, tt.ToString());
                #endregion