Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/visual/modules/reportFilling.jsp
2026-01-16 14:13:44 +08:00

148 lines
6.5 KiB
Plaintext

<%@ 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">
//获取url地址根目录 当前taomcat下路径
function getRootPath(){
var pathName = window.location.pathname.substring(1);
// var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
return window.location.protocol + '//' + window.location.host;
}
//获取url地址根目录 当前taomcat下路径
function getRootPath2(){
var pathName = window.location.pathname.substring(1);
var webName = pathName == '' ? '' : pathName.substring(0, pathName.indexOf('/'));
return window.location.protocol + '//' + window.location.host +"/"+webName;
}
function numOutput(num){
var numpart=String(num).split(".");//将数字通过jq split用小数点分隔为数组对象
numpart[0]=numpart[0].replace(new RegExp('(\\d)(?=(\\d{3})+$)','ig'),"$1,");
//将数组对象第一个数据(整数部分)通过正则表达式每三位用逗号分隔
return numpart.join(".");//把数组通过join方法用.进行拼接
}
/* 请求数据 */
function getreportFillingValue() {
$.post(ext.contextPath + '/plan/getJspWholeInfoByPlanLayoutId.do', { planLayoutId: "${param.planLayoutId}" }, function (data) {
// console.log(data);
if(data!=''){
var seriesData=[];
for(var i=0;i<data.length;i++){
if(data[i].elementCode=="chart"){
seriesData.push({
value:data[i].visualCacheData.value,
name:data[i].name
})
}else if(data[i].elementCode=="planNum"){
$("#planNum").html(numOutput(data[i].visualCacheData.value));
}else if(data[i].elementCode=="completeNum"){
$("#completeNum").html(numOutput(data[i].visualCacheData.value));
}
}
getreportFillingchart('fillchart',seriesData);
}
},'json');
}
function getreportFillingchart(id,seriesData){
var myChart = echarts.init(document.getElementById(id));
var option = {
color:['#36CBCB','#3AA1FF','#4ECB73'],
tooltip: {
trigger: 'item'
},
legend: {
bottom: '5%',
left: 'center'
},
series: [
{
type: 'pie',
center: ['50%', '45%'],
radius: ['40%', '60%'],
avoidLabelOverlap: false,
itemStyle: {
borderRadius: 0,
borderColor: '#fff',
borderWidth: 2
},
label: {
show: true,
},
data: seriesData
}
]
};
myChart.setOption(option, true);
window.addEventListener("resize", function () {
myChart.resize();
});
}
/* 定时器 */
//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";
getreportFillingValue();
//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="reportFillingmain" style="height:calc(100% - 6px);width:100%;padding-top:10px;padding-left:10px;padding-right:10px;">
<div style="height:100%;width:100%;background:#ffffff;border: 1px solid #E1E1E1;border-radius: 4px;box-shadow: 2px 2px 4px 0px #696969, 0px 0px 4px 0px #696969;padding-top:10px;padding-left:10px;padding-right:10px;">
<div style="float: left;width: 100%;height:30px;">
<div style="float: left;width:5px;height:100%;margin-left: 15px;padding-top:5px;padding-bottom:5px;"><div style="width: 100%;height: 100%;background-color:skyblue;"></div></div>
<div style="float: left;height:100%;margin-left: 10px;line-height: 30px;">报表填报情况</div>
</div>
<div style="float: left;width: 100%;height:calc(100% - 30px);">
<div id="fillchart" style="float: left;width: 100%;height:75%;"></div>
<div style="float: left;width: 100%;height:20%;margin-top: 5px;">
<div style="float: left;width:50%;height:100%;">
<div style="float: left;width:100%;height:50%;text-align: center;color: #B0B0B0;line-height: 30px;">每日应填数量</div>
<div id="planNum" style="float: left;width:100%;height:50%;text-align: center;font-size:20px;font-weight: bold;"></div>
</div>
<div style="float: left;width:50%;height:100%;">
<div style="float: left;width:100%;height:50%;text-align: center;color: #B0B0B0;line-height: 30px;">已完成</div>
<div id="completeNum" style="float: left;width:100%;height:50%;text-align: center;font-size:20px;font-weight: bold;"></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>