diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 98f8e0e..9eabac1 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -2375,9 +2375,7 @@ - - @@ -16058,13 +16056,6 @@ indexProject.aspx - - index4.aspx - ASPXCodeBehind - - - index4.aspx - indexProjects.aspx ASPXCodeBehind @@ -16072,13 +16063,6 @@ indexProjects.aspx - - index1.aspx - ASPXCodeBehind - - - index1.aspx - ConstructionLog.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/favicon.ico b/SGGL/FineUIPro.Web/favicon1.ico similarity index 100% rename from SGGL/FineUIPro.Web/favicon.ico rename to SGGL/FineUIPro.Web/favicon1.ico diff --git a/SGGL/FineUIPro.Web/index1.aspx b/SGGL/FineUIPro.Web/index1.aspx deleted file mode 100644 index 2d7d620..0000000 --- a/SGGL/FineUIPro.Web/index1.aspx +++ /dev/null @@ -1,801 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index1.aspx.cs" Inherits="FineUIPro.Web.index1" %> - - - - - - - - - - - - - - -
- -
- -

智慧施工管理信息系统

- -
- - - -
-
- -
-
人员统计
-
-
-
-
管理人员
-
0
-
-
-
作业人员
-
0
-
-
-
-
-
-
-
- - - -
-
风险管控
-
-
-
-
- - -
-
作业许可统计
-
-
-
-
- -
-
-
-
-
-
在建项目(个)
-
-
-
-
年度累计
-
承接施工产值(亿元)
-
--
-
-
-
年度累计
-
施工实际产值(亿元)
-
--
-
-
-
年度累计
-
签订合同额(亿元)
-
0
-
-
-
年度累计
-
施工分包合同(个)
-
-
-
-
-
中国地图
-
-
-
-
-
-
-
-
安全统计
-
-
安全人工时
-
00000000000
-
-
-
0
-
问题总数
-
-
-
0%
-
整改率
-
-
-
-
-
-
安全隐患分析
-
-
-
-
-
-
质量统计
-
-
-
问题总数
-
0
-
-
-
-
-
-
-
-
-
- - -
- - - - - - - - - \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/index1.aspx.cs b/SGGL/FineUIPro.Web/index1.aspx.cs deleted file mode 100644 index f42c40f..0000000 --- a/SGGL/FineUIPro.Web/index1.aspx.cs +++ /dev/null @@ -1,401 +0,0 @@ -using BLL; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -namespace FineUIPro.Web -{ - public partial class index1 : PageBase - { - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.userName.InnerText = this.CurrUser.UserName; - this.spDate.InnerText = DateTime.Now.ToLongDateString().ToString() + " " + WeekDayService.CaculateWeekDayT(DateTime.Now); - - var getW = WeatherService.GetWeather(null); - if (getW != null) - { - divWeather.InnerHtml = getW.WeatherRef + " " + getW.CurrTem + "°C"; - } - - ////项目信息 - var getProjectLists = getProjectInfo(); - ////合同 - getHTContract(); - ///劳务统计 - getSitePerson(); - /// 获取安全人工时 - getPersonWorkTime(); - /// 获取质量问题 - getCQMSProblem(); - /// 获取施工产值 - getOutputValue(getProjectLists); - /// 获取风险管控 - getHazard(); - } - } - #region 项目信息 - protected string ProjectInfo; - /// - /// 项目信息 - /// - private List getProjectInfo() - { - ProjectInfo = "[]"; - var getProjects = Funs.DB.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)); - this.divProjectNum.InnerHtml = getProjects.Count().ToString(); - var getProjectMap = getProjects.Where(x => x.MapCoordinates.Length > 0); - if (getProjectMap.Count() > 0) - { - List list = new List(); - foreach (var item in getProjectMap) - { - Model.SingleSerie newS = new Model.SingleSerie - { - name = "【项目名称】:" + item.ProjectName - //+ "
【项目状态】:" + GetProjectState(item.ProjectId) - + "
【开工时间】:" + string.Format("{0:yyyy-MM-dd}", item.StartDate) - + "
【竣工时间】:" + string.Format("{0:yyyy-MM-dd}", item.EndDate) - + "
【项目地址】:" + item.ProjectAddress, - url = "indexProject.aspx?projectId=" + item.ProjectId, - cityname = "中国" - }; - var strMap = Funs.GetStrListByStr(item.MapCoordinates, ','); - if (strMap.Count > 1) - { - newS.value = new[] { Funs.GetNewDecimalOrZero(strMap[0]), Funs.GetNewDecimalOrZero(strMap[1]) }; - list.Add(newS); - } - } - ProjectInfo = JsonConvert.SerializeObject(list); - } - - return getProjects.ToList(); - } - #endregion - - - #region 劳务统计 - protected double OnDutyRate; - /// - /// 劳务统计 - /// - private void getSitePerson() - { - OnDutyRate = 0; - int AllCount = 0; - int MCount = 0; - DateTime dateValue = DateTime.Now.AddDays(-1); - List getallin = new List(); - var getDayAll = from x in Funs.DB.SitePerson_PersonInOut - where x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month - && x.ChangeTime.Value.Day == dateValue.Day && x.IsIn == true - select x; - if (getDayAll.Count() > 0) - { - var getInMaxs = from x in getDayAll - select new Model.PageDataPersonInOutItem - { - PersonId = x.PersonId, - PostType = x.PostType, - WorkPostId = x.WorkPostId, - }; - if (getInMaxs.Count() > 0) - { - getallin = getInMaxs.Distinct().ToList(); - } - } - AllCount = getallin.Count(); - if (AllCount > 0) - { - MCount = getallin.Where(x => x.PostType == Const.PostType_1).Count(); - /////管理人数 - this.divGLPerson.InnerHtml = MCount.ToString()+ ""; - /////作业人数 - this.divZYPerson.InnerHtml = (AllCount - MCount).ToString()+ ""; - int getPersonCount = Funs.DB.SitePerson_Person.Where(x => x.IsUsed == true - && x.InTime <= DateTime.Now && !x.OutTime.HasValue && x.AuditorDate.HasValue).Count(); - if (getPersonCount > 0) - { - OnDutyRate = Math.Round(AllCount * 100.0 / getPersonCount, 1); - } - } - } - #endregion - - - #region 安全人工时 - /// - /// 获取安全人工时 - /// - private void getPersonWorkTime() - { - int wHours = 0; - var getMax = from x in Funs.DB.SitePerson_DayReportDetail - join y in Funs.DB.SitePerson_DayReport on x.DayReportId equals y.DayReportId - select x; - if (getMax.Count() > 0) - { - wHours = Convert.ToInt32(getMax.Sum(x => x.PersonWorkTime) ?? 0); - } - this.divSafeWorkTime.InnerHtml = wHours.ToString("0000000000"); - - ///整改单 - var getRectify = from x in Funs.DB.Check_RectifyNotices - where x.States != Const.State_0 && x.States != null && x.ProjectId != null - select x; - int allcout = getRectify.Count(); - if (allcout > 0) - { - this.divAllRectify.InnerHtml = allcout.ToString()+ ""; - int ccount = getRectify.Where(x => x.States == "5").Count(); - this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString()+ "%"; - } - } - #endregion - - #region 获取合同 - private void getHTContract() - { - - this.divHTNum.InnerHtml = "0"; - decimal d = 0; - //foreach (var item in getC) - //{ - // d += item.ContractAmount ?? 0; - //} - this.divHTAmount.InnerHtml = Math.Round((d / 100000000), 4).ToString(); - } - #endregion - - #region 获取质量问题 - protected double CRectificationRate; - protected double CQualifiedRate; - /// - /// 获取质量问题 - /// - private void getCQMSProblem() - { - ///整改率 - CRectificationRate = 0; - ///合格率 - CQualifiedRate = 0; - var getJointCheckDetail = from x in Funs.DB.Check_JointCheckDetail - select x; - var getCheckControl = from x in Funs.DB.Check_CheckControl select x; - ///问题总数 - int AllCount = getJointCheckDetail.Count() + getCheckControl.Count(); - this.divCQMSAllNum.InnerHtml = AllCount.ToString()+ ""; - if (AllCount > 0) - { - ///问题完成数 - var getJOk = getJointCheckDetail.Where(x => x.State == "6").Count(); - var getCOk = getCheckControl.Where(x => x.State == "7").Count(); - int CCount = getJOk + getCOk; - if (CCount > 0) - { - CRectificationRate = Math.Round(CCount * 1.0 / AllCount * 100, 1); - } - } - - //质量共检数据 - var inspectionManagements = from x in Funs.DB.ProcessControl_InspectionManagement select x; - int a = inspectionManagements.Count(); - //验收数据 - int b = inspectionManagements.Count(x => x.IsOnceQualified == true); - if (a > 0 && b > 0) - { - CQualifiedRate = Math.Round(b * 1.0 / a * 100, 1); - } - } - #endregion - - /// - /// 进度 - /// - protected string projectJDHtml; - /// - /// 月施工计划产值 - /// - protected string MonthPlanOutPutValue; - /// - /// 月施工实际产值 - /// - protected string MonthActualOutPutValue; - /// - /// 获取当年施工产值 - /// - private void getOutputValue(List getProjectLists) - { - MonthPlanOutPutValue = "[0,0,0,0,0,0,0,0,0,0,0,0]"; - MonthActualOutPutValue = "[0,0,0,0,0,0,0,0,0,0,0,0]"; - projectJDHtml = ""; - DateTime date = DateTime.Now.AddYears(-1); - var getOutputValue = Funs.DB.Sys_OutputValueProject.Where(x => x.Year > date.Year || (x.Year == date.Year && x.Month >= date.Month)); - if (getOutputValue.Count() > 0) - { - this.divYearPlanOutPutValue.InnerHtml = (getOutputValue.Sum(x => x.PlanOutPutValue ?? 0)).ToString(); - this.divYearActualOutPutValue.InnerHtml = (getOutputValue.Sum(x => x.ActualOutPutValue ?? 0)).ToString(); - } - DateTime dateValue = DateTime.Now.AddMonths(-1).AddDays(-1); - var getPersonAll = from x in Funs.DB.SitePerson_Person select x; - List getIn = new List(); - var getDayAll = from x in Funs.DB.SitePerson_PersonInOut - where x.ChangeTime.Value.Year == dateValue.Year && x.ChangeTime.Value.Month == dateValue.Month - && x.ChangeTime.Value.Day == dateValue.Day && x.IsIn == true - select x; - foreach (var item in getProjectLists) - { - getIn.Clear(); - var projectClockIns = getDayAll.Where(x => x.ProjectId == item.ProjectId); - if (projectClockIns.Count() > 0) - { - var getInMaxs = from x in projectClockIns - select new Model.PageDataPersonInOutItem - { - PersonId = x.PersonId, - PostType = x.PostType, - WorkPostId = x.WorkPostId, - }; - if (getInMaxs.Count() > 0) - { - getIn = getInMaxs.Distinct().ToList(); - } - } - var getPersons = getPersonAll.Where(x => x.ProjectId == item.ProjectId && x.IsUsed == true && x.InTime <= dateValue - && !x.OutTime.HasValue); - string shortName = item.ShortName; - string jdRate = "0%"; - if (getPersons.Count() > 0 && getIn.Count > 0) - { - decimal a = Convert.ToDecimal(getIn.Count); - decimal b = Convert.ToDecimal(getPersons.Count()); - jdRate = Math.Round(a * 100 / b, 1).ToString() + "%"; - } - projectJDHtml += @"
【在建】" + shortName + "
"; - } - } - - #region 安全隐患分析 - /// - /// 安全隐患分析 - /// - protected string SafeHiddenDanger - { - get - { - List series = new List(); - Model.BusinessColumn businessColumn = new Model.BusinessColumn(); - - Model.SingleSerie s = new Model.SingleSerie(); - List listdata = new List(); - List list = new List(); - businessColumn.title = "安全隐患分析"; - var getTypes = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes select x; - var getAllChecks = from x in Funs.DB.HSSE_Hazard_HazardRegister select x; - var getChecks = from x in Funs.DB.HSSE_Hazard_HazardRegister - group x by x.RegisterTypesId into g - select new { g.First().RegisterTypesId, Count = g.Count(x => x.RegisterTypesId == g.First().RegisterTypesId) }; - var top5Checks = getChecks.OrderByDescending(x => x.Count).Take(5); - int top5Count = 0; - string typeName = string.Empty; - foreach (var item in top5Checks) - { - typeName = string.Empty; - var type = getTypes.FirstOrDefault(x => x.RegisterTypesId == item.RegisterTypesId); - if (type != null) - { - typeName = type.RegisterTypesName; - } - list.Add(typeName); - listdata.Add(1.0*item.Count); - top5Count += item.Count; - } - list.Add("其他"); - listdata.Add(getAllChecks.Count() - top5Count); - s.data = listdata; - series.Add(s); - businessColumn.legend = list; - businessColumn.series = series; - return JsonConvert.SerializeObject(businessColumn); - } - } - #endregion - - protected string riskData1; - protected string riskData2; - protected string riskData3; - protected string riskData4; - #region 风险管控 - /// - /// 获取风险管控 - /// - private void getHazard() - { - var getHazards = from x in Funs.DB.Hazard_HazardSelectedItem - join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId - select new { x.HazardSelectedItemId, y.RiskLevel }; - var riskLevels = from x in Funs.DB.Base_RiskLevel select x; - - List RiskLevelNum = new List(); - List series = new List(); - - riskData1 = getHazards.Count(x => x.RiskLevel == 1).ToString(); - riskData2= getHazards.Count(x => x.RiskLevel == 2).ToString(); - riskData3 = getHazards.Count(x => x.RiskLevel == 3).ToString(); - riskData4 = getHazards.Count(x => x.RiskLevel == 4).ToString(); - - } - #endregion - - - - #region 作业许可数量统计 - /// - /// 作业许可数量统计 - /// - protected string License - { - get - { - List series = new List(); - Model.BusinessColumn businessColumn = new Model.BusinessColumn(); - List listCategories = new List(); - businessColumn.title = "作业许可数量统计"; - Model.SingleSerie s = new Model.SingleSerie(); - List listdata = new List(); - - listCategories.Add("动火"); - listdata.Add(Funs.DB.License_FireWork.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("高处"); - listdata.Add(Funs.DB.License_HeightWork.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("受限"); - listdata.Add(Funs.DB.License_LimitedSpace.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("射线"); - listdata.Add(Funs.DB.License_RadialWork.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("断路"); - listdata.Add(Funs.DB.License_OpenCircuit.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("动土"); - listdata.Add(Funs.DB.License_BreakGround.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("夜间"); - listdata.Add(Funs.DB.License_NightWork.Where(x => x.States == Const.State_3).Count()); - listCategories.Add("吊装"); - listdata.Add(Funs.DB.License_LiftingWork.Where(x => x.States == Const.State_3).Count()); - - s.data = listdata; - series.Add(s); - businessColumn.categories = listCategories; - businessColumn.series = series; - return JsonConvert.SerializeObject(businessColumn); - } - } - #endregion - - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/index1.aspx.designer.cs b/SGGL/FineUIPro.Web/index1.aspx.designer.cs deleted file mode 100644 index 42e374b..0000000 --- a/SGGL/FineUIPro.Web/index1.aspx.designer.cs +++ /dev/null @@ -1,152 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web -{ - - - public partial class index1 - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// divWeather 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWeather; - - /// - /// spDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate; - - /// - /// userName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl userName; - - /// - /// divGLPerson 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divGLPerson; - - /// - /// divZYPerson 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divZYPerson; - - /// - /// divProjectNum 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divProjectNum; - - /// - /// divYearPlanOutPutValue 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divYearPlanOutPutValue; - - /// - /// divYearActualOutPutValue 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divYearActualOutPutValue; - - /// - /// divHTAmount 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divHTAmount; - - /// - /// divHTNum 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divHTNum; - - /// - /// divSafeWorkTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSafeWorkTime; - - /// - /// divAllRectify 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAllRectify; - - /// - /// divRectifyRate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRectifyRate; - - /// - /// divCQMSAllNum 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCQMSAllNum; - } -} diff --git a/SGGL/FineUIPro.Web/index4.aspx b/SGGL/FineUIPro.Web/index4.aspx deleted file mode 100644 index 35e6ed5..0000000 --- a/SGGL/FineUIPro.Web/index4.aspx +++ /dev/null @@ -1,682 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index4.aspx.cs" Inherits="FineUIPro.Web.index4" %> - - - - - - - - 智慧施工管理信息系统 - - <%-- - - - - --%> - - - - - - - - - -
- - - - - <%--头部 开始--%> - -
-
-
-
-
天津
-
- 多云 -
-
-
-
- -
-
-
- 智慧施工管理信息系统 - -
-
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
    -
  • - - -
  • -
  • - - -
  • -
  • - - -
  • -
-
-
-
-
- <%--头部 结束--%> -
- - - <%--自定义展开折叠工具图标--%> - - - - - - - <%--.f-tabstrip-noheader>.f-panel-header--%> - - - - - - - - - - - - - - - - - - -
-
- - - - -
- - - diff --git a/SGGL/FineUIPro.Web/index4.aspx.cs b/SGGL/FineUIPro.Web/index4.aspx.cs deleted file mode 100644 index e644b1f..0000000 --- a/SGGL/FineUIPro.Web/index4.aspx.cs +++ /dev/null @@ -1,504 +0,0 @@ -using BLL; -using System; -using System.Web; -using System.Web.UI.WebControls; -using System.Xml; -using System.Linq; -using System.Configuration; - -namespace FineUIPro.Web -{ - public partial class index4 : PageBase - { - #region Page_Init - - private string _menuType = "menu"; - private int _examplesCount = 0; - private string _searchText = ""; - #region Page_Init - - /// - /// - /// - /// - /// - protected void Page_Init(object sender, EventArgs e) - { - //////////////////////////////////////////////////////////////// - string themeStr = Request.QueryString["theme"]; - string menuStr = Request.QueryString["menu"]; - if (!String.IsNullOrEmpty(themeStr) || !String.IsNullOrEmpty(menuStr)) - { - if (!String.IsNullOrEmpty(themeStr)) - { - HttpCookie cookie = new HttpCookie("Theme_Pro", "Cupertino") - { - Expires = DateTime.Now.AddYears(1) - }; - Response.Cookies.Add(cookie); - } - - if (!String.IsNullOrEmpty(menuStr)) - { - HttpCookie cookie = new HttpCookie("MenuStyle_Pro", menuStr) - { - Expires = DateTime.Now.AddYears(1) - }; - Response.Cookies.Add(cookie); - } - - PageContext.Redirect("~/default.aspx"); - return; - } - //////////////////////////////////////////////////////////////// - - if (!IsPostBack) - { - this.CurrUser.LoginProjectId = null; - } - } - - #endregion - - #region InitTreeMenu - /// - /// - /// - /// - private Tree InitTreeMenu() - { - Tree treeMenu = new Tree - { - ID = "treeMenu", - ShowBorder = false, - ShowHeader = false, - EnableIcons = true, - AutoScroll = true, - EnableSingleClickExpand = true - }; - if (_menuType == "tree" || _menuType == "tree_minimode") - { - treeMenu.HideHScrollbar = true; - treeMenu.ExpanderToRight = true; - treeMenu.HeaderStyle = true; - if (_menuType == "tree_minimode") - { - treeMenu.MiniMode = true; - treeMenu.MiniModePopWidth = Unit.Pixel(300); - - leftPanelToolGear.Hidden = true; - leftPanelToolCollapse.IconFont = IconFont.ChevronCircleRight; - leftPanel.Width = Unit.Pixel(50); - leftPanel.CssClass = "minimodeinside"; - } - } - - leftPanel.Items.Add(treeMenu); - XmlDocument doc = XmlDataSource1.GetXmlDocument(); - ResolveXmlDocument(doc); - // 绑定 XML 数据源到树控件 - treeMenu.NodeDataBound += treeMenu_NodeDataBound; - treeMenu.PreNodeDataBound += treeMenu_PreNodeDataBound; - treeMenu.DataSource = doc; - treeMenu.DataBind(); - return treeMenu; - } - - #endregion - - #region ResolveXmlDocument - - private void ResolveXmlDocument(XmlDocument doc) - { - ResolveXmlDocument(doc, doc.DocumentElement.ChildNodes); - } - - private int ResolveXmlDocument(XmlDocument doc, XmlNodeList nodes) - { - // nodes 中渲染到页面上的节点个数 - int nodeVisibleCount = 0; - foreach (XmlNode node in nodes) - { - // Only process Xml elements (ignore comments, etc) - if (node.NodeType == XmlNodeType.Element) - { - XmlAttribute removedAttr; - // 是否叶子节点 - bool isLeaf = node.ChildNodes.Count == 0; - // 所有过滤条件均是对叶子节点而言,而是否显示目录,要看是否存在叶子节点 - if (isLeaf) - { - // 存在搜索关键字 - if (!String.IsNullOrEmpty(_searchText)) - { - XmlAttribute textAttr = node.Attributes["Text"]; - if (textAttr != null) - { - if (!textAttr.Value.Contains(_searchText) && isLeaf) - { - removedAttr = doc.CreateAttribute("Removed"); - removedAttr.Value = "true"; - node.Attributes.Append(removedAttr); - } - } - } - } - - // 存在子节点 - if (!isLeaf) - { - // 递归 - int childVisibleCount = ResolveXmlDocument(doc, node.ChildNodes); - - if (childVisibleCount == 0) - { - removedAttr = doc.CreateAttribute("Removed"); - removedAttr.Value = "true"; - - node.Attributes.Append(removedAttr); - } - } - - removedAttr = node.Attributes["Removed"]; - if (removedAttr == null) - { - nodeVisibleCount++; - } - } - } - - return nodeVisibleCount; - } - #endregion - - #region treeMenu_NodeDataBound treeMenu_PreNodeDataBound - /// - /// 树节点的绑定后事件 - /// - /// - /// - private void treeMenu_NodeDataBound(object sender, TreeNodeEventArgs e) - { - // 是否叶子节点 - bool isLeaf = e.XmlNode.ChildNodes.Count == 0; - if (!String.IsNullOrEmpty(e.Node.Text)) - { - if (GetIsNewHtml(e.XmlNode)) - { - e.Node.Text = "" + e.Node.Text + ""; - if (e.Node.ParentNode != null) - { - e.Node.ParentNode.Text = "" + e.Node.ParentNode.Text + ""; - } - } - } - - if (isLeaf) - { - // 设置节点的提示信息 - e.Node.ToolTip = e.Node.Text; - } - // 如果仅显示最新示例,或者存在搜索文本 - if (!String.IsNullOrEmpty(_searchText)) - { - e.Node.Expanded = true; - } - } - - /// - /// 树节点的预绑定事件 - /// - /// - /// - private void treeMenu_PreNodeDataBound(object sender, TreePreNodeEventArgs e) - { - // 是否叶子节点 - bool isLeaf = e.XmlNode.ChildNodes.Count == 0; - XmlAttribute removedAttr = e.XmlNode.Attributes["Removed"]; - if (removedAttr != null) - { - e.Cancelled = true; - } - - bool isShow = GetIsPowerMenu(e.XmlNode); - if (!isShow) - { - e.Cancelled = true; - } - - if (isLeaf && !e.Cancelled) - { - _examplesCount++; - } - } - #endregion - - #region 该节点是否显示 - /// - /// 该节点是否显示 - /// - /// - /// - private bool GetIsPowerMenu(XmlNode node) - { - bool result = true; - XmlAttribute isNewAttr = node.Attributes["id"]; - if (isNewAttr != null) - { - result = BLL.CommonService.ReturnMenuByUserIdMenuId(this.CurrUser.UserId, isNewAttr.Value.ToString(), this.CurrUser.LoginProjectId); - } - - return result; - } - #endregion - - #region GetIsNewHtml 是否必填项 - /// - /// 是否必填项 - /// - /// - /// - private bool GetIsNewHtml(XmlNode xmlNode) - { - bool isShow = false; - if (xmlNode.Attributes["Text"].Value.Contains("*")) - { - isShow = true; - } - else - { - - } - - return isShow; - } - #endregion - - #endregion - - #region Page_Load - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.MenuSwitchMethod(Request.Params["menuType"]); - this.InitMenuStyleButton(); - this.InitMenuModeButton(); - this.InitLangMenuButton(); - this.btnRetweet.Hidden = true; - if (this.CurrUser.UserId == Const.hfnbdId) - { - this.btnRetweet.Hidden = false; - } - this.userName.InnerText= this.CurrUser.UserName; - this.spDate.InnerText = DateTime.Now.ToLongDateString().ToString()+" "+WeekDayService.CaculateWeekDayT(DateTime.Now); - this.hdHomePage.Text = "1"; - if (this.CurrUser.HomePageType == "2") - { - this.Tab1.IFrameUrl = "~/common/main2.aspx"; - this.hdHomePage.Text = "2"; - } - var getW = WeatherService.GetWeather(null); - if (getW != null) - { - divWeather.InnerHtml = getW.WeatherRef + " " + getW.CurrTem+ "°C"; - } - } - } - - - /// - /// 菜单树样式 - /// - private void InitMenuStyleButton() - { - string menuStyle = "tree"; - HttpCookie menuStyleCookie = Request.Cookies["MenuStyle_Pro"]; - if (menuStyleCookie != null) - { - menuStyle = menuStyleCookie.Value; - } - - SetSelectedMenuItem(MenuStyle, menuStyle); - } - - /// - /// - /// - private void InitMenuModeButton() - { - string menuMode = "normal"; - HttpCookie menuModeCookie = Request.Cookies["MenuMode_Pro"]; - if (menuModeCookie != null) - { - menuMode = menuModeCookie.Value; - } - - SetSelectedMenuItem(MenuMode, menuMode); - } - - /// - /// 加载菜单语言 - /// - private void InitLangMenuButton() - { - string language = "zh_CN"; - HttpCookie languageCookie = Request.Cookies["Language_Pro"]; - if (languageCookie != null) - { - language = languageCookie.Value; - } - - SetSelectedMenuItem(MenuLang, language); - } - - /// - /// 过滤菜单 - /// - /// - /// - private void SetSelectedMenuItem(MenuButton menuButton, string selectedDataTag) - { - foreach (MenuItem item in menuButton.Menu.Items) - { - MenuCheckBox checkBox = (item as MenuCheckBox); - if (checkBox != null) - { - checkBox.Checked = checkBox.AttributeDataTag == selectedDataTag; - } - } - } - #endregion - - /// - /// 功能模块切换方法 - /// - /// - protected void MenuSwitchMethod(string type) - { - if (!string.IsNullOrEmpty(type)) - { - if (CommonService.IsHaveSystemPower(this.CurrUser.UserId, type, this.CurrUser.LoginProjectId) || type == Const.Menu_Personal) //|| type == Const.Menu_ToDo - { - this.leftPanel.Hidden = false; - this.XmlDataSource1.DataFile = "common/" + type + ".xml"; - this.Tab1.IFrameUrl = ""; - if (type == Const.Menu_Project) - { - this.Tab1.IFrameUrl = "ProjectData/ProjectList.aspx"; - } - } - else - { - Alert.ShowInParent("您没有此模块操作权限,请联系管理员授权!", MessageBoxIcon.Warning); - return; - } - } - else - { - this.leftPanel.Hidden = true; - this.XmlDataSource1.DataFile = "common/Menu_Personal.xml"; - this.Tab1.IFrameUrl = "~/common/main.aspx"; - } - - UserService.UpdateLastUserInfo(this.CurrUser.UserId, type, true, string.Empty); - InitTreeMenu(); - } - - protected void btnHome_Click(object sender, EventArgs e) - { - if (this.leftPanel.Hidden) - { - string url = "~/indexProject.aspx?projectId=" + this.CurrUser.LastProjectId; - UserService.UpdateLastUserInfo(this.CurrUser.UserId, null, false, this.CurrUser.LastProjectId); - PageContext.Redirect(url, "_top"); - } - else - { - this.MenuSwitchMethod(string.Empty); - } - } - - protected void btnPerson_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Person); - } - - protected void btnNotice_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Notice); - } - - protected void btnProject_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Project); - } - - protected void btnServer_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Server); - } - - protected void btnContract_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Contract); - } - - protected void btnDigData_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_DigData); - } - - protected void btnZHGL_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_ZHGL); - } - - protected void btnParty_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Party); - } - - protected void btnPersonal_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_Personal); - } - - protected void btnSysSet_Click(object sender, EventArgs e) - { - this.MenuSwitchMethod(Const.Menu_SysSet); - } - - /// - /// 重新生成系统菜单 - /// - /// - /// - protected void btnRetweet_Click(object sender, EventArgs e) - { - ////设置菜单 - CreateMenuXML.getMenuXML(); - MenuSwitchMethod(string.Empty); - ShowNotify("菜单刷新完成!", MessageBoxIcon.Success); - } - - protected void btnChangeHomePage_Click(object sender, EventArgs e) - { - if (this.hdHomePage.Text == "1") - { - this.hdHomePage.Text = "2"; - this.Tab1.IFrameUrl = "~/common/main2.aspx"; - } - else - { - this.hdHomePage.Text = "1"; - this.Tab1.IFrameUrl = "~/common/main.aspx"; - } - } - } -} diff --git a/SGGL/FineUIPro.Web/index4.aspx.designer.cs b/SGGL/FineUIPro.Web/index4.aspx.designer.cs deleted file mode 100644 index ef78196..0000000 --- a/SGGL/FineUIPro.Web/index4.aspx.designer.cs +++ /dev/null @@ -1,404 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web -{ - - - public partial class index4 - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; - - /// - /// Panel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel Panel1; - - /// - /// topPanel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel topPanel; - - /// - /// ContentPanel1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel ContentPanel1; - - /// - /// divWeather 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWeather; - - /// - /// spDate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate; - - /// - /// userName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlGenericControl userName; - - /// - /// btnPersonal 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPersonal; - - /// - /// btnSysSet 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSysSet; - - /// - /// btnRetweet 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnRetweet; - - /// - /// btnHome 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnHome; - - /// - /// btnProject 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnProject; - - /// - /// btnDigData 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnDigData; - - /// - /// btnServer 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnServer; - - /// - /// btnNotice 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNotice; - - /// - /// btnPerson 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPerson; - - /// - /// btnZHGL 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnZHGL; - - /// - /// leftPanel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Panel leftPanel; - - /// - /// leftPanelToolCollapse 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool leftPanelToolCollapse; - - /// - /// leftPanelToolGear 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool leftPanelToolGear; - - /// - /// btnExpandAll 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnExpandAll; - - /// - /// btnCollapseAll 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnCollapseAll; - - /// - /// MenuMode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuMode; - - /// - /// MenuModeNormal 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeNormal; - - /// - /// MenuModeCompact 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeCompact; - - /// - /// MenuModeLarge 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuModeLarge; - - /// - /// MenuStyle 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuStyle; - - /// - /// MenuStyleTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStyleTree; - - /// - /// MenuStyleMiniModeTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStyleMiniModeTree; - - /// - /// MenuStylePlainTree 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuStylePlainTree; - - /// - /// MenuLang 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton MenuLang; - - /// - /// MenuLangZHCN 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuCheckBox MenuLangZHCN; - - /// - /// mainTabStrip 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TabStrip mainTabStrip; - - /// - /// Tab1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tab Tab1; - - /// - /// toolRefresh 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolRefresh; - - /// - /// toolNewWindow 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolNewWindow; - - /// - /// toolMaximize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolMaximize; - - /// - /// toolSignOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Tool toolSignOut; - - /// - /// windowCustomQuery 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window windowCustomQuery; - - /// - /// hdHomePage 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdHomePage; - - /// - /// btnChangeHomePage 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnChangeHomePage; - - /// - /// XmlDataSource1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1; - } -}