From 1d25d355cb0efc9685a8ad5c870b5941b95ce9b8 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 30 三月 2021 09:11:57 +0800
Subject: [PATCH] 1

---
 HDL_APP_Project.sln                                                              |   14 -
 HDL-ON_Android/Assets/Language.ini                                               |    3 
 HDL-ON_iOS/HDL-ON_iOS.csproj                                                     |    2 
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs |    3 
 HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs                  |  150 ++++++++++++
 HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png            |    0 
 HDL_ON/HDL_ON.projitems                                                          |    1 
 HDL_ON/Entity/FunctionList.cs                                                    |   11 
 HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs                        |  388 +++++++++++++++++++++++++++++++
 HDL-ON_Android/HDL-ON_Android.csproj                                             |    8 
 HDL-ON_iOS/Resources/Language.ini                                                |    2 
 HDL_ON/Entity/Function/Function.cs                                               |   17 +
 HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs           |    2 
 HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png           |    0 
 HDL_ON/Common/R.cs                                                               |    2 
 .vs/HDL_APP_Project/xs/UserPrefs.xml                                             |   69 ++++-
 HDL_ON/UI/UI1-Login/LoginPage.cs                                                 |    1 
 17 files changed, 621 insertions(+), 52 deletions(-)

diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml
index 5196bc6..6806064 100644
--- a/.vs/HDL_APP_Project/xs/UserPrefs.xml
+++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml
@@ -1,19 +1,18 @@
-锘�<Properties StartupConfiguration="{09712674-2A38-407B-B1E2-560B2C352F9A}|Default">
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget." />
-  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs">
+锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default">
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS automaticSigning="False" PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" />
+  <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/Server/HttpServerRequest.cs">
     <Files>
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs" Line="249" Column="85" />
+      <File FileName="HDL_ON/DAL/Server/HttpUtil.cs" Line="19" Column="23" />
+      <File FileName="HDL_ON/Common/R.cs" Line="13" Column="43" />
+      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" Line="204" Column="18" />
       <File FileName="HDL-ON_iOS/Info.plist" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage_AddIrButton.cs" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/PirSend.cs" />
-      <File FileName="HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/Method.cs" />
-      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" />
-      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" />
-      <File FileName="HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs" />
-      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="404" Column="11" />
-      <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" />
-      <File FileName="HDL_ON/Entity/FunctionList.cs" />
-      <File FileName="HDL_ON/UI/UI1-Login/LoginPage.cs" />
+      <File FileName="HDL_ON/Entity/FunctionList.cs" Line="82" Column="10" />
+      <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="402" Column="25" />
+      <File FileName="HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs" Line="64" Column="1" />
+      <File FileName="HDL_ON/DAL/Mqtt/MqttClient.cs" Line="338" Column="1" />
+      <File FileName="../../Library/Containers/com.tencent.WeWorkMac/Data/Library/Application Support/WXWork/Data/1688852687634638/Cache/File/2021-03/DeviceTemperatureHistoryForm(1).cs" Line="401" Column="18" />
+      <File FileName="HDL_ON/DAL/Server/HttpServerRequest.cs" Line="55" Column="1" />
     </Files>
     <Pads>
       <Pad Id="ProjectPad">
@@ -21,19 +20,47 @@
           <Node name="HDL_APP_Project" expanded="True">
             <Node name="HDL_ON" expanded="True">
               <Node name="DAL" expanded="True">
-                <Node name="DriverLayer" expanded="True">
-                  <Node name="Control.cs" selected="True" />
-                </Node>
+                <Node name="DriverLayer" expanded="True" />
                 <Node name="Mqtt" expanded="True" />
+                <Node name="Server" expanded="True">
+                  <Node name="HttpServerRequest.cs" selected="True" />
+                </Node>
+              </Node>
+              <Node name="Entity" expanded="True">
+                <Node name="Function" expanded="True" />
               </Node>
               <Node name="UI" expanded="True">
+                <Node name="CSS" expanded="True" />
                 <Node name="UI1-Login" expanded="True" />
                 <Node name="UI2" expanded="True">
