This commit is contained in:
夏菊 2025-09-28 14:36:11 +08:00
parent e4b2b878cd
commit 229b9ef4d9
8 changed files with 0 additions and 2960 deletions

View File

@ -2375,9 +2375,7 @@
<Content Include="indexs.aspx" />
<Content Include="indexProject.aspx" />
<Content Include="font\iconfont.svg" />
<Content Include="index4.aspx" />
<Content Include="indexProjects.aspx" />
<Content Include="index1.aspx" />
<Content Include="InformationProject\ConstructionLog.aspx" />
<Content Include="InformationProject\ConstructionLogEdit.aspx" />
<Content Include="InformationProject\PersonStarList.aspx" />
@ -16058,13 +16056,6 @@
<Compile Include="indexProject.aspx.designer.cs">
<DependentUpon>indexProject.aspx</DependentUpon>
</Compile>
<Compile Include="index4.aspx.cs">
<DependentUpon>index4.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="index4.aspx.designer.cs">
<DependentUpon>index4.aspx</DependentUpon>
</Compile>
<Compile Include="indexProjects.aspx.cs">
<DependentUpon>indexProjects.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -16072,13 +16063,6 @@
<Compile Include="indexProjects.aspx.designer.cs">
<DependentUpon>indexProjects.aspx</DependentUpon>
</Compile>
<Compile Include="index1.aspx.cs">
<DependentUpon>index1.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="index1.aspx.designer.cs">
<DependentUpon>index1.aspx</DependentUpon>
</Compile>
<Compile Include="InformationProject\ConstructionLog.aspx.cs">
<DependentUpon>ConstructionLog.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,801 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index1.aspx.cs" Inherits="FineUIPro.Web.index1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></title>
<link href="res/css/indexv1.css" rel="stylesheet" />
</head>
<body>
<script src="res/lib/flexlib.js"></script>
<form id="form1" runat="server">
<div class="header-navs">
<div class="nav">
<div class="nav-site ">
<p><span>天津</span><span id="divWeather" runat="server" class="tianqi">多云</span> <span id="spDate" runat="server"></span></p>
</div>
<div class="nav-site nav-site_left">
<div class="nav-bar">项目清单</div>
<div class="nav-bar">大数据中心</div>
<div class="nav-bar">总部检查</div>
</div>
</div>
<h2>智慧施工管理信息系统</h2>
<div class="nav">
<div class="nav-site nav-site_sitting">
<div class="btn btn1">消息</div>
<div class="btn btn2" id="userName" runat="server"></div>
<div class="btn btn3">设置</div>
<div class="btn btn4">退出</div>
<div class="btn btn5 magnify">全屏</div>
</div>
<div class="nav-site nav-site_right">
<div class="nav-bar">项目清单</div>
<div class="nav-bar">大数据中心</div>
<div class="nav-bar">总部检查</div>
</div>
</div>
</div>
<!-- 导航 1 -->
<div id="wrap">
<div class="side_left">
<!-- 人员统计 0 -->
<div class="plate">
<div class="plate-title">人员统计</div>
<div class="people">
<div class="people-nums">
<div class="people-nums_dot">
<div class="label">管理人员</div>
<div class="val" runat="server" id="divGLPerson">0<span>个</span></div>
</div>
<div class="people-nums_dot" style="margin-top:2.8947rem;">
<div class="label">作业人员</div>
<div class="val" id="divZYPerson" runat="server">0<span>个</span></div>
</div>
</div>
<div class="people-map">
<div id="onGuardMap"></div>
</div>
</div>
</div>
<!-- 人员统计 1 -->
<!-- 风险管控 0 -->
<div class="plate">
<div class="plate-title">风险管控</div>
<div class="risk">
<div id="riskMap"></div>
</div>
</div>
<!-- 风险管控 1 -->
<!-- 作业许可统计 0 -->
<div class="plate">
<div class="plate-title">作业许可统计</div>
<div class="jobLicensesMap">
<div id="jobLicensesMap"></div>
</div>
</div>
<!-- 作业许可统计 1 -->
</div>
<div class="side_center">
<div class="plate1">
<div class="item">
<div class="item-label"></div>
<div class="item-label">在建项目(个)</div>
<div class="item-num" runat="server" id="divProjectNum"></div>
</div>
<div class="item">
<div class="item-label">年度累计</div>
<div class="item-label">承接施工产值(亿元)</div>
<div class="item-num" runat="server" id="divYearPlanOutPutValue" >--</div>
</div>
<div class="item">
<div class="item-label">年度累计</div>
<div class="item-label">施工实际产值(亿元)</div>
<div class="item-num" runat="server" id="divYearActualOutPutValue">--</div>
</div>
<div class="item">
<div class="item-label">年度累计</div>
<div class="item-label">签订合同额(亿元)</div>
<div class="item-num" runat="server" id="divHTAmount">0</div>
</div>
<div class="item">
<div class="item-label">年度累计</div>
<div class="item-label">施工分包合同(个)</div>
<div class="item-num" runat="server" id="divHTNum"> </div>
</div>
</div>
<div class="plate2">
<div class="changMap imgbg"><b>中国地图</b> <span class="imgbg"></span></div>
<div class="map">
<div id="map"></div>
</div>
</div>
</div>
<div class="side_right">
<div class="plate">
<div class="plate-title">安全统计</div>
<div class="safe">
<div class="safe-label">安全人工时</div>
<div class="safe-num" id="divSafeWorkTime" runat="server">00000000000</div>
<div class="safe-boxs">
<div class="safe-box">
<div class="safe-box_label" runat="server" id="divAllRectify">0<span>个</span></div>
<div class="safe-box_val">问题总数</div>
</div>
<div class="safe-box">
<div class="safe-box_label orange" id="divRectifyRate" runat="server">0<span>%</span></div>
<div class="safe-box_val">整改率</div>
</div>
</div>
</div>
</div>
<div class="plate">
<div class="plate-title">安全隐患分析</div>
<div class="safetyAnalysisMap">
<div id="safetyAnalysisMap"></div>
</div>
</div>
<div class="plate">
<div class="plate-title">质量统计</div>
<div class="quality">
<div class="quality-top">
<div class="quality-top_label">问题总数</div>
<div class="quality-top_val" id="divCQMSAllNum" runat="server">0<span>个</span></div>
</div>
<div class="qualityMap">
<div id="qualityMap1"></div>
<div id="qualityMap2"></div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>
<script src="res/lib/echarts.min.js"></script>
<script src="res/lib/china.js"></script>
<script src="res/lib/world.js"></script>
<script src="res/js/optionV1.js"></script>
<script src="res/lib/jquery.js"></script>
<script>
// 在岗率数据配置
let guardData1 = [
{
value: <%=OnDutyRate%>,
name: '在岗率',
title: {
color: '#12CDA2',
offsetCenter: ['0%', '20%'],
fontSize: 0.6316 * basePx
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '-10%'],
}
}
];
let guardOption1 = {
series: [
{
id: '在岗率',
radius: '99%',
type: 'gauge',
startAngle: 90,
endAngle: -270,
pointer: {
show: false,
},
progress: {
show: true,
overlap: false,
roundCap: false,
clip: false,
},
axisLine: {
lineStyle: {
width: 1.0526 * basePx,
color: [[1, '#071646']],
shadowColor: '#1C466C',
shadowBlur: 2,
}
},
itemStyle: {
color: '#0FD09C',
},
splitLine: {
show: false,
distance: 0,
length: 0.5263 * basePx
},
axisTick: {
show: false
},
axisLabel: {
show: false,
},
data: guardData1,
detail: {
offsetCenter: ['0%', '120%'],
fontSize: 1.0526 * basePx,
color: '#12CDA2',
formatter: '{value}{a|%}',
rich: {
a: {
fontSize: 0.4211 * basePx,
color: '#1AB1FF'
}
}
}
}
]
};
// 人员统计 在岗率初始化
var guardMap = echarts.init(document.getElementById('onGuardMap'));
guardMap.setOption(guardOption1)
// 风险管理初始化
// 风险管控
let riskData1 = [
{ value: <%=riskData4%>, name: '四级/重大风险', label: { color: '#FF7473' }, itemStyle: { color: '#FF7473' }, labelLine: { lineStyle: { color: '#FF7473' } } },
{ value: <%=riskData1%>, name: '一级/低风险', label: { color: '#5C5AFF' }, itemStyle: { color: '#5C5AFF' }, labelLine: { lineStyle: { color: '#5C5AFF' } } },
{ value: <%=riskData2%>, name: '三级/较大风险', label: { color: '#FFA502' }, itemStyle: { color: '#FFA502' }, labelLine: { lineStyle: { color: '#FFA502' } } },
{ value: <%=riskData3%>, name: '二级/一般风险', label: { color: '#E7EA2E' }, itemStyle: { color: '#E7EA2E' }, labelLine: { lineStyle: { color: '#E7EA2E' } } },
]
let riskOption1 = {
tooltip: {
trigger: 'item'
},
series: [
{
type: 'pie',
radius: ['20%', '60%'],
center: ['50%', '50%'],
label: {
formatter: '{b}\n{c}'
},
data: riskData1.sort(function (a, b) {
return a.value - b.value;
}),
roseType: 'radius',
animationType: 'scale',
animationEasing: 'elasticOut',
animationDelay: function (idx) {
return Math.random() * 200;
}
}
]
};
var riskMap = echarts.init(document.getElementById('riskMap'));
riskMap.setOption(riskOption1)
// 作业许可统计
// 作业许可统计
var license =<%=License %>;
let yMax1 = 500;
let dataShadow1 = [];
for (let i = 0; i < data.length; i++) {
dataShadow1.push(yMax1);
}
let jobOption1 = {
grid: {
top: 1.3158 * basePx,
left: 3.6842 * basePx,
height: '85%',
},
xAxis: {
show: false,
axisTick: {
show: false
},
axisLine: {
show: false
},
},
yAxis: [
{
data: license.categories,
axisLine: {
show: false
},
axisTick: {
show: false
},
triggerEvent: true,
axisLabel: {
color: '#7ECEF7',
width: 2.6316 * basePx,
overflow: 'truncate',
align: 'right',
},
},
{
data: data,
position: 'left',
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
inside: true,
fontSize: 0.5263 * basePx,
color: '#ffffff'
},
z: 0.5263 * basePx
},
],
series: [
{
type: 'bar',
showBackground: true,
backgroundStyle: {
color: '#091F60',
borderRadius: 0.2632 * basePx,
},
barWidth: 0.5263 * basePx,
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
{ offset: 0, color: '#12CDA2' },
{ offset: 1, color: '#091F60' }
]),
barBorderRadius: [0.2632 * basePx, 0.2632 * basePx, 0.2632 * basePx, 0.2632 * basePx]
},
data: license.series[0].data
}
]
};
var jobLicensesMap = echarts.init(document.getElementById('jobLicensesMap'));
jobLicensesMap.setOption(jobOption1)
// 安全隐患分析
var safeHiddenDanger = JSON.parse('<%=SafeHiddenDanger %>')
let xdatay = safeHiddenDanger.legend
let data1y = safeHiddenDanger.series[0].data
let safetyAnalysisOption1 = {
grid: {
left: 2.1053 * basePx,
right: '3%',
bottom: 1.0526 * basePx,
top: '15%',
containLabel: true
},
xAxis: {
data: xdatay,
triggerEvent: true,
axisTick: {
// 刻度线
show: false
},
axisLine: {
show: false
},
axisLabel: {
show: true,
rotate: -30,
interval: 0,
width: 3.1579 * basePx,
overflow: 'truncate',
textStyle: {
color: '#00BEFF',
fontSize: 0.6316 * basePx
}
}
},
yAxis: {
splitLine: {
show: true,
lineStyle: {
color: '#0D3C65'
}
},
axisTick: {
show: false
},
axisLine: {
show: false
},
axisLabel: {
// y轴线
show: true,
textStyle: {
color: '#00BEFF',
fontSize: 0.6316 * basePx
}
}
},
series: [
{
name: 'hill',
type: 'pictorialBar',
barWidth: 1.5789 * basePx,
symbol:
'triangle',
itemStyle: {
normal: {
// 渐变色
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: '#00FEFF'
},
{
offset: 1,
color: '#4390FA'
}
])
}
},
data: data1y,
z: 10
},
]
}
var safetyAnalysisMap = echarts.init(document.getElementById('safetyAnalysisMap'));
safetyAnalysisMap.setOption(safetyAnalysisOption1)
// 质量统计
const quality1Data1 = [
{
value: <%=CRectificationRate%>,
name: '整改率',
title: {
color: '#1AB1FF',
offsetCenter: ['0%', '125%'],
fontSize: 0.6316 * basePx
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '10%'],
}
}
];
let quality1ption1 = {
series: [
{
id: '整改率',
radius: '75%',
type: 'gauge',
startAngle: 90,
endAngle: -270,
pointer: {
show: false
},
progress: {
show: true,
overlap: false,
roundCap: false,
clip: false,
},
axisLine: {
lineStyle: {
width: 0.5263 * basePx,
color: [[1, '#0F2164']]
}
},
itemStyle: {
color: '#FFB260',
borderRadius: 0
},
splitLine: {
show: false,
distance: 0,
length: 0.5263 * basePx
},
axisTick: {
show: false
},
axisLabel: {
show: false,
},
data: quality1Data1,
detail: {
fontSize: 0.7368 * basePx,
color: '#FFB260',
formatter: '{value}{a|%}',
rich: {
a: {
fontSize: 0.4211 * basePx,
color: '#1AB1FF'
}
}
}
}
]
};
const quality2Data2 = [
{
value:<%=CQualifiedRate%>,
name: '合格率',
title: {
color: '#1AB1FF',
offsetCenter: ['0%', '125%'],
fontSize: 0.6316 * basePx
},
detail: {
valueAnimation: true,
offsetCenter: ['0%', '10%'],
}
}
];
let quality2ption2 = {
series: [
{
id: '合格率',
radius: '70%',
type: 'gauge',
startAngle: 90,
endAngle: -270,
pointer: {
show: false
},
progress: {
show: true,
overlap: false,
roundCap: false,
clip: false,
},
axisLine: {
lineStyle: {
width: 0.5263 * basePx,
color: [[1, '#0F2164']]
}
},
itemStyle: {
color: '#12CDA2',
borderRadius: 0
},
splitLine: {
show: false,
distance: 0,
length: 0.5263 * basePx
},
axisTick: {
show: false
},
axisLabel: {
show: false,
},
data: quality2Data2,
detail: {
fontSize: 0.7368 * basePx,
color: '#12CDA2',
formatter: '{value}{a|%}',
rich: {
a: {
fontSize: 0.4211 * basePx,
color: '#1AB1FF'
}
}
}
}
]
};
var qualityMap1 = echarts.init(document.getElementById('qualityMap1'));
qualityMap1.setOption(quality1ption1)
var qualityMap2 = echarts.init(document.getElementById('qualityMap2'));
qualityMap2.setOption(quality2ption2)
</script>
<script>
var mapProjectPoint = JSON.parse('<%=ProjectInfo %>')
// 地图
let chinaData1 = [
{
name: '合肥',
value: [117.27, 31.86, 55]
},
{
name: '北京',
value: [116.40, 39.90, 110]
},
{
name: '重庆',
value: [106.55, 29.56, 32]
}
]
let chinaOption1 = {
geo: [
{
// 地理坐标系组件
map: "china",
roam: false, // 可以缩放和平移
aspectScale: 0.75, // 比例
top: 6.3158 * basePx,
zlevel: 1,
zoom: 1.4,
regions: [
{
name: "南海诸岛",
itemStyle: {
// 隐藏地图
normal: {
opacity: 0, // 为 0 时不绘制该图形
}
},
label: {
show: false // 隐藏文字
}
}
],
itemStyle: {
// 图形上的地图区域
normal: {
areaColor: "#1B3885",
}
},
emphasis: {
disabled: true,
}
},
{
// 地理坐标系组件
map: "china",
roam: false, // 可以缩放和平移
aspectScale: 0.75, // 比例
top: 6.3158 * basePx,
zlevel: 10,
zoom: 1.4,
regions: [
{
name: "南海诸岛",
itemStyle: {
// 隐藏地图
normal: {
opacity: 0, // 为 0 时不绘制该图形
}
},
label: {
show: false // 隐藏文字
}
}
],
itemStyle: {
// 图形上的地图区域
normal: {
borderWidth: 0.1053 * basePx,
areaColor: "#214DA9",
borderColor: "#2FA1D7",
// shadowBlur: 20,
// shadowOffsetY:10,
// shadowOffsetX:10,
}
},
emphasis: {
disabled: true,
itemStyle: {
areaColor: 'red',
}
}
},
],
series: [{
type: 'effectScatter',
coordinateSystem: 'geo',
symbolSize: 1.0526 * basePx,
zlevel: 100,
itemStyle: {
color: "#FDFF04"
},
rippleEffect: {
},
data: mapProjectPoint,
}],
}
// 地图
echarts.registerMap('china', chinaJson);
var chart = echarts.init(document.getElementById('map'));
chart.setOption(chinaOption1);
// 世界地图跳转事件
chart.on('click', function (params) {
console.log(params);
if (params.seriesId && params.seriesId == 'isSkip') {
// isFullScreen 判单是不是全屏保证当进入项目时也是全屏状态
location.href = './indexv2.html'
}
});
// 切换地图的事件
$('.changMap').click(function () {
let val = $('.changMap>b').text()
if (val == '中国地图') {
echarts.registerMap('word', wordJson);
chart.setOption(wordOption);
$('.changMap>b').text('世界地图')
} else {
echarts.registerMap('china', chinaJson);
chart.setOption(chinaOption);
$('.changMap>b').text('中国地图')
}
})
// 切换全屏
$('.magnify').click(function () {
const element = document.documentElement
if (document.fullscreenElement) {
// 如果浏览器有这个Function
if (document.exitFullscreen) {
document.exitFullscreen()
} else if (document.webkitCancelFullScreen) {
document.webkitCancelFullScreen()
} else if (document.mozCancelFullScreen) {
document.mozCancelFullScreen()
} else if (document.msExitFullscreen) {
document.msExitFullscreen()
}
} else {
// 如果浏览器有这个Function
if (element.requestFullscreen) {
element.requestFullscreen()
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen()
} else if (element.mozRequestFullScreen) {
element.mozRequestFullScreen()
} else if (element.msRequestFullscreen) {
element.msRequestFullscreen()
}
}
})
// 监听全屏变化
window.onresize = function () {
if (document.fullscreenElement) {
$('.nav-site_right').hide();
$('.nav-site_left').hide();
$('.magnify').text('退出全屏');
} else {
$('.nav-site_right').show();
$('.nav-site_left').show();
$('.magnify').text('全屏');
}
}
</script>

