first commit
This commit is contained in:
352
WebRoot/jsp/visual/modules/bigScreen_equipmentCondition3.jsp
Normal file
352
WebRoot/jsp/visual/modules/bigScreen_equipmentCondition3.jsp
Normal file
@ -0,0 +1,352 @@
|
||||
<%@ page language="java" pageEncoding="UTF-8"%>
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
|
||||
<%@ page import="com.sipai.entity.base.ServerObject"%>
|
||||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security"%>
|
||||
<%@page import="com.sipai.entity.visual.JspElement"%>
|
||||
<%request.setAttribute("Type_GetValue", JspElement.Type_GetValue); %>
|
||||
<%request.setAttribute("Type_Get7dayHistory", JspElement.Type_GetHourHistory); %>
|
||||
<%request.setAttribute("Type_Get7dayHistory", JspElement.Type_Get7dayHistory); %>
|
||||
<%request.setAttribute("Type_GetModbus", JspElement.Type_GetModbus); %>
|
||||
<%request.setAttribute("Type_GetHttp", JspElement.Type_GetHttp); %>
|
||||
<!DOCTYPE html>
|
||||
<!-- <html lang="zh-CN"> -->
|
||||
<!-- BEGIN HEAD -->
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<!-- 引用页头及CSS页-->
|
||||
<script type="text/javascript">
|
||||
|
||||
/* 请求数据 */
|
||||
function getbigScreen_equipmentCondition3Value() {
|
||||
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
|
||||
// console.log(data);
|
||||
// if(data!=''){
|
||||
// for(var i=0;i<data.length;i++){
|
||||
// if(data[i].elementCode=="totalEqNum"){
|
||||
// $('#bigScreen_equipmentCondition3totalEqNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
|
||||
// }else if(data[i].elementCode=="usingTotalEqNum"){
|
||||
// $('#bigScreen_equipmentCondition3usingTotalEqNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
|
||||
// }else if(data[i].elementCode=="AEqNum"){
|
||||
// $('#bigScreen_equipmentCondition3AEqNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
|
||||
// eqTypedata.push({
|
||||
// name:'A类设备',
|
||||
// value:(data[i].visualCacheData.value).toFixed(0)
|
||||
// })
|
||||
// }else if(data[i].elementCode=="BEqNum"){
|
||||
// $('#BEqNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
|
||||
// eqTypedata.push({
|
||||
// name:'B类设备',
|
||||
// value:(data[i].visualCacheData.value).toFixed(0)
|
||||
// })
|
||||
// }else if(data[i].elementCode=="CEqNum"){
|
||||
// $('#CEqNum').text(numOutput((data[i].visualCacheData.value).toFixed(0)));
|
||||
// eqTypedata.push({
|
||||
// name:'C类设备',
|
||||
// value:(data[i].visualCacheData.value).toFixed(0)
|
||||
// })
|
||||
// }else if(data[i].elementCode=="eqCompletionRate"){
|
||||
// dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart1',(data[i].visualCacheData.value).toFixed(0),'设备完好率','#FFE538');
|
||||
// }else if(data[i].elementCode=="maintainCompletionRate"){
|
||||
// dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart2',(data[i].visualCacheData.value).toFixed(0),'保养完成率','#3883FF');
|
||||
// }else if(data[i].elementCode=="repairCompletionRate"){
|
||||
// dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart3',(data[i].visualCacheData.value).toFixed(0),'维修完成率','#3883FF');
|
||||
// }
|
||||
|
||||
|
||||
// }
|
||||
// }
|
||||
var eqTypedata =[];
|
||||
eqTypedata.push({
|
||||
name:'A类设备',
|
||||
value:1337
|
||||
})
|
||||
$('#bigScreen_equipmentCondition3AEqNum').text(1337);
|
||||
eqTypedata.push({
|
||||
name:'B类设备',
|
||||
value:1
|
||||
})
|
||||
$('#bigScreen_equipmentCondition3BEqNum').text(1);
|
||||
eqTypedata.push({
|
||||
name:'C类设备',
|
||||
value:0
|
||||
})
|
||||
$('#bigScreen_equipmentCondition3CEqNum').text(0);
|
||||
|
||||
dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart1',98,'设备完好率','#FE8841');
|
||||
dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart2',92,'大修完成率','#862CAA');
|
||||
dobigScreen_equipmentCondition3chart('bigScreen_equipmentCondition3chart3',94,'保养完成率','#3A84FF');
|
||||
doequbigScreen_equipmentCondition3type("bigScreen_equipmentCondition3chart4",eqTypedata);
|
||||
|
||||
}, 'json');
|
||||
}
|
||||
|
||||
function dobigScreen_equipmentCondition3chart(id,value,title,color){
|
||||
var myChart = echarts.init(document.getElementById(id));
|
||||
var option = {
|
||||
title: {
|
||||
text: value+"%",
|
||||
textStyle: {
|
||||
color: '#FFFFFF',
|
||||
fontSize: 14
|
||||
},
|
||||
subtext: title,
|
||||
subtextStyle: {
|
||||
color: '#8AC2F6',
|
||||
fontSize: 12
|
||||
},
|
||||
itemGap: 30, // 主副标题距离
|
||||
left: 'center',
|
||||
top: '40%'
|
||||
},
|
||||
angleAxis: {
|
||||
max: 100, // 满分
|
||||
clockwise: true, // 逆时针
|
||||
// 隐藏刻度线
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
radiusAxis: {
|
||||
type: 'category',
|
||||
// 隐藏刻度线
|
||||
axisLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
show: false
|
||||
},
|
||||
axisLabel: {
|
||||
show: false
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
polar: {
|
||||
radius: ['65%', '80%'],
|
||||
center: ['50%', '40%'],
|
||||
radius: '120%' //图形大小
|
||||
},
|
||||
series: [{
|
||||
type: 'bar',
|
||||
data: [{
|
||||
name: '百分比',
|
||||
value: value,
|
||||
itemStyle: {
|
||||
color: color
|
||||
},
|
||||
}],
|
||||
coordinateSystem: 'polar',
|
||||
roundCap: true,
|
||||
barWidth: 4,
|
||||
barGap: '-100%', // 两环重叠
|
||||
z: 2
|
||||
},{ // 灰色环
|
||||
type: 'bar',
|
||||
data: [{
|
||||
value: 100,
|
||||
itemStyle: {
|
||||
color: '#2B3F69',
|
||||
shadowColor: 'rgba(0, 0, 0, 0.2)',
|
||||
shadowBlur: 2,
|
||||
shadowOffsetY: 2
|
||||
}
|
||||
}],
|
||||
coordinateSystem: 'polar',
|
||||
roundCap: true,
|
||||
barWidth: 8,
|
||||
barGap: '-100%', // 两环重叠
|
||||
z: 1
|
||||
}]
|
||||
};
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
|
||||
//设备类型pie
|
||||
function doequbigScreen_equipmentCondition3type(id,val){
|
||||
const colorList = ['#3883FF', '#A84ECB', '#FE8840'];
|
||||
var data = val;
|
||||
var legendName = new Array;
|
||||
data.forEach(function(value,i){
|
||||
legendName[i] = value.name;
|
||||
});
|
||||
var myChart = echarts.init(document.getElementById(id));
|
||||
var option = {
|
||||
title: {
|
||||
text: '设备\n数量',
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: '#FFFFFF',
|
||||
lineHeight:18
|
||||
},
|
||||
textAlign: 'center',
|
||||
left: '46%',
|
||||
top: '25%'
|
||||
},
|
||||
grid: {
|
||||
top:0,
|
||||
left:0,
|
||||
right:0,
|
||||
bottom:0,
|
||||
},
|
||||
// tooltip: {
|
||||
// trigger: 'item',
|
||||
// },
|
||||
color: colorList,
|
||||
series: [{
|
||||
name: '设备',
|
||||
type: 'pie',
|
||||
radius: ['65%', '80%'],
|
||||
center: ['50%', '40%'],
|
||||
label: {
|
||||
show: false
|
||||
},
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
itemStyle: {
|
||||
borderWidth: 3,
|
||||
borderColor: '#0D436A'
|
||||
},
|
||||
data: data,
|
||||
}]
|
||||
};
|
||||
myChart.clear();
|
||||
myChart.setOption(option, true);
|
||||
}
|
||||
|
||||
/* 定时器 */
|
||||
//setInterval(change, 60000); //每1分钟切换
|
||||
// setInterval(getValue, 3600000); //每一小时切换
|
||||
|
||||
|
||||
/* 初始化 */
|
||||
$(function () {
|
||||
if('${param.backgroundColor}'=='transparent'){
|
||||
document.body.style.backgroundColor = '${param.backgroundColor}';
|
||||
}else{
|
||||
document.body.style.backgroundColor = "#" + '${param.backgroundColor}';
|
||||
}
|
||||
// document.getElementById("main").style.width = document.documentElement.clientWidth + "px";
|
||||
// document.getElementById("main").style.height = (document.documentElement.clientHeight) + "px";
|
||||
|
||||
getbigScreen_equipmentCondition3Value();
|
||||
//console.log("height",document.body.scrollHeight);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
||||
<body style="width:100%;height:100%;margin:0;padding:0;overflow-x:hidden;overflow-y:hidden;">
|
||||
<div id="bigScreen_equipmentCondition3main" style="height:100%;width:100%;padding-top:10px;padding-left:10px;padding-right:10px;">
|
||||
<div style="height:100%;width:100%;background:#16314c;border-radius: 8px;">
|
||||
<div style="float:left;width:100%;height:calc(100%*0.3);">
|
||||
<div style="float:left;width:50%;height:100%;">
|
||||
<div style="float:left;width:40%;height:100%;">
|
||||
<table style="width:100%;height:100%;color: #8ac2f6;">
|
||||
<tr style="text-align: center;vertical-align:bottom;">
|
||||
<td>总设备</td>
|
||||
</tr>
|
||||
<tr style="text-align: center;vertical-align:top;">
|
||||
<td>数量</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float:left;width:60%;height:100%;">
|
||||
<table style="width:100%;height:100%;color: #8ac2f6;">
|
||||
<tr style="text-align: center;color: #ffffff;font-weight: 700;font-size: 36px;">
|
||||
<td>1338</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float:left;width:50%;height:100%;">
|
||||
<div style="float:left;width:40%;height:100%;">
|
||||
<table style="width:100%;height:100%;color: #8ac2f6;">
|
||||
<tr style="text-align: center;vertical-align:bottom;">
|
||||
<td>投运设备</td>
|
||||
</tr>
|
||||
<tr style="text-align: center;vertical-align:top;">
|
||||
<td>数量</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float:left;width:60%;height:100%;">
|
||||
<table style="width:100%;height:100%;color: #8ac2f6;">
|
||||
<tr style="text-align: center;color: #ffffff;font-weight: 700;font-size: 36px;">
|
||||
<td>1338</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float:left;width:100%;height:calc(100%*0.3);">
|
||||
<div style="float:left;width:33.3%;height:100%;">
|
||||
<div id="bigScreen_equipmentCondition3chart4" style="width: 100%;height: 100%;"></div>
|
||||
</div>
|
||||
<div style="float:left;width:22.2%;height:100%;">
|
||||
<table style="width: 100%;height:100%;text-align: left;vertical-align: middle;">
|
||||
<tr height="20%">
|
||||
<td width="100%" ><div style="width:26px;height:12px;background: #3883FF;border-radius: 2px;"></div></td>
|
||||
</tr>
|
||||
<tr height="30%">
|
||||
<td width="100%" style="color: #ffffff;font-size:12px;">A类设备</td>
|
||||
</tr>
|
||||
<tr height="50%">
|
||||
<td id="bigScreen_equipmentCondition3AEqNum" width="100%" style="color: #ffffff;font-size:16px;font-weight: 700;vertical-align:top;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float:left;width:22.2%;height:100%;">
|
||||
<table style="width: 100%;height:100%;text-align: left;vertical-align: middle;">
|
||||
<tr height="20%">
|
||||
<td width="100%" ><div style="width:26px;height:12px;background: #A84ECB;border-radius: 2px;"></div></td>
|
||||
</tr>
|
||||
<tr height="30%">
|
||||
<td width="100%" style="color: #ffffff;font-size:12px;">B类设备</td>
|
||||
</tr>
|
||||
<tr height="50%">
|
||||
<td id="bigScreen_equipmentCondition3BEqNum" width="100%" style="color: #ffffff;font-size:16px;font-weight: 700;vertical-align:top;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div style="float:left;width:22.2%;height:100%;">
|
||||
<table style="width: 100%;height:100%;text-align: left;vertical-align: middle;">
|
||||
<tr height="20%">
|
||||
<td width="100%" ><div style="width:26px;height:12px;background: #FE8840;border-radius: 2px;"></div></td>
|
||||
</tr>
|
||||
<tr height="30%">
|
||||
<td width="100%" style="color: #ffffff;font-size:12px;">C类设备</td>
|
||||
</tr>
|
||||
<tr height="50%">
|
||||
<td id="bigScreen_equipmentCondition3CEqNum" width="100%" style="color: #ffffff;font-size:16px;font-weight: 700;vertical-align:top;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div style="float:left;width:100%;height:calc(100%*0.35);">
|
||||
<div id="bigScreen_equipmentCondition3chart1" style="float:left;width:33.3%;height:100%;">
|
||||
</div>
|
||||
<div id="bigScreen_equipmentCondition3chart2" style="float:left;width:33.3%;height:100%;">
|
||||
</div>
|
||||
<div id="bigScreen_equipmentCondition3chart3" style="float:left;width:33.3%;height:100%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user