-                  <Node name="1-HomePage" expanded="True" />
+                  <Node name="2-Classification" expanded="True" />
+                  <Node name="4-PersonalCenter" expanded="True">
+                    <Node name="PirDevice" expanded="True" />
+                  </Node>
+                  <Node name="FuntionControlView" expanded="True">
+                    <Node name="1ContorlPage" expanded="True" />
+                    <Node name="Energy" expanded="True" />
+                    <Node name="EnvironmentalScience" expanded="True" />
+                  </Node>
                 </Node>
               </Node>
             </Node>
-            <Node name="HDL-ON_iOS" expanded="True" />
+            <Node name="HDL-ON_Android" expanded="True">
+              <Node name="Assets" expanded="True">
+                <Node name="Phone" expanded="True">
+                  <Node name="FunctionIcon" expanded="True">
+                    <Node name="Energy" expanded="True" />
+                  </Node>
+                </Node>
+              </Node>
+            </Node>
+            <Node name="HDL-ON_iOS" expanded="True">
+              <Node name="Resources" expanded="True">
+                <Node name="Phone" expanded="True">
+                  <Node name="FunctionIcon" expanded="True" />
+                </Node>
+              </Node>
+            </Node>
           </Node>
         </State>
       </Pad>
@@ -45,8 +72,8 @@
     <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String>
     <String>Shared.IOS/Shared.IOS.csproj</String>
   </DisabledProjects>
-  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
-  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.364c4b3158493098" />
+  <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" />
+  <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" />
   <MonoDevelop.Ide.DebuggingService.Breakpoints>
     <BreakpointStore />
   </MonoDevelop.Ide.DebuggingService.Breakpoints>
diff --git a/HDL-ON_Android/Assets/Language.ini b/HDL-ON_Android/Assets/Language.ini
index ffe1789..0ee9f16 100644
--- a/HDL-ON_Android/Assets/Language.ini
+++ b/HDL-ON_Android/Assets/Language.ini
@@ -411,6 +411,7 @@
 426=Air dry time
 427=Disinfect time
 428=Anion Time
+429=Real time power consumption: {0}kw
 
 429=H
 430=Min
@@ -422,6 +423,7 @@
 436=Added Devices
 437=Device List
 438=humidity:{0}%    air:{1}    wind:{2}
+
 
 
 1000=Indoor Humidity
@@ -1186,6 +1188,7 @@
 436=宸叉坊鍔犲姛鑳�
 437=璁惧鍒楄〃
 438=婀垮害:{0}%    绌烘皵:{1}    椋庨��:{2}绾�
+439=瀹炴椂鍔熻��: {0}kW
 
 1000=瀹ゅ唴婀垮害
 1001=绔ラ攣
diff --git a/HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png b/HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
new file mode 100644
index 0000000..73b0e18
--- /dev/null
+++ b/HDL-ON_Android/Assets/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
Binary files differ
diff --git a/HDL-ON_Android/HDL-ON_Android.csproj b/HDL-ON_Android/HDL-ON_Android.csproj
index 00f6003..50d8794 100644
--- a/HDL-ON_Android/HDL-ON_Android.csproj
+++ b/HDL-ON_Android/HDL-ON_Android.csproj
@@ -336,6 +336,7 @@
     <Folder Include="Assets\Phone\FunctionIcon\Electrical\ClothesHanger\" />
     <Folder Include="Assets\Phone\PirIcon\" />
     <Folder Include="Assets\Phone\VideoIcon\" />
+    <Folder Include="Assets\Phone\FunctionIcon\Energy\" />
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>
@@ -1076,16 +1077,11 @@
     <AndroidAsset Include="Assets\Phone\FunctionIcon\EnvirSensor\0.png" />
     <AndroidAsset Include="Assets\Phone\PirIcon\add.png" />
     <AndroidAsset Include="Assets\Phone\FunctionIcon\AC\More.png" />
+    <AndroidAsset Include="Assets\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" />
   </ItemGroup>
   <ItemGroup>
     <AndroidNativeLibrary Include="libs\armeabi-v7a\libelianjni.so" />
     <AndroidNativeLibrary Include="libs\armeabi-v7a\libjcore127.so" />
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\ys\ys.csproj">
-      <Project>{DF065E3F-C3A1-4908-9582-000974B7C290}</Project>
-      <Name>ys</Name>
-    </ProjectReference>
   </ItemGroup>
   <Import Project="..\HDL_ON\HDL_ON.projitems" Label="Shared" Condition="Exists('..\HDL_ON\HDL_ON.projitems')" />
   <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