View File

@ -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;
/// <summary>
/// 项目信息
/// </summary>
private List<Model.Base_Project> 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<Model.SingleSerie> list = new List<Model.SingleSerie>();
foreach (var item in getProjectMap)
{
Model.SingleSerie newS = new Model.SingleSerie
{
name = "【项目名称】:" + item.ProjectName
//+ "</br> 【项目状态】:" + GetProjectState(item.ProjectId)
+ "</br>【开工时间】:" + string.Format("{0:yyyy-MM-dd}", item.StartDate)
+ "</br>【竣工时间】:" + string.Format("{0:yyyy-MM-dd}", item.EndDate)
+ "</br>【项目地址】:" + 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;
/// <summary>
/// 劳务统计
/// </summary>
private void getSitePerson()
{
OnDutyRate = 0;
int AllCount = 0;
int MCount = 0;
DateTime dateValue = DateTime.Now.AddDays(-1);
List<Model.PageDataPersonInOutItem> getallin = new List<Model.PageDataPersonInOutItem>();
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()+ "<span>个</span>";
/////作业人数
this.divZYPerson.InnerHtml = (AllCount - MCount).ToString()+ "<span>个</span>";
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
/// <summary>
/// 获取安全人工时
/// </summary>
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()+ "<span>个</span>";
int ccount = getRectify.Where(x => x.States == "5").Count();
this.divRectifyRate.InnerHtml = Math.Round(ccount * 1.0 / allcout * 100, 1).ToString()+ "<span>%</span>";
}
}
#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;
/// <summary>
/// 获取质量问题
/// </summary>
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()+ "<span>个</span>";
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
/// <summary>
/// 进度
/// </summary>
protected string projectJDHtml;
/// <summary>
/// 月施工计划产值
/// </summary>
protected string MonthPlanOutPutValue;
/// <summary>
/// 月施工实际产值
/// </summary>
protected string MonthActualOutPutValue;
/// <summary>
/// 获取当年施工产值
/// </summary>
private void getOutputValue(List<Model.Base_Project> 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<Model.PageDataPersonInOutItem> getIn = new List<Model.PageDataPersonInOutItem>();
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 += @"<div class='sd-rate-item'><span class='sd-rate-status'>【在建】</span><span class='sd-rate-name'>" + shortName + "</span><span class='sd-rate-bar' style='cursor:pointer' title='" + jdRate + "'><span class='sd-rate-bar-value' style='width: " + jdRate + ";'></span></span></div>";
}
}
#region
/// <summary>
/// 安全隐患分析
/// </summary>
protected string SafeHiddenDanger
{
get
{
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
Model.SingleSerie s = new Model.SingleSerie();
List<double> listdata = new List<double>();
List<string> list = new List<string>();
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
/// <summary>
/// 获取风险管控
/// </summary>
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<int> RiskLevelNum = new List<int>();
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
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
/// <summary>
/// 作业许可数量统计
/// </summary>
protected string License
{
get
{
List<Model.SingleSerie> series = new List<Model.SingleSerie>();
Model.BusinessColumn businessColumn = new Model.BusinessColumn();
List<string> listCategories = new List<string>();
businessColumn.title = "作业许可数量统计";
Model.SingleSerie s = new Model.SingleSerie();
List<double> listdata = new List<double>();
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
}
}

View File

@ -1,152 +0,0 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web
{
public partial class index1
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// divWeather 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWeather;
/// <summary>
/// spDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate;
/// <summary>
/// userName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl userName;
/// <summary>
/// divGLPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divGLPerson;
/// <summary>
/// divZYPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divZYPerson;
/// <summary>
/// divProjectNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divProjectNum;
/// <summary>
/// divYearPlanOutPutValue 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divYearPlanOutPutValue;
/// <summary>
/// divYearActualOutPutValue 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divYearActualOutPutValue;
/// <summary>
/// divHTAmount 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divHTAmount;
/// <summary>
/// divHTNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divHTNum;
/// <summary>
/// divSafeWorkTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divSafeWorkTime;
/// <summary>
/// divAllRectify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divAllRectify;
/// <summary>
/// divRectifyRate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divRectifyRate;
/// <summary>
/// divCQMSAllNum 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divCQMSAllNum;
}
}

View File

@ -1,682 +0,0 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index4.aspx.cs" Inherits="FineUIPro.Web.index4" %>
<!DOCTYPE html>
<html>
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="initial-scale=scale,maximum-scale=scale,minimum-scale=scale,user-scalable=no" />
<title> 智慧施工管理信息系统</title>
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />
<%--
<link rel="stylesheet" href="~/res/indexv1/iconfont/iconfont.css" />
<link rel="stylesheet" href="~/res/indexv1/css/index1.css" />
<link type="text/css" rel="stylesheet" href="~/res/css/default.css" />
<link href="res/index/css/home.css" rel="stylesheet" />--%>
<link href="~/res/indexv2/assets/iconfont/iconfont.css" rel="stylesheet" />
<link href="~/res/indexv2/assets/css/video-7.15.0.min.css" rel="stylesheet" />
<link href="~/res/indexv2/assets/css/index7.css" rel="stylesheet" />
<style type="text/css">
html {
min-height: auto;
}
.sd-index1-body {
background-image: none;
}
.f-widget-content {
border: none;
background: none;
}
</style>
<style type="text/css">
.f-tabstrip-header-clip {
width: 100%;
height: 35px;
}
.up-wrap {
height: 55px;
padding: 0 10px;
}
.item-s {
padding: 0;
margin: 0;
}
.f-btn .f-btn-text {
vertical-align: baseline !important;
}
.f-state-hover {
background-color: transparent !important;
}
.bgbtn {
width: 100%;
border: none !important;
background-color: transparent !important;
padding: 0 !important;
line-height: 1;
}
.activeClick {
font-weight: 800;
color: white !important;
}
.bgbtn .x-frame-ml, .bgbtn .x-frame-mc, .bgbtn .x-frame-mr,
.bgbtn .x-frame-tl, .bgbtn .x-frame-tc, .bgbtn .x-frame-tr,
.bgbtn .x-frame-bl, .bgbtn .x-frame-bc, .bgbtn .x-frame-br,
.bgbtn a:visited, .bgbtn .f-state-focus {
background-image: none;
background-color: transparent;
}
.f-state-default, .f-widget-content .f-state-default, .f-widget-header .f-state-default {
background-image: none;
background-color: transparent;
}
.header .layui-nav {
padding: 0;
margin: 0;
}
.bgbtntop.f-btn.f-state-default .f-icon, .bgbtntop.f-btn.f-state-hover .f-icon, .bgbtntop.f-btn.f-state-focus .f-icon, .bgbtntop.f-btn.f-state-active .f-icon {
color: #37a6ff;
}
.activeClick .f-icon {
color: white !important;
}
.f-panel, .f-widget-header, .f-tree-headerstyle .f-panel-body {
background-color: #dfe4f1;
color: #333;
border: none !important;
}
.f-menu-item-text, .f-tree-cell-text, .f-widget-content a, .f-qtip-content {
color: #333;
}
.f-corner-all {
background-color: #dfe4f1;
}
.f-state-hover.f-tree-node a {
color: #37a6ff;
}
.f-state-default, .f-widget-content .f-state-default, .f-widget-header .f-state-default {
border-color: transparent;
}
.bgbtn2 {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
.f-tabstrip-align-left .f-tab-header.f-first {
background-color: #dfe4f1;
color: #333;
border: none !important;
}
.top-li-item {
position: relative;
}
.top-li-item .f-btn-inner {
display: none;
}
.sd-header .sd-header-top .sd-header-top-right ul li span:nth-child(2n) {
margin-right: 0;
}
#Panel1_leftPanel_treeMenu .f-state-hover .f-icon {
color: #fff !important;
}
#Panel1_leftPanel_treeMenu .f-state-hover {
background: #99e7ff !important;
}
</style>
</head>
<body class="wrap">
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server"></f:PageManager>
<f:Panel ID="Panel1" Layout="Region" ShowBorder="false" ShowHeader="false" runat="server">
<Items>
<f:ContentPanel ID="topPanel" CssClass="topregion" RegionPosition="Top" ShowBorder="false" ShowHeader="false" EnableCollapse="true" runat="server">
<%--头部 开始--%>
<f:ContentPanel ID="ContentPanel1" CssClass="bodyregion" ShowBorder="false" ShowHeader="false" runat="server">
<div class="sd-index1-body">
<div class="sd-header">
<div class="sd-header-top">
<div class="sd-header-top-left">
<div class="sd-location-name">天津</div>
<div class="sd-location-weather">
<img src="res/indexv1/image/index1/weather/duoyun.png"
alt="" /><span runat="server" id="divWeather">多云</span>
</div>
<div class="sd-location-time"><span id="spDate" runat="server"></span></div>
</div>
<div class="sd-header-top-right">
<ul>
<li><a href="javascript:void(0);" onclick="onToolSignChangeHomePageClick()">切换首页</a></li>
<li class="js-showTab-item"><a href="#"><span class="sd-message-dot"><i class="iconfont icon-message"></i></span>消息</a></li>
<li class="js-showTab-item top-li-item"><a href="javascript:void(0);"><span><i class="iconfont icon-user"></i></span><span id="userName" runat="server"></span></a>
<f:Button runat="server" CssClass="bgbtn2" OnClick="btnPersonal_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnPersonal" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li class="js-showTab-item top-li-item"><a href="#"><span><i class="iconfont icon-setting"></i></span>设置</a><f:Button runat="server" CssClass="bgbtn2" OnClick="btnSysSet_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnSysSet" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li><a href="javascript:void(0);" onclick="onToolSignOutClick()"><span><i class="iconfont icon-stop"></i></span>退出</a></li>
<li class="top-li-item">
<f:Button runat="server" CssClass="bgbtntop" Text="刷新" ToolTip="刷新菜单" IconFont="Retweet" OnClick="btnRetweet_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" ID="btnRetweet" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
</ul>
</div>
</div>
<div class="sd-header-title js-hiddenTab-item">
智慧施工管理信息系统<f:Button runat="server" CssClass="bgbtn2" EnablePostBack="true" OnClick="btnHome_Click"
EnableDefaultState="true" EnableDefaultCorner="false" ID="btnHome" OnClientClick="parent.removeActiveTab();">
</f:Button>
</div>
<div class="sd-header-bottom" runat="server" visible="true">
<ul class="sd-header-bottom-menu">
<li>
<f:Button runat="server" CssClass="bgbtn" Text="项目清单" ID="btnProject" OnClick="btnProject_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="大数据中心" ID="btnDigData" OnClick="btnDigData_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="总部检查" ID="btnServer" OnClick="btnServer_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
</ul>
<ul class="sd-header-bottom-menu">
<li>
<f:Button runat="server" CssClass="bgbtn" Text="通知管理" ID="btnNotice" OnClick="btnNotice_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="员工管理" ID="btnPerson" OnClick="btnPerson_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
<li>
<f:Button runat="server" CssClass="bgbtn" Text="综合管理" ID="btnZHGL" OnClick="btnZHGL_Click"
EnablePostBack="true" EnableDefaultState="true" EnableDefaultCorner="false" OnClientClick="parent.removeActiveTab();">
</f:Button>
</li>
</ul>
</div>
</div>
</div>
</f:ContentPanel>
<%--头部 结束--%>
</f:ContentPanel>
<f:Panel ID="leftPanel" CssClass="leftregion" RegionPosition="Left" RegionSplit="true" RegionSplitWidth="3px"
ShowBorder="true" Width="250px" ShowHeader="true" Title="系统菜单"
EnableCollapse="false" Collapsed="false" Layout="Fit" runat="server">
<Tools>
<%--自定义展开折叠工具图标--%>
<f:Tool ID="leftPanelToolCollapse" runat="server" IconFont="ChevronCircleLeft"
EnablePostBack="false" ToolTip="展开/折叠" Hidden="true">
<Listeners>
<f:Listener Event="click" Handler="onLeftPanelToolCollapseClick" />
</Listeners>
</f:Tool>
<f:Tool ID="leftPanelToolGear" runat="server" IconFont="Gear" EnablePostBack="false" Hidden="true" ToolTip="设置">
<Menu runat="server" ID="menuSettings">
<f:MenuButton ID="btnExpandAll" Text="展开菜单" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="click" Handler="onExpandAllClick" />
</Listeners>
</f:MenuButton>
<f:MenuButton ID="btnCollapseAll" Text="折叠菜单" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="click" Handler="onCollapseAllClick" />
</Listeners>
</f:MenuButton>
<f:MenuSeparator runat="server">
</f:MenuSeparator>
<f:MenuButton runat="server" EnablePostBack="false" ID="MenuMode" Text="显示模式">
<Menu runat="server">
<Items>
<f:MenuCheckBox Text="普通模式" ID="MenuModeNormal" AttributeDataTag="normal" Checked="true" GroupName="MenuMode" runat="server">
</f:MenuCheckBox>
<f:MenuCheckBox Text="紧凑模式" ID="MenuModeCompact" AttributeDataTag="compact" GroupName="MenuMode" runat="server">
</f:MenuCheckBox>
<f:MenuCheckBox Text="大字体模式" ID="MenuModeLarge" AttributeDataTag="large" GroupName="MenuMode" runat="server">
</f:MenuCheckBox>
</Items>
<Listeners>
<f:Listener Event="checkchange" Handler="onMenuModeCheckChange" />
</Listeners>
</Menu>
</f:MenuButton>
<f:MenuButton EnablePostBack="false" Text="菜单样式" ID="MenuStyle" runat="server">
<Menu runat="server">
<Items>
<f:MenuCheckBox Text="智能树菜单" ID="MenuStyleTree" AttributeDataTag="tree" GroupName="MenuStyle" runat="server">
</f:MenuCheckBox>
<f:MenuCheckBox Text="智能树菜单(默认折叠)" ID="MenuStyleMiniModeTree" AttributeDataTag="tree_minimode" GroupName="MenuStyle" runat="server">
</f:MenuCheckBox>
<f:MenuCheckBox Text="树菜单" ID="MenuStylePlainTree" AttributeDataTag="plaintree" GroupName="MenuStyle" runat="server" Checked="true">
</f:MenuCheckBox>
<%-- <f:MenuCheckBox Text="手风琴+树菜单" ID="MenuStyleAccordion" AttributeDataTag="accordion" GroupName="MenuStyle" runat="server">
</f:MenuCheckBox>--%>
</Items>
<Listeners>
<f:Listener Event="checkchange" Handler="onMenuStyleCheckChange" />
</Listeners>
</Menu>
</f:MenuButton>
<f:MenuButton EnablePostBack="false" Text="语言" ID="MenuLang" runat="server">
<Menu ID="Menu2" runat="server">
<Items>
<f:MenuCheckBox Text="简体中文" ID="MenuLangZHCN" AttributeDataTag="zh_CN" Checked="true" GroupName="MenuLang" runat="server">
</f:MenuCheckBox>
</Items>
<Listeners>
<f:Listener Event="checkchange" Handler="onMenuLangCheckChange" />
</Listeners>
</Menu>
</f:MenuButton>
</Menu>
</f:Tool>
</Tools>
</f:Panel>
<f:TabStrip ID="mainTabStrip" CssClass="centerregion" RegionPosition="Center" ShowTabHeader="false"
ShowBorder="true" EnableTabCloseMenu="true" runat="server">
<Tabs>
<%--.f-tabstrip-noheader>.f-panel-header--%>
<f:Tab ID="Tab1" Title="首页" IconFont="Home"
EnableIFrame="true" IFrameUrl="~/common/main.aspx" runat="server">
</f:Tab>
</Tabs>
<Tools>
<f:Tool runat="server" EnablePostBack="false" IconFont="Refresh" MarginRight="5" CssClass="tabtool" ToolTip="刷新本页" ID="toolRefresh">
<Listeners>
<f:Listener Event="click" Handler="onToolRefreshClick" />
</Listeners>
</f:Tool>
<f:Tool runat="server" EnablePostBack="false" IconFont="Share" MarginRight="5" CssClass="tabtool" ToolTip="在新标签页中打开" ID="toolNewWindow">
<Listeners>
<f:Listener Event="click" Handler="onToolNewWindowClick" />
</Listeners>
</f:Tool>
<f:Tool runat="server" EnablePostBack="false" IconFont="Expand" CssClass="tabtool" ToolTip="最大化" ID="toolMaximize" Hidden="true">
<Listeners>
<f:Listener Event="click" Handler="onToolMaximizeClick" />
</Listeners>
</f:Tool>
<f:Tool runat="server" EnablePostBack="false" IconFont="SignOut" Hidden="true"
CssClass="tabtool" ToolTip="注销" ID="toolSignOut">
<Listeners>
<f:Listener Event="click" Handler="onToolSignOutClick" />
</Listeners>
</f:Tool>
</Tools>
</f:TabStrip>
</Items>
</f:Panel>
<f:Window ID="windowCustomQuery" Title="自定义查询" Hidden="true" EnableIFrame="true" IFrameUrl="./SysManage/CustomQuery.aspx" ClearIFrameAfterClose="false"
runat="server" IsModal="true" Width="1200px" Height="620px" EnableClose="true"
EnableMaximize="true" EnableResize="false">
</f:Window>
<f:HiddenField runat="server" ID="hdHomePage"></f:HiddenField>
<f:Button runat="server" ID="btnChangeHomePage" OnClick="btnChangeHomePage_Click"></f:Button>
<asp:XmlDataSource ID="XmlDataSource1" runat="server" EnableCaching="false"></asp:XmlDataSource>
</form>
<script type="text/javascript">
var toolRefreshClientID = '<%= toolRefresh.ClientID %>';
var toolNewWindowClientID = '<%= toolNewWindow.ClientID %>';
var mainTabStripClientID = '<%= mainTabStrip.ClientID %>';
var windowCustomQueryClientID = '<%= windowCustomQuery.ClientID %>';
var MenuStyleClientID = '<%= MenuStyle.ClientID %>';
var MenuLangClientID = '<%= MenuLang.ClientID %>';
var topPanelClientID = '<%= topPanel.ClientID %>';
var leftPanelClientID = '<%= leftPanel.ClientID %>';
var leftPanelToolGearClientID = '<%= leftPanelToolGear.ClientID %>';
var leftPanelToolCollapseClientID = '<%= leftPanelToolCollapse.ClientID %>';
var btnChangeHomePageClientID = '<%= btnChangeHomePage.ClientID %>';
var tab1ClientID = '<%= Tab1.ClientID %>';
// 展开左侧面板
function expandLeftPanel() {
var leftPanel = F(leftPanelClientID);
// 获取左侧树控件实例
var leftMenuTree = leftPanel.items[0];
leftMenuTree.miniMode = false;
leftPanel.el.removeClass('minimodeinside');
leftPanel.setWidth(220);
F(leftPanelToolGearClientID).show();
F(leftPanelToolCollapseClientID).setIconFont('chevron-circle-left');
// 重新加载树菜单
leftMenuTree.loadData();
}
// 展开左侧面板
function collapseLeftPanel() {
var leftPanel = F(leftPanelClientID);
// 获取左侧树控件实例
var leftMenuTree = leftPanel.items[0];
leftMenuTree.miniMode = true;
leftMenuTree.miniModePopWidth = 220;
leftPanel.el.addClass('minimodeinside');
leftPanel.setWidth(50);
F(leftPanelToolGearClientID).hide();
F(leftPanelToolCollapseClientID).setIconFont('chevron-circle-right');
// 重新加载树菜单
leftMenuTree.loadData();
}
// 自定义展开折叠工具图标
function onLeftPanelToolCollapseClick(event) {
var leftPanel = F(leftPanelClientID);
var menuStyle = F.cookie('MenuStyle_Pro') || 'tree';
if (menuStyle === 'tree' || menuStyle === 'tree_minimode') {
// 获取左侧树控件实例
var leftMenuTree = leftPanel.items[0];
// 设置 miniMode 模式
if (leftMenuTree.miniMode) {
expandLeftPanel();
} else {
collapseLeftPanel();
}
// 对左侧面板重新布局
leftPanel.doLayout();
} else {
leftPanel.toggleCollapse();
}
}
// 点击标题栏工具图标 - 切换首页
function onToolSignChangeHomePageClick(event) {
F(btnChangeHomePageClientID).click();
}
// 点击展开菜单
function onExpandAllClick(event) {
var leftPanel = F(leftPanelClientID);
var firstChild = leftPanel.items[0];
if (firstChild.isType('tree')) {
// 左侧为树控件
firstChild.expandAll();
} else {
// 左侧为树控件+手风琴控件
var activePane = firstChild.getActivePane();
if (activePane) {
activePane.items[0].expandAll();
}
}
}
// 点击折叠菜单
function onCollapseAllClick(event) {
var leftPanel = F(leftPanelClientID);
var firstChild = leftPanel.items[0];
if (firstChild.isType('tree')) {
// 左侧为树控件
firstChild.collapseAll();
} else {
// 左侧为树控件+手风琴控件
var activePane = firstChild.getActivePane();
if (activePane) {
activePane.items[0].collapseAll();
}
}
}
function onSearchTrigger1Click(event) {
F.removeCookie('SearchText_Pro');
top.window.location.reload();
}
function onSearchTrigger2Click(event) {
F.cookie('SearchText_Pro', this.getValue(), {
expires: 100 // 单位:天
});
top.window.location.reload();
}
// 点击标题栏工具图标 - 刷新
function onToolRefreshClick(event) {
var mainTabStrip = F(mainTabStripClientID);
var activeTab = mainTabStrip.getActiveTab();
if (activeTab.iframe) {
var iframeWnd = activeTab.getIFrameWindow();
iframeWnd.location.reload();
}
}
// 点击标题栏工具图标 - 在新标签页中打开
function onToolNewWindowClick(event) {
var mainTabStrip = F(mainTabStripClientID);
var activeTab = mainTabStrip.getActiveTab();
if (activeTab.iframe) {
var iframeUrl = activeTab.getIFrameUrl();
iframeUrl = iframeUrl.replace(/\/mobile\/\?file=/ig, '/mobile/');
window.open(iframeUrl, '_blank');
}
}
// 点击标题栏工具图标 - 注销
function onToolSignOutClick(event) {
var bConfirmed = confirm('您确定要退出吗?');
if (bConfirmed) { window.open('login.aspx', '_top'); }
}
// 点击标题栏工具图标 - 最大化
function onToolMaximizeClick(event) {
var topPanel = F(topPanelClientID);
var leftPanel = F(leftPanelClientID);
var currentTool = this;
if (currentTool.iconFont.indexOf('expand') >= 0) {
topPanel.collapse();
currentTool.setIconFont('compress');
collapseLeftPanel();
} else {
topPanel.expand();
currentTool.setIconFont('expand');
expandLeftPanel();
}
}
// 添加示例标签页
// id 选项卡ID
// iframeUrl: 选项卡IFrame地址
// title 选项卡标题
// icon 选项卡图标
// createToolbar 创建选项卡前的回调函数接受tabOptions参数
// refreshWhenExist 添加选项卡时如果选项卡已经存在是否刷新内部IFrame
// iconFont 选项卡图标字体
function addExampleTab(tabOptions) {
if (typeof (tabOptions) === 'string') {
tabOptions = {
id: arguments[0],
iframeUrl: arguments[1],
title: arguments[2],
icon: arguments[3],
createToolbar: arguments[4],
refreshWhenExist: arguments[5],
iconFont: arguments[6]
};
}
F.addMainTab(F(mainTabStripClientID), tabOptions);
}
// 移除选中标签页
function removeActiveTab() {
var mainTabStrip = F(mainTabStripClientID);
var activeTab = mainTabStrip.getActiveTab();
if (activeTab) {
if (activeTab.id != tab1ClientID) {
activeTab.hide();
removeActiveTab();
}
}
}
// 获取当前激活选项卡的ID
function getActiveTabId() {
var mainTabStrip = F(mainTabStripClientID);
var activeTab = mainTabStrip.getActiveTab();
if (activeTab) {
return activeTab.id;
}
return '';
}
// 激活选项卡,并刷新其中的内容,示例:表格控件->杂项->在新标签页中打开(关闭后刷新父选项卡)
function activeTabAndRefresh(tabId) {
var mainTabStrip = F(mainTabStripClientID);
var targetTab = mainTabStrip.getTab(tabId);
if (targetTab) {
mainTabStrip.activeTab(targetTab);
targetTab.refreshIFrame();
}
}
// 激活选项卡,并刷新其中的内容,示例:表格控件->杂项->在新标签页中打开(关闭后更新父选项卡中的表格)
function activeTabAndUpdate(tabId, param1) {
var mainTabStrip = F(mainTabStripClientID);
var targetTab = mainTabStrip.getTab(tabId);
if (targetTab) {
mainTabStrip.activeTab(targetTab);
targetTab.getIFrameWindow().updatePage(param1);
}
}
// 通知框
function notify(msg) {
F.notify({
message: msg,
messageIcon: 'information',
target: '_top',
header: false,
displayMilliseconds: 3 * 1000,
positionX: 'center',
positionY: 'center'
});
}
// 点击菜单样式
function onMenuStyleCheckChange(event, item, checked) {
var menuStyle = item.getAttr('data-tag');
F.cookie('MenuStyle_Pro', menuStyle, {
expires: 100 // 单位:天
});
top.window.location.reload();
}
// 点击显示模式
function onMenuModeCheckChange(event, item, checked) {
var menuMode = item.getAttr('data-tag');
F.cookie('MenuMode_Pro', menuMode, {
expires: 100 // 单位:天
});
top.window.location.reload();
}
// 点击语言
function onMenuLangCheckChange(event, item, checked) {
var lang = item.getAttr('data-tag');
F.cookie('Language_Pro', lang, {
expires: 100 // 单位:天
});
top.window.location.reload();
}
///个人信息
function onUserProfileClick() {
var windowUserProfile = F(windowUserProfileClientID);
windowUserProfile.show();
}
F.ready(function () {
//点头部菜单,显示标签“首页”
$(".sd-header-bottom li").click(function () {
var $item = $('.f-tabstrip-header')
$item.attr('style', ";display:block !important;")
});
$(".js-showTab-item").click(function () {
var $item = $('.f-tabstrip-header')
$item.attr('style', ";display:block !important;")
});
$(".js-hiddenTab-item").click(function () {
var $item = $('.f-tabstrip-header')
$item.attr('style', ";display:none !important;")
$(".bgbtn,.bgbtntop").removeClass("activeClick")
});
$(".bgbtn,.bgbtntop").click(function () {
// 切换下tab样式
var $this = $(this)
if (!$this.hasClass('activeClick')) {
if ($this.hasClass('bgbtn')) {
$(".bgbtn").removeClass('activeClick')
} else {
$(".bgbtntop").removeClass('activeClick')
}
$this.addClass('activeClick')
}
});
var mainTabStrip = F(mainTabStripClientID);
var leftPanel = F(leftPanelClientID);
var mainMenu = leftPanel.items[0];
// 初始化主框架中的树(或者Accordion+Tree)和选项卡互动,以及地址栏的更新
// treeMenu 主框架中的树控件实例,或者内嵌树控件的手风琴控件实例
// mainTabStrip 选项卡实例
// updateLocationHash: 切换Tab时是否更新地址栏Hash值
// refreshWhenExist 添加选项卡时如果选项卡已经存在是否刷新内部IFrame
// refreshWhenTabChange: 切换选项卡时是否刷新内部IFrame
F.initTreeTabStrip(mainMenu, mainTabStrip, true, false, false);
//var themeTitle = F.cookie('Theme_Pro_Title');
//var themeName = F.cookie('Theme_Pro');
//if (themeTitle) {
// F.removeCookie('Theme_Pro_Title');
// //notify('主题更改为:' + themeTitle + '' + themeName + '');
//}
});
</script>
</body>
</html>

