diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs new file mode 100644 index 0000000..87cb6cb --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiJMReportNewController.cs @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright © 2020 HT.Cloud.Framework 版权所有 + * Author: HT.Cloud + * Description: WaterCloud快速开发平台 + * Website: +*********************************************************************************/ + +using Microsoft.AspNetCore.Mvc; +using System.Linq; +using System.Threading.Tasks; +using HT.Cloud.Code; +using HT.Cloud.Service.SystemSecurity; +using Quartz; + +namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers +{ + [Area("PenMeiReportManage")] + [HandlerLogin(needLogin: false)] + [HandlerAuthorize(needAuth: false)] + public class PenMeiJMReportNewController : BaseController + { + public ServerStateService _serverStateService { get; set; } + + public RealTimeIOStateService _realTimeIOState { get; set; } + + + [HttpGet] + public async Task GetServerDataJson() + { + return await Task.Run(() => + { + /* + * 一 + * 1、安装java集成开发环境,根据示例重构jimu报表的代码。 + * 2、jimu报表的java环境继承到.Net中过于繁琐和前端功能较简单放弃使用jumu报表,使用另一款.Net作为服务端的cell报表。 + * 二 + * 1、下载cell报表前端源码,安装前端Vue3源码环境,通过反编译补全功能代码和与后端的Api请求。 + * 2、去除无用功能和界面,只保留报表功能,将所有原项目logo和名称标记替换为恒拓相关。 + * 三 + * 1、获取cellreport后端源码,编辑源码库的静态资源,下载补全项目引用的开源类库。 + * 2、修改水印函数库文件,将唯一不可修改的导出pdf水印替换为空或恒拓环保科技。 + * 四 + * 1、将前端和后端源码编译打包,重构项目运行结构,前后端集成为一个服务实力,部署测试。 + * 2、报表软件交给曲工进行报表编辑和运行测试,同时进行debug调试。 + * 五 + * 1、将曲工编辑好的报表集成至管理平台。 + * 2、比较JS自动绘图组件,选择适合自动生成的组件进行io模块自动构建。 + */ + //windows环境 + var computer = ComputerHelper.GetComputerInfo(); + var arm = computer.RAMRate; + var cpu = computer.CPURate; + var iis = computer.RunTime; + var TotalRAM = computer.TotalRAM; + string ip = WebHelper.GetWanIp(); + string ipLocation = WebHelper.GetIpLocation(ip); + var IP = string.Format("{0} ({1})", ip, ipLocation); + return Content(new { ARM = arm, CPU = cpu, IIS = iis, TotalRAM = TotalRAM, IP = IP }.ToJson()); + }); + } + + [HttpGet] + public async Task GetServerData() + { + var data = (await _serverStateService.GetList(2)).OrderBy(a => a.F_Date).ToList(); + return Content(data.ToJson()); + } + [HttpGet] + public async Task GetRealIOGroup() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + + return Content(listgroup.ToJson()); + } + [HttpGet] + public async Task GetRealIOInfo() + { + + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + + return Content(listinfo.ToJson()); + } + [HttpGet] + public async Task GetRealIOState() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + var data = _realTimeIOState.GetRtData(); + return Content(data.Result); + } + } +} \ No newline at end of file diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs new file mode 100644 index 0000000..936f3c0 --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateController.cs @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright © 2020 HT.Cloud.Framework 版权所有 + * Author: HT.Cloud + * Description: WaterCloud快速开发平台 + * Website: +*********************************************************************************/ + +using Microsoft.AspNetCore.Mvc; +using System.Linq; +using System.Threading.Tasks; +using HT.Cloud.Code; +using HT.Cloud.Service.SystemSecurity; +using Quartz; + +namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers +{ + [Area("PenMeiReportManage")] + [HandlerLogin(needLogin: false)] + [HandlerAuthorize(needAuth: false)] + public class PenMeiNetWorkStateController : BaseController + { + public ServerStateService _serverStateService { get; set; } + + public RealTimeIOStateService _realTimeIOState { get; set; } + + + [HttpGet] + public async Task GetServerDataJson() + { + return await Task.Run(() => + { + /* + * 一 + * 1、安装java集成开发环境,根据示例重构jimu报表的代码。 + * 2、jimu报表的java环境继承到.Net中过于繁琐和前端功能较简单放弃使用jumu报表,使用另一款.Net作为服务端的cell报表。 + * 二 + * 1、下载cell报表前端源码,安装前端Vue3源码环境,通过反编译补全功能代码和与后端的Api请求。 + * 2、去除无用功能和界面,只保留报表功能,将所有原项目logo和名称标记替换为恒拓相关。 + * 三 + * 1、获取cellreport后端源码,编辑源码库的静态资源,下载补全项目引用的开源类库。 + * 2、修改水印函数库文件,将唯一不可修改的导出pdf水印替换为空或恒拓环保科技。 + * 四 + * 1、将前端和后端源码编译打包,重构项目运行结构,前后端集成为一个服务实力,部署测试。 + * 2、报表软件交给曲工进行报表编辑和运行测试,同时进行debug调试。 + * 五 + * 1、将曲工编辑好的报表集成至管理平台。 + * 2、比较JS自动绘图组件,选择适合自动生成的组件进行io模块自动构建。 + */ + //windows环境 + var computer = ComputerHelper.GetComputerInfo(); + var arm = computer.RAMRate; + var cpu = computer.CPURate; + var iis = computer.RunTime; + var TotalRAM = computer.TotalRAM; + string ip = WebHelper.GetWanIp(); + string ipLocation = WebHelper.GetIpLocation(ip); + var IP = string.Format("{0} ({1})", ip, ipLocation); + return Content(new { ARM = arm, CPU = cpu, IIS = iis, TotalRAM = TotalRAM, IP = IP }.ToJson()); + }); + } + + [HttpGet] + public async Task GetServerData() + { + var data = (await _serverStateService.GetList(2)).OrderBy(a => a.F_Date).ToList(); + return Content(data.ToJson()); + } + [HttpGet] + public async Task GetRealIOGroup() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + + return Content(listgroup.ToJson()); + } + [HttpGet] + public async Task GetRealIOInfo() + { + + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + + return Content(listinfo.ToJson()); + } + [HttpGet] + public async Task GetRealIOState() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + var data = _realTimeIOState.GetRtData(); + return Content(data.Result); + } + } +} \ No newline at end of file diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs new file mode 100644 index 0000000..4f6cb03 --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Controllers/PenMeiNetWorkStateControllerNew.cs @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright © 2020 HT.Cloud.Framework 版权所有 + * Author: HT.Cloud + * Description: WaterCloud快速开发平台 + * Website: +*********************************************************************************/ + +using Microsoft.AspNetCore.Mvc; +using System.Linq; +using System.Threading.Tasks; +using HT.Cloud.Code; +using HT.Cloud.Service.SystemSecurity; +using Quartz; + +namespace HT.Cloud.Web.Areas.SystemSecurity.Controllers +{ + [Area("PenMeiReportManage")] + [HandlerLogin(needLogin: false)] + [HandlerAuthorize(needAuth: false)] + public class PenMeiNetWorkStateNewController : BaseController + { + public ServerStateService _serverStateService { get; set; } + + public RealTimeIOStateService _realTimeIOState { get; set; } + + + [HttpGet] + public async Task GetServerDataJson() + { + return await Task.Run(() => + { + /* + * 一 + * 1、安装java集成开发环境,根据示例重构jimu报表的代码。 + * 2、jimu报表的java环境继承到.Net中过于繁琐和前端功能较简单放弃使用jumu报表,使用另一款.Net作为服务端的cell报表。 + * 二 + * 1、下载cell报表前端源码,安装前端Vue3源码环境,通过反编译补全功能代码和与后端的Api请求。 + * 2、去除无用功能和界面,只保留报表功能,将所有原项目logo和名称标记替换为恒拓相关。 + * 三 + * 1、获取cellreport后端源码,编辑源码库的静态资源,下载补全项目引用的开源类库。 + * 2、修改水印函数库文件,将唯一不可修改的导出pdf水印替换为空或恒拓环保科技。 + * 四 + * 1、将前端和后端源码编译打包,重构项目运行结构,前后端集成为一个服务实力,部署测试。 + * 2、报表软件交给曲工进行报表编辑和运行测试,同时进行debug调试。 + * 五 + * 1、将曲工编辑好的报表集成至管理平台。 + * 2、比较JS自动绘图组件,选择适合自动生成的组件进行io模块自动构建。 + */ + //windows环境 + var computer = ComputerHelper.GetComputerInfo(); + var arm = computer.RAMRate; + var cpu = computer.CPURate; + var iis = computer.RunTime; + var TotalRAM = computer.TotalRAM; + string ip = WebHelper.GetWanIp(); + string ipLocation = WebHelper.GetIpLocation(ip); + var IP = string.Format("{0} ({1})", ip, ipLocation); + return Content(new { ARM = arm, CPU = cpu, IIS = iis, TotalRAM = TotalRAM, IP = IP }.ToJson()); + }); + } + + [HttpGet] + public async Task GetServerData() + { + var data = (await _serverStateService.GetList(2)).OrderBy(a => a.F_Date).ToList(); + return Content(data.ToJson()); + } + [HttpGet] + public async Task GetRealIOGroup() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + + return Content(listgroup.ToJson()); + } + [HttpGet] + public async Task GetRealIOInfo() + { + + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + + return Content(listinfo.ToJson()); + } + [HttpGet] + public async Task GetRealIOState() + { + var listgroup = _realTimeIOState.GetIOGroup("喷煤系统"); + var listinfo = _realTimeIOState.GetIOInfo("喷煤系统"); + var data = _realTimeIOState.GetRtData(); + return Content(data.Result); + } + } +} \ No newline at end of file diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml index 5a9624e..9490999 100644 --- a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index.cshtml @@ -168,1109 +168,6 @@ echarts = layui.echarts; wcLoading.close(); - //基准配置项 - const width_iobox = 300; - const width_iobox_16bit = 200; - const width_iobox_8bit = 200; - const height_iobox = 810; - - //拖拽 - const draggable_dev = false; - - // //开发色彩 - // const fill_backgroud = '#8d98a3'; - // const fill_iobox = '#8d98a3'; - // const stroke_iobox = '#494d52';; - // const stroke_iobox_line = '#42444a'; - // const stroke_iobox_spiltline = '#474b58'; - // const fill_top_name = '#f1f4f6'; - // const fill_top_name_value = '#f1f4f6'; - // const fill_rect = '#a4a9ab'; - // const fill_rect_text_name = '#e5e9ec'; - // const fill_rect_text_description = '#f3f6f8'; - // const fill_rect_io_on = '#aaff00'; - // const fill_rect_io_off = '#a3a6a9'; - - //新版色彩 - const fill_backgroud = '#28333e'; - //const fill_backgroud = '#2a0056'; - // const fill_iobox = '#2492e9';//00 - // const fill_iobox = '#345266';//001 - const fill_iobox = '#345b87';//002 - // const fill_iobox = '#50657a';//003 - // const fill_iobox = '#334b64';//004 - //const fill_iobox = '#3d5062';//005 - const stroke_iobox = '#494d52';; - const stroke_iobox_line = '#42444a'; - const stroke_iobox_spiltline = '#474b58'; - const fill_top_name = '#ffffff'; - const fill_top_name_value = '#ffffff'; - const fill_rect = '#cecece'; - const fill_rect_text_name = '#ffffff'; - //const fill_rect_text_name = '#02f2e0'; - const fill_rect_text_description = '#ffffff'; - //const fill_rect_text_description = '#02f2e0'; - const fill_rect_io_on = '#00ff55';//'#00ff7f' - //const fill_rect_io_on = '#00ff7f' - const fill_rect_io_off = '#cecece'; - - //32IO配置项 - const top_row_height_32bit = 25; - const separator_32bit = 15; - const io_row_height_32bit = 45; - - const io_row_y_offset_32bit = 13; - const io_row_left_x_name_32bit = 10; - const io_row_left_x_value_32bit = 65; - const io_row_right_x_name_32bit = 160; - const io_row_left_width_name_32bit = 40; - const io_row_left_width_value_32bit = 55; - const io_row_right_width_name_32bit = 20; - const io_row_right_width_value_32bit = 130; - - - - const rect_height_32bit = 10; - - const rect_top_y_offset_32bit = 95; - const rect_bottom_y_offset_32bit = 65; - - const io_rect_left_x_32bit = 10; - const io_rect_name_left_x_32bit = 35; - const io_rect_description_left_x_32bit = 35; - const io_rect_right_x_32bit = 270; - const io_rect_name_right_x_32bit = 225; - const io_rect_description_right_x_32bit = 155; - - const io_rect_left_y_offset_32bit = 0; - const io_rect_name_left_y_offset_32bit = -7; - const io_rect_description_left_y_offset_32bit = 12; - const io_rect_right_y_offset_32bit = 0; - const io_rect_name_right_y_offset_32bit = -7; - const io_rect_description_right_y_offset_32bit = 12; - - const io_rect_left_width_32bit = 20; - const io_rect_name_left_width_32bit = 40; - const io_rect_description_left_width_32bit = 110; - const io_rect_right_width_32bit = 20; - const io_rect_name_right_width_32bit = 40; - const io_rect_description_right_width_32bit = 110; - - - //16IO配置项 - const top_row_height_16bit = 25; - const separator_16bit = 15; - const io_row_height_16bit = 45; - - const io_row_y_offset_16bit = 13; - const io_row_left_x_name_16bit = 10; - const io_row_left_x_value_16bit = 65; - const io_row_right_x_name_16bit = 160; - const io_row_left_width_name_16bit = 40; - const io_row_left_width_value_16bit = 55; - const io_row_right_width_name_16bit = 20; - const io_row_right_width_value_16bit = 130; - - - - const rect_height_16bit = 10; - - const rect_top_y_offset_16bit = 95; - const rect_bottom_y_offset_16bit = 65; - - const io_rect_left_x_16bit = 10; - const io_rect_name_left_x_16bit = 35; - const io_rect_description_left_x_16bit = 80; - const io_rect_right_x_16bit = 270; - const io_rect_name_right_x_16bit = 225; - const io_rect_description_right_x_16bit = 155; - - const io_rect_left_y_offset_16bit = 0; - const io_rect_name_left_y_offset_16bit = 5; - const io_rect_description_left_y_offset_16bit = -4; - const io_rect_right_y_offset_16bit = 0; - const io_rect_name_right_y_offset_16bit = 0; - const io_rect_description_right_y_offset_16bit = 0; - - const io_rect_left_width_16bit = 20; - const io_rect_name_left_width_16bit = 40; - const io_rect_description_left_width_16bit = 110; - const io_rect_right_width_16bit = 20; - const io_rect_name_right_width_16bit = 40; - const io_rect_description_right_width_16bit = 110; - - //8IO配置项 - const top_row_height_8bit = 25; - const separator_8bit = 15; - const io_row_height_8bit = 45; - - const io_row_y_offset_8bit = 13; - const io_row_left_x_name_8bit = 10; - const io_row_left_x_value_8bit = 65; - const io_row_right_x_name_8bit = 160; - const io_row_left_width_name_8bit = 40; - const io_row_left_width_value_8bit = 55; - const io_row_right_width_name_8bit = 20; - const io_row_right_width_value_8bit = 130; - - - - const rect_height_8bit = 10; - - const rect_top_y_offset_8bit = 95; - const rect_bottom_y_offset_8bit = 65; - - const io_rect_left_x_8bit = 10; - const io_rect_name_left_x_8bit = 35; - const io_rect_description_left_x_8bit = 80; - const io_rect_right_x_8bit = 270; - const io_rect_name_right_x_8bit = 225; - const io_rect_description_right_x_8bit = 155; - - const io_rect_left_y_offset_8bit = 0; - const io_rect_name_left_y_offset_8bit = 5; - const io_rect_description_left_y_offset_8bit = -4; - const io_rect_right_y_offset_8bit = 0; - const io_rect_name_right_y_offset_8bit = 0; - const io_rect_description_right_y_offset_8bit = 0; - - const io_rect_left_width_8bit = 20; - const io_rect_name_left_width_8bit = 40; - const io_rect_description_left_width_8bit = 110; - const io_rect_right_width_8bit = 20; - const io_rect_name_right_width_8bit = 40; - const io_rect_description_right_width_8bit = 110; - - const leafer = new LeaferUI.Leafer({ - view: 'idmain', // 支持 window 、div、canvas 标签对象, 可使用id字符串(不用加 # 号) - width: 1700, // 不能设置为 0, 否则会变成自动布局 - height: 900, - fill: fill_backgroud - }) - - const group = new LeaferUI.Group({ x: 0, y: 0, scaleX: 1, scaleY: 1 }) - leafer.add(group) - const image_cpu = new LeaferUI.Image({ x: 100, y: 50, url: '/images/S71500.png', draggable: true, height: 800 }) - - var iogroup = []; - var ioinfo = []; - - groupajax = $.ajax({ - url: "/PenMeiReportManage/PenMeiJMReport/GetRealIOGroup", - type: "Get", - dataType: "json", - async: false, - success: function (redata) { - iogroup = redata.Result; - } - }); - infoajax = $.ajax({ - url: "/PenMeiReportManage/PenMeiJMReport/GetRealIOInfo", - type: "Get", - dataType: "json", - async: false, - success: function (redata) { - ioinfo = redata.Result; - } - }); - - 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',]; - - iogroup.sort(function (a, b) { - return a.IOIndex - b.IOIndex; // 从小到大排序 - }); - debugger; - var initx = 200; - for (var i = 0; i < iogroup.length; i++) { - var iobit = iogroup[i].IOBit; - var ioid = iogroup[i].IOID; - var top_text_value_array = [iogroup[i].IOModel, 'Slot: ' + iogroup[i].IOSlot, "在线"] - var ioinfofilter = ioinfo.filter(function (item) { - return item.IOID === ioid; - }); - var names = []; - var descriptions = []; - for (var iff = 0; iff= 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, - 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_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, - 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_description); - box_32bit.add(rect_right); - box_32bit.add(rect_right_text_name); - box_32bit.add(rect_right_text_description); - } - - return box_32bit; - } - - function Draw16bitIOBox(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_16bit * (sid) + rect_top_y_offset_16bit; - } - if (sid >= 8) { - y = io_row_height_16bit * (sid + 1) + rect_bottom_y_offset_16bit; - } - var rect_left = new LeaferUI.Rect({ - x: io_rect_left_x_16bit, - y: y + io_rect_left_y_offset_16bit, - height: rect_height_16bit, - width: io_rect_left_width_16bit, - fill: fill_rect, - draggable: false, - id: name_16bit[sid] - }) - var rect_left_text_name = new LeaferUI.Text({ - x: io_rect_name_left_x_16bit, - y: y + io_rect_name_left_y_offset_16bit, - width: io_rect_name_left_width_16bit, - fill: fill_rect_text_name, - text: name_16bit[sid], - textAlign: 'left', - verticalAlign: 'middle', - textWrap: 'none', - padding: 0, - fontSize: 12 - }) - var rect_left_text_description = new LeaferUI.Text({ - x: io_rect_description_left_x_16bit, - y: y + io_rect_description_left_y_offset_16bit, - width: io_rect_description_left_width_16bit, - 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_description); - } - return box_16bit; - } - - function Draw8bitIOBox(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_8bit * (sid) + rect_top_y_offset_8bit; - } - if (sid >= 8) { - y = io_row_height_8bit * (sid + 1) + rect_bottom_y_offset_8bit; - } - var rect_left = new LeaferUI.Rect({ - x: io_rect_left_x_8bit, - y: y + io_rect_left_y_offset_8bit, - height: rect_height_8bit, - width: io_rect_left_width_8bit, - fill: fill_rect, - draggable: false, - id: name_8bit[sid] - }) - var rect_left_text_name = new LeaferUI.Text({ - x: io_rect_name_left_x_8bit, - y: y + io_rect_name_left_y_offset_8bit, - width: io_rect_name_left_width_8bit, - fill: fill_rect_text_name, - text: name_8bit[sid], - textAlign: 'left', - verticalAlign: 'middle', - textWrap: 'none', - padding: 0, - fontSize: 12 - }) - var rect_left_text_description = new LeaferUI.Text({ - x: io_rect_description_left_x_8bit, - y: y + io_rect_description_left_y_offset_8bit, - width: io_rect_description_left_width_8bit / 3, - fill: fill_rect_text_description, - text: descriptions_8bit[sid], - textAlign: 'left', - verticalAlign: 'middle', - textWrap: 'none', - textOverflow: ' ', - padding: 0, - fontSize: 12 - }) - - box_8bit.add(rect_left); - box_8bit.add(rect_left_text_name); - box_8bit.add(rect_left_text_description); - } - return box_8bit; - } - - var t = null; - function time() { - clearTimeout(t); //清除定时器 - UpdataChart() - t = setTimeout(time, 1 * 1000); //设定定时器,循环运行 - - } - async function UpdataChart() { - - myajax = await $.ajax({ - url: "/PenMeiReportManage/PenMeiJMReport/GetRealIOState", - type: "Get", - dataType: "json", - // traditional: true,//这里设置为true - // data: { charts_TagNames: SelectTagNamelist }, - success: function (redata) { - - } - }); - $.when(myajax).done(function (redata) { - debugger; - for(var ioName in redata) - { - leafer.findOne('#'+ioName.replace('_','.')).fill =(redata[ioName] == '1') ? fill_rect_io_on : fill_rect_io_off; - - // leafer.findOne('#'+ioName+'_box_tow').fill =(redata[ioName] != '1') ? '#d4d04e' : '#9f9f91'; - // leafer.findOne('#'+ioName+'_box_three').fill =(((Math.random()) < 0.5) == false) ? '#d4d04e' : '#9f9f91'; - //debugger; - } - for (var ioslot = 1; ioslot < 7; ioslot++) { - leafer.findOne('#' + 'Slot:' + ioslot + '_OnlineSatate').fill = fill_rect_io_on; - } - - }); - - - } - t = setTimeout(time, 1 * 1000); //开始运行 @@ -1278,15 +175,9 @@ }) -
-
-
- -
-
-
- + diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit16bitt8bit初版完成.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 32bit16bitt8bit初版完成.cshtml similarity index 100% rename from HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit16bitt8bit初版完成.cshtml rename to HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 32bit16bitt8bit初版完成.cshtml diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit完成.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 32bit完成.cshtml similarity index 100% rename from HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 32bit完成.cshtml rename to HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 32bit完成.cshtml diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 副本.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 副本.cshtml similarity index 100% rename from HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 副本.cshtml rename to HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 副本.cshtml diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 样式完成待改函数.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 样式完成待改函数.cshtml similarity index 100% rename from HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReport/Index - 样式完成待改函数.cshtml rename to HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index - 样式完成待改函数.cshtml diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml new file mode 100644 index 0000000..3b96e0d --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiJMReportNew/Index.cshtml @@ -0,0 +1,1874 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + +
+
+
+ +
+
+
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkState/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkState/Index.cshtml new file mode 100644 index 0000000..456487d --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkState/Index.cshtml @@ -0,0 +1,816 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + +
+
+
+
+
+
diff --git a/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkStateNew/Index.cshtml b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkStateNew/Index.cshtml new file mode 100644 index 0000000..e70925c --- /dev/null +++ b/HT.Cloud.Web/Areas/PenMeiReportManage/Views/PenMeiNetWorkStateNew/Index.cshtml @@ -0,0 +1,1031 @@ +@{ + ViewBag.Title = "Index"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +@inject Microsoft.AspNetCore.Hosting.IWebHostEnvironment env + + + + + + +
+
+
+
+
+
diff --git a/HT.Cloud.Web/DataProtection/key-50c97b30-fc78-4678-8491-609fe36ba677.xml b/HT.Cloud.Web/DataProtection/key-50c97b30-fc78-4678-8491-609fe36ba677.xml new file mode 100644 index 0000000..49e5c2b --- /dev/null +++ b/HT.Cloud.Web/DataProtection/key-50c97b30-fc78-4678-8491-609fe36ba677.xml @@ -0,0 +1,16 @@ + + + 2024-01-24T06:56:20.433702Z + 2024-01-24T06:56:20.2008649Z + 2024-04-23T06:56:20.2008649Z + + + + + + + uqxVELX71LiB9P3EvBDYewROjDOToo7tHjN3gHPuzGDHq9GomkJSKGmqYmQNNA0gyl///qknafQsNDfb8+HCng== + + + + \ No newline at end of file diff --git a/HT.Cloud.Web/wwwroot/images/RJ45.png b/HT.Cloud.Web/wwwroot/images/RJ45.png new file mode 100644 index 0000000..b8d076a Binary files /dev/null and b/HT.Cloud.Web/wwwroot/images/RJ45.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/PLC.png b/HT.Cloud.Web/wwwroot/imagesnet/PLC.png new file mode 100644 index 0000000..e12d3f5 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/PLC.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/false.png b/HT.Cloud.Web/wwwroot/imagesnet/false.png new file mode 100644 index 0000000..1b63782 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/false.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/true.png b/HT.Cloud.Web/wwwroot/imagesnet/true.png new file mode 100644 index 0000000..92e0d37 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/true.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/交换机.png b/HT.Cloud.Web/wwwroot/imagesnet/交换机.png new file mode 100644 index 0000000..612df4c Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/交换机.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/应用服务器.png b/HT.Cloud.Web/wwwroot/imagesnet/应用服务器.png new file mode 100644 index 0000000..7ad9050 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/应用服务器.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/服务器.png b/HT.Cloud.Web/wwwroot/imagesnet/服务器.png new file mode 100644 index 0000000..72027a8 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/服务器.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/磁盘存储.png b/HT.Cloud.Web/wwwroot/imagesnet/磁盘存储.png new file mode 100644 index 0000000..717fe9b Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/磁盘存储.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/计算机.png b/HT.Cloud.Web/wwwroot/imagesnet/计算机.png new file mode 100644 index 0000000..e30b5cf Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/计算机.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/阀门.png b/HT.Cloud.Web/wwwroot/imagesnet/阀门.png new file mode 100644 index 0000000..62bd245 Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/阀门.png differ diff --git a/HT.Cloud.Web/wwwroot/imagesnet/面板.png b/HT.Cloud.Web/wwwroot/imagesnet/面板.png new file mode 100644 index 0000000..18528ac Binary files /dev/null and b/HT.Cloud.Web/wwwroot/imagesnet/面板.png differ