diff --git a/HDL-ON_iOS/HDL-ON_iOS.csproj b/HDL-ON_iOS/HDL-ON_iOS.csproj
index 48b10a5..ad85c72 100644
--- a/HDL-ON_iOS/HDL-ON_iOS.csproj
+++ b/HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -446,6 +446,7 @@
         <Folder Include="Resources\Phone\FunctionIcon\ArmSensor\" />
         <Folder Include="Resources\Phone\FunctionIcon\Electrical\ClothesHanger\" />
         <Folder Include="Resources\Phone\FunctionIcon\EnvirSensor\" />
+        <Folder Include="Resources\Phone\FunctionIcon\Energy\" />
     </ItemGroup>
     <ItemGroup>
         <InterfaceDefinition Include="LaunchScreen.storyboard" />
@@ -1195,6 +1196,7 @@
       <BundleResource Include="Resources\Phone\FunctionIcon\EnvirSensor\TvocIcon.png" />
       <BundleResource Include="Resources\Phone\PirIcon\add.png" />
       <BundleResource Include="Resources\Phone\FunctionIcon\AC\More.png" />
+      <BundleResource Include="Resources\Phone\FunctionIcon\Energy\EnergyDrodDownIcon.png" />
     </ItemGroup>
     <ItemGroup>
       <ITunesArtwork Include="iTunesArtwork" />
diff --git a/HDL-ON_iOS/Resources/Language.ini b/HDL-ON_iOS/Resources/Language.ini
index 9851c94..0ee9f16 100644
--- a/HDL-ON_iOS/Resources/Language.ini
+++ b/HDL-ON_iOS/Resources/Language.ini
@@ -411,6 +411,7 @@
 426=Air dry time
 427=Disinfect time
 428=Anion Time
+429=Real time power consumption: {0}kw
 
 429=H
 430=Min
@@ -1187,6 +1188,7 @@
 436=宸叉坊鍔犲姛鑳�
 437=璁惧鍒楄〃
 438=婀垮害:{0}%    绌烘皵:{1}    椋庨��:{2}绾�
+439=瀹炴椂鍔熻��: {0}kW
 
 1000=瀹ゅ唴婀垮害
 1001=绔ラ攣