View File

@ -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
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
///
/// </summary>
/// <returns></returns>
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
/// <summary>
/// 树节点的绑定后事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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 = "<span class=\"isnew\">" + e.Node.Text + "</span>";
if (e.Node.ParentNode != null)
{
e.Node.ParentNode.Text = "<span class=\"isnew\">" + e.Node.ParentNode.Text + "</span>";
}
}
}
if (isLeaf)
{
// 设置节点的提示信息
e.Node.ToolTip = e.Node.Text;
}
// 如果仅显示最新示例,或者存在搜索文本
if (!String.IsNullOrEmpty(_searchText))
{
e.Node.Expanded = true;
}
}
/// <summary>
/// 树节点的预绑定事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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
/// <summary>
/// 该节点是否显示
/// </summary>
/// <param name="node"></param>
/// <returns></returns>
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
/// <summary>
/// 是否必填项
/// </summary>
/// <param name="titleText"></param>
/// <returns></returns>
private bool GetIsNewHtml(XmlNode xmlNode)
{
bool isShow = false;
if (xmlNode.Attributes["Text"].Value.Contains("*"))
{
isShow = true;
}
else
{
}
return isShow;
}
#endregion
#endregion
#region Page_Load
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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";
}
}
}
/// <summary>
/// 菜单树样式
/// </summary>
private void InitMenuStyleButton()
{
string menuStyle = "tree";
HttpCookie menuStyleCookie = Request.Cookies["MenuStyle_Pro"];
if (menuStyleCookie != null)
{
menuStyle = menuStyleCookie.Value;
}
SetSelectedMenuItem(MenuStyle, menuStyle);
}
/// <summary>
///
/// </summary>
private void InitMenuModeButton()
{
string menuMode = "normal";
HttpCookie menuModeCookie = Request.Cookies["MenuMode_Pro"];
if (menuModeCookie != null)
{
menuMode = menuModeCookie.Value;
}
SetSelectedMenuItem(MenuMode, menuMode);
}
/// <summary>
/// 加载菜单语言
/// </summary>
private void InitLangMenuButton()
{
string language = "zh_CN";
HttpCookie languageCookie = Request.Cookies["Language_Pro"];
if (languageCookie != null)
{
language = languageCookie.Value;
}
SetSelectedMenuItem(MenuLang, language);
}
/// <summary>
/// 过滤菜单
/// </summary>
/// <param name="menuButton"></param>
/// <param name="selectedDataTag"></param>
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
/// <summary>
/// 功能模块切换方法
/// </summary>
/// <param name="type"></param>
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);
}
/// <summary>
/// 重新生成系统菜单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
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";
}
}
}
}

