CNCEC_SUBQHSE_WUHUAN/SGGL/FineUIPro.Web/common/mainMenu_HJGL.aspx

943 lines
31 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mainMenu_HJGL.aspx.cs" Inherits="FineUIPro.Web.mainMenu_HJGL" %>
<!DOCTYPE html>
<html>
<head id="Head1" runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>首页</title>
<link href="../res/index/css/reset.css" rel="stylesheet" />
<link href="../res/index/css/home.css" rel="stylesheet" />
<link href="../res/index/css/swiper-3.4.2.min.css" rel="stylesheet" />
<style type="text/css">
* {
box-sizing: border-box;
}
.pd {
padding: 20px;
}
.pd10 {
padding: 10px !important;
}
.flexV {
flex-direction: column;
}
.wrap {
height: 100%;
padding: 15px;
}
.iteml {
margin-left: 5px;
}
.itemb {
margin-bottom: 5px;
}
.bottom-wrap {
padding: 0;
margin-bottom: 5px;
}
.bottom-wrap:last-child {
margin-bottom: 0;
}
.bw-b-bottom {
width: 100%;
height: 100%;
}
.bw-b-bottom-up {
border-radius: 0;
height: 100%;
margin: 0;
box-shadow: none;
}
.bw-item-content {
padding: 0px;
}
.top {
display: flex;
display: -webkit-flex;
overflow: hidden;
width: 100%;
}
.top .item {
}
.bw-b {
width: 50%;
}
.bw-b-bottom-up {
}
.tab-wrap {
left: auto;
right: 15px;
top: 5px;
font-size: 12px;
}
.tab .t-item {
width: auto;
padding: 5px 10px;
}
.tit-item {
padding: 0 10px;
color: #fff;
justify-content: space-between;
font-size: 12px;
}
.tip-item {
margin-left: 10px;
align-items: center;
font-size: 10px;
}
.tip {
width: 25px;
height: 13px;
background-color: #258F76;
border-radius: 2px;
margin-right: 5px;
}
.info-wrap {
width: 100%;
height: 100%;
padding: 5px 10px;
}
.info-wrap .info-item {
align-items: center;
margin: 0 20px;
}
.info-wrap .info-item .title {
margin-bottom: 5px;
font-size: 14px;
}
.tip-next {
background-color: #92BF55;
}
.info-wrap .info-item .item {
width: 100%;
height: 100%;
background-color: #267AA4;
border-radius: 25px;
align-items: center;
justify-content: space-around;
}
.info-wrap .info-item .item .i-num {
color: #F48A5C;
font-size: 48px;
}
.info-wrap .info-item .item .i-num-c {
color: #C1DF8E;
}
</style>
</head>
<body>
<div class="wrap flex flexV">
<div class="bottom-wrap flex1">
<div class="top flex">
<div class="item flex1 flex flexV">
<div class="bw-b-bottom" style="margin-bottom: 5px;">
<div class="bw-b-bottom-up">
<div class="info-wrap flex">
<div class="info-item flex flexV flex1">
<div class="title">一次合格率</div>
<div class="item flex1 flex flexV">
<div runat="server" id="divFirstOKRate" class="specialNum i-num">87</div>
<div style="font-size: 10px">单位:%</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="item flex2 iteml">
<div class="bw-b-bottom">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="3">
<div class="t-item active">按分包商</div>
<div class="spline"></div>
<div class="t-item ">按装置</div>
</div>
</div>
<div class="bw-item-content flex1 pdtb0">
<div id='four' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="bottom-wrap flex1">
<div class="top flex">
<div class="item flex1">
<div class="bw-b-bottom">
<div class="bw-b-bottom-up">
<div class="tab-wrap" style="right: 5px;">
</div>
<div class="bw-item-content">
<div id='two' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
<div class="item flex2 iteml">
<div class="bw-b-bottom">
<div class="bw-b-bottom-up">
<div class="tab-wrap">
<div class="tab" data-value="2">
<div class="t-item active">按分包商</div>
<div class="spline"></div>
<div class="t-item">按装置</div>
</div>
</div>
<div class="bw-item-content">
<div id='three' style="width: 100%; height: 100%;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="../res/index/js/jquery-3.4.1.min.js"></script>
<script type="text/javascript" src="../res/index/js/swiper-3.4.2.jquery.min.js"></script>
<script type="text/javascript" src="../res/index/js/echarts.min.js"></script>
<script type="text/javascript">
function category_One(id, dataNum, title, detail) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
//tooltip: {
// formatter: '{a} <br/>{b} : {c}%'
//},
title: {
left: 'center',
text: title,
textStyle: {
color: '#278AC8',
fontSize: 14,
fontWeight: '300'
},
show: true
},
series: [
{
name: ' ',
center: ["50%", "65%"],
type: 'gauge',
radius: "100%",
pointer: {
show: true,
length: '70%',
width: 3
},
axisTick: { //刻度线样式(及短线样式)
length: 0
},
splitLine: {
length: 10,
lineStyle: {
color: 'rgba(255,255,255,.1)'
}
},
axisLine: {
lineStyle: {
width: 10//表盘宽度
}
},
min: 0,
max: 100,
detail: {
show: true,
formatter: detail
},
data: [{
value: dataNum,
name: ''
}]
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option, true)
}
//category_One('one', 80, '项目焊接一次合格率', '{value}%');
//category_One('one1', 76, '项目焊工总人数', '{value}人');
</script>
<script type="text/javascript">
function category_two(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: [{
text: '项目焊接工程量统计',
top: '10',
//left:'center',
textStyle: {
color: '#278AC8',
fontSize: 12,
//fontWeight:300
}
}],
//tooltip: {
// trigger: 'item',
// formatter: '{a} <br/>{b}: {c} ({d}%)'
//},
legend: {
show: true,
bottom: 0,
align: 'left',
textStyle: {//图例文字的样式
color: '#fff'
}
},
color: ['#1E9B7D', '#8EC43D'],
series: [
{
name: '项目焊接工程量统计',
type: 'pie',
center: ['50%', '55%'],
radius: ['50%', '65%'],
avoidLabelOverlap: false,
label: {
show: true,
position: 'inside',
formatter: function (data) { return data.percent.toFixed(2) + "%"; }
},
//emphasis: {
// label: {
// show: true,
// fontSize: '20',
// fontWeight: 'bold'
// }
//},
labelLine: {
show: false
},
data: [
{ value: data.num10, name: '已完成' },
{ value: data.num11, name: '未完成' }
],
itemStyle: {
normal: {
//opacity: 0.7,
borderWidth: 3,
borderColor: 'rgba(218,235,234, 1)'
}
}
}
]
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["分包一", "分包二"]
var data = [
{
name: '质量一次性合格率',
type: 'bar',
barWidth: 40,
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
barWidth: 40,
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
var two =<%=Two %>;
category_two('two', xArr, two)
</script>
<script type="text/javascript">
function category_Three(id, xArr, data, num) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '焊接完成量',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize: 12
},
show: true
},
tooltip: {},
legend: {
left: '10%',
show: true,
textStyle: {//图例文字的样式
color: '#ffffff',
fontSize: 10,
}
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)',
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
interval: 0,
formatter: function (value) {
var ret = "";//拼接加\n返回的类目项
var maxLength = num;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于maxLength,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN - 1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
},
type: 'category',
data: xArr,
boundaryGap: [0, 0.01],
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
}
},
series: data,
grid: {
top: '20%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var three =<%=Three %>;
//var xArr = ["分包1", "分包2", "分包3", "分包4", "分包5", "分包6", "分包7", "分包8", "分包9"]
var xArr = three.categories
var data = [
{
name: '已完成',
type: 'bar',
stack: '总量',
barWidth: 40,
//data: [3, 5, 8, 10, 6, 4, 5, 9, 12],
data: three.series[0].data,
itemStyle: { normal: { color: 'rgba(162,63,21, 1)' } }
},
{
name: '未完成',
type: 'bar',
stack: '总量',
barWidth: 40,
//data: [2, 7, 5, 9, 12, 9, 2, 8, 10],
data: three.series[1].data,
itemStyle: { normal: { color: 'rgba(206,143,135,1)' } }
}
]
category_Three('three', xArr, data, three.xFontNum)
</script>
<script type="text/javascript">
function line(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
// left:'center',
text: '一次合格率',
textStyle: {
color: '#fff',
fontWeight: 'normal',
fontSize:14
},
show: true
},
tooltip: {},
legend: {
//data: ['销量'],
show: false
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
},
formatter:function(value)
{
var ret = "";//拼接加\n返回的类目项
var maxLength = 8;//每项显示文字个数
var valLength = value.length;//X轴类目项的文字个数
var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数
if (rowN > 1)//如果类目项的文字大于maxLength,
{
for (var i = 0; i < rowN; i++) {
var temp = "";//每次截取的字符串
var start = i * maxLength;//开始截取的位置
var end = start + maxLength;//结束截取的位置
//这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
//temp = value.substring(start, end) + "\n";
temp = value.substring(start, end) + (i == rowN -1 ? "" : "\n");
ret += temp; //凭借最终的字符串
}
return ret;
}
else {
return value;
}
}
},
type: 'category',
data: xArr
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
}
},
series: [{
name: '',
type: 'bar',
data: data
}],
grid: {
top: '25%',
left: '0%',
right: '0%',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
itemStyle: {
color: 'rgba(200,201,10, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var four =<%=Four %>;
var xArr1 = four.categories
var data1 = [{
name: '分包1',
type: 'line',
data: [76, 86, 96],
}, {
name: '分包2',
type: 'line',
data: [56, 66, 76],
}, {
name: '分包3',
type: 'line',
data: [51, 61, 71],
}]
var data2 = four.series[0].data
line('four', xArr1, data2)
</script>
<script type="text/javascript">
function category_five(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
top: 10,
//left: 10,
text: '焊接缺陷分析',
textStyle: {
color: '#278AC8',
//fontWeight: '300',
fontSize: 12
},
},
tooltip: {
trigger: 'axis'
},
legend: {
show: false,
left: 'center',
data: ['降水量', '蒸发量']
},
radar: [
{
shape: 'circle',
indicator: (function () {
var res = [];
for (var i = 1; i <= 12; i++) {
res.push({ text: '问题' + i, max: 100 });
}
return res;
})(),
center: ['50%', '55%'],
radius: 70
}
],
series: [
{
type: 'radar',
//areaStyle: {},
data: [
{
name: '降水量',
value: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 75.6, 82.2, 48.7, 18.8, 6.0, 2.3],
},
{
name: '蒸发量',
value: [2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 35.6, 62.2, 32.6, 20.0, 6.4, 3.3]
}
]
}
]
};
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["类别1", "类别2", "类别3", "类别4", "类别5", "类别6", "类别7"]
var data = [{
name: '',
type: 'line',
data: [23, 25, 22, 13, 4, 12, 9],
itemStyle: { normal: { color: 'rgba(110,164,133, 1)' } }
}, {
name: '',
type: 'bar',
barWidth: 40,
data: [20, 2, 1, 34, 39, 30, 20],
itemStyle: { normal: { color: 'rgba(160,181,204, 1)' } }
}]
category_five('five', xArr, data)
</script>
<script type="text/javascript">
function category_six(id, xArr, data) {
// 基于准备好的dom初始化echarts实例
var myChart = echarts.init(document.getElementById(id))
// 指定图表的配置项和数据
var option = {
title: {
//left:'0',
text: '焊接进度分析',
textStyle: {
color: '#fff',
fontSize: 12,
fontWeight: '300'
},
show: true
},
tooltip: {},
legend: {
show: false
},
xAxis: {
axisTick: {
show: false
},
axisLine: {
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
},
type: 'category',
data: xArr
},
yAxis: {
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
},
axisLabel: {
show: true,
textStyle: {
color: 'rgba(255, 255, 255, 0.8)'
}
}
},
series: data,
grid: {
top: '25%',
left: '0',
right: '0',
bottom: '0%',
containLabel: true,
backgroundColor: 'rgba(0,162,233, 0.01)',
// borderColor: 'rgba(0,162,233, 1)'
},
itemStyle: {
color: 'rgba(200,201,10, 1)'
},
backgroundColor: 'rgba(0,162,233, 0.01)',
textStyle: {
color: 'rgba(255, 255, 255, 0.3)'
}
}
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option)
}
var xArr = ["类别1", "类别2", "类别3", "类别4", "类别5", "类别6", "类别7"]
var data = [{
name: '',
type: 'line',
data: [23, 25, 22, 13, 4, 12, 9],
itemStyle: { normal: { color: '#83B848' } }
}, {
name: '',
type: 'bar',
barWidth: 40,
data: [20, 2, 1, 34, 39, 30, 20],
itemStyle: { normal: { color: 'rgba(160,181,204, 1)' } }
}]
category_six('six', xArr, data)
</script>
<script>
$(".tab .t-item").click(function () {
var $this = $(this)
var index = $this.index()
if ($this.hasClass('active') && index == 0) {
return
}
var $tab = $this.closest(".tab")
var value = $tab.attr("data-value")
$tab.find(".t-item").removeClass('active');
$this.addClass('active')
if (value == 1) {
var xArr = ["单位工程一", "单位工程二"]
var data = [
{
name: '质量一次性合格率',
type: 'bar',
barWidth: 40,
data: [0.9, 0.85],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
barWidth: 40,
data: [0.75, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
if (index == 0) {
xArr = ["分包一", "分包二"]
data = [
{
name: '质量一次性合格率',
type: 'bar',
barWidth: 40,
data: [0.85, 0.82],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
barWidth: 40,
data: [0.69, 0.65],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
} else if (index == 4) {
xArr = ["建筑", "安装"]
data = [
{
name: '质量一次性合格率',
type: 'bar',
barWidth: 40,
data: [0.83, 0.78],
//itemStyle: { normal: { color: 'rgba(231,236,114,.9)' } }
},
{
name: '施工资料同步率',
type: 'bar',
barWidth: 40,
data: [0.64, 0.61],
//itemStyle: { normal: { color: 'rgba(200,201,10, 1)' } }
}
]
}
//category_One('one', xArr, data)
}
else if (value == 2) {
var three =<%=Three %>;
var three2 =<%=Three2 %>;
if (index == 0) {
var xArr = three.categories
var data = [
{
name: '已完成',
type: 'bar',
stack: '总量',
barWidth: 40,
data: three.series[0].data,
itemStyle: { normal: { color: 'rgba(162,63,21, 1)' } }
},
{
name: '未完成',
type: 'bar',
stack: '总量',
barWidth: 40,
data: three.series[1].data,
itemStyle: { normal: { color: 'rgba(206,143,135,1)' } }
}
]
category_Three('three', xArr, data, three.xFontNum)
}
else if (index == 2) {
var xArr = three2.categories
var data = [
{
name: '已完成',
type: 'bar',
stack: '总量',
barWidth: 40,
data: three2.series[0].data,
itemStyle: { normal: { color: 'rgba(162,63,21, 1)' } }
},
{
name: '未完成',
type: 'bar',
stack: '总量',
barWidth: 40,
data: three2.series[1].data,
itemStyle: { normal: { color: 'rgba(206,143,135,1)' } }
}
]
category_Three('three', xArr, data, three2.xFontNum)
}
}
else if (value == 3) {
var four =<%=Four %>;
var four2 =<%=Four2 %>;
if (index == 0) {
var xArr1 = four.categories
var data2 = four.series[0].data
line('four', xArr1, data2)
}
else if (index == 2) {
var xArr1 = four2.categories
var data2 = four2.series[0].data
line('four', xArr1, data2)
}
}
else if (value == 4) {
var xArr = ["主项一", "主项二", "主项三", "主项四", "主项五"]
var data = [12, 5, 28, 43, 22]
if (index == 2) {
xArr = ["建筑", "安装"]
data = [45, 65]
}
category('four', xArr, data)
}
})
</script>
</html>