diff --git a/HT.Cloud.Code/Model/SystemConfig.cs b/HT.Cloud.Code/Model/SystemConfig.cs
index 85ecee5..918703d 100644
--- a/HT.Cloud.Code/Model/SystemConfig.cs
+++ b/HT.Cloud.Code/Model/SystemConfig.cs
@@ -12,7 +12,7 @@ namespace HT.Cloud.Code.Model
///
/// 系统备注
///
- public string GroupDescription { get; set; }
+ public string SystemDescription { get; set; }
///
/// 是否是调试模式
diff --git a/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs
index a543360..7803927 100644
--- a/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs
+++ b/HT.Cloud.Domain/Entity/SystemSecurity/RealTimeIOGroupEntity.cs
@@ -42,5 +42,10 @@ namespace HT.Cloud.Domain.SystemSecurity
///
[SugarColumn(ColumnName="IOBit", ColumnDescription = "IO位数",ColumnDataType = "varchar(255)", IsNullable = true)]
public string IOBit { get; set; }
- }
+ ///
+ /// IO位数
+ ///
+ [SugarColumn(ColumnName = "IOType", ColumnDescription = "数字量或模拟量", ColumnDataType = "varchar(128)", IsNullable = true)]
+ public string IOType { get; set; }
+ }
}
diff --git a/HT.Cloud.Service/ReportManage/HistoryReportService.cs b/HT.Cloud.Service/ReportManage/HistoryReportService.cs
index 2d88b24..a1a8b19 100644
--- a/HT.Cloud.Service/ReportManage/HistoryReportService.cs
+++ b/HT.Cloud.Service/ReportManage/HistoryReportService.cs
@@ -224,11 +224,11 @@ namespace HT.Cloud.Service.ReportManage
//return Report.ToJson();
}
- public async Task GetReportDownLoad(DateTime startTime, DateTime endTime ,int interval)
+ public async Task GetReportDownLoad(DateTime startTime, DateTime endTime ,int interval, string systemName)
{
+ var groupName = _context.AsTenant().QueryableWithAttr().Where(x => x.GroupDescription == systemName).First().GroupName;
-
- var listSub = TimeInOneDay(startTime, endTime);
+ var listSub = TimeInOneDay(startTime, endTime);
var pathroot = Directory.GetCurrentDirectory();
string fileurl = "报表 " + startTime.ToString("yyyy年MM月dd日 HH.mm.ss") + "至" + endTime.ToString("yyyy年MM月dd日 HH.mm.ss") + "(" + "时间间隔" + interval.ToString() + "秒" + ")" + "_" + DateTime.Now.ToString("yyyy年MM月dd日 HH.mm.ss") + "导出" + ".xlsx";
@@ -244,17 +244,28 @@ namespace HT.Cloud.Service.ReportManage
var item = listSub[i];
var fstartTime = item.starttime;
var fendTime = item.endtime;
- string conn = _context.CurrentConnectionConfig.ConnectionString; //"Data Source=192.168.110.32;Initial Catalog=SCADA;User Id= sa;Password= Sa1qaz;Integrated Security=False;Encrypt=True;TrustServerCertificate=True;";
- SqlConnection sqlConnection = new SqlConnection(conn);
- SqlCommand command = new SqlCommand("dbo.Query_Report_YL_CHN", sqlConnection);
- command.CommandType = CommandType.StoredProcedure;
- command.Parameters.Add(new SqlParameter("@startdt", fstartTime.ToString("yyyy/MM/dd HH:mm:ss")));
- command.Parameters.Add(new SqlParameter("@enddt", fendTime.ToString("yyyy/MM/dd HH:mm:ss")));
- command.Parameters.Add(new SqlParameter("@timeinterval", interval));
- command.CommandTimeout = 999999;
- sqlConnection.Open();
- var reader = command.ExecuteReader();
+ SugarParameter[] sqlParameters ={
+ new SugarParameter("@enddt", fendTime.ToString("yyyy-MM-dd HH:mm:ss")),
+ new SugarParameter("@groupname", groupName),
+ new SugarParameter("@startdt", fstartTime.ToString("yyyy-MM-dd HH:mm:ss")),
+ new SugarParameter("@timeinterval",interval)
+ };
+ var reader = _context.AsTenant().GetConnection(dataDBNumber).Ado.UseStoredProcedure().GetDataReader("Query_Report_YL_CHN", sqlParameters);
+
+ //string conn = _context.CurrentConnectionConfig.ConnectionString; //"Data Source=192.168.110.32;Initial Catalog=SCADA;User Id= sa;Password= Sa1qaz;Integrated Security=False;Encrypt=True;TrustServerCertificate=True;";
+ // SqlConnection sqlConnection = new SqlConnection(conn);
+ // SqlCommand command = new SqlCommand("dbo.Query_Report_YL_CHN", sqlConnection);
+ // command.CommandType = CommandType.StoredProcedure;
+
+ //command.Parameters.Add(new SqlParameter("@enddt", fendTime.ToString("yyyy-MM-dd HH:mm:ss")));
+ //command.Parameters.Add(new SqlParameter("@groupname", groupName));
+ //command.Parameters.Add(new SqlParameter("@startdt", fstartTime.ToString("yyyy-MM-dd HH:mm:ss")));
+ //command.Parameters.Add(new SqlParameter("@timeinterval", interval));
+
+ // command.CommandTimeout = 999999;
+ // sqlConnection.Open();
+ // var reader = command.ExecuteReader();
diff --git a/HT.Cloud.Web/Areas/ChartsManage/Controllers/HistoryChartsController.cs b/HT.Cloud.Web/Areas/ChartsManage/Controllers/HistoryChartsController.cs
index f10f22f..68f599f 100644
--- a/HT.Cloud.Web/Areas/ChartsManage/Controllers/HistoryChartsController.cs
+++ b/HT.Cloud.Web/Areas/ChartsManage/Controllers/HistoryChartsController.cs
@@ -26,7 +26,7 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
@@ -45,18 +45,16 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- string systemName = "制粉系统";
- var data = await _historyChartsService.GetAllSubsystemTag(systemName);
+ var data = await _historyChartsService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(string SubsysytemName)
{
- string systemName = "制粉系统";
- var data = await _historyChartsService.GetSubsystemAllTag(SubsysytemName, systemName);
+ var data = await _historyChartsService.GetSubsystemAllTag(SubsysytemName, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/ChartsManage/Controllers/RtchartsController.cs b/HT.Cloud.Web/Areas/ChartsManage/Controllers/RtchartsController.cs
index e6926f5..5f29572 100644
--- a/HT.Cloud.Web/Areas/ChartsManage/Controllers/RtchartsController.cs
+++ b/HT.Cloud.Web/Areas/ChartsManage/Controllers/RtchartsController.cs
@@ -23,7 +23,7 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -34,28 +34,28 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- var data = await _rtchartsService.GetAllSubsystemTag(groupDescription);
+ var data = await _rtchartsService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(ChartSubsysytemName chartSubsysytemName)
{
- var data = await _rtchartsService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, groupDescription);
+ var data = await _rtchartsService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetChartsTagValueInit(string[] charts_TagIDs)
{
- var data = await _rtchartsService.GetChartsTagValueInit(charts_TagIDs, groupDescription);
+ var data = await _rtchartsService.GetChartsTagValueInit(charts_TagIDs, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetChartsTagValue(string[] charts_TagIDs)
{
- var data = await _rtchartsService.GetChartsTagValue(charts_TagIDs, groupDescription);
+ var data = await _rtchartsService.GetChartsTagValue(charts_TagIDs, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryChartsController.cs b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryChartsController.cs
index 077e016..09fbf8c 100644
--- a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryChartsController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryChartsController.cs
@@ -28,7 +28,7 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
@@ -47,16 +47,14 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- string systemName = "喷煤系统";
- var data = await _historyChartsService.GetAllSubsystemTag(systemName);
+ var data = await _historyChartsService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(string SubsysytemName)
{
- string systemName = "喷煤系统";
- var data = await _historyChartsService.GetSubsystemAllTag(SubsysytemName, systemName);
+ var data = await _historyChartsService.GetSubsystemAllTag(SubsysytemName, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryTechChartsController.cs b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryTechChartsController.cs
index b745631..345c9a6 100644
--- a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryTechChartsController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiHistoryTechChartsController.cs
@@ -28,13 +28,12 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpPost]
public async Task GetAllTagList(ChartTagType chartTagType)
{
- var systemName = "喷煤系统";
- var data = await _historyTechChartsService.GetAllTagList(systemName, chartTagType.ChartTagTypeName);
+ var data = await _historyTechChartsService.GetAllTagList(systemDescription, chartTagType.ChartTagTypeName);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtTechChartsController.cs b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtTechChartsController.cs
index 42cf786..75de122 100644
--- a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtTechChartsController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtTechChartsController.cs
@@ -28,13 +28,12 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpPost]
public async Task GetAllTagList(ChartTagType chartTagType)
{
- var systemName = "喷煤系统";
- var data = await _rtTechChartsService.GetAllTagList(systemName, chartTagType.ChartTagTypeName);
+ var data = await _rtTechChartsService.GetAllTagList(systemDescription, chartTagType.ChartTagTypeName);
return Content(data);
}
@@ -69,16 +68,14 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
[HttpPost]
public async Task GetChartsTagValueInit(string[] charts_TagNames, string[] Tables)
{
- var systemName = "喷煤系统";
- var data = await _rtTechChartsService.GetChartsTagValueInit(charts_TagNames, Tables, systemName);
+ var data = await _rtTechChartsService.GetChartsTagValueInit(charts_TagNames, Tables, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetChartsTagValue(string[] charts_TagNames)
{
- var systemName = "喷煤系统";
- var data = await _rtTechChartsService.GetChartsTagValue(charts_TagNames, systemName);
+ var data = await _rtTechChartsService.GetChartsTagValue(charts_TagNames, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtchartsController.cs b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtchartsController.cs
index 059e17c..32616db 100644
--- a/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtchartsController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiChartsManage/Controllers/PenMeiRtchartsController.cs
@@ -23,7 +23,7 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -34,28 +34,28 @@ namespace HT.Cloud.Web.Areas.ChartsManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- var data = await _rtchartsService.GetAllSubsystemTag(groupDescription);
+ var data = await _rtchartsService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(ChartSubsysytemName chartSubsysytemName)
{
- var data = await _rtchartsService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, groupDescription);
+ var data = await _rtchartsService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetChartsTagValueInit(string[] charts_TagIDs)
{
- var data = await _rtchartsService.GetChartsTagValueInit(charts_TagIDs, groupDescription);
+ var data = await _rtchartsService.GetChartsTagValueInit(charts_TagIDs, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetChartsTagValue(string[] charts_TagIDs)
{
- var data = await _rtchartsService.GetChartsTagValue(charts_TagIDs, groupDescription);
+ var data = await _rtchartsService.GetChartsTagValue(charts_TagIDs, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmController.cs
index e1268b3..a0aebc0 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmController.cs
@@ -25,7 +25,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -36,62 +36,56 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- string systemName = "喷煤系统";
- var data = await _historyAlarmService.GetAllSubsystemTag(systemName);
+ var data = await _historyAlarmService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(ChartSubsysytemName chartSubsysytemName)
{
- string systemName = "喷煤系统";
- var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemName);
+ var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecord(Alarm_Params charts_Params)
{
- string systemName = "喷煤系统";
short TagID = short.Parse(charts_Params.TagID);
var StartTime = Gettime(charts_Params.StartTime);
var EndTime = Gettime(charts_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuick(Alarm_Quick_Params alarm_Quick_Params)
{
- string systemName = "喷煤系统";
var Alarmtype = alarm_Quick_Params.Alarmtype;
var StartTime = Gettime(alarm_Quick_Params.StartTime);
var EndTime = Gettime(alarm_Quick_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuickDesc(Alarm_Quick_Desc_Params alarm_Quick_Desc_Params)
{
- string systemName = "喷煤系统";
var hhour = alarm_Quick_Desc_Params.Hhour;
- var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmSubSystem(SubSystem_Params subSystem_Params)
{
- string systemName = "喷煤系统";
var AlarmName = subSystem_Params.AlarmName;
- var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemName);
+ var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemDescription);
return Content(data);
}
@@ -115,36 +109,33 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpPost]
public async Task GetAlarmACC(Alarm_ACC_Params alarm_ACC_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_ACC_Params.StartTime);
var EndTime = Gettime(alarm_ACC_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmHistogram(Alarm_Histogram_Params alarm_Histogram_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime_(alarm_Histogram_Params.StartTime);
var EndTime = Gettime_(alarm_Histogram_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmPie(Alarm_Pie_Params alarm_Pie_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_Pie_Params.StartTime);
var EndTime = Gettime(alarm_Pie_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewController.cs
index fa0ffa1..097660d 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewController.cs
@@ -25,7 +25,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -36,73 +36,65 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- string systemName = "喷煤系统";
- var data = await _historyAlarmService.GetAllSubsystemTag(systemName);
+ var data = await _historyAlarmService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(ChartSubsysytemName chartSubsysytemName)
{
- string systemName = "喷煤系统";
- var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemName);
+ var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecord(Alarm_Params charts_Params)
{
- string systemName = "喷煤系统";
short TagID = short.Parse(charts_Params.TagID);
var StartTime = Gettime(charts_Params.StartTime);
var EndTime = Gettime(charts_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuick(Alarm_Quick_Params alarm_Quick_Params)
{
- string systemName = "喷煤系统";
var Alarmtype = alarm_Quick_Params.Alarmtype;
var StartTime = Gettime(alarm_Quick_Params.StartTime);
var EndTime = Gettime(alarm_Quick_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuickDesc(Alarm_Quick_Desc_Params alarm_Quick_Desc_Params)
{
- string systemName = "喷煤系统";
-
var hhour = alarm_Quick_Desc_Params.Hhour;
- var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmHistory(Alarm_History_Params alarm_History_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_History_Params.StartTime);
var EndTime = Gettime(alarm_History_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmHistory(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmHistory(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmSubSystem(SubSystem_Params subSystem_Params)
{
- string systemName = "喷煤系统";
var AlarmName = subSystem_Params.AlarmName;
- var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemName);
+ var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemDescription);
return Content(data);
}
@@ -126,36 +118,31 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpPost]
public async Task GetAlarmACC(Alarm_ACC_Params alarm_ACC_Params)
{
- string systemName = "喷煤系统";
-
var StartTime = Gettime(alarm_ACC_Params.StartTime);
var EndTime = Gettime(alarm_ACC_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmHistogram(Alarm_Histogram_Params alarm_Histogram_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime_(alarm_Histogram_Params.StartTime);
var EndTime = Gettime_(alarm_Histogram_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmPie(Alarm_Pie_Params alarm_Pie_Params)
{
- string systemName = "喷煤系统";
-
var StartTime = Gettime(alarm_Pie_Params.StartTime);
var EndTime = Gettime(alarm_Pie_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewNewController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewNewController.cs
index 1db5016..88d82dd 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewNewController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryAlarmNewNewController.cs
@@ -27,7 +27,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -38,73 +38,63 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpGet]
public async Task GetAllSubsystemTag()
{
- string systemName = "喷煤系统";
-
- var data = await _historyAlarmService.GetAllSubsystemTag(systemName);
+ var data = await _historyAlarmService.GetAllSubsystemTag(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetSubsystemAllTag(ChartSubsysytemName chartSubsysytemName)
{
- string systemName = "喷煤系统";
-
- var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemName);
+ var data = await _historyAlarmService.GetSubsystemAllTag(chartSubsysytemName.SubsysytemName, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecord(Alarm_Params charts_Params)
{
- string systemName = "喷煤系统";
-
short TagID = short.Parse(charts_Params.TagID);
var StartTime = Gettime(charts_Params.StartTime);
var EndTime = Gettime(charts_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecord(TagID, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuick(Alarm_Quick_Params alarm_Quick_Params)
{
- string systemName = "喷煤系统";
var Alarmtype = alarm_Quick_Params.Alarmtype;
var StartTime = Gettime(alarm_Quick_Params.StartTime);
var EndTime = Gettime(alarm_Quick_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuick(Alarmtype, StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordQuickDesc(Alarm_Quick_Desc_Params alarm_Quick_Desc_Params)
{
- string systemName = "喷煤系统";
var hhour = alarm_Quick_Desc_Params.Hhour;
- var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordQuickDesc(hhour, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmHistory(Alarm_History_Params alarm_History_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_History_Params.StartTime);
var EndTime = Gettime(alarm_History_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmHistory(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmHistory(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmSubSystem(SubSystem_Params subSystem_Params)
{
- string systemName = "喷煤系统";
var AlarmName = subSystem_Params.AlarmName;
- var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemName);
+ var data = await _historyAlarmService.GetAlarmSubSystem(AlarmName,systemDescription);
return Content(data);
}
@@ -128,71 +118,65 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
[HttpPost]
public async Task GetAlarmACC(Alarm_ACC_Params alarm_ACC_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_ACC_Params.StartTime);
var EndTime = Gettime(alarm_ACC_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_ACC(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmHistogram(Alarm_Histogram_Params alarm_Histogram_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime_(alarm_Histogram_Params.StartTime);
var EndTime = Gettime_(alarm_Histogram_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Histogram(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmPie(Alarm_Pie_Params alarm_Pie_Params)
{
- string systemName = "喷煤系统";
var StartTime = Gettime(alarm_Pie_Params.StartTime);
var EndTime = Gettime(alarm_Pie_Params.EndTime);
- var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Pie(StartTime, EndTime, systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetAlarmRecordForTagName(Alarm_ParamsForTagName charts_Params)
{
- string systemName = "喷煤系统";
string Description = charts_Params.Description;
var StartTime = Gettime(charts_Params.StartTime);
var EndTime = Gettime(charts_Params.EndTime);
- var data = await _historyAlarmService.GetAlarmRecordForTagName(Description, StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarmRecordForTagName(Description, StartTime, EndTime, systemDescription);
return Content(data);
}
public async Task GetAlarm_CS(Alarm_CS alarm_CS)
{
- string systemName = "喷煤系统";
var StartTime = Gettime_(alarm_CS.StartTime);
var EndTime = Gettime_(alarm_CS.EndTime);
- var data = await _historyAlarmService.GetAlarm_CS(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_CS(StartTime, EndTime, systemDescription);
return Content(data);
}
public async Task GetAlarm_Ztime(Alarm_Ztime alarm_Ztime)
{
- string systemName = "喷煤系统";
var StartTime = Gettime_(alarm_Ztime.StartTime);
var EndTime = Gettime_(alarm_Ztime.EndTime);
- var data = await _historyAlarmService.GetAlarm_Ztime(StartTime, EndTime, systemName);
+ var data = await _historyAlarmService.GetAlarm_Ztime(StartTime, EndTime, systemDescription);
return Content(data);
}
/*
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryReportController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryReportController.cs
index 2c0fab5..bbf1a6f 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryReportController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiHistoryReportController.cs
@@ -23,7 +23,7 @@ namespace HT.Cloud.Web.Areas.PenMeiReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -90,14 +90,13 @@ namespace HT.Cloud.Web.Areas.PenMeiReportManage.Controllers
[IgnoreAntiforgeryToken]
public async Task GetReportNewPage(string page, string limit,string StartTime,string EndTime, string Interval)
{
- var systemName = "喷煤系统";
//string page = Request.Query["page"].ToString();
//string limit = Request.Query["limit"].ToString();
//var page = Gettime(asyncparam.page.ToString());
//var limit = Gettime(asyncparam.limit.ToString());
var startTime = Gettime(StartTime);
var endTime = Gettime(EndTime);
- var data = await _historyReportService.GetReportNewAsync(page, limit, startTime, endTime, Interval, systemName);
+ var data = await _historyReportService.GetReportNewAsync(page, limit, startTime, endTime, Interval, systemDescription);
//var con = JsonConvert.SerializeObject(data);
return Content(data);
}
@@ -106,8 +105,7 @@ namespace HT.Cloud.Web.Areas.PenMeiReportManage.Controllers
{
//var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
//var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- var systemName = "喷煤系统";
- var data = await _historyReportService.GetReportFirstHead(systemName);
+ var data = await _historyReportService.GetReportFirstHead(systemDescription);
return Content(data);
}
[HttpGet]
@@ -115,20 +113,19 @@ namespace HT.Cloud.Web.Areas.PenMeiReportManage.Controllers
{
//var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
//var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- var systemName = "喷煤系统";
- var data = await _historyReportService.GetReportSecondHead(systemName);
+ var data = await _historyReportService.GetReportSecondHead(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetReportDownLoad(DownLoadparam downLoadparam)
{
- //var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
- //var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ //var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
+ //var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
+ DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
DateTime StartTime = start.AddMilliseconds(downLoadparam.StartTime).ToLocalTime();
DateTime EndTime = start.AddMilliseconds(downLoadparam.EndTime).ToLocalTime();
int Interval = int.Parse(downLoadparam.Interval.ToString());
- var data = await _historyReportService.GetReportDownLoad(StartTime, EndTime, Interval);
+ var data = await _historyReportService.GetReportDownLoad(StartTime, EndTime, Interval, systemDescription);
return Content(data);
}
public string Gettime(string longtime)
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs
index d9291d5..1a83092 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportController.cs
@@ -21,10 +21,13 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
{
public ServerStateService _serverStateService { get; set; }
- public RealTimeIOStateService _realTimeIOState { get; set; }
+ public RealTimeIOStateService _realTimeIOState { get; set; }
+ ///
+ /// 绑定数据仓库的数据库ID
+ ///
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
-
- [HttpGet]
+ [HttpGet]
public async Task GetServerDataJson()
{
return await Task.Run(() =>
@@ -68,7 +71,7 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
[HttpGet]
public async Task GetRealIOGroup()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
return Content(listgroup.ToJson());
}
@@ -76,15 +79,15 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
public async Task GetRealIOInfo()
{
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
return Content(listinfo.ToJson());
}
[HttpGet]
public async Task GetRealIOState()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
var data = _realTimeIOState.GetRtData();
return Content(data.Result);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs
index 87cb6cb..1481e68 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs
@@ -21,10 +21,13 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
{
public ServerStateService _serverStateService { get; set; }
- public RealTimeIOStateService _realTimeIOState { get; set; }
+ public RealTimeIOStateService _realTimeIOState { get; set; }
-
- [HttpGet]
+ ///
+ /// 绑定数据仓库的数据库ID
+ ///
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
+ [HttpGet]
public async Task GetServerDataJson()
{
return await Task.Run(() =>
@@ -68,7 +71,7 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
[HttpGet]
public async Task GetRealIOGroup()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
return Content(listgroup.ToJson());
}
@@ -76,15 +79,15 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
public async Task GetRealIOInfo()
{
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
return Content(listinfo.ToJson());
}
[HttpGet]
public async Task GetRealIOState()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
var data = _realTimeIOState.GetRtData();
return Content(data.Result);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs
index 936f3c0..c75729f 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs
@@ -21,10 +21,13 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
{
public ServerStateService _serverStateService { get; set; }
- public RealTimeIOStateService _realTimeIOState { get; set; }
+ public RealTimeIOStateService _realTimeIOState { get; set; }
-
- [HttpGet]
+ ///
+ /// 绑定数据仓库的数据库ID
+ ///
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
+ [HttpGet]
public async Task GetServerDataJson()
{
return await Task.Run(() =>
@@ -68,7 +71,7 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
[HttpGet]
public async Task GetRealIOGroup()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
return Content(listgroup.ToJson());
}
@@ -76,15 +79,15 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
public async Task GetRealIOInfo()
{
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
return Content(listinfo.ToJson());
}
[HttpGet]
public async Task GetRealIOState()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
var data = _realTimeIOState.GetRtData();
return Content(data.Result);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs
index 4f6cb03..5b190a6 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs
@@ -21,10 +21,13 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
{
public ServerStateService _serverStateService { get; set; }
- public RealTimeIOStateService _realTimeIOState { get; set; }
+ public RealTimeIOStateService _realTimeIOState { get; set; }
+ ///
+ /// 绑定数据仓库的数据库ID
+ ///
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
-
- [HttpGet]
+ [HttpGet]
public async Task GetServerDataJson()
{
return await Task.Run(() =>
@@ -68,7 +71,7 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
[HttpGet]
public async Task GetRealIOGroup()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
return Content(listgroup.ToJson());
}
@@ -76,15 +79,15 @@ namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers
public async Task GetRealIOInfo()
{
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
return Content(listinfo.ToJson());
}
[HttpGet]
public async Task GetRealIOState()
{
- var listgroup = _realTimeIOState.GetIOGroup("喷煤系统");
- var listinfo = _realTimeIOState.GetIOInfo("喷煤系统");
+ var listgroup = _realTimeIOState.GetIOGroup(systemDescription);
+ var listinfo = _realTimeIOState.GetIOInfo(systemDescription);
var data = _realTimeIOState.GetRtData();
return Content(data.Result);
}
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/RtReportController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/RtReportController.cs
index 127f047..017d325 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/RtReportController.cs
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/RtReportController.cs
@@ -14,7 +14,7 @@ namespace HT.Cloud.Web.Areas.PenMeiReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetRtData()
{
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 副本 (2).cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 副本 (2).cshtml
new file mode 100644
index 0000000..4eb7863
--- /dev/null
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 副本 (2).cshtml
@@ -0,0 +1,2412 @@
+@{
+ ViewBag.Title = "Index";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env
+
+
+
+
+
+
+
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml
index 3b96e0d..de9c474 100644
--- a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml
+++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml
@@ -472,7 +472,7 @@
}
});
- debugger;
+ // debugger;
const top_text_value_array_32bitt = ['DQ 32xDC 24V/0.5A HF', 'Slot: 1', '在线'];//右上右下
const name_32bitt = ['DQ0.0', 'DQ0.1', 'DQ0.2', 'DQ0.3', 'DQ0.4', 'DQ0.5', 'DQ0.6', 'DQ0.7', 'DQ1.0', 'DQ1.1', 'DQ1.2', 'DQ1.3', 'DQ1.4', 'DQ1.5', 'DQ1.6', 'DQ1.7', 'DQ2.0', 'DQ2.1', 'DQ2.2', 'DQ2.3', 'DQ2.4', 'DQ2.5', 'DQ2.6', 'DQ2.7', 'DQ3.0', 'DQ3.1', 'DQ3.2', 'DQ3.3', 'DQ3.4', 'DQ3.5', 'DQ3.6', 'DQ3.7',];
@@ -493,9 +493,10 @@
iogroup.sort(function (a, b) {
return a.IOSlot - b.IOSlot; // 从小到大排序
});
- debugger;
+ // debugger;
var initx = 452;
for (var i = 0; i < iogroup.length; i++) {
+ var iotype = iogroup[i].IOType;
var iobit = iogroup[i].IOBit;
var ioid = iogroup[i].IOID;
var top_text_value_array = [iogroup[i].IOModel, 'Slot: ' + iogroup[i].IOSlot, "在线"]
@@ -510,29 +511,72 @@
}
var ioboxwidth = 0;
- //debugger;
- if (iobit == '32') {
- ioboxwidth = 300;
- var offset = 2;
- initx = initx + offset
- var box = Draw32bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
- initx = initx + ioboxwidth;
- group.add(box)
- }
- else if (iobit == '16') {
- ioboxwidth = 200;
- var offset = 2;
- initx = initx + offset
- var box = Draw16bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
- initx = initx + ioboxwidth;
- group.add(box)
- } else if (iobit = '8') {
- ioboxwidth = 200;
- var offset = 2;
- initx = initx + offset
- var box = Draw8bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
- initx = initx + ioboxwidth;
- group.add(box)
+ debugger;
+ if(iotype == 'Digital')
+ {
+ if (iobit == '32') {
+ ioboxwidth = 300;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw32bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ }
+ else if (iobit == '16') {
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw16bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ } else if (iobit = '8') {
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw8bitIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ }
+ } else if (iotype == 'Analog') {
+ if (iobit == '32') {
+ ioboxwidth = 300;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw32bitAnalogIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ }
+ else if (iobit == '16') {
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw16bitAnalogIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ } else if (iobit == '8') {
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw8bitAnalogIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ } else if (iobit == '4') {
+ debugger;
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw4bitAnalogIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ } else if (iobit == '2') {
+ debugger;
+ ioboxwidth = 200;
+ var offset = 2;
+ initx = initx + offset
+ var box = Draw2bitAnalogIOBox(names, top_text_value_array, descriptions, ioboxwidth, initx)
+ initx = initx + ioboxwidth;
+ group.add(box)
+ }
}
}
@@ -678,7 +722,7 @@
draggable: false,
id: top_text_value_array_32bit[1].replace(' ', '') + '_OnlineSatate'
})
- debugger;
+ // debugger;
box_32bit.add(rect)
var top_text_value = new LeaferUI.Text({
x: io_row_left_x_name_32bit + io_rect_left_width_32bit + 15,
@@ -1347,6 +1391,1314 @@
return box_8bit;
}
+ function Draw32bitAnalogIOBox(name_32bit, top_text_value_array_32bit, descriptions_32bit, ioboxwidth, initx) {
+ var box_32bit = new LeaferUI.Box({
+ x: initx,
+ y: 20,
+ width: ioboxwidth,
+ height: height_iobox,
+ fill: fill_iobox,
+ draggable: draggable_dev,
+ strokeWidth: 1,
+ stroke: stroke_iobox,
+ })
+
+ var ylinex_sum_four = 0;
+ var ylinex_array_four = [];
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_32bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 1) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_32bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 2) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_32bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 11) {
+ ylinex_sum_four = ylinex_sum_four + separator_32bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else {
+ ylinex_sum_four = ylinex_sum_four + io_row_height_32bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ }
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_32bit.add(line);
+ }
+ else if (linexid == 1) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_32bit.add(line);
+ }
+ else if (linexid == 2) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_32bit.add(line);
+ }
+ else if (linexid == 11) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 20,
+ width: width_iobox,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_32bit.add(line);
+ }
+ else {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 45,
+ width: width_iobox,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_32bit.add(line);
+ }
+ //box_32bit.add(line);
+ }
+
+ var spiltline_four = new LeaferUI.Line({
+ x: width_iobox / 2,
+ y: top_row_height_32bit * 3,
+ width: height_iobox - top_row_height_32bit * 3,
+ rotation: 90,
+ stroke: stroke_iobox_spiltline,
+ strokeWidth: 1,
+ dashPattern: [5, 2]
+ })
+ box_32bit.add(spiltline_four);
+
+
+ //box4左侧顶部状态效果
+ for (var tid = 0; tid < 3; tid++) {
+ let y = io_row_y_offset_32bit + tid * top_row_height_32bit;
+ if (tid < 2) {
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_32bit,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_32bit,
+ fill: fill_top_name,
+ text: top_text_value_array_32bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_32bit.add(top_text_value)
+ }
+
+ if (tid == 2) {
+ var rect = new LeaferUI.Rect({
+ x: io_row_left_x_name_32bit,
+ y: y - 5,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect,
+ draggable: false,
+ id: top_text_value_array_32bit[1].replace(' ', '') + '_OnlineSatate'
+ })
+ //debugger;
+ box_32bit.add(rect)
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_32bit + io_rect_left_width_32bit + 15,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_32bit,
+ fill: fill_top_name,
+ text: top_text_value_array_32bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_32bit.add(top_text_value)
+ }
+
+ }
+
+
+ //box4效果
+ for (var sid = 0; sid < 16; sid++) {
+ let y = 0;
+ if (sid < 8) {
+ y = io_row_height_32bit * (sid) + rect_top_y_offset_32bit;
+ }
+ if (sid >= 8) {
+ y = io_row_height_32bit * (sid + 1) + rect_bottom_y_offset_32bit;
+ }
+ var rect_left = new LeaferUI.Rect({
+ x: io_rect_left_x_32bit,
+ y: y + io_rect_left_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_32bit[sid]
+ })
+ var rect_left_text_name = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_name_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_32bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_Avalue = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit + io_rect_name_left_width_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: 111111,
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_description = new LeaferUI.Text({
+ x: io_rect_description_left_x_32bit,
+ y: y + io_rect_description_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_description,
+ text: descriptions_32bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ //1罐仓流化阀原输出
+ var rect_right = new LeaferUI.Rect({
+ x: io_rect_right_x_32bit,
+ y: y + io_rect_right_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_right_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_32bit[sid + 16]
+ })
+ var rect_right_text_name = new LeaferUI.Text({
+ x: io_rect_name_right_x_32bit,
+ y: y + io_rect_name_right_y_offset_32bit,
+ width: io_rect_name_right_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_32bit[sid + 16],
+ textAlign: 'right',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_right_text_description = new LeaferUI.Text({
+ x: io_rect_description_right_x_32bit,
+ y: y + io_rect_description_right_y_offset_32bit,
+ width: io_rect_description_right_width_32bit,
+ fill: fill_rect_text_description,
+ text: descriptions_32bit[sid + 16],
+ textAlign: 'right',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ //console.log(rect)
+ box_32bit.add(rect_left);
+ box_32bit.add(rect_left_text_name);
+ box_32bit.add(rect_left_text_Avalue);
+ box_32bit.add(rect_left_text_description);
+ box_32bit.add(rect_right);
+ box_32bit.add(rect_right_text_name);
+ box_32bit.add(rect_right_text_description);
+ }
+
+ return box_32bit;
+ }
+ function Draw16bitAnalogIOBox(name_16bit, top_text_value_array_16bit, descriptions_16bit, ioboxwidth, initx) {
+ //16IO生成
+ var box_16bit = new LeaferUI.Box({
+ x: initx,
+ y: 20,
+ width: ioboxwidth,
+ height: height_iobox,
+ fill: fill_iobox,
+ draggable: draggable_dev,
+ strokeWidth: 1,
+ stroke: stroke_iobox,
+ })
+
+ var ylinex_sum_four = 0;
+ var ylinex_array_four = [];
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_16bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 1) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_16bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 2) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_16bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 11) {
+ ylinex_sum_four = ylinex_sum_four + separator_16bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else {
+ ylinex_sum_four = ylinex_sum_four + io_row_height_16bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ }
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_16bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_16bit.add(line);
+ }
+ else if (linexid == 1) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_16bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_16bit.add(line);
+ }
+ else if (linexid == 2) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_16bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_16bit.add(line);
+ }
+ else if (linexid == 11) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 20,
+ width: width_iobox_16bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_16bit.add(line);
+ }
+ else {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 45,
+ width: width_iobox_16bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_16bit.add(line);
+ }
+ }
+
+ var spiltline_four = new LeaferUI.Line({
+ x: width_iobox_16bit / 2,
+ width: top_row_height_16bit * 2,
+ rotation: 90,
+ stroke: stroke_iobox_spiltline,
+ strokeWidth: 1,
+ dashPattern: [5, 2]
+ })
+ // box_16bit.add(spiltline_four);
+
+
+ //box4左侧顶部状态效果
+ for (var tid = 0; tid < 3; tid++) {
+ let y = io_row_y_offset_16bit + tid * top_row_height_16bit;
+ if (tid < 2) {
+
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_16bit,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_16bit,
+ fill: fill_top_name,
+ text: top_text_value_array_16bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_16bit.add(top_text_value)
+ }
+ if (tid == 2) {
+ var rect = new LeaferUI.Rect({
+ x: io_row_left_x_name_16bit,
+ y: y - 5,
+ height: rect_height_16bit,
+ width: io_rect_left_width_16bit,
+ fill: fill_rect,
+ draggable: false,
+ id: top_text_value_array_16bit[1].replace(' ', '') + '_OnlineSatate'
+ })
+ box_16bit.add(rect)
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_16bit + io_rect_left_width_16bit + 15,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_16bit,
+ fill: fill_top_name,
+ text: top_text_value_array_16bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_16bit.add(top_text_value)
+ }
+
+
+ // var left_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_left_x_value_16bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_left_width_value_16bit,
+ // fill: fill_top_name_value,
+ // text:left_top_text_value_four_array_16bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // //建议取消
+ // var right_top_text_name = new LeaferUI.Text({
+ // x:io_row_right_x_name_16bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_name_16bit,
+ // fill: fill_top_name,
+ // text:right_top_text_name_four_array_16bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // var right_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_right_x_name_16bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_value_16bit,
+ // fill: fill_top_name_value,
+ // text:right_top_text_value_four_array_16bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // box_16bit.add(left_top_text_name)
+ // //box_16bit.add(right_top_text_name)
+ // box_16bit.add(left_top_text_name_value)
+ // box_16bit.add(right_top_text_name_value)
+ }
+
+
+ //box4效果
+ for (var sid = 0; sid < 16; sid++) {
+ let y = 0;
+ if (sid < 8) {
+ y = io_row_height_32bit * (sid) + rect_top_y_offset_32bit;
+ }
+ if (sid >= 8) {
+ y = io_row_height_32bit * (sid + 1) + rect_bottom_y_offset_32bit;
+ }
+ var rect_left = new LeaferUI.Rect({
+ x: io_rect_left_x_32bit,
+ y: y + io_rect_left_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_16bit[sid]
+ })
+ var rect_left_text_name = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_name_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_16bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_Avalue = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit + io_rect_name_left_width_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: 32767,
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_description = new LeaferUI.Text({
+ x: io_rect_description_left_x_32bit,
+ y: y + io_rect_description_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_description,
+ text: descriptions_16bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ // textOverflow: ' ',
+ padding: 0,
+ fontSize: 12
+ })
+
+ box_16bit.add(rect_left);
+ box_16bit.add(rect_left_text_name);
+ box_16bit.add(rect_left_text_Avalue);
+ box_16bit.add(rect_left_text_description);
+ }
+ return box_16bit;
+ }
+ function Draw8bitAnalogIOBox(name_8bit, top_text_value_array_8bit, descriptions_8bit, ioboxwidth, initx) {
+ //8IO生成
+ var box_8bit = new LeaferUI.Box({
+ x: initx,
+ y: 20,
+ width: ioboxwidth,
+ height: height_iobox,
+ fill: fill_iobox,
+ draggable: draggable_dev,
+ strokeWidth: 1,
+ stroke: stroke_iobox,
+ })
+
+ var ylinex_sum_four = 0;
+ var ylinex_array_four = [];
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 1) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 2) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 11) {
+ ylinex_sum_four = ylinex_sum_four + separator_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else {
+ ylinex_sum_four = ylinex_sum_four + io_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ }
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 1) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 2) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 11) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 20,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 45,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ }
+
+ var spiltline_four = new LeaferUI.Line({
+ x: width_iobox_8bit / 2,
+ width: top_row_height_8bit * 2,
+ rotation: 90,
+ stroke: stroke_iobox_spiltline,
+ strokeWidth: 1,
+ dashPattern: [5, 2]
+ })
+ // box_8bit.add(spiltline_four);
+
+
+ //box4左侧顶部状态效果
+ for (var tid = 0; tid < 3; tid++) {
+ let y = io_row_y_offset_8bit + tid * top_row_height_8bit;
+ if (tid < 2) {
+
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value);
+ }
+ if (tid == 2) {
+ var rect = new LeaferUI.Rect({
+ x: io_row_left_x_name_8bit,
+ y: y - 5,
+ height: rect_height_8bit,
+ width: io_rect_left_width_8bit,
+ fill: fill_rect,
+ draggable: false,
+ id: top_text_value_array_8bit[1].replace(' ', '') + '_OnlineSatate'
+ })
+ box_8bit.add(rect)
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit + io_rect_left_width_8bit + 15,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value)
+ }
+
+ // var left_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_left_x_value_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_left_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:left_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // //建议取消
+ // var right_top_text_name = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_name_8bit,
+ // fill: fill_top_name,
+ // text:right_top_text_name_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // var right_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:right_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // box_8bit.add(left_top_text_name)
+ // //box_8bit.add(right_top_text_name)
+ // box_8bit.add(left_top_text_name_value)
+ // box_8bit.add(right_top_text_name_value)
+ }
+
+
+ //box4效果
+ for (var sid = 0; sid < 8; sid++) {
+ let y = 0;
+ if (sid < 8) {
+ y = io_row_height_32bit * (sid) + rect_top_y_offset_32bit;
+ }
+ if (sid >= 8) {
+ y = io_row_height_32bit * (sid + 1) + rect_bottom_y_offset_32bit;
+ }
+ var rect_left = new LeaferUI.Rect({
+ x: io_rect_left_x_32bit,
+ y: y + io_rect_left_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_8bit[sid]
+ })
+ var rect_left_text_name = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_name_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_Avalue = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit + io_rect_name_left_width_32bit + 10,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: 32767,
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_description = new LeaferUI.Text({
+ x: io_rect_description_left_x_32bit,
+ y: y + io_rect_description_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit / 3,
+ fill: fill_rect_text_description,
+ text: descriptions_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+
+ box_8bit.add(rect_left);
+ box_8bit.add(rect_left_text_name);
+ box_8bit.add(rect_left_text_Avalue);
+ box_8bit.add(rect_left_text_description);
+ }
+ return box_8bit;
+ }
+ function Draw4bitAnalogIOBox(name_8bit, top_text_value_array_8bit, descriptions_8bit, ioboxwidth, initx) {
+ //8IO生成
+ var box_8bit = new LeaferUI.Box({
+ x: initx,
+ y: 20,
+ width: ioboxwidth,
+ height: height_iobox,
+ fill: fill_iobox,
+ draggable: draggable_dev,
+ strokeWidth: 1,
+ stroke: stroke_iobox,
+ })
+
+ var ylinex_sum_four = 0;
+ var ylinex_array_four = [];
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 1) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 2) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 11) {
+ ylinex_sum_four = ylinex_sum_four + separator_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else {
+ ylinex_sum_four = ylinex_sum_four + io_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ }
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 1) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 2) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 11) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 20,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 45,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ }
+
+ var spiltline_four = new LeaferUI.Line({
+ x: width_iobox_8bit / 2,
+ width: top_row_height_8bit * 2,
+ rotation: 90,
+ stroke: stroke_iobox_spiltline,
+ strokeWidth: 1,
+ dashPattern: [5, 2]
+ })
+ // box_8bit.add(spiltline_four);
+
+
+ //box4左侧顶部状态效果
+ for (var tid = 0; tid < 3; tid++) {
+ let y = io_row_y_offset_8bit + tid * top_row_height_8bit;
+ if (tid < 2) {
+
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value);
+ }
+ if (tid == 2) {
+ var rect = new LeaferUI.Rect({
+ x: io_row_left_x_name_8bit,
+ y: y - 5,
+ height: rect_height_8bit,
+ width: io_rect_left_width_8bit,
+ fill: fill_rect,
+ draggable: false,
+ id: top_text_value_array_8bit[1].replace(' ', '') + '_OnlineSatate'
+ })
+ box_8bit.add(rect)
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit + io_rect_left_width_8bit + 15,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value)
+ }
+
+ // var left_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_left_x_value_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_left_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:left_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // //建议取消
+ // var right_top_text_name = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_name_8bit,
+ // fill: fill_top_name,
+ // text:right_top_text_name_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // var right_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:right_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // box_8bit.add(left_top_text_name)
+ // //box_8bit.add(right_top_text_name)
+ // box_8bit.add(left_top_text_name_value)
+ // box_8bit.add(right_top_text_name_value)
+ }
+
+ debugger;
+ //box4效果
+ for (var sid = 0; sid < 4; sid++) {
+ let y = 0;
+ if (sid < 4) {
+ y = io_row_height_32bit * (sid) + rect_top_y_offset_32bit;
+ }
+ if (sid >= 4) {
+ y = io_row_height_32bit * (sid + 1) + rect_bottom_y_offset_32bit;
+ }
+ var rect_left = new LeaferUI.Rect({
+ x: io_rect_left_x_32bit,
+ y: y + io_rect_left_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_8bit[sid]
+ })
+ var rect_left_text_name = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_name_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_Avalue = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit + io_rect_name_left_width_32bit + 10,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: 32767,
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_description = new LeaferUI.Text({
+ x: io_rect_description_left_x_32bit,
+ y: y + io_rect_description_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_description,
+ text: descriptions_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+
+ box_8bit.add(rect_left);
+ box_8bit.add(rect_left_text_name);
+ box_8bit.add(rect_left_text_Avalue);
+ box_8bit.add(rect_left_text_description);
+ }
+ return box_8bit;
+ }
+ function Draw2bitAnalogIOBox(name_8bit, top_text_value_array_8bit, descriptions_8bit, ioboxwidth, initx) {
+ //8IO生成
+ var box_8bit = new LeaferUI.Box({
+ x: initx,
+ y: 20,
+ width: ioboxwidth,
+ height: height_iobox,
+ fill: fill_iobox,
+ draggable: draggable_dev,
+ strokeWidth: 1,
+ stroke: stroke_iobox,
+ })
+
+ var ylinex_sum_four = 0;
+ var ylinex_array_four = [];
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 1) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 2) {
+ ylinex_sum_four = ylinex_sum_four + top_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else if (linexid == 11) {
+ ylinex_sum_four = ylinex_sum_four + separator_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ else {
+ ylinex_sum_four = ylinex_sum_four + io_row_height_8bit;
+ ylinex_array_four.push(ylinex_sum_four);
+ }
+ }
+ for (var linexid = 0; linexid < 19; linexid++) {
+ if (linexid == 0) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 1) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 2) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 35,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else if (linexid == 11) {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 20,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ else {
+ var line = new LeaferUI.Line({
+ x: 0,
+ y: ylinex_array_four[linexid],// ylinex_sum_four + 45,
+ width: width_iobox_8bit,
+ strokeWidth: 1,
+ stroke: stroke_iobox_line,
+ //id: "line" + linexid.toString()
+ });
+ box_8bit.add(line);
+ }
+ }
+
+ var spiltline_four = new LeaferUI.Line({
+ x: width_iobox_8bit / 2,
+ width: top_row_height_8bit * 2,
+ rotation: 90,
+ stroke: stroke_iobox_spiltline,
+ strokeWidth: 1,
+ dashPattern: [5, 2]
+ })
+ // box_8bit.add(spiltline_four);
+
+
+ //box4左侧顶部状态效果
+ for (var tid = 0; tid < 3; tid++) {
+ let y = io_row_y_offset_8bit + tid * top_row_height_8bit;
+ if (tid < 2) {
+
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value);
+ }
+ if (tid == 2) {
+ var rect = new LeaferUI.Rect({
+ x: io_row_left_x_name_8bit,
+ y: y - 5,
+ height: rect_height_8bit,
+ width: io_rect_left_width_8bit,
+ fill: fill_rect,
+ draggable: false,
+ id: top_text_value_array_8bit[1].replace(' ', '') + '_OnlineSatate'
+ })
+ box_8bit.add(rect)
+ var top_text_value = new LeaferUI.Text({
+ x: io_row_left_x_name_8bit + io_rect_left_width_8bit + 15,
+ y: y,//+10
+ //height:10,
+ width: io_row_left_width_name_8bit,
+ fill: fill_top_name,
+ text: top_text_value_array_8bit[tid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ box_8bit.add(top_text_value)
+ }
+
+ // var left_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_left_x_value_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_left_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:left_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // //建议取消
+ // var right_top_text_name = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_name_8bit,
+ // fill: fill_top_name,
+ // text:right_top_text_name_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // var right_top_text_name_value = new LeaferUI.Text({
+ // x:io_row_right_x_name_8bit,
+ // y:y,//+10
+ // //height:10,
+ // width:io_row_right_width_value_8bit,
+ // fill: fill_top_name_value,
+ // text:right_top_text_value_four_array_8bit[tid],
+ // textAlign :'left',
+ // verticalAlign:'middle',
+ // textWrap:'none',
+ // padding:0,
+ // fontSize:12
+ // })
+ // box_8bit.add(left_top_text_name)
+ // //box_8bit.add(right_top_text_name)
+ // box_8bit.add(left_top_text_name_value)
+ // box_8bit.add(right_top_text_name_value)
+ }
+
+ debugger;
+ //box4效果
+ for (var sid = 0; sid < 2; sid++) {
+ let y = 0;
+ if (sid < 2) {
+ y = io_row_height_32bit * (sid) + rect_top_y_offset_32bit;
+ }
+ if (sid >= 2) {
+ y = io_row_height_32bit * (sid + 1) + rect_bottom_y_offset_32bit;
+ }
+ var rect_left = new LeaferUI.Rect({
+ x: io_rect_left_x_32bit,
+ y: y + io_rect_left_y_offset_32bit,
+ height: rect_height_32bit,
+ width: io_rect_left_width_32bit,
+ fill: fill_rect_io_on,
+ draggable: false,
+ id: name_8bit[sid]
+ })
+ var rect_left_text_name = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_name_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: name_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_Avalue = new LeaferUI.Text({
+ x: io_rect_name_left_x_32bit + io_rect_name_left_width_32bit + 10,
+ y: y + io_rect_name_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_name,
+ text: 32767,
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+ var rect_left_text_description = new LeaferUI.Text({
+ x: io_rect_description_left_x_32bit,
+ y: y + io_rect_description_left_y_offset_32bit,
+ width: io_rect_description_left_width_32bit,
+ fill: fill_rect_text_description,
+ text: descriptions_8bit[sid],
+ textAlign: 'left',
+ verticalAlign: 'middle',
+ textWrap: 'none',
+ padding: 0,
+ fontSize: 12
+ })
+
+ box_8bit.add(rect_left);
+ box_8bit.add(rect_left_text_name);
+ box_8bit.add(rect_left_text_Avalue);
+ box_8bit.add(rect_left_text_description);
+ }
+ return box_8bit;
+ }
function DrawCPUBox(name_cpu, top_text_value_array_cpu, descriptions_cpu, name_eth_cpu, descriptions_eth_cpu, ioboxwidth, initx) {
var box_cpu = new LeaferUI.Box({
x: initx,
@@ -1844,7 +3196,7 @@
}
});
$.when(myajax).done(function (redata) {
- debugger;
+ //debugger;
leafer.findOne('#' + 'RUN1').fill = fill_rect_io_on;
leafer.findOne('#' + 'RUN').fill = fill_rect_io_on;
leafer.findOne('#' + 'ETH0').fill = fill_rect_io_on;
diff --git a/HT.Cloud.Web/Areas/ReportManage/Controllers/HistoryReportController.cs b/HT.Cloud.Web/Areas/ReportManage/Controllers/HistoryReportController.cs
index 4bc15f9..e47425e 100644
--- a/HT.Cloud.Web/Areas/ReportManage/Controllers/HistoryReportController.cs
+++ b/HT.Cloud.Web/Areas/ReportManage/Controllers/HistoryReportController.cs
@@ -22,7 +22,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
@@ -93,10 +93,9 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
//string limit = Request.Query["limit"].ToString();
//var page = Gettime(asyncparam.page.ToString());
//var limit = Gettime(asyncparam.limit.ToString());
- var systemName = "制粉系统";
var startTime = Gettime(StartTime);
var endTime = Gettime(EndTime);
- var data = await _historyReportService.GetReportNewAsync(page, limit, startTime, endTime, Interval, systemName);
+ var data = await _historyReportService.GetReportNewAsync(page, limit, startTime, endTime, Interval, systemDescription);
//var con = JsonConvert.SerializeObject(data);
return Content(data);
}
@@ -105,8 +104,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
{
//var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
//var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- var systemName = "制粉系统";
- var data = await _historyReportService.GetReportFirstHead(systemName);
+ var data = await _historyReportService.GetReportFirstHead(systemDescription);
return Content(data);
}
[HttpGet]
@@ -114,20 +112,19 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
{
//var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
//var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- var systemName = "制粉系统";
- var data = await _historyReportService.GetReportSecondHead(systemName);
+ var data = await _historyReportService.GetReportSecondHead(systemDescription);
return Content(data);
}
[HttpPost]
public async Task GetReportDownLoad(DownLoadparam downLoadparam)
{
- //var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
- //var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
- DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+ //var StartTime = reportparam.StartTime.ToString("yyyy-MM-dd HH:mm:ss");
+ //var EndTime = reportparam.EndTime.ToString("yyyy-MM-dd HH:mm:ss");
+ DateTime start = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
DateTime StartTime = start.AddMilliseconds(downLoadparam.StartTime).ToLocalTime();
DateTime EndTime = start.AddMilliseconds(downLoadparam.EndTime).ToLocalTime();
int Interval = int.Parse(downLoadparam.Interval.ToString());
- var data = await _historyReportService.GetReportDownLoad(StartTime, EndTime, Interval);
+ var data = await _historyReportService.GetReportDownLoad(StartTime, EndTime, Interval, systemDescription);
return Content(data);
}
public string Gettime(string longtime)
diff --git a/HT.Cloud.Web/Areas/ReportManage/Controllers/MainPageControl.cs b/HT.Cloud.Web/Areas/ReportManage/Controllers/MainPageControl.cs
index fe29832..abea843 100644
--- a/HT.Cloud.Web/Areas/ReportManage/Controllers/MainPageControl.cs
+++ b/HT.Cloud.Web/Areas/ReportManage/Controllers/MainPageControl.cs
@@ -16,33 +16,33 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetMainPageInit()
{
- var data = await _mainPageService.GetMainPageInit(groupDescription);
+ var data = await _mainPageService.GetMainPageInit(systemDescription);
return Content(data);
}
[HttpGet]
public async Task GetMainPageChartInit()
{
- var data = await _mainPageService.GetMainPageChartInit(groupDescription);
+ var data = await _mainPageService.GetMainPageChartInit(systemDescription);
return Content(data);
}
[HttpGet]
public async Task GetRtData()
{
- var data = await _mainPageService.GetRtData(groupDescription);
+ var data = await _mainPageService.GetRtData(systemDescription);
return Content(data);
}
[HttpGet]
public async Task GetRtChartData()
{
- var data = await _mainPageService.GetRtChartData(groupDescription);
+ var data = await _mainPageService.GetRtChartData(systemDescription);
return Content(data);
}
diff --git a/HT.Cloud.Web/Areas/ReportManage/Controllers/MetaTagAlarmController.cs b/HT.Cloud.Web/Areas/ReportManage/Controllers/MetaTagAlarmController.cs
index 3d76c7b..c5c983a 100644
--- a/HT.Cloud.Web/Areas/ReportManage/Controllers/MetaTagAlarmController.cs
+++ b/HT.Cloud.Web/Areas/ReportManage/Controllers/MetaTagAlarmController.cs
@@ -25,7 +25,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetDriverGroupList()
{
diff --git a/HT.Cloud.Web/Areas/ReportManage/Controllers/RtReportController.cs b/HT.Cloud.Web/Areas/ReportManage/Controllers/RtReportController.cs
index 33a4ef5..2712561 100644
--- a/HT.Cloud.Web/Areas/ReportManage/Controllers/RtReportController.cs
+++ b/HT.Cloud.Web/Areas/ReportManage/Controllers/RtReportController.cs
@@ -14,7 +14,7 @@ namespace HT.Cloud.Web.Areas.ReportManage.Controllers
///
/// 绑定数据仓库的数据库ID
///
- private string groupDescription = GlobalContext.SystemConfig.GroupDescription;
+ private string systemDescription = GlobalContext.SystemConfig.SystemDescription;
[HttpGet]
public async Task GetRtData()
{
diff --git a/HT.Cloud.Web/Controllers/ClientsDataController.cs b/HT.Cloud.Web/Controllers/ClientsDataController.cs
index 1e566dc..8ad3ced 100644
--- a/HT.Cloud.Web/Controllers/ClientsDataController.cs
+++ b/HT.Cloud.Web/Controllers/ClientsDataController.cs
@@ -64,7 +64,7 @@ namespace HT.Cloud.Web.Controllers
/// 清空缓存请求方法
///
///
- [HttpGet]
+ [HttpGet]
public async Task ClearCache()
{
try
diff --git a/HT.Cloud.Web/HT.Cloud.Web.csproj b/HT.Cloud.Web/HT.Cloud.Web.csproj
index 734cd2b..043536b 100644
--- a/HT.Cloud.Web/HT.Cloud.Web.csproj
+++ b/HT.Cloud.Web/HT.Cloud.Web.csproj
@@ -81,7 +81,7 @@
PreserveNewest
- PreserveNewest
+ Never
diff --git a/HT.Cloud.Web/appsettings.json b/HT.Cloud.Web/appsettings.json
index ac529ae..4035e00 100644
--- a/HT.Cloud.Web/appsettings.json
+++ b/HT.Cloud.Web/appsettings.json
@@ -8,7 +8,7 @@
}
},
"SystemConfig": {
- "GroupDescription": "喷煤系统", //系统备注
+ "SystemDescription": "喷煤系统", //系统备注
"Demo": false, // 是否是演示模式 账号admin 密码0000
"LoginMultiple": false, // 是否允许一个账户在多处登录
"AllowCorsSite": "http://localhost:8058", // 允许的其他站点访问Api