From 505effa88b17ce8c3c7ac5403b76d9e5d0cfc2a5 Mon Sep 17 00:00:00 2001
From: wxr <wxr@hdlchina.com.cn>
Date: 星期一, 28 十月 2024 11:58:31 +0800
Subject: [PATCH] 谷歌版本问题修复
---
HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs | 76 ++++++++++++++++++++++++++++----------
1 files changed, 56 insertions(+), 20 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs
index 6a8adb8..2668f25 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/CacDayHistoryPage.cs
@@ -13,9 +13,16 @@
EchartsOption_BrokenLine brokenLine;
MyEchartsViewOn myEchartsView_Line;
string curQueryType = "hour";
- public CacDayHistoryPage()
+ string queryTime;
+ string functionId;
+ string time;
+ public CacDayHistoryPage(string functionId,string queryType, string time)
{
+ this.time = time;
+ this.functionId = functionId;
+ curQueryType = queryType;
bodyView = this;
+ queryTime = time;
}
@@ -24,15 +31,34 @@
/// </summary>
public void InitView()
{
- new TopViewDiv(bodyView, Language.StringByID(StringId.StatisticalChart24Hour)).LoadTopView();
+ var topview = new TopViewDiv(bodyView, Language.StringByID(StringId.StatisticalChart24Hour));
+ topview.maginY = 10;
+ topview.LoadTopView();
bodyView.BackgroundColor = CSS_Color.BackgroundColor;
var contentView = new FrameLayout()
{
- Y = Application.GetRealHeight(64),
+ Y = Application.GetRealHeight(74),
Height = Application.GetRealHeight(603),
};
bodyView.AddChidren(contentView);
+
+ var btnTitle = new Button()
+ {
+ Height = Application.GetRealHeight(60),
+ TextAlignment = TextAlignment.Center,
+ TextSize = CSS_FontSize.SubheadingFontSize,
+ TextColor = CSS_Color.FirstLevelTitleColor,
+ };
+ if(curQueryType == "room_temp")
+ {
+ btnTitle.Text = queryTime + "瀹ゅ唴娓╁害鍘嗗彶鏁版嵁";
+ }
+ else
+ {
+ btnTitle.Text = queryTime + "瀹ゅ唴婀垮害鍘嗗彶鏁版嵁";
+ }
+ contentView.AddChidren(btnTitle);
var historyDataView = new FrameLayout()
@@ -78,20 +104,22 @@
}, "#FF9D54");
brokenLine.yTitle = "(鈩�)";
brokenLine.xTitle = "";
- if (curQueryType != "hour")
- {
- brokenLine.xTitle = Language.StringByID(StringId.Date);
- }
+ //if (curQueryType != "hour")
+ //{
+ // brokenLine.xTitle = Language.StringByID(StringId.Date);
+ //}
var opString = brokenLine.InitOption();
- myEchartsView_Line.ShowWithOption(opString);
+ myEchartsView_Line.ShowWithOptionJsonString(opString);
+
#endif
+ //LoadMothed_GetHistoryData();
}
/// <summary>
/// 璇诲彇鍘嗗彶鏁版嵁
/// </summary>
- void LoadMothed_GetHistoryData(Function sr, bool isDel)
+ void LoadMothed_GetHistoryData()
{
var loadPage = new Loading()
@@ -109,8 +137,7 @@
loadPage.Start(Language.StringByID(StringId.PleaseWait));
});
- var sensorType = sr.spk.Split(".")[1];
- var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, sr.deviceId, "total_electricity");
+ var revertObj = new HttpServerRequest().GetSensorHistory("day_hour", functionId, curQueryType,time);
if (revertObj != null)
{
if (revertObj.Code == StateCode.SUCCESS)
@@ -126,19 +153,28 @@
}
brokenLine.InitXdataText(vs);
}
- if (sr.GetAttribute("ydata") == null)
- {
- sr.attributes.Add(new FunctionAttributes() { key = "ydata" });
- }
- sr.SetAttrState("ydata", brokenLine.InitYdataText(sr.name, revertData, sr.GetAttrState("color")) + ",");
+ //if (sr.GetAttribute("ydata") == null)
+ //{
+ // sr.attributes.Add(new FunctionAttributes() { key = "ydata" });
+ //}
+ //sr.SetAttrState("ydata",
+ brokenLine.InitYdataText("", revertData, "#FF9D54");// + ",");
}
}
- brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)";
- brokenLine.xTitle = Language.StringByID(StringId.timeMode);
- if (curQueryType != "hour")
+ brokenLine.yTitle = Language.StringByID(StringId.Uint);
+ if(curQueryType == "room_temp")
{
- brokenLine.xTitle = Language.StringByID(StringId.Date);
+ brokenLine.yTitle += ":掳C";
}
+ else
+ {
+ brokenLine.yTitle += ":%";
+ }
+ brokenLine.xTitle = Language.StringByID(StringId.timeMode);
+ //if (curQueryType != "hour")
+ //{
+ // brokenLine.xTitle = Language.StringByID(StringId.Date);
+ //}
var opString = brokenLine.InitOption();
Application.RunOnMainThread(() =>
--
Gitblit v1.8.0