This commit is contained in:
李超 2025-06-13 21:17:50 +08:00
parent d3da07c131
commit 8c1756587d
28 changed files with 1052 additions and 14 deletions

View File

@ -0,0 +1,8 @@
Alter TABLE [dbo].[HSSE_TowerCrane]
add [VideoAccount] [nvarchar](50) NULL,
[VideoPassword] [nvarchar](50) NULL,

View File

@ -1829,7 +1829,9 @@
<Content Include="res\assets\js\swiper.min.js" /> <Content Include="res\assets\js\swiper.min.js" />
<Content Include="res\assets\js\video-7.15.0.min.js" /> <Content Include="res\assets\js\video-7.15.0.min.js" />
<Content Include="res\assets\js\world.js" /> <Content Include="res\assets\js\world.js" />
<Content Include="res\css\commontower.css" />
<Content Include="res\css\company.css" /> <Content Include="res\css\company.css" />
<Content Include="res\css\indextower.css" />
<Content Include="res\css\swiper.min.css" /> <Content Include="res\css\swiper.min.css" />
<Content Include="res\DataInTable.js" /> <Content Include="res\DataInTable.js" />
<Content Include="res\images\01.png" /> <Content Include="res\images\01.png" />
@ -1856,6 +1858,15 @@
<Content Include="res\images\bj.jpg" /> <Content Include="res\images\bj.jpg" />
<Content Include="res\images\Organizational.png" /> <Content Include="res\images\Organizational.png" />
<Content Include="res\images\SubOrganizational.png" /> <Content Include="res\images\SubOrganizational.png" />
<Content Include="res\images\tower\2.png" />
<Content Include="res\images\tower\3.png" />
<Content Include="res\images\tower\4.png" />
<Content Include="res\images\tower\5.png" />
<Content Include="res\images\tower\6.png" />
<Content Include="res\images\tower\tjimg.97b7389.png" />
<Content Include="res\images\tower\twoerpolic.bb339ff.png" />
<Content Include="res\images\tower\twoerpolice2.261a289.png" />
<Content Include="res\images\tower\work1.e93d23f.png" />
<Content Include="res\images\zg05.png" /> <Content Include="res\images\zg05.png" />
<Content Include="res\index\images\logocenter.png" /> <Content Include="res\index\images\logocenter.png" />
<Content Include="res\js\swiper-bundle.min.css" /> <Content Include="res\js\swiper-bundle.min.css" />

View File

@ -22,6 +22,17 @@
MaxLength="50"> MaxLength="50">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:TextBox ID="txtVideoAccount" runat="server" Label="视频账号" Required="true" ShowRedStar="true" LabelWidth="120px"
MaxLength="50" FocusOnPageLoad="true">
</f:TextBox>
<f:TextBox ID="txtVideoPassword" runat="server" Label="视频密码" Required="true" ShowRedStar="true" LabelWidth="120px"
MaxLength="50">
</f:TextBox>
</Items>
</f:FormRow> </f:FormRow>
<f:FormRow> <f:FormRow>
<Items> <Items>

View File