View File

@ -1,404 +0,0 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web
{
public partial class index4
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// topPanel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel topPanel;
/// <summary>
/// ContentPanel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel ContentPanel1;
/// <summary>
/// divWeather 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divWeather;
/// <summary>
/// spDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spDate;
/// <summary>
/// userName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl userName;
/// <summary>
/// btnPersonal 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPersonal;
/// <summary>
/// btnSysSet 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSysSet;
/// <summary>
/// btnRetweet 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnRetweet;
/// <summary>
/// btnHome 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnHome;
/// <summary>
/// btnProject 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnProject;
/// <summary>
/// btnDigData 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDigData;
/// <summary>
/// btnServer 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnServer;
/// <summary>
/// btnNotice 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNotice;
/// <summary>
/// btnPerson 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnPerson;
/// <summary>
/// btnZHGL 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnZHGL;
/// <summary>
/// leftPanel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel leftPanel;
/// <summary>
/// leftPanelToolCollapse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool leftPanelToolCollapse;
/// <summary>
/// leftPanelToolGear 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool leftPanelToolGear;
/// <summary>
/// btnExpandAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnExpandAll;
/// <summary>
/// btnCollapseAll 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnCollapseAll;
/// <summary>
/// MenuMode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton MenuMode;
/// <summary>
/// MenuModeNormal 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuModeNormal;
/// <summary>
/// MenuModeCompact 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuModeCompact;
/// <summary>
/// MenuModeLarge 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuModeLarge;
/// <summary>
/// MenuStyle 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton MenuStyle;
/// <summary>
/// MenuStyleTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuStyleTree;
/// <summary>
/// MenuStyleMiniModeTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuStyleMiniModeTree;
/// <summary>
/// MenuStylePlainTree 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuStylePlainTree;
/// <summary>
/// MenuLang 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton MenuLang;
/// <summary>
/// MenuLangZHCN 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuCheckBox MenuLangZHCN;
/// <summary>
/// mainTabStrip 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip mainTabStrip;
/// <summary>
/// Tab1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab1;
/// <summary>
/// toolRefresh 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool toolRefresh;
/// <summary>
/// toolNewWindow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool toolNewWindow;
/// <summary>
/// toolMaximize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool toolMaximize;
/// <summary>
/// toolSignOut 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tool toolSignOut;
/// <summary>
/// windowCustomQuery 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window windowCustomQuery;
/// <summary>
/// hdHomePage 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdHomePage;
/// <summary>
/// btnChangeHomePage 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnChangeHomePage;
/// <summary>
/// XmlDataSource1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.XmlDataSource XmlDataSource1;
}
}