数据大屏优化
This commit is contained in:
@@ -58,10 +58,66 @@ namespace FineUIPro.Web
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.CurrUser.LoginProjectId = null;
|
||||
}
|
||||
}
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分公司下拉框绑定数据
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.CurrUser.UnitId) && this.CurrUser.Base_Unit.IsBranch == true)
|
||||
{//当前人员为分公司人员
|
||||
return;
|
||||
}
|
||||
string userId = this.CurrUser.UserId;
|
||||
string unitName = string.Empty;
|
||||
//string unitName = this.txtUnitName.Text.Trim();
|
||||
var getUser = UserService.GetUserByUserId(userId);
|
||||
var unitlist = BLL.UnitService.GetBranchUnitList(true);
|
||||
//if (!string.IsNullOrWhiteSpace(unitName))
|
||||
//{
|
||||
// unitlist = unitlist.Where(x => x.UnitName.Contains(unitName)).ToList();
|
||||
//}
|
||||
unitlist = unitlist.OrderBy(x => x.UnitCode).ToList();
|
||||
Grid1.RecordCount = unitlist.Count;
|
||||
Grid1.DataSource = unitlist;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Tab1.RefreshIFrame();
|
||||
string dUnitId = this.drpUnit.Value;
|
||||
if (!string.IsNullOrEmpty(dUnitId))
|
||||
{
|
||||
this.CurrUser.LastUnitId = this.drpUnit.Value;
|
||||
UserService.UpdateLastUserInfo(this.CurrUser.UserId, null, true, string.Empty, this.drpUnit.Value);
|
||||
}
|
||||
PageContext.Redirect("~/index.aspx?unitId=" + this.drpUnit.Value, "_top");
|
||||
|
||||
PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
//this.CurrUser.LoginProjectId = this.drpProject.Value;
|
||||
//PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
//MenuSwitchMethod(this.CurrUser.LastMenuType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region InitTreeMenu
|
||||
@@ -290,7 +346,11 @@ namespace FineUIPro.Web
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
//string menuType = Request.Params["menuType"] != null ? Request.Params["menuType"].ToString() : string.Empty;
|
||||
//if (!string.IsNullOrWhiteSpace(menuType))
|
||||
//{
|
||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||
//}
|
||||
this.InitMenuStyleButton();
|
||||
this.InitMenuModeButton();
|
||||
this.InitLangMenuButton();
|
||||
@@ -314,6 +374,33 @@ namespace FineUIPro.Web
|
||||
// //divWeather.InnerHtml = getW.WeatherRef + " " + getW.CurrTem+ "°C";
|
||||
//}
|
||||
|
||||
this.CurrUser.LoginProjectId = null;
|
||||
this.drpUnit.Hidden = true;
|
||||
if (CommonService.IsSuperAdminManage(this.CurrUser.UserId) || !string.IsNullOrWhiteSpace(this.CurrUser.UnitId))
|
||||
{
|
||||
if (CommonService.IsSuperAdminManage(this.CurrUser.UserId) || this.CurrUser.UnitId == Const.UnitId_XJYJ)
|
||||
{
|
||||
this.drpUnit.Hidden = false;
|
||||
BindGrid();
|
||||
string dUnitId = Const.UnitId_XJYJ;
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LastUnitId))
|
||||
{
|
||||
dUnitId = this.CurrUser.LastUnitId;
|
||||
}
|
||||
//var su = UserService.GetUserByUserId(this.CurrUser.UserId);
|
||||
//if (!string.IsNullOrEmpty(su.LastUnitId))
|
||||
//{
|
||||
// dUnitId = su.LastUnitId;
|
||||
//}
|
||||
this.drpUnit.Value = dUnitId;
|
||||
UserService.UpdateLastUserInfo(this.CurrUser.UserId, null, true, string.Empty, dUnitId);
|
||||
}
|
||||
else if (this.CurrUser.Base_Unit.IsBranch == true)
|
||||
{
|
||||
this.drpUnit.Hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.UnitId) && this.CurrUser.UnitId != CommonService.GetThisUnitId())
|
||||
{
|
||||
this.Title = "安全数据采集平台(分公司)";
|
||||
@@ -393,7 +480,7 @@ namespace FineUIPro.Web
|
||||
/// 功能模块切换方法
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
protected void MenuSwitchMethod(string type)
|
||||
protected void MenuSwitchMethod(string type)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
@@ -421,7 +508,7 @@ namespace FineUIPro.Web
|
||||
this.Tab1.IFrameUrl = "~/common/main.aspx";
|
||||
}
|
||||
|
||||
UserService.UpdateLastUserInfo(this.CurrUser.UserId, type, true, string.Empty);
|
||||
//UserService.UpdateLastUserInfo(this.CurrUser.UserId, type, true, string.Empty, this.CurrUser.UnitId);
|
||||
InitTreeMenu();
|
||||
}
|
||||
|
||||
@@ -442,7 +529,7 @@ namespace FineUIPro.Web
|
||||
if ((this.CurrUser.IsOffice == true && !string.IsNullOrEmpty(this.CurrUser.RoleId)) || (this.CurrUser.IsOffice == false || !this.CurrUser.IsOffice.HasValue))
|
||||
{
|
||||
string url = "~/indexProject.aspx?projectId=" + this.CurrUser.LastProjectId;
|
||||
UserService.UpdateLastUserInfo(this.CurrUser.UserId, null, false, this.CurrUser.LastProjectId);
|
||||
UserService.UpdateLastUserInfo(this.CurrUser.UserId, null, false, this.CurrUser.LastProjectId, string.Empty);
|
||||
PageContext.Redirect(url, "_top");
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user