diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index ad138858..5f282702 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,17 +1 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) - 在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion) - 在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context) - 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() - 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) - 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) -出错时间:11/09/2021 09:51:28 -出错文件:http://localhost:8118/res.axd?img=images.loading._3.f2f5f7_362b36.gif&t=635987008610000000 -IP地址:::1 - -出错时间:11/09/2021 09:51:29 - + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 36a8d229..87c9ca32 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1413,6 +1413,7 @@ + @@ -14131,6 +14132,13 @@ TestRunEdit.aspx + + Video.aspx + ASPXCodeBehind + + + Video.aspx + AccidentCauseReportBar.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Video/Video.aspx b/SGGL/FineUIPro.Web/Video/Video.aspx new file mode 100644 index 00000000..29846c3f --- /dev/null +++ b/SGGL/FineUIPro.Web/Video/Video.aspx @@ -0,0 +1,152 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Video.aspx.cs" Inherits="FineUIPro.Web.Video.Video" %> + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+
+
+ + + + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+
+
+ + + + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+ + + + +
关闭
+
+
+
+
+
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Video/Video.aspx.cs b/SGGL/FineUIPro.Web/Video/Video.aspx.cs new file mode 100644 index 00000000..602e8f69 --- /dev/null +++ b/SGGL/FineUIPro.Web/Video/Video.aspx.cs @@ -0,0 +1,140 @@ +using BLL; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.Video +{ + public partial class Video : PageBase + { + + public string playIds + { + get + { + return (string)ViewState["playIds"]; + } + set + { + ViewState["playIds"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + if (this.CurrUser != null) + { + this.playIds = ""; + this.tvControlItem.Nodes.Clear(); + TreeNode rootNode = new TreeNode + { + Text = "项目-设备", + NodeID = "0", + Expanded = true + }; + this.tvControlItem.Nodes.Add(rootNode); + + try + { + string url = ConfigurationManager.AppSettings["Video_URL"]; + List urls = new List(); + string res = APIGetHttpService.Http(url + "api/v1/device/channeltree"); + + List> jsonNvr = JsonConvert.DeserializeObject>>(res); + foreach (Dictionary nvr in jsonNvr) + { + TreeNode newNode = new TreeNode + { + NodeID = nvr["id"], + Text = nvr["customName"], + ToolTip = "项目", + Expanded = false + }; + rootNode.Nodes.Add(newNode); + string jsonCameras = APIGetHttpService.Http(url + "api/v1/device/channeltree?serial=" + nvr["serial"]); + var data = JsonConvert.DeserializeObject>>(jsonCameras); + foreach (var video in data) + { + TreeNode tempNode = new TreeNode + { + NodeID = video["id"], + Text = video["name"], + ToolTip = "设备", + EnableClickEvent = true + }; + + newNode.Nodes.Add(tempNode); + } + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "视频监控", "Video.Video.aspx"); + } + } + } + } + + #region 树展开事件 + /// + /// 树展开事件 + /// + /// + /// + protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) + { } + #endregion + + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + var id = this.tvControlItem.SelectedNodeID; + if (id.Contains(":")) + { + try + { + string url = ConfigurationManager.AppSettings["Video_URL"]; + var stmp = new DateTimeOffset(DateTime.Now).ToUnixTimeSeconds() + ""; + string jsonCamera = APIGetHttpService.Http(url + "api/v1/stream/start?serial=" + id.Split(':')[0] + "&code=" + id.Split(':')[1] + "&_=" + stmp); + var data = JsonConvert.DeserializeObject>(jsonCamera); + for (int i = 1; i <= 9; i++) + { + if (this.playIds.Contains("player0" + i)) + { + continue; + } + else + { + this.playIds += "player0" + i; + PageContext.RegisterStartupScript("play(\"" + "player0" + i + "\",\"" + data["HLS"] + "\")"); + break; + } + } + } + catch (Exception ex) + { + ErrLogInfo.WriteLog(ex, "视频监控", "Video.Video.aspx"); + } + } + } + #endregion + + protected void btnClose_Click(object sender, EventArgs e) + { + var id = Request.Form["__EVENTARGUMENT"]; + this.playIds = this.playIds.Replace(id, ""); + PageContext.RegisterStartupScript("play(\"" + id + "\",\"\")"); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Video/Video.aspx.designer.cs b/SGGL/FineUIPro.Web/Video/Video.aspx.designer.cs new file mode 100644 index 00000000..411c614b --- /dev/null +++ b/SGGL/FineUIPro.Web/Video/Video.aspx.designer.cs @@ -0,0 +1,269 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Video +{ + + + public partial class Video + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Panel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel3; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Panel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel5; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Panel6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel6; + + /// + /// ContentPanel3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel3; + + /// + /// Panel7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel7; + + /// + /// Panel8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel8; + + /// + /// ContentPanel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel4; + + /// + /// Panel9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel9; + + /// + /// ContentPanel5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel5; + + /// + /// Panel10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel10; + + /// + /// ContentPanel6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel6; + + /// + /// Panel11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel11; + + /// + /// Panel12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel12; + + /// + /// ContentPanel7 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel7; + + /// + /// Panel13 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel13; + + /// + /// ContentPanel8 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel8; + + /// + /// Panel14 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel14; + + /// + /// ContentPanel9 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel9; + } +} diff --git a/SGGL/FineUIPro.Web/indexProject.aspx b/SGGL/FineUIPro.Web/indexProject.aspx index b723039a..b8c2622c 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx +++ b/SGGL/FineUIPro.Web/indexProject.aspx @@ -234,7 +234,7 @@
  • -
  • diff --git a/SGGL/FineUIPro.Web/indexProject.aspx.cs b/SGGL/FineUIPro.Web/indexProject.aspx.cs index 5f4b9636..4866882c 100644 --- a/SGGL/FineUIPro.Web/indexProject.aspx.cs +++ b/SGGL/FineUIPro.Web/indexProject.aspx.cs @@ -604,14 +604,16 @@ namespace FineUIPro.Web this.Tab1.IFrameUrl = "~/common/mainProject.aspx"; } this.CurrUser.LastProjectId = null; + if (!string.IsNullOrEmpty(type)) - { + { this.CurrUser.LastProjectId = this.CurrUser.LoginProjectId; if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal) - { + { this.XmlDataSource1.DataFile = "common/" + type + ".xml"; this.leftPanel.Hidden = false; this.Tab1.IFrameUrl = "~/common/main" + type + ".aspx"; + this.Tab1.Title = "首页"; if (type == Const.Menu_Personal) { this.Tab1.IFrameUrl = "~/Personal/PersonalInfo.aspx"; @@ -619,8 +621,15 @@ namespace FineUIPro.Web else if (type == Const.Menu_ProjectSet) { this.Tab1.IFrameUrl = "~/ProjectData/ProjectSetView.aspx"; + this.Tab1.Title = "项目"; } - if (type == Const.Menu_PZHGL) + else if (type == Const.Menu_DigitalSite) + { + this.Tab1.IFrameUrl = "~/Video/Video.aspx"; + this.leftPanel.Hidden = true; + this.Tab1.Title = "视频监控"; + } + else if (type == Const.Menu_PZHGL) { //this.Tab1.IFrameUrl = "~/PZHGL/InformationProject/ConstructionPlan.aspx"; this.Tab1.IFrameUrl = "~/HSSE/Manager/HSSELog.aspx"; @@ -631,10 +640,6 @@ namespace FineUIPro.Web this.Tab1.IFrameUrl = "~/PZHGL/GJSX/GJSXList.aspx"; this.Tab1.Title = "关键事项"; } - else - { - this.Tab1.Title = "首页"; - } } else { @@ -709,9 +714,9 @@ namespace FineUIPro.Web protected void btnDigitalSite_Click(object sender, EventArgs e) { - string url = ConfigurationManager.AppSettings["Video_URL"] + "#/screen"; - Response.Write(""); - // this.MenuSwitchMethod(Const.Menu_DigitalSite); + //string url = ConfigurationManager.AppSettings["Video_URL"] + "#/screen"; + //Response.Write(""); + this.MenuSwitchMethod(Const.Menu_DigitalSite); } protected string VideoURL diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 62e242ad..13d080ad 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -71165,7 +71165,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualifiedProjectCode", DbType="NVarChar(50)")] public string QualifiedProjectCode { get @@ -245131,7 +245131,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] public string Address { get @@ -245195,7 +245195,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkAreaName { get @@ -326794,7 +326794,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(2000)")] public string Address { get @@ -326810,7 +326810,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkAreaName", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] public string WorkAreaName { get @@ -334282,7 +334282,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(102)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(100)")] public string Name { get