1、系统菜单调整;
2、系统看板UI调整; 3、事故事件功能 4、其他
This commit is contained in:
@@ -302,60 +302,97 @@ namespace FineUIPro.Web
|
||||
{
|
||||
needProjectId = Request.Params["projectId"];
|
||||
}
|
||||
ProjectService.InitAllUnEndProjectShortNameDropDownList(this.drpProject, this.CurrUser.UserId, needProjectId, false);
|
||||
BLL.UnitService.InitBranchUnitDropDownList(this.drpUnit, false);
|
||||
Funs.FineUIPleaseSelect(this.drpUnit, "请选择所属单位");
|
||||
//if (this.CurrUser.UnitId != null)
|
||||
//{
|
||||
// this.drpUnit.SelectedValue = this.CurrUser.UnitId;
|
||||
//}
|
||||
if (!string.IsNullOrEmpty(Request.Params["state"]))
|
||||
{
|
||||
this.ckState.SelectedValue = Request.Params["state"];
|
||||
}
|
||||
BindGrid(this.CurrUser.UserId, needProjectId, "GONGCHENG", this.ckState.SelectedValue, this.txtProjectName.Text.Trim(), this.drpUnit.SelectedValue);
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
{
|
||||
|
||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||
|
||||
this.drpProject.Value = Request.Params["projectId"];
|
||||
}
|
||||
else if (this.Grid1.Rows.Count() > 0)
|
||||
{
|
||||
this.drpProject.Value = this.Grid1.Rows[0].DataKeys[0].ToString();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectName"]))
|
||||
{
|
||||
var getproject = ProjectService.GetProjectByProjectName(Request.Params["projectName"]);
|
||||
if (getproject != null)
|
||||
{
|
||||
this.drpProject.SelectedValue = getproject.ProjectId;
|
||||
this.drpProject.Value = getproject.ProjectId;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
this.drpProject.Value = this.CurrUser.LoginProjectId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(needProjectId))
|
||||
{
|
||||
this.drpProject.Value = needProjectId;
|
||||
}
|
||||
//var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == this.drpProject.Value);
|
||||
//if (project != null && !string.IsNullOrEmpty(project.ProjectCode))
|
||||
//{
|
||||
// this.hfProjectCode.Text = project.ProjectCode;
|
||||
//}
|
||||
//if (project != null && !string.IsNullOrEmpty(project.MonitorPW))
|
||||
//{
|
||||
// this.hfMonitorPW.Text = Funs.EncryptionPassword(project.MonitorPW);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.hfMonitorPW.Text = "";
|
||||
//}
|
||||
//if (CurrUser.UserId == Const.hfnbdId)
|
||||
//{
|
||||
// var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控密码" select x).ToList().FirstOrDefault();
|
||||
// if (sysSet17 != null)
|
||||
// {
|
||||
// this.hfProjectCode.Text = "admin";
|
||||
// this.hfMonitorPW.Text = Funs.EncryptionPassword(sysSet17.SetValue);
|
||||
// }
|
||||
//}
|
||||
|
||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||
this.InitMenuStyleButton();
|
||||
this.InitMenuModeButton();
|
||||
this.InitLangMenuButton();
|
||||
this.btnPersonal.Text = this.CurrUser.UserName;
|
||||
}
|
||||
if (CurrUser.IsOffice.HasValue && CurrUser.IsOffice.Value)
|
||||
{
|
||||
|
||||
string username = ConfigurationManager.AppSettings["Video_USER"];
|
||||
string password = ConfigurationManager.AppSettings["Video_PW"];
|
||||
this.hfProjectCode.Text = username;
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(password);
|
||||
}
|
||||
else
|
||||
{
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (project != null && !string.IsNullOrEmpty(project.ProjectCode))
|
||||
{
|
||||
this.hfProjectCode.Text = project.ProjectCode;
|
||||
}
|
||||
if (project != null && !string.IsNullOrEmpty(project.MonitorPW))
|
||||
{
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(project.MonitorPW);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hfMonitorPW.Text = "";
|
||||
}
|
||||
this.userName.InnerText = this.CurrUser.UserName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region 项目下拉框绑定数据
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid(string userId, string projectId, string ProjectAttribute, string projectState, string projectName, string unitId)
|
||||
{
|
||||
var projectlist = BLL.ProjectService.GetUnEndProjectByUserIdDropDownList(userId, projectId, ProjectAttribute, projectState, projectName);
|
||||
if (unitId != BLL.Const._Null)
|
||||
{
|
||||
projectlist = projectlist.Where(x => x.UnitId == unitId).ToList();
|
||||
}
|
||||
foreach (var item in projectlist)
|
||||
{
|
||||
item.ProjectAddress = BLL.UnitService.GetUnitCodeByUnitId(item.UnitId);
|
||||
item.UnitId = BLL.UnitService.GetUnitNameByUnitId(item.UnitId);
|
||||
|
||||
}
|
||||
projectlist = projectlist.OrderBy(x => x.ProjectAddress).ToList();
|
||||
Grid1.RecordCount = projectlist.Count;
|
||||
Grid1.DataSource = projectlist;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Http (GET/POST)
|
||||
@@ -548,47 +585,87 @@ namespace FineUIPro.Web
|
||||
protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.Tab1.RefreshIFrame();
|
||||
this.CurrUser.LoginProjectId = this.drpProject.SelectedValue;
|
||||
|
||||
this.CurrUser.LoginProjectId = this.drpProject.Value;
|
||||
PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
MenuSwitchMethod(this.CurrUser.LastMenuType);
|
||||
|
||||
if (CurrUser.IsOffice.HasValue && CurrUser.IsOffice.Value)
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == this.drpProject.Value);
|
||||
if (project != null && !string.IsNullOrEmpty(project.ProjectCode))
|
||||
{
|
||||
|
||||
string username = ConfigurationManager.AppSettings["Video_USER"];
|
||||
string password = ConfigurationManager.AppSettings["Video_PW"];
|
||||
this.hfProjectCode.Text = username;
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(password);
|
||||
this.hfProjectCode.Text = project.ProjectCode;
|
||||
}
|
||||
if (project != null && !string.IsNullOrEmpty(project.MonitorPW))
|
||||
{
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(project.MonitorPW);
|
||||
}
|
||||
else
|
||||
{
|
||||
var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
if (project != null && !string.IsNullOrEmpty(project.ProjectCode))
|
||||
{
|
||||
this.hfProjectCode.Text = project.ProjectCode;
|
||||
}
|
||||
if (project != null && !string.IsNullOrEmpty(project.MonitorPW))
|
||||
{
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(project.MonitorPW);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.hfMonitorPW.Text = "";
|
||||
}
|
||||
this.hfMonitorPW.Text = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (CurrUser.UserId == Const.hfnbdId)
|
||||
{
|
||||
var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控密码" select x).ToList().FirstOrDefault();
|
||||
if (sysSet17 != null)
|
||||
{
|
||||
this.hfProjectCode.Text = "admin";
|
||||
this.hfMonitorPW.Text = Funs.EncryptionPassword(sysSet17.SetValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//protected void drpProject_SelectedIndexChanged(object sender, EventArgs e)
|
||||
//{
|
||||
// this.Tab1.RefreshIFrame();
|
||||
// this.CurrUser.LoginProjectId = this.drpProject.SelectedValue;
|
||||
|
||||
// PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
// MenuSwitchMethod(this.CurrUser.LastMenuType);
|
||||
|
||||
// if (CurrUser.IsOffice.HasValue && CurrUser.IsOffice.Value)
|
||||
// {
|
||||
|
||||
// string username = ConfigurationManager.AppSettings["Video_USER"];
|
||||
// string password = ConfigurationManager.AppSettings["Video_PW"];
|
||||
// this.hfProjectCode.Text = username;
|
||||
// this.hfMonitorPW.Text = Funs.EncryptionPassword(password);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
|
||||
// if (project != null && !string.IsNullOrEmpty(project.ProjectCode))
|
||||
// {
|
||||
// this.hfProjectCode.Text = project.ProjectCode;
|
||||
// }
|
||||
// if (project != null && !string.IsNullOrEmpty(project.MonitorPW))
|
||||
// {
|
||||
// this.hfMonitorPW.Text = Funs.EncryptionPassword(project.MonitorPW);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// this.hfMonitorPW.Text = "";
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
protected void btnMenuSwitch_Click(object sender, EventArgs e)
|
||||
{
|
||||
string datatag = ((FineUIPro.ControlBase)sender).AttributeDataTag;
|
||||
this.MenuSwitchMethod(datatag);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 功能模块切换方法
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
protected void MenuSwitchMethod(string type)
|
||||
{
|
||||
this.CurrUser.LoginProjectId = this.drpProject.SelectedValue;
|
||||
this.CurrUser.LoginProjectId = this.drpProject.Value;
|
||||
this.XmlDataSource1.DataFile = "common/Menu_Personal.xml";
|
||||
this.leftPanel.Hidden = true;
|
||||
this.Tab1.IFrameUrl = "~/common/mainProject.aspx";
|
||||
@@ -761,7 +838,7 @@ namespace FineUIPro.Web
|
||||
|
||||
protected void btnDigitalSite_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_DigitalSite, this.drpProject.SelectedValue))
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_DigitalSite, this.drpProject.Value))
|
||||
{
|
||||
string url = ConfigurationManager.AppSettings["Video_URL"] + "#/screen";
|
||||
Response.Write("<script>window.open(" + url + "'',''_blank'')</script>");
|
||||
@@ -777,7 +854,7 @@ namespace FineUIPro.Web
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"];
|
||||
}
|
||||
else if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_DigitalSite, this.drpProject.SelectedValue))
|
||||
else if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_DigitalSite, this.drpProject.Value))
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"];
|
||||
}
|
||||
@@ -799,5 +876,24 @@ namespace FineUIPro.Web
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_SubPackMage);
|
||||
}
|
||||
|
||||
#region 查询
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void TextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
string needProjectId = "";
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
{
|
||||
needProjectId = Request.Params["projectId"];
|
||||
}
|
||||
BindGrid(this.CurrUser.UserId, needProjectId, "GONGCHENG", this.ckState.SelectedValue, this.txtProjectName.Text.Trim(), this.drpUnit.SelectedValue);
|
||||
//this.drpProject.SelectedIndex = 0;
|
||||
this.CurrUser.LoginProjectId = this.drpProject.Value;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user