@ -36,9 +36,7 @@ namespace FineUIPro.Web.HSSE.TowerCrane
if (!IsPostBack) if (!IsPostBack)
{ {
////权限按钮方法 ////权限按钮方法
this.GetButtonPower(); this.GetButtonPower();
this.TowerCraneId = Request.Params["TowerCraneId"]; this.TowerCraneId = Request.Params["TowerCraneId"];
if (!string.IsNullOrEmpty(this.TowerCraneId)) if (!string.IsNullOrEmpty(this.TowerCraneId))
{ {
@ -47,6 +45,8 @@ namespace FineUIPro.Web.HSSE.TowerCrane
{ {
this.txtTowerCraneName.Text = rectify.TowerCraneName; this.txtTowerCraneName.Text = rectify.TowerCraneName;
this.txtTowerCraneCode.Text = rectify.TowerCraneCode; this.txtTowerCraneCode.Text = rectify.TowerCraneCode;
this.txtVideoAccount.Text = rectify.VideoAccount;
this.txtVideoPassword.Text = rectify.VideoPassword;
if (rectify.MaxHoist.HasValue) if (rectify.MaxHoist.HasValue)
{ {
this.txtMaxHoist.Text = rectify.MaxHoist.Value.ToString("#.##"); this.txtMaxHoist.Text = rectify.MaxHoist.Value.ToString("#.##");
@ -111,6 +111,8 @@ namespace FineUIPro.Web.HSSE.TowerCrane
} }
towerCrane.TowerCraneCode = this.txtTowerCraneCode.Text.Trim(); towerCrane.TowerCraneCode = this.txtTowerCraneCode.Text.Trim();
towerCrane.TowerCraneName = this.txtTowerCraneName.Text.Trim(); towerCrane.TowerCraneName = this.txtTowerCraneName.Text.Trim();
towerCrane.VideoAccount = this.txtVideoAccount.Text.Trim();
towerCrane.VideoPassword = this.txtVideoPassword.Text.Trim();
if (!string.IsNullOrEmpty(this.txtMaxHoist.Text)) if (!string.IsNullOrEmpty(this.txtMaxHoist.Text))
{ {
@ -141,9 +143,7 @@ namespace FineUIPro.Web.HSSE.TowerCrane
towerCrane.TowerCap = "否"; towerCrane.TowerCap = "否";
} }
towerCrane.Remark = this.txtRemark.Text.Trim(); towerCrane.Remark = this.txtRemark.Text.Trim();
Funs.DB.SubmitChanges(); Funs.DB.SubmitChanges();
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
#endregion #endregion

View File

@ -59,6 +59,24 @@ namespace FineUIPro.Web.HSSE.TowerCrane
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtTowerCraneName; protected global::FineUIPro.TextBox txtTowerCraneName;
/// <summary>
/// txtVideoAccount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtVideoAccount;
/// <summary>
/// txtVideoPassword 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtVideoPassword;
/// <summary> /// <summary>
/// txtMaxHoist 控件。 /// txtMaxHoist 控件。
/// </summary> /// </summary>

View File

@ -6,6 +6,9 @@
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>塔吊状态</title> <title>塔吊状态</title>
<script src="../../common/lib/flex.js"></script>
<link rel="stylesheet" href="../../res/css/commontower.css" />
<link rel="stylesheet" href="../../res/css/indextower.css" />
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
@ -21,14 +24,14 @@
<f:TextBox ID="txtIsono" runat="server" Label="塔吊" EmptyText="输入查询条件" AutoPostBack="true" <f:TextBox ID="txtIsono" runat="server" Label="塔吊" EmptyText="输入查询条件" AutoPostBack="true"
OnTextChanged="Tree_TextChanged" Width="250px" LabelWidth="70px" LabelAlign="Right"> OnTextChanged="Tree_TextChanged" Width="250px" LabelWidth="70px" LabelAlign="Right">
</f:TextBox> </f:TextBox>
<f:HiddenField ID="hfTowerCraneId" ClientIDMode="Static"></f:HiddenField>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
</Toolbars> </Toolbars>
<Items> <Items>
<f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="塔吊状态" OnNodeCommand="tvControlItem_NodeCommand" <f:Tree ID="tvControlItem" ShowHeader="false" Height="500px" Title="塔吊状态" OnNodeCommand="tvControlItem_NodeCommand"
runat="server" ShowBorder="false" EnableCollapse="true" EnableSingleClickExpand="true" runat="server" ShowBorder="false" EnableCollapse="true"
AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true" AutoLeafIdentification="true" EnableSingleExpand="true" EnableTextSelection="true" >
>
</f:Tree> </f:Tree>
</Items> </Items>
</f:Panel> </f:Panel>
@ -36,7 +39,165 @@
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="塔吊状态" Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="塔吊状态"
TitleToolTip="塔吊状态" AutoScroll="true"> TitleToolTip="塔吊状态" AutoScroll="true">
<Items> <Items>
<f:ContentPanel ID="ContentPanel1" CssClass="bodyregion" ShowBorder="false" ShowHeader="false" runat="server">
<div class="y_wrap">
<div class="y_l_site">
<div class="y_box">
<div class="tit">
<div class="y_c_icon"><span></span></div>
<p>设备报警</p>
</div>
<div class="y_box_main" id="sbbj">
<div>
<div>当日预警</div>
<div><span class="c_5b97f9" id="DailyWarning">0</span><span>次</span></div>
</div>
<div>
<div>当日报警</div>
<div><span class="c_ff5353" id="DailyAlarm">0</span><span>次</span></div>
</div>
</div>
</div>
<div class="y_box">
<div class="tit">
<div class="y_c_icon"><span></span></div>
<p>预警趋势</p>
</div>
<div class="y_box_main" style="height:4rem;width:7rem" id="BJQS"></div>
</div>
<div class="y_box">
<div class="tit">
<div class="y_c_icon"><span></span></div>
<p>设备信息</p>
</div>
<div class="y_box_main" id="sbxx">
<div class="y_row">
<div class="y_span">
<div class="y_span_lab"><span></span><span>设备名称</span></div>
<div class="y_span_val" id="divTowerCraneName" ></div>
</div>
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #92b8f5"></span
><span>设备编号</span>
</div>
<div class="y_span_val" id="divTowerCraneCode" ></div>
</div>
</div>
<div class="y_row">
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #a8eeff"></span
><span>最大吊重</span>
</div>
<div class="y_span_val" id="divMaxHoist" >T</div>
</div>
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #4efac6"></span
><span>最大力矩</span>
</div>
<div class="y_span_val" id="divMaxMoment" runat="server">T-M</div>
</div>
</div>
<div class="y_row">
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #a9f841"></span
><span>前臂长</span>
</div>
<div class="y_span_val" id="divFrontArmLength" runat="server">米</div>
</div>
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #e5fa29"></span
><span>后臂长</span>
</div>
<div class="y_span_val" id="divBackArmLength" runat="server">米</div>
</div>
</div>
<div class="y_row">
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #f8c63e"></span
><span>塔帽高</span>
</div>
<div class="y_span_val" id="divTowerCap" runat="server" > </div>
</div>
<div class="y_span">
<div class="y_span_lab">
<span style="background-color: #f1540b"></span
><span>塔臂高</span>
</div>
<div class="y_span_val" id="divArmHeigh" runat="server" >米</div>
</div>
</div>
</div>
</div>
</div>
<div class="y_r_site">
<div class="y_r_site_sub">
<div id="tdzt">
<div></div>
<p>设备编号</p>
</div>
<div id="sp">
<live-player id="player01" live="true" aspect="16:9"></live-player>
</div>
</div>
<div id="zt">
<div>
<span></span>
<span id="Hoist">0T</span>
<span>吊重</span>
</div>
<div>
<span></span>
<span id="Range">0M</span>
<span>幅度</span>
</div>
<div>
<span></span>
<span id="Camber">0度</span>
<span>倾度</span>
</div>
<div>
<span></span>
<span id="WindSpeed">0.00M-T</span>
<span>风速</span>
</div>
<div>
<span></span>
<span id="Moment">0T</span>
<span>力矩</span>
</div>
<div>
<span></span>
<span id="Height">0M</span>
<span>高度</span>
</div>
</div>
<div class="y_r_site_sub1">
<div class="y_box">
<div class="tit">
<div class="y_c_icon"><span></span></div>
<p>实时力矩</p>
</div>
<div class="y_box_main" style="height:3.5rem;width:6rem" id="SSLJ"></div>
</div>
<div class="y_box">
<div class="tit">
<div class="y_c_icon" ><span></span></div>
<p>实时吊重</p>
</div>
<div class="y_box_main" style="height:3.5rem;width:6rem" id="SSDZ"></div>
</div>
</div>
</div>
</div>
</f:ContentPanel>
</Items> </Items>
</f:Panel> </f:Panel>
</Items> </Items>
@ -44,9 +205,313 @@
</form> </form>
<script src="../../res/liveplayer/liveplayer-element.min.js"></script>
<script type="text/javascript" src="../../res/lib/echarts.min.js"></script>
<script type="text/javascript"> <script type="text/javascript">
// 报警趋势
function createBJQSMap(data,dataX) {
// 初始化ECharts实例
const trendChart = echarts.init(document.getElementById("BJQS"));
// 配置项
const option = {
title: {
text: "预警数量",
textStyle: {
color: "#000", // 标题颜色
fontSize: 14,
},
top: "0%", // 顶部对齐
right: "-3%", // 右侧偏移位置
textAlign: "right", // 文本右对齐
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
grid: {
left: "3%",
right: "4%",
bottom: "6%",
containLabel: true,
},
xAxis: {
type: "category",
data: dataX,
axisLine: {
lineStyle: {
color: "#5b97f9", // 坐标轴颜色
},
},
axisLabel: {
color: "#c9c9c9", // 坐标轴标签颜色
},
},
yAxis: {
type: "value",
axisLine: {
lineStyle: {
color: "#5b97f9",
},
},
axisLabel: {
color: "#c9c9c9",
},
splitLine: {
lineStyle: {
color: "rgba(91, 151, 249, 0.2)", // 网格线颜色
},
},
},
series: [
{
name: "报警次数",
type: "line",
smooth: true,
symbol: "none",
data: data,
lineStyle: {
color: "#b828fc", // 报警线颜色
},
itemStyle: {
color: "#b828fc",
},
},
],
};
// 应用配置
trendChart.setOption(option);
// 响应式调整
window.addEventListener("resize", function () {
trendChart.resize();
});
}
function createSSLJMap(data,dataX) {
// 初始化ECharts实例
const trendChart = echarts.init(document.getElementById("SSLJ"));
// 配置项
const option = {
grid: {
left: "3%",
right: "4%",
bottom: "6%",
containLabel: true,
},
xAxis: {
type: "category",
data: dataX,
axisLine: {
lineStyle: {
color: "#5b97f9", // 坐标轴颜色
},
},
axisLabel: {
color: "#c9c9c9", // 坐标轴标签颜色
},
},
yAxis: {
type: "value",
axisLine: {
lineStyle: {
color: "#5b97f9",
},
},
axisLabel: {
color: "#c9c9c9",
},
splitLine: {
lineStyle: {
color: "rgba(91, 151, 249, 0.2)", // 网格线颜色
},
},
},
series: [
{
name: "实时力矩",
type: "line",
smooth: true,
symbol: "none",
data: data,
lineStyle: {
color: "#599df7", // 报警线颜色
},
itemStyle: {
color: "#599df7",
},
},
],
};
// 应用配置
trendChart.setOption(option);
// 响应式调整
window.addEventListener("resize", function () {
trendChart.resize();
});
}
function createSSDZMap(data, datax) {
debugger
// 初始化ECharts实例
const trendChart = echarts.init(document.getElementById("SSDZ"));
// 配置项
const option = {
grid: {
left: "3%",
right: "4%",
bottom: "6%",
containLabel: true,
},
xAxis: {
type: "category",
data: datax,
axisLine: {
lineStyle: {
color: "#5b97f9", // 坐标轴颜色
},
},
axisLabel: {
color: "#c9c9c9", // 坐标轴标签颜色
},
},
yAxis: {
type: "value",
axisLine: {
lineStyle: {
color: "#5b97f9",
},
},
axisLabel: {
color: "#c9c9c9",
},
splitLine: {
lineStyle: {
color: "rgba(91, 151, 249, 0.2)", // 网格线颜色
},
},
},
series: [
{
name: "吊重",
type: "line",
smooth: true,
symbol: "none",
data: data,
lineStyle: {
color: "#599df7", // 报警线颜色
},
itemStyle: {
color: "#599df7",
},
},
],
};
// 应用配置
trendChart.setOption(option);
// 响应式调整
window.addEventListener("resize", function () {
trendChart.resize();
});
}
var currentTowerCraneId = "";
function runGetData() {
var TowerCraneId = $("#hfTowerCraneId-inputEl").val();
if (TowerCraneId != undefined) {
$.ajax({
url: "TowerCraneState.aspx/GetData",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: JSON.stringify({
TowerCraneId: TowerCraneId
}),
success: function (data) {
if (data.d != '' && data.d != undefined) {
var d = JSON.parse(data.d);
$('#divTowerCraneName').text(d.TowerCraneName)
$('#divTowerCraneCode').text(d.TowerCraneCode)
$('#divTowerCap').text(d.TowerCap)
$('#divMaxHoist').text(d.MaxHoist+'T')
$('#divMaxMoment').text(d.MaxMoment)
$('#divFrontArmLength').text(d.FrontArmLength + '米')
$('#divBackArmLength').text(d.BackArmLength + '米')
$('#divArmHeigh').text(d.ArmHeigh + '米')
$('#DailyWarning').text(d.DailyWarning)
$('#DailyAlarm').text(d.DailyAlarm)
$('#Camber').text(d.Camber)
$('#Height').text(d.Height)
$('#Hoist').text(d.Hoist)
$('#Moment').text(d.Moment)
$('#Range').text(d.Range)
$('#WindSpeed').text(d.WindSpeed)
createSSDZMap(d.SSDZ, d.SSDZX)
createSSLJMap(d.SSLJ, d.SSLJX)
createBJQSMap(d.BJQS, d.BJQSX)
}
}
})
}
setTimeout(function () {
runGetData();
}, 5000);
}
var videoHost = 'https://camera.cwcec.com:10000/';
function initVideo(VideoUserName, VideoPassWord) {
var player = document.getElementById('player01');
player.setAttribute("video-url",'');
$.get(videoHost + 'api/v1/login?username=' + VideoUserName + '&password=' + VideoPassWord, function (data1) {
authToken = data1.AuthToken;
$.get(videoHost + 'api/v1/device/channeltree?token=' + authToken, function (data2) {
for (var i = 0; i < data2.length && i <= 0; i++) {
$.get(videoHost + 'api/v1/device/channeltree?serial=' + data2[i].serial + '&token=' + authToken, function (data3) {
debugger
if (data3.length > 0) {
$.get(videoHost + 'api/v1/stream/start?serial=' + data3[0].id.split(':')[0] + '&code=' + data3[0].id.split(':')[1] + '&token=' + authToken, function (data4) {
console.log(data4.HLS)
var player = document.getElementById('player01');
player.setAttribute("video-url", data4.HLS);
}, 'json');
}
}, 'json');
}
}, 'json');
}, 'json');
}
runGetData()
</script> </script>
</body> </body>
</html> </html>

View File

@ -12,6 +12,10 @@ using NPOI.SS.UserModel;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using FineUIPro.Web.ProjectData; using FineUIPro.Web.ProjectData;
using System.Configuration; using System.Configuration;
using System.Web.Services;
using FastReport.Utils;
using Newtonsoft.Json;
using FineUIPro.Web.DataShow;
namespace FineUIPro.Web.HSSE.TowerCrane namespace FineUIPro.Web.HSSE.TowerCrane
{ {
@ -51,7 +55,8 @@ namespace FineUIPro.Web.HSSE.TowerCrane
{ {
TreeNode rootNode = new TreeNode(); TreeNode rootNode = new TreeNode();
rootNode.Text = item.TowerCraneName; rootNode.Text = item.TowerCraneName;
rootNode.NodeID = item.TowerCraneId; rootNode.NodeID = item.TowerCraneId;
rootNode.EnableClickEvent= true;
this.tvControlItem.Nodes.Add(rootNode); this.tvControlItem.Nodes.Add(rootNode);
} }
@ -78,12 +83,165 @@ namespace FineUIPro.Web.HSSE.TowerCrane
/// <param name="e"></param> /// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{ {
string TowerCraneId = this.tvControlItem.SelectedNodeID;
this.hfTowerCraneId.Text = TowerCraneId;
var towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == TowerCraneId);
PageContext.RegisterStartupScript("runGetData() ; initVideo('"+ towerCrane.VideoAccount + "', '"+ Funs.EncryptionPassword(towerCrane.VideoPassword )+ "');");
}
[WebMethod]
public static string GetData(string TowerCraneId)
{
Dictionary<string, object> res = new Dictionary<string, object>();
var towerCrane = Funs.DB.HSSE_TowerCrane.FirstOrDefault(x => x.TowerCraneId == TowerCraneId);
if (towerCrane != null)
{
res.Add("TowerCraneName", towerCrane.TowerCraneName);
res.Add("TowerCraneCode", towerCrane.TowerCraneCode);
res.Add("TowerCap", towerCrane.TowerCap);
res.Add("VideoAccount", towerCrane.VideoAccount);
res.Add("VideoPassword", Funs.EncryptionPassword(towerCrane.VideoPassword));
if (towerCrane.MaxHoist.HasValue)
{
res.Add("MaxHoist", towerCrane.MaxHoist.Value.ToString("##.##"));
}
if (towerCrane.MaxMoment.HasValue)
{
res.Add("MaxMoment", towerCrane.MaxMoment.Value.ToString("##.##"));
}
if (towerCrane.FrontArmLength.HasValue)
{
res.Add("FrontArmLength", towerCrane.FrontArmLength.Value.ToString("##.##"));
}
if (towerCrane.BackArmLength.HasValue)
{
res.Add("BackArmLength", towerCrane.BackArmLength.Value.ToString("##.##"));
}
if (towerCrane.ArmHeigh.HasValue)
{
res.Add("ArmHeigh", towerCrane.ArmHeigh.Value.ToString("##.##"));
}
DateTime date = DateTime.Now.AddDays(-1);
var record = Funs.DB.HSSE_TowerCraneRecord.Where(x=>x.TowerCraneId==TowerCraneId && x.Date>=date).OrderByDescending(x=>x.Date).ToList();
if (record.Count > 0)
{
res.Add("AmountHoist", record[0].AmountHoist.Value.ToString("#0.##"));
res.Add("Camber", record[0].Camber.Value.ToString("#0.##"));
res.Add("Height", record[0].Height.Value.ToString("#0.##"));
res.Add("Hoist", record[0].Hoist.Value.ToString("#0.##"));
res.Add("Moment", record[0].Moment.Value.ToString("#0.##"));
res.Add("Range", record[0].Range.Value.ToString("#0.##"));
res.Add("RotationAngle", record[0].RotationAngle.Value.ToString("#0.##"));
res.Add("WindSpeed", record[0].WindSpeed.Value.ToString("#0.##"));
}
else
{
res.Add("AmountHoist", "0");
res.Add("Camber", "0");
res.Add("Height", "0");
res.Add("Hoist", "0");
res.Add("Moment", "0");
res.Add("Range", "0");
res.Add("RotationAngle", "0");
res.Add("WindSpeed", "0");
}
HashSet<string> warnings = new HashSet<string>();
warnings.Add("111");
warnings.Add("121");
warnings.Add("132");
warnings.Add("133");
warnings.Add("141");
warnings.Add("151");
HashSet<string> alarms = new HashSet<string>();
alarms.Add("112");
alarms.Add("122");
alarms.Add("131");
alarms.Add("134");
alarms.Add("142");
alarms.Add("152");
alarms.Add("201");
alarms.Add("202");
int DailyWarning = 0;
int DailyAlarm = 0;
List<double> SSDZ = new List<double>();
List<string> SSDZX = new List<string>();
List<double> SSLJ = new List<double>();
List<string> SSLJX = new List<string>();
List<int> BJQS = new List<int>();
List<string> BJQSX = new List<string>();
foreach (var r in record)
{
if (!string.IsNullOrEmpty(r.AlarmType))
{
string[] AlarmType = r.AlarmType.Replace("[","").Replace("]","").Split(',');
foreach(string a in AlarmType)
{
if (warnings.Contains(a))
{
DailyWarning++;
}
if (alarms.Contains(a))
{
DailyAlarm++;
}
}
BJQS.Add(AlarmType.Length);
BJQSX.Add(r.Date.Value.ToString("HH:mm"));
}
if (r.Hoist.HasValue)
{
SSDZ.Add(r.Hoist.Value);
SSDZX.Add(r.Date.Value.ToString("HH:mm"));
}
else
{
SSDZ.Add(0);
}
if (r.Moment.HasValue)
{
SSLJ.Add(r.Moment.Value);
SSLJX.Add(r.Date.Value.ToString("HH:mm"));
}
else
{
SSLJ.Add(0);
}
}
res.Add("SSDZ", SSDZ);
res.Add("SSDZX", SSDZX);
res.Add("SSLJ", SSLJ);
res.Add("SSLJX", SSLJX);
res.Add("BJQS", BJQS);
res.Add("BJQSX", BJQSX);
res.Add("DailyWarning", DailyWarning + "");
res.Add("DailyAlarm", DailyAlarm + "");
}
return JsonConvert.SerializeObject(res); ;
} }
#endregion #endregion
#endregion #endregion
} }
} }

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.HSSE.TowerCrane
/// </remarks> /// </remarks>
protected global::FineUIPro.TextBox txtIsono; protected global::FineUIPro.TextBox txtIsono;
/// <summary>
/// hfTowerCraneId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hfTowerCraneId;
/// <summary> /// <summary>
/// tvControlItem 控件。 /// tvControlItem 控件。
/// </summary> /// </summary>
@ -85,5 +94,59 @@ namespace FineUIPro.Web.HSSE.TowerCrane
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks> /// </remarks>
protected global::FineUIPro.Panel panelCenterRegion; protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// divMaxMoment 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divMaxMoment;
/// <summary>
/// divFrontArmLength 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divFrontArmLength;
/// <summary>
/// divBackArmLength 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divBackArmLength;
/// <summary>
/// divTowerCap 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTowerCap;
/// <summary>
/// divArmHeigh 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divArmHeigh;
} }
} }

View File

@ -0,0 +1,39 @@
/* 删除: 之前的样式 */
/* 添加重置CSS样式 */
html,
body,
div,
span,
h1,
h2,
h3,
h4,
h5,
h6,
p,
live-player {
font-family: '宋体';
margin: 0;
padding: 0;
border: 0;
font-size: 14px;
line-height: 1;
vertical-align: baseline;
box-sizing: border-box;
user-select: none; /* 添加: 禁止文字选中 */
}
html,
body {
height: 100%;
width: 100%;
}
ol,
ul {
list-style: none;
}
html::-webkit-scrollbar {
display: none;
}

View File

@ -0,0 +1,265 @@
.y_wrap{
height: 100%;
width: 100%;
display: grid;
padding: 0.1875rem;
grid-template-columns: 1.2fr 2fr;
gap: 0.1875rem;
background-color: #f5f3f3;
}
.y_l_site{
height: 100%;
display: grid;
grid-template-rows: 1.3fr 2fr 1.2fr;
gap: 0.1875rem;
}
.y_r_site{
height: 100%;
display: grid;
grid-template-rows: 2fr 1fr 2fr;
gap: 0.1875rem;
}
.y_r_site_sub{
display: grid;
grid-template-columns: 1.2fr 2fr;
gap: 0.1875rem;
}
.y_r_site_sub1{
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.1875rem;
}
.y_r_site_sub1>div,
.y_r_site_sub>div,
.y_r_site>div:nth-child(2),
.y_l_site>div{
background-color: #ffffff;
}
.y_box{
position: relative;
}
.y_box>.tit{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
padding: 0 0.25rem;
height: 0.5rem;
}
.y_box>.tit>p{
line-height: 1;
font-size: 0.2rem;
margin-left: 0.1875rem;
}
.y_c_icon{
height: 0.2rem;
width: 0.2rem;
border:0.0375rem solid #5b97f9;
border-radius: 50%;
position: relative;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
.y_c_icon>span{
height: 0.125rem;
width: 0.125rem;
border-radius: 50%;
border:0.0375rem solid #5b97f9;
}
.y_box_main{
width: 100%;
height: calc(100% - 0.5rem);
}
/* 设备报警 */
#sbbj{
display: grid;
grid-template-columns: 1fr 1fr;
align-items: center;
justify-items: center;
}
#sbbj>div{
min-width: 1.8rem;
max-width: 90%;
height: 0.725rem;
padding-left: 1rem;
background-position: left center;
background-repeat: no-repeat;
background-size: 0.875rem 0.725rem;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
}
#sbbj>div:nth-child(1){
background-image: url("../images/tower/twoerpolic.bb339ff.png");
}
#sbbj > div:nth-child(2) {
background-image: url("../images/tower/twoerpolice2.261a289.png");
}
#sbbj>div>div:nth-child(1){
font-size: 0.2rem;
}
#sbbj>div>div:nth-child(2){
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
#sbbj>div>div:nth-child(2)>span{
font-size: 0.2rem;
}
/* 设备信息 */
#sbxx{
padding: 0.1875rem;
}
#sbxx>.y_row{
padding: 0.125rem 0;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
border-bottom: 1px solid #ddd;
}
#sbxx>.y_row>.y_span{
flex: 1;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
#sbxx>.y_row>.y_span>div{
width: 50%;
}
#sbxx>.y_row>.y_span>.y_span_lab{
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
}
#sbxx>.y_row>.y_span>.y_span_val{
text-align: right;
padding: 0 0.125rem;
}
#sbxx>.y_row>.y_span>.y_span_lab>span:nth-child(1){
display: inline-block;
height: 0.2rem;
width: 0.075rem;
border-radius: 0.0375rem;
background-color: #5b97f9;
}
#sbxx>.y_row>.y_span>.y_span_lab>span:nth-child(2){
font-size: 0.2rem;
margin-left: 0.125rem;
}
/* 吊重\风速... */
#zt{
padding: 0.125rem;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-row: 1fr 1fr;
grid-row-gap: 0.1875rem;
grid-column-gap: 0.125rem;
}
#zt>div{
border: 1px solid #d3e3fe;
background-color: #eff5ff;
border-radius: 0.1rem;
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 0 0.1875rem;
align-items: center;
}
#zt > div > span:nth-child(1) {
height: 0.475rem;
width: 0.475rem;
background-image: url("../images/tower/work1.e93d23f.png");
background-position: center center;
background-repeat: no-repeat;
background-size: 0.475rem 0.475rem;
}
#zt > div:nth-child(2) > span:nth-child(1) {
background-image: url("../images/tower/2.png");
}
#zt > div:nth-child(3) > span:nth-child(1) {
background-image: url("../images/tower/3.png");
}
#zt > div:nth-child(4) > span:nth-child(1) {
background-image: url("../images/tower/4.png");
}
#zt > div:nth-child(5) > span:nth-child(1) {
background-image: url("../images/tower/5.png");
}
#zt > div:nth-child(6) > span:nth-child(1) {
background-image: url("../images/tower/6.png");
}
#zt>div>span:nth-child(2){
width: 40%;
color: #649bf8;
font-size: .2rem;
font-weight: 700;
text-align: center;
}
#zt>div>span:nth-child(3){
color: #404040;
font-size: 0.2rem;
}
/* 塔吊状态 */
#tdzt{
padding: 0.1875rem;
}
#tdzt > div {
width: 100%;
height: calc(100% - 0.5rem);
background-image: url(../images/tower/tjimg.97b7389.png);
background-position: center;
background-repeat: no-repeat;
}
#tdzt>p{
height: 0.5rem;
line-height: .5rem;
font-size: 0.225rem;
text-align: center;
}
/* 视频 */
#sp{
position: relative; /* 设置相对定位 */
width: 100%; /* 宽度占满父容器 */
height: 100%;
}
#sp live-player {
position: absolute; /* 绝对定位 */
top: 0;
left: 0;
width: 100%; /* 宽度100% */
height: 100%; /* 高度100% */
background-color: #000000;
object-fit: cover; /* 保持原始比例并覆盖整个区域 */
}
.c_5b97f9{
color: #5b97f9;
font-weight: 700;
font-size: 0.25rem !important;
}
.c_ff5353{
color: #ff5353;
font-weight: 700;
font-size: 0.25rem !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 863 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 942 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB