补充公司级别树

This commit is contained in:
2025-04-09 19:14:54 +08:00
parent 8514fb0156
commit 023e3d33cf
86 changed files with 5694 additions and 3375 deletions
@@ -9,6 +9,23 @@ namespace FineUIPro.Web.Customization.CNCCG.HSSE.Check
{
public partial class SafetyOfficerCheck : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
/// <summary>
/// 页面加载
/// </summary>
@@ -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();
}
}
/// <summary>
/// 公司级树加载
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
@@ -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
/// </summary>
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<SqlParameter> listStr = new List<SqlParameter>();