合并最新
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
@@ -12,7 +13,8 @@ using System.Xml;
|
||||
namespace FineUIPro.Web
|
||||
{
|
||||
public partial class indexProject : PageBase
|
||||
{
|
||||
{
|
||||
|
||||
#region Page_Init
|
||||
|
||||
private string _menuType = "menu";
|
||||
@@ -289,106 +291,98 @@ namespace FineUIPro.Web
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.UserId, false);
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
//string userData = "localhost/hsse/indexProject.aspx?account=sysgly&projectcode=E21009&module=1";
|
||||
if (!string.IsNullOrEmpty(Request.Params["account"]))
|
||||
{
|
||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||
}
|
||||
Session[SessionName.CurrUser] = new Model.Sys_User();
|
||||
string userAccount = Request.Params["account"];
|
||||
string projectCode = Request.Params["projectcode"];
|
||||
string module = Request.Params["module"];
|
||||
var project = BLL.ProjectService.GetProjectByProjectCode(projectCode);
|
||||
this.CurrUser.LoginProjectId = project.ProjectId;
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectName"]))
|
||||
{
|
||||
var getproject = ProjectService.GetProjectByProjectName(Request.Params["projectName"]);
|
||||
if (getproject != null)
|
||||
if (BLL.LoginService.UserLogOnByAccount(userAccount, this.Page))
|
||||
{
|
||||
this.drpProject.SelectedValue = getproject.ProjectId;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Request.Params["PHTUrl"]))
|
||||
{
|
||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||
mainTabStrip.ShowTabHeader = true;
|
||||
PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
//btnPHTGL_Click(null, null);
|
||||
if (!string.IsNullOrEmpty(Request.Params["PHTUserid"]))
|
||||
{
|
||||
var model_user = BLL.UserService.GetUserByUserId(Request.Params["PHTUserid"]);
|
||||
var q = BLL.Funs.DB.Sys_User.FirstOrDefault(x => x.Account == model_user.Account && x.Password == model_user.Password);
|
||||
if (q != null)
|
||||
if (this.CurrUser != null)
|
||||
{
|
||||
Session["CurrUser"] = q;
|
||||
Session["u"] = model_user.Account;
|
||||
Session["p"] = model_user.Password;
|
||||
mainTabStrip.ShowTabHeader = true;
|
||||
PageContext.RegisterStartupScript("parent.removeActiveTab();");
|
||||
}
|
||||
}
|
||||
btnPHTGL_Click(null, null);
|
||||
PageContext.RegisterStartupScript(mainTabStrip.GetAddTabReference("dynamic_tab4", Request.Params["PHTUrl"], "审批", IconHelper.GetIconUrl(Icon.ApplicationAdd), true));
|
||||
else
|
||||
{
|
||||
Response.Redirect("https://sggl.chengda.com/");
|
||||
return;
|
||||
}
|
||||
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.UserId, false);
|
||||
this.drpProject.SelectedValue = project.ProjectId;
|
||||
if (module == "1")
|
||||
{
|
||||
btnPZHGL_Click(null, null);
|
||||
}
|
||||
if (module == "2")
|
||||
{
|
||||
btnJDGL_Click(null, null);
|
||||
}
|
||||
if (module == "3")
|
||||
{
|
||||
btnCQMS_Click(null, null);
|
||||
}
|
||||
if (module == "4")
|
||||
{
|
||||
btnHSSE_Click(null, null);
|
||||
}
|
||||
if (module == "5")
|
||||
{
|
||||
btnHJGL_Click(null, null);
|
||||
}
|
||||
if (module == "6")
|
||||
{
|
||||
btnDocControl_Click(null, null);
|
||||
}
|
||||
if (module == "7")
|
||||
{
|
||||
btnTestRun_Click(null, null);
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||
ProjectService.InitAllProjectShortNameDropDownList(this.drpProject, this.CurrUser.UserId, false);
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
|
||||
{
|
||||
this.drpProject.SelectedValue = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectName"]))
|
||||
{
|
||||
var getproject = ProjectService.GetProjectByProjectName(Request.Params["projectName"]);
|
||||
if (getproject != null)
|
||||
{
|
||||
this.drpProject.SelectedValue = getproject.ProjectId;
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
{
|
||||
this.drpProject.SelectedValue = this.CurrUser.LoginProjectId;
|
||||
}
|
||||
this.MenuSwitchMethod(Request.Params["menuType"]);
|
||||
}
|
||||
|
||||
this.InitMenuStyleButton();
|
||||
this.InitMenuModeButton();
|
||||
this.InitLangMenuButton();
|
||||
this.userName.InnerText = this.CurrUser.UserName;
|
||||
SetSystemPower();
|
||||
this.userName.InnerText = this.CurrUser.UserName;
|
||||
if (this.CurrUser.Password == Const.MD5pwd)
|
||||
{
|
||||
Alert.ShowInTop("当前密码不安全,请尽快更改!", MessageBoxIcon.Warning);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private void SetSystemPower()
|
||||
{
|
||||
var getSystemList = CommonService.GetSystemPowerList(this.CurrUser.UserId, this.drpProject.SelectedValue);
|
||||
if (!getSystemList.Contains(Const.Menu_PHTGL))
|
||||
{
|
||||
this.liPHTGL.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_HSSE))
|
||||
{
|
||||
this.liHSSE.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_CQMS))
|
||||
{
|
||||
this.liCQMS.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_JDGL))
|
||||
{
|
||||
this.liJDGL.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_HJGL))
|
||||
{
|
||||
this.liHJGL.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_DigitalSite))
|
||||
{
|
||||
this.liDigitalSite.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_PPerson))
|
||||
{
|
||||
this.liPPerson.Visible = false;
|
||||
}
|
||||
if (!getSystemList.Contains(Const.Menu_PZHGL))
|
||||
{
|
||||
this.liPZHGL.Visible = false;
|
||||
}
|
||||
|
||||
if (getSystemList.Count() == 1)
|
||||
{
|
||||
MenuSwitchMethod(getSystemList.FirstOrDefault());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Http (GET/POST)
|
||||
@@ -600,7 +594,7 @@ namespace FineUIPro.Web
|
||||
if (!string.IsNullOrEmpty(type))
|
||||
{
|
||||
this.CurrUser.LastProjectId = this.CurrUser.LoginProjectId;
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal)
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal || type == Const.Menu_ToDo)
|
||||
{
|
||||
this.XmlDataSource1.DataFile = "common/" + type + ".xml";
|
||||
this.leftPanel.Hidden = false;
|
||||
@@ -612,11 +606,18 @@ namespace FineUIPro.Web
|
||||
else if (type == Const.Menu_ProjectSet)
|
||||
{
|
||||
this.Tab1.IFrameUrl = "~/ProjectData/ProjectSetView.aspx";
|
||||
}
|
||||
if (type == Const.Menu_PZHGL)
|
||||
}
|
||||
else if (type == Const.Menu_ToDo)
|
||||
{
|
||||
this.Tab1.IFrameUrl = "~/PZHGL/InformationProject/ConstructionPlan.aspx";
|
||||
this.Tab1.Title = "总承包商施工计划";
|
||||
this.Tab1.IFrameUrl = "~/ToDo/CQMSToDo.aspx";
|
||||
}
|
||||
else if (type == Const.Menu_Change)
|
||||
{
|
||||
this.Tab1.IFrameUrl = ""; //~/CQMS/Comprehensive/DesignChangeOrder.aspx
|
||||
}
|
||||
if (type == Const.Menu_PZHGL || type == Const.Menu_DocControl || type == Const.Menu_TestRun)
|
||||
{
|
||||
this.Tab1.IFrameUrl = "";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -645,59 +646,144 @@ namespace FineUIPro.Web
|
||||
this.MenuSwitchMethod(string.Empty);
|
||||
}
|
||||
}
|
||||
protected void btnCQMS_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_CQMS);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 个人设置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPersonal_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_Personal);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目设置
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnProjectSet_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_ProjectSet);
|
||||
}
|
||||
|
||||
protected void btnHSSE_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_HSSE);
|
||||
}
|
||||
|
||||
protected void btnHJGL_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_HJGL);
|
||||
}
|
||||
|
||||
protected void btnPHTGL_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_PHTGL);
|
||||
}
|
||||
|
||||
protected void btnTestRun_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_TestRun);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 施工管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPZHGL_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_PZHGL);
|
||||
}
|
||||
|
||||
protected void btnDigitalSite_Click(object sender, EventArgs e)
|
||||
/// <summary>
|
||||
/// 质量
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCQMS_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_DigitalSite);
|
||||
this.MenuSwitchMethod(Const.Menu_CQMS);
|
||||
}
|
||||
|
||||
protected void btnPPerson_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_PDigData);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 进度/计划
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnJDGL_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_JDGL);
|
||||
}
|
||||
/// <summary>
|
||||
/// hse管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnHSSE_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_HSSE);
|
||||
}
|
||||
/// <summary>
|
||||
/// 焊接管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnHJGL_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_HJGL);
|
||||
}
|
||||
/// <summary>
|
||||
/// 试车管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnTestRun_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_TestRun);
|
||||
}
|
||||
/// <summary>
|
||||
/// 文控管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDocControl_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_DocControl);
|
||||
}
|
||||
/// <summary>
|
||||
/// 变更管理
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnChange_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_Change);
|
||||
}
|
||||
/// <summary>
|
||||
/// 现场考勤
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAttendance_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_Attendance);
|
||||
}
|
||||
/// <summary>
|
||||
/// 监控视频
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnVideo_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_Video, this.drpProject.SelectedValue))
|
||||
{
|
||||
string url = ConfigurationManager.AppSettings["Video_URL"] + "#/screen";
|
||||
Response.Write("<script>window.open(" + url + "'',''_blank'')</script>");
|
||||
// this.MenuSwitchMethod(Const.Menu_Video);
|
||||
}
|
||||
}
|
||||
|
||||
protected string VideoURL
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, Const.Menu_Video, this.drpProject.SelectedValue))
|
||||
{
|
||||
return ConfigurationManager.AppSettings["Video_URL"] + "#/screen";
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 待办
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnToDoItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.MenuSwitchMethod(Const.Menu_ToDo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user