diff --git a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx index 30e3b88..48ccfc4 100644 --- a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx +++ b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx @@ -1,119 +1,135 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyOfficerCheck.aspx.cs" Inherits="FineUIPro.Web.Customization.CNCCG.HSSE.Check.SafetyOfficerCheck" %> +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + - + 群安员巡检 -
- - - - - - - - + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - \ No newline at end of file + diff --git a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.cs b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.cs index 475bece..ae55e72 100644 --- a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.cs +++ b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.cs @@ -9,6 +9,23 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check { public partial class SafetyOfficerCheck : PageBase { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + /// /// 页面加载 /// @@ -18,8 +35,21 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check { if (!IsPostBack) { - ////权限按钮方法 - this.GetButtonPower(); + this.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) + { + this.ProjectId = Request.Params["projectId"]; + } + + this.ucTree.UnitId = this.CurrUser.UnitId; + this.ucTree.ProjectId = this.ProjectId; + if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + this.panelLeftRegion.Hidden = true; + ////权限按钮方法 + this.GetButtonPower(); + } + this.btnNew.OnClientClick = Window1.GetShowReference("SafetyOfficerCheckEdit.aspx") + "return false;"; if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) { @@ -30,6 +60,22 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check this.BindGrid(); } } + /// + /// 公司级树加载 + /// + /// + /// + protected void changeTree(object sender, EventArgs e) + { + this.ProjectId = this.ucTree.ProjectId; + this.BindGrid(); + + this.GetButtonPower(); + if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId)) + { + btnNew.Hidden = true; + } + } #region 获取按钮权限 /// @@ -45,7 +91,7 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check } var menuid = Const.Check_SafetyOfficerCheckMenuId; - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuid); + var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, menuid); if (buttonList.Count() > 0) { if (buttonList.Contains(BLL.Const.BtnAdd)) @@ -98,6 +144,10 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check /// private void BindGrid() { + if (string.IsNullOrEmpty(this.ProjectId)) + { + return; + } string strSql = @"SELECT CASE WHEN State='0' then '待提交' when State='1' then '待生成日常巡检' when State='2' then '已生成日常巡检' END as StatesNr,F.State,F.CompileDate,F.SafetyOfficerCheckId,F.ImageUrl,F.HandleIdea, @@ -108,9 +158,9 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check left join Project_ProjectUser AS PUser on F.ReceiveMan=PUser.UserId WHERE 1=1 "; var userId = CurrUser.UserId; - if (!string.IsNullOrEmpty(CurrUser.LoginProjectId)) + if (!string.IsNullOrEmpty(ProjectId)) { - strSql += " and PUser.ProjectId='" + CurrUser.LoginProjectId + "' "; + strSql += " and PUser.ProjectId='" + ProjectId + "' "; } List listStr = new List(); diff --git a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.designer.cs index 49456d0..fec5f71 100644 --- a/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.designer.cs +++ b/SUBQHSE/FineUIPro.Web/Customization/CNCCG/HSSE/Check/SafetyOfficerCheck.aspx.designer.cs @@ -41,6 +41,42 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check /// protected global::FineUIPro.Panel Panel1; + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + /// /// Grid1 控件。 /// diff --git a/SUBQHSE/FineUIPro.Web/Customization/ZJ/HSSE/Hazard/HazardInfo.aspx b/SUBQHSE/FineUIPro.Web/Customization/ZJ/HSSE/Hazard/HazardInfo.aspx index 9926119..8fd5dc2 100644 --- a/SUBQHSE/FineUIPro.Web/Customization/ZJ/HSSE/Hazard/HazardInfo.aspx +++ b/SUBQHSE/FineUIPro.Web/Customization/ZJ/HSSE/Hazard/HazardInfo.aspx @@ -1,5 +1,7 @@ <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HazardInfo.aspx.cs" Inherits="FineUIPro.Web.Customization.ZJ.HSSE.Hazard.HazardInfo" %> +<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %> + @@ -10,121 +12,135 @@
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -<%-- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +