From eaaa2635f9ef5e431e00df922731a54c20cf7016 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 31 七月 2023 19:41:58 +0800
Subject: [PATCH] 三相空开备份
---
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs | 11 +++--
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs | 59 ++++++++++++-----------------
2 files changed, 32 insertions(+), 38 deletions(-)
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs
index fea4794..15ac8b0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs
@@ -493,6 +493,9 @@
};
totalElectricityView.AddChidren(btnTotalElectricity);
+
+ double totalNumber = 0.00;
+ double.TryParse(device.GetAttrState(FunctionAttributeKey.TotalElectricity), out totalNumber);
var btnTotalNumber = new Button()
{
Y = Application.GetRealHeight(27),
@@ -501,43 +504,43 @@
TextSize = 49,
TextColor = 0xFF030D1C,
TextAlignment = TextAlignment.Center,
- Text = device.GetAttrState(FunctionAttributeKey.TotalElectricity),
+ Text = totalNumber.ToString("F2"),
};
totalElectricityView.AddChidren(btnTotalNumber);
btnShowHistroyData_Day.MouseUpEventHandler += (sender, e) => {
totalElectricityView.RemoveFromParent();
historyDataView.AddChidren(myEchartsView_Line);
- viewa.Visible = true;
- viewb.Visible = true;
- viewc.Visible = true;
+ //viewa.Visible = true;
+ //viewb.Visible = true;
+ //viewc.Visible = true;
btnTip.TextID = StringId.AirSwitchP3HistroyTip1;
historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Month.MouseUpEventHandler += (sender, e) => {
totalElectricityView.RemoveFromParent();
historyDataView.AddChidren(myEchartsView_Line);
- viewa.Visible = true;
- viewb.Visible = true;
- viewc.Visible = true;
+ //viewa.Visible = true;
+ //viewb.Visible = true;
+ //viewc.Visible = true;
btnTip.TextID = StringId.AirSwitchP3HistroyTip2;
historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Year.MouseUpEventHandler += (sender, e) => {
totalElectricityView.RemoveFromParent();
historyDataView.AddChidren(myEchartsView_Line);
- viewa.Visible = false;
- viewb.Visible = false;
- viewc.Visible = false;
+ //viewa.Visible = false;
+ //viewb.Visible = false;
+ //viewc.Visible = false;
btnTip.TextID = StringId.AirSwitchP3HistroyTip3;
historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Total.MouseUpEventHandler += (sender, e) => {
myEchartsView_Line.RemoveFromParent();
historyDataView.AddChidren(totalElectricityView);
- viewa.Visible = false;
- viewb.Visible = false;
- viewc.Visible = false;
+ //viewa.Visible = false;
+ //viewb.Visible = false;
+ //viewc.Visible = false;
historyDataView.Height = Application.GetRealHeight(184);
};
@@ -576,37 +579,25 @@
});
var sensorType = device.spk.Split(".")[1];
- var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, "power_a");
+ var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, FunctionAttributeKey.TotalElectricity);
if (revertObj != null)
{
if (revertObj.Code == StateCode.SUCCESS)
{
var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
- if (revertData == null || revertData.Count == 0) {
+ if (revertData == null || revertData.Count == 0 || true) {
#if DEBUG
List<string> vs = new List<string>() {
- "813","313","213","123",
- "113","213","183","133",
- "133","513","133","413",
- "813","313","213","123",
- "113","213","183","133",
- "133","513","133","413",
+ "1","2","3","4",
+ "5","6","7","8",
+ "9","10","11","12",
+ //"13","14","15","16",
+ //"17","18","19","20",
+ //"21","22","23","24",
};
brokenLine.InitXdataText(vs);
revertData = new List<EnvironmentalSensorHistor>()
{
- new EnvironmentalSensorHistor{ fieldValue = "100"},
- new EnvironmentalSensorHistor{ fieldValue = "200"},
- new EnvironmentalSensorHistor{ fieldValue = "300"},
- new EnvironmentalSensorHistor{ fieldValue = "400"},
- new EnvironmentalSensorHistor{ fieldValue = "500"},
- new EnvironmentalSensorHistor{ fieldValue = "400"},
- new EnvironmentalSensorHistor{ fieldValue = "100"},
- new EnvironmentalSensorHistor{ fieldValue = "200"},
- new EnvironmentalSensorHistor{ fieldValue = "300"},
- new EnvironmentalSensorHistor{ fieldValue = "400"},
- new EnvironmentalSensorHistor{ fieldValue = "500"},
- new EnvironmentalSensorHistor{ fieldValue = "400"},
new EnvironmentalSensorHistor{ fieldValue = "100"},
new EnvironmentalSensorHistor{ fieldValue = "200"},
new EnvironmentalSensorHistor{ fieldValue = "300"},
@@ -654,7 +645,7 @@
brokenLine.xTitle = Language.StringByID(StringId.Date);
}
- var opString = brokenLine.InitOption(50, curQueryType == "year_month");
+ var opString = brokenLine.InitOption(100, curQueryType == "year_month");
Application.RunOnMainThread(() =>
{
myEchartsView_Line.ShowWithOption(opString);
diff --git a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
index d47db5a..dcc70c0 100644
--- a/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
+++ b/HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3SubloopEnergyPage.cs
@@ -488,6 +488,9 @@
};
totalElectricityView.AddChidren(btnTotalElectricity);
+
+ double totalNumber = 0.00;
+ double.TryParse(device.GetAttrState(key), out totalNumber);
var btnTotalNumber = new Button()
{
Y = Application.GetRealHeight(27),
@@ -496,7 +499,7 @@
TextSize = 49,
TextColor = 0xFF030D1C,
TextAlignment = TextAlignment.Center,
- Text = device.GetAttrState(key),
+ Text = totalNumber.ToString("F2"),
};
totalElectricityView.AddChidren(btnTotalNumber);
@@ -508,7 +511,7 @@
//viewb.Visible = true;
//viewc.Visible = true;
btnTip.TextID = StringId.AirSwitchP3HistroyTip1;
- historyDataView.Height = Application.GetRealHeight(330);
+ historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Month.MouseUpEventHandler += (sender, e) => {
totalElectricityView.RemoveFromParent();
@@ -517,7 +520,7 @@
//viewb.Visible = true;
//viewc.Visible = true;
btnTip.TextID = StringId.AirSwitchP3HistroyTip2;
- historyDataView.Height = Application.GetRealHeight(330);
+ historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Year.MouseUpEventHandler += (sender, e) => {
totalElectricityView.RemoveFromParent();
@@ -526,7 +529,7 @@
//viewb.Visible = true;
//viewc.Visible = true;
btnTip.TextID = StringId.AirSwitchP3HistroyTip3;
- historyDataView.Height = Application.GetRealHeight(330);
+ historyDataView.Height = Application.GetRealWidth(330);
};
btnShowHistroyData_Total.MouseUpEventHandler += (sender, e) => {
myEchartsView_Line.RemoveFromParent();
--
Gitblit v1.8.0