补充公司级树

This commit is contained in:
2025-04-09 14:29:40 +08:00
parent a37909b608
commit 8514fb0156
15 changed files with 643 additions and 647 deletions
@@ -37,13 +37,19 @@ namespace FineUIPro.Web.HSSE.Material
if (!IsPostBack)
{
Funs.DropDownPageSize(this.ddlPageSize);
////权限按钮方法
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("MaterialEdit.aspx") + "return false;";
if (this.CurrUser != null && this.CurrUser.PageSize.HasValue)
{
@@ -54,11 +60,34 @@ namespace FineUIPro.Web.HSSE.Material
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;
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
if (string.IsNullOrEmpty(this.ProjectId))
{
return;
}
string strSql = @" SELECT a.MaterialId
,a.Name
,a.PublishMan
@@ -71,7 +100,7 @@ namespace FineUIPro.Web.HSSE.Material
FROM dbo.HSSE_Material a left join Sys_User b on a.PublishMan = b.UserId WHERE a.ProjectId = @ProjectId ";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
if (!string.IsNullOrEmpty(this.txtName.Text.Trim()))
{
strSql += " AND a.Name LIKE @Name";
@@ -209,7 +238,7 @@ namespace FineUIPro.Web.HSSE.Material
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSEMaterialMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.HSSEMaterialMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))