diff --git a/HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
new file mode 100644
index 0000000..73b0e18
--- /dev/null
+++ b/HDL-ON_iOS/Resources/Phone/FunctionIcon/Energy/EnergyDrodDownIcon.png
Binary files differ
diff --git a/HDL_APP_Project.sln b/HDL_APP_Project.sln
index 53170d1..6e5610f 100644
--- a/HDL_APP_Project.sln
+++ b/HDL_APP_Project.sln
@@ -9,8 +9,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Blufi", "HdlBluWi\Blufi.csproj", "{2DDF4C3C-6998-432E-9F43-6786D82F0630}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ys", "ys\ys.csproj", "{DF065E3F-C3A1-4908-9582-000974B7C290}"
-EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -57,17 +55,5 @@
 		{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Debug|iPhone.Build.0 = Debug|Any CPU
 		{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.ActiveCfg = Release|Any CPU
 		{2DDF4C3C-6998-432E-9F43-6786D82F0630}.Release|iPhone.Build.0 = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|Any CPU.Build.0 = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.ActiveCfg = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Debug|iPhone.Build.0 = Debug|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.ActiveCfg = Release|Any CPU
-		{DF065E3F-C3A1-4908-9582-000974B7C290}.Release|iPhone.Build.0 = Release|Any CPU
 	EndGlobalSection
 EndGlobal
diff --git a/HDL_ON/Common/R.cs b/HDL_ON/Common/R.cs
index fbf9563..906c11f 100644
--- a/HDL_ON/Common/R.cs
+++ b/HDL_ON/Common/R.cs
@@ -4,7 +4,7 @@
 {
     public static class StringId
     {
-        //public const int EnergyMonitoring = 439;
+        public const int RealTimePowerConsumption = 439;
         public const int EnvirSensorValueTip = 438;
         public const int DeviceList = 437;
         public const int AddedDevice = 436;
diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs
index 5b69485..a6beab4 100644
--- a/HDL_ON/Entity/Function/Function.cs
+++ b/HDL_ON/Entity/Function/Function.cs
@@ -1070,6 +1070,23 @@
         }
         #endregion
 
+        #region 鑳芥簮
+        /// <summary>
+        /// 鑳芥簮妯″潡
+        /// </summary>
+        public const string EnergyStandard = "energy.standard";
+        /// <summary>
+        /// 鑳芥簮spk鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public static List<string> EnergySpkList()
+        {
+            var spkList = new List<string>();
+            spkList.Add(EnergyStandard);
+            return spkList;
+        }
+        #endregion
+
         #region 闊充箰
         /// <summary>
         /// 锛堥煶涔愶級
diff --git a/HDL_ON/Entity/FunctionList.cs b/HDL_ON/Entity/FunctionList.cs
index 3b7972c..d0cb2e8 100644
--- a/HDL_ON/Entity/FunctionList.cs
+++ b/HDL_ON/Entity/FunctionList.cs
@@ -80,6 +80,17 @@
             var spkList = SPK.AirFreshSpkList();
             return Functions.FindAll((obj) => spkList.Contains(obj.spk));
         }
+
+        /// <summary>
+        /// 鑳芥簮鍒楄〃
+        /// </summary>
+        /// <returns></returns>
+        public List<Function> GetEnergyList()
+        {
+            var spkList = SPK.EnergySpkList();
+            return Functions.FindAll((obj) => spkList.Contains(obj.spk));
+        }
+
         #region 瀹剁數鍒楄〃 electricals
         /// <summary>
         /// 瀹剁數鍒楄〃
diff --git a/HDL_ON/HDL_ON.projitems b/HDL_ON/HDL_ON.projitems
index 51f3383..43cacb2 100644
--- a/HDL_ON/HDL_ON.projitems
+++ b/HDL_ON/HDL_ON.projitems
@@ -391,6 +391,7 @@
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Video\Send.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EnergyMainPage.cs" />
     <Compile Include="$(MSBuildThisFileDirectory)DAL\ThirdPartySdk\ESOnVideo.cs" />
+    <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Energy\EchartsOption_Energy.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="$(MSBuildThisFileDirectory)DAL\" />
diff --git a/HDL_ON/UI/UI1-Login/LoginPage.cs b/HDL_ON/UI/UI1-Login/LoginPage.cs
index 1ddf012..d059d91 100644
--- a/HDL_ON/UI/UI1-Login/LoginPage.cs
+++ b/HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -204,6 +204,7 @@
                 }
                 else
                 {
+                    //etAccount.Text = "13602944661";//kx
                     etAccount.Text = "18316120654";//鍑夐湼"18666455392";//13375012446//13602944661//tzy 18778381374
                     //15971583093 gs//tzy 274116637@qq.com//Sumant.Bhatia@havells.com 鍥藉鏈嶅姟鍣ㄦ祴璇�
                 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
new file mode 100644
index 0000000..839a35c
--- /dev/null
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EchartsOption_Energy.cs
@@ -0,0 +1,150 @@
+锘縰sing System;
+using System.Collections.Generic;
+
+namespace HDL_ON.UI.EchartsOption_Energy
+{
+    public class EchartsOption_Energy
+    {
+        ///// <summary>
+        ///// 
+        ///// </summary>
+        public EchartTitle title  = new EchartTitle();
+        /// <summary>
+        /// 
+        /// </summary>
+        public EchartTooltip tooltip;
+        /// <summary>
+        /// 
+        /// </summary>
+        public EchartGrid grid = new EchartGrid();
+        /// <summary>
+        /// 
+        /// </summary>
+        public Echart_xAxis xAxis = new Echart_xAxis();
+        /// <summary>
+        /// 
+        /// </summary>
+        public Echart_yAxis yAxis = new Echart_yAxis();
+        /// <summary>
+        /// 
+        /// </summary>
+        public List<EchartSeriesItem> series =new List<EchartSeriesItem>();
+
+        public EchartsOption_Energy()
+        {
+            tooltip = new EchartTooltip
+            {
+                trigger = "axis",
+            };
+        }
+    }
+
+    public class EchartTitle
+    {
+        public string text;
+    }
+
+    /// <summary>
+    /// 绾挎潯灞炴��
+    /// </summary>
+    public class EchartLineStyle
+    {
+        /// <summary>
+        /// 鍧愭爣杞村埢搴︾嚎瀹�
+        /// type   |   string
+        /// 鍙�夛細
+        /// 'solid'
+        /// 'dashed'
+        /// 'dotted'
+        /// </summary>
+        public string type = "solid";
+        /// <summary>
+        /// 
+        /// </summary>
+        public int width = 1;
+        /// <summary>
+        /// 鍒诲害绾跨殑棰滆壊
+        /// </summary>
+        public string color = "#333";
+    }
+
+
+    public class EchartTooltip
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public string trigger ="axis";
+    }
+
+    public class EchartGrid
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public string left = "3%";
+        /// <summary>
+        /// 
+        /// </summary>
+        public string right = "4%";
+        /// <summary>
+        /// 
+        /// </summary>
+        public string bottom = "3%";
+        /// <summary>
+        /// 
+        /// </summary>
+        public bool containLabel = true;
+    }
+
+    /// <summary>
+    /// 鍧愭爣杞村睘鎬�
+    /// </summary>
+    public class Echart_xAxis
+    {
+        public string type = "category";
+        public List<string> data = new List<string>();
+        public int offset = 5;
+        public bool boundaryGap = false;
+    }
+    /// <summary>
+    /// 鍧愭爣杞村睘鎬�
+    /// </summary>
+    public class Echart_yAxis
+    {
+        public string type = "value";
+    }
+
+    public class EchartSeriesItem
+    {
+        /// <summary>
+        /// 瀹㈠巺
+        /// </summary>
+        public string name = "";
+        /// <summary>
+        /// 
+        /// </summary>
+        public string type = "line";
+        /// <summary>
+        /// 
+        /// </summary>
+        public bool smooth = true;
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public List<int> data;
+
+        /// <summary>
+        /// none 鍘绘帀鎷愮偣
+        /// </summary>
+        public string symbol = "none";
+        /// <summary>
+        /// 绾挎潯鏍峰紡
+        /// </summary>
+        public EchartLineStyle lineStyle;
+
+
+    }
+
+}
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
index 14fba77..560fb7a 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Energy/EnergyMainPage.cs
@@ -1,5 +1,7 @@
 锘縰sing System;
 using System.Collections.Generic;
+using HDL_ON.DAL.Server;
+using HDL_ON.Entity;
 using HDL_ON.UI.CSS;
 using Shared;
 namespace HDL_ON.UI
@@ -7,26 +9,44 @@
     public class EnergyMainPage : FrameLayout
     {
         FrameLayout bodyView;
+
+        List<uint> colorList = new List<uint>(){0xFF80AEFF, 0xFFFFD154, 0xFFFF9D54, 0xFFFE6A6A, 0xFFB183C3, 0xFFADE764,
+                                        0xFFD7504B, 0xFFC6E579, 0xFFF4E001, 0xFFF0805A, 0xFF26C0C0};
+        List<string> colorList2 = new List<string>() {
+                                        "#80AEFF", "#FFD154", "#FF9D54", "#FE6A6A", "#B183C3", "#ADE764",
+                                        "#D7504B", "#C6E579", "#F4E001", "#F0805A", "#26C0C0"};
+                                        
         public EnergyMainPage()
         {
             bodyView = this;
         }
 
+        /// <summary>
+        /// 
+        /// </summary>
         public void LoadPage()
         {
             new TopViewDiv(bodyView, Language.StringByID(StringId.EnergyMonitoring)).LoadTopView();
             bodyView.BackgroundColor = CSS_Color.BackgroundColor;
 
+            var contentView = new VerticalScrolViewLayout()
+            {
+                Y = Application.GetRealHeight(64),
+                Height = Application.GetRealHeight(603),
+            };
+            bodyView.AddChidren(contentView);
+
+            #region 椤堕儴view
             var generalTableView = new FrameLayout()
             {
                 Gravity = Gravity.CenterHorizontal,
-                Y = Application.GetRealHeight(80),
+                Y = Application.GetRealHeight(16),
                 Width = Application.GetRealWidth(343),
                 Height = Application.GetRealWidth(148),
                 Radius = (uint)Application.GetRealWidth(5),
                 BackgroundColor = CSS_Color.MainBackgroundColor,
             };
-            bodyView.AddChidren(generalTableView);
+            contentView.AddChidren(generalTableView);
 
             TextButton btnTotalValue = new TextButton()
             {
@@ -58,18 +78,19 @@
             };
             generalTableView.AddChidren(btnTotalValueUint);
 
-            var btnValue = new Button()
+            var btnRealTimeData = new Button()
             {
                 X = Application.GetRealWidth(18),
                 Y = btnTotalValue.Bottom,
                 Width = Application.GetRealWidth(209),
                 Height = Application.GetRealWidth(28),
-                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextColor = CSS_Color.TextualColor,
                 TextSize = CSS_FontSize.SubheadingFontSize,
-                IsBold = true,
                 TextAlignment = TextAlignment.CenterLeft,
+                TextID = StringId.RealTimePowerConsumption,
             };
-            generalTableView.AddChidren(btnValue);
+            generalTableView.AddChidren(btnRealTimeData);
+            btnRealTimeData.Text = Language.StringByID(StringId.RealTimePowerConsumption).Replace("{0}", "0");
 
             var echartsView = new FrameLayout()
             {
@@ -97,6 +118,361 @@
             myEchartsView.ShowWithOption(echartRootJson);
 
 
+            var btnDrodDown = new Button()
+            {
+                Y = Application.GetRealWidth(118),
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealWidth(30),
+                UnSelectedImagePath = "FunctionIcon/Energy/EnergyDrodDownIcon.png",
+            };
+            generalTableView.AddChidren(btnDrodDown);
+
+            #endregion
+
+
+            var energyList = FunctionList.List.GetEnergyList();
+            var energyListView = new FrameLayout()
+            {
+                Y = generalTableView.Bottom + Application.GetRealWidth(8),
+                Height = Application.GetRealWidth(116 * energyList.Count) ,
+            };
+            contentView.AddChidren(energyListView);
+            int index = 0;
+            foreach(var energy in energyList)
+            {
+                EnergyRow(energy, energyListView, index);
+                index++;
+            }
+        }
+
+        public void ddd(FrameLayout contentView)
+        {
+
+            FrameLayout diagramView = new FrameLayout()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealWidth(420),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+                Radius = (uint)Application.GetRealWidth(12),
+                BorderColor = 0x00000000,
+                BorderWidth = 0,
+            };
+            contentView.AddChidren(diagramView);
+
+            #region 閫夋嫨鏁版嵁鏃ユ湡鑼冨洿
+            var showDataTypeView = new FrameLayout()
+            {
+                X = Application.GetRealWidth(183),
+                Y = Application.GetRealHeight(12),
+                Width = Application.GetRealWidth(144),
+                Height = Application.GetRealHeight(24),
+                BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png",
+            };
+            diagramView.AddChidren(showDataTypeView);
+
+            var btnShowHistroyData_Day = new Button()
+            {
+                Width = Application.GetRealWidth(48),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.PromptingColor2,
+                SelectedTextColor = CSS_Color.MainColor,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                IsSelected = true,
+                TextID = StringId.day,
+            };
+            showDataTypeView.AddChidren(btnShowHistroyData_Day);
+
+            var btnShowHistroyData_Week = new Button()
+            {
+                X = Application.GetRealWidth(48),
+                Width = Application.GetRealWidth(48),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.PromptingColor2,
+                SelectedTextColor = CSS_Color.MainColor,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                TextID = StringId.week,
+            };
+            showDataTypeView.AddChidren(btnShowHistroyData_Week);
+
+            var btnShowHistroyData_Month = new Button()
+            {
+                X = Application.GetRealWidth(48 * 2),
+                Width = Application.GetRealWidth(48),
+                TextAlignment = TextAlignment.Center,
+                TextColor = CSS_Color.PromptingColor2,
+                SelectedTextColor = CSS_Color.MainColor,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+                Text = DateTime.Now.Month.ToString() + Language.StringByID(StringId.month),
+            };
+            showDataTypeView.AddChidren(btnShowHistroyData_Month);
+            #endregion
+
+            var historyDataView = new FrameLayout()
+            {
+                Gravity = Gravity.CenterHorizontal,
+                Y = Application.GetRealHeight(52),
+                Width = Application.GetRealWidth(343 - 32),
+                Height = Application.GetRealHeight(270),
+            };
+            diagramView.AddChidren(historyDataView);
+
+            var myEchartsView = new MyEchartsViewOn();
+
+            historyDataView.AddChidren(myEchartsView);
+
+        }
+            /// <summary>
+            /// 璇诲彇浼犳劅鍣ㄥ巻鍙叉暟鎹�
+            /// </summary>
+            void ddd2(string curQueryType,Function function,int index)
+            {
+                var seriesList = new List<EchartSeriesItem>();
+                var loadPage = new Loading()
+                {
+                    LodingBackgroundColor = 0x88888888,
+                };
+                historyDataView.AddChidren(loadPage);
+
+                new System.Threading.Thread(() =>
+                {
+                    try
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            loadPage.Start(Language.StringByID(StringId.PleaseWait));
+                        });
+                        int i = 0;
+
+                        {
+                            var sensorType = function.spk.Split(".")[0];
+                            var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, function.deviceId, sensorType);
+
+                            if (revertObj != null)
+                            {
+                                if (revertObj.Code == StateCode.SUCCESS)
+                                {
+                                    var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
+
+                                    var sItem = new EchartSeriesItem
+                                    {
+                                        data = new List<int>(),
+                                        lineStyle = new EchartLineStyle()
+                                        {
+                                            color = colorList2[i],
+#if __IOS__
+                                            width = 5,
+#elif __ANDROID__
+                                        width = 2,
+#endif
+                                        },
+                                    };
+
+                                    foreach (var d in revertData)
+                                    {
+                                        echartRootJson.xAxis.data.Add(d.fieldName);
+                                        echartRootJson.yAxis.data.Add(d.fieldValue);
+                                    }
+                                    seriesList.Add(sItem);
+                                }
+                                else
+                                {
+                                    Application.RunOnMainThread(() =>
+                                    {
+                                        IMessageCommon.Current.ShowErrorInfoAlter("", true, 2, Language.StringByID(StringId.GetSensorHistoryFailed), false);
+                                    });
+                                }
+                            }
+                            i++;
+                        }
+
+                    }
+                    catch (Exception ex)
+                    {
+                        MainPage.Log($"sensor history error : {ex.Message}");
+                    }
+                    finally
+                    {
+                        Application.RunOnMainThread(() =>
+                        {
+                            loadPage.Hide();
+                        });
+                    }
+                })
+                { IsBackground = true }.Start();
+                EchartsOption echartRootJson = new EchartsOption();
+                echartRootJson.series = seriesList;
+
+
+#if __IOS__
+                echartRootJson.xAxis.axisLabel.fontSize = 22;
+                echartRootJson.yAxis.axisLabel.fontSize = 22;
+#else
+                    echartRootJson.xAxis.axisLabel.fontSize = 8;
+                    echartRootJson.yAxis.axisLabel.fontSize = 8;
+#endif
+                var echartRootJsonString = Newtonsoft.Json.JsonConvert.SerializeObject(echartRootJson);
+                myEchartsView.ShowWithOptionJsonString(echartRootJsonString);
+
+            }
+
+            var curQueryType = "";
+
+            void LoadEvent_ChangeSensorHistoryShowType()
+            {
+                btnShowHistroyData_Day.MouseUpEventHandler = (sender, e) =>
+                {
+                    showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg1.png";
+                    btnShowHistroyData_Day.IsSelected = true;
+                    btnShowHistroyData_Month.IsSelected = false;
+                    btnShowHistroyData_Week.IsSelected = false;
+                    curQueryType = "hour";
+                    LoadMothed_GetSensorHistoryData();
+                };
+
+                btnShowHistroyData_Month.MouseUpEventHandler = (sender, e) =>
+                {
+                    showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg3.png";
+                    btnShowHistroyData_Day.IsSelected = false;
+                    btnShowHistroyData_Month.IsSelected = true;
+                    btnShowHistroyData_Week.IsSelected = false;
+                    curQueryType = "week";
+                    LoadMothed_GetSensorHistoryData();
+                };
+                btnShowHistroyData_Week.MouseUpEventHandler = (sender, e) =>
+                {
+                    showDataTypeView.BackgroundImagePath = "FunctionIcon/EnvironmentalScience/SensorHistoryBg2.png";
+                    btnShowHistroyData_Day.IsSelected = false;
+                    btnShowHistroyData_Month.IsSelected = false;
+                    btnShowHistroyData_Week.IsSelected = true;
+                    curQueryType = "month";
+                    LoadMothed_GetSensorHistoryData();
+                };
+
+            }
+
+
+        /// <summary>
+        /// 
+        /// </summary>
+        public void EnergyRow(Function energy, FrameLayout view, int index)
+        {
+            var btnLine = new Button()
+            {
+                Y = Application.GetRealWidth(116 * index),
+                Height = Application.GetRealWidth(16),
+            };
+            view.AddChidren(btnLine);
+
+            var row = new FrameLayout()
+            {
+                Y = btnLine.Bottom,
+                Gravity = Gravity.CenterHorizontal,
+                Width = Application.GetRealWidth(343),
+                Height = Application.GetRealWidth(100),
+                Radius = (uint)Application.GetRealWidth(12),
+                BackgroundColor = CSS_Color.MainBackgroundColor,
+            };
+            view.AddChidren(row);
+
+            var btnColorTip = new Button()
+            {
+                X = Application.GetRealWidth(8),
+                Y = Application.GetRealWidth(16),
+                Width = Application.GetRealWidth(12),
+                Height = Application.GetRealWidth(12),
+                BackgroundColor = colorList[index],
+            };
+            row.AddChidren(btnColorTip);
+
+            var btnName = new Button()
+            {
+                X = Application.GetRealWidth(8 + 10 + 32),
+                Y = Application.GetRealHeight(10),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealHeight(24),
+                Text = energy.name,
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                TextSize = CSS_FontSize.TextFontSize,
+            };
+            row.AddChidren(btnName);
+
+            var btnFromFloor = new Button()
+            {
+                X = Application.GetRealWidth(8 + 10 + 32),
+                Y = Application.GetRealHeight(10 + 24),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealHeight(18),
+                Text = energy.GetRoomListName(),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.PromptingColor1,
+                TextSize = CSS_FontSize.PromptFontSize_FirstLevel,
+            };
+            row.AddChidren(btnFromFloor);
+
+            var btnValue = new Button()
+            {
+                X = Application.GetRealWidth(28),
+                Y = Application.GetRealWidth(57),
+                Width = Application.GetRealWidth(226),
+                Height = Application.GetRealWidth(43),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextSize = CSS_FontSize.HeadlineFontSize,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                Text = "---"
+            };
+            row.AddChidren(btnValue);
+
+
+            var btnSetting = new Button()
+            {
+                X = Application.GetRealWidth(291),
+                Y = Application.GetRealWidth(6),
+                Width = Application.GetMinRealAverage(32),
+                Height = Application.GetMinRealAverage(32),
+                UnSelectedImagePath = "Public/FuncInfoSetIcon.png",
+            };
+            row.AddChidren(btnSetting);
+
+            Button btnSeltSensorValue = new Button()
+            {
+                X = Application.GetRealWidth(16),
+                Y = Application.GetRealWidth(47),
+                Width = Application.GetRealWidth(200),
+                Height = Application.GetRealWidth(43),
+                TextAlignment = TextAlignment.CenterLeft,
+                TextColor = CSS_Color.FirstLevelTitleColor,
+                IsBold = true,
+                TextSize = CSS_FontSize.HeadlineFontSize,
+            };
+            row.AddChidren(btnSeltSensorValue);
+
+            Button btnShowData;
+            btnShowData = new Button()
+            {
+                X = Application.GetRealWidth(291),
+                Y = Application.GetRealWidth(62),
+                Width = Application.GetMinRealAverage(32),
+                Height = Application.GetMinRealAverage(32),
+                UnSelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIcon.png",
+                SelectedImagePath = "FunctionIcon/EnvironmentalScience/DiagramIconOn.png",
+                IsSelected = true,
+            };
+            row.AddChidren(btnShowData);
+
+            btnSetting.MouseUpEventHandler = (sender, e) =>
+            {
+                Action backAction = () =>
+                {
+                    btnName.Text = energy.name;
+                };
+                var infoView = new FunctionBaseInfoSetPage(energy, backAction);
+                MainPage.BasePageView.AddChidren(infoView);
+                infoView.LoadPage();
+                MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
+            };
+
         }
     }
 }
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
index cb2ca7a..7a2db65 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption.cs
@@ -301,7 +301,7 @@
         /// <summary>
         /// 
         /// </summary>
-        public List<string> data;
+        public List<string> data = new List<string>();
         /// <summary>
         /// 鍧愭爣杞村亸绉�
         /// </summary>
diff --git a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
index 29a41b3..aaa80a9 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalSensorPage.cs
@@ -944,10 +944,7 @@
 
         }
 
-        void LoadEvent_SwitchOtherRoomSensorData()
-        {
 
-        }
     }
 
     public class EnvironmentalSensorHistor

--
Gitblit v1.8.0