Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/todo/healthy.jsp
2026-01-16 14:13:44 +08:00

718 lines
26 KiB
Plaintext
Raw Permalink 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="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"%>
<!DOCTYPE html>
<!-- <html lang="zh-CN"> -->
<!-- BEGIN HEAD -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"/> -->
<title>
<%= ServerObject.atttable.get("TOPTITLE")%>
</title>
<!-- 引用页头及CSS页-->
<jsp:include page="/jsp/inc.jsp"></jsp:include>
<!-- bootstrap switch -->
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/css/bootstrap3/bootstrap-switch.min.css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/node_modules/bootstrap-switch/dist/js/bootstrap-switch.min.js"
charset="utf-8"></script>
<style type="text/css">+
.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9,
.col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9,
.col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9,
.col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {
padding-left: 5px;
padding-right: 5px;
}
.floattop_div_1 {
width: 100%;
height: 420px;
padding:10px;
background: #FFFFFF;
}
.floattop_div_1_1 {
width: 25%;
height: 400px;
float: left;
}
.floattop_div_1_2 {
width: 73%;
height: 400px;
float: left;
}
.floattop_div_1_3 {
width: 25%;
height: 400px;
float: left;
}
/* .floattop_div_1_4 {
width: 6%;
height: 400px;
float: left;
} */
.floattop_div_1_5 {
width: 1%;
height: 400px;
float: left;
}
.floattop_div_1_6 {
width: 1%;
height: 400px;
float: right;
}
.floattop_div_2 {
width: 100%;
height: 460px;
background: transparent;
border:0px;
}
.floattop_div_2_1 {
width: 10%;
height: 430px;
float: left;
}
.floattop_div_2_2 {
width: 100%;
height: 430px;
margin-top:10px;
margin-right:10px;
background-color: #fff;
}
.floattop_div_3 {
width: 99%;
height: 520px;
margin-left:10px;
margin-right:10px;
margin-top:0px;
background: #FFFFFF;
border:0px solid #8B8386;
float: left;
}
.floattop_div_3_1 {
width: 41%;
height: 430px;
margin-top:10px;
margin-left:15px;
float: left;
}
.floattop_div_3_2 {
width: 100%;
height: 550px;
margin-top:10px;
margin-right:15px;
float: left;
}
.yuanG {
width: 15px;
height: 15px;
border-radius: 10px;
background:#3BBD51;
display: block;
float: left;
margin-top:-2px;
}
.yuanO {
width: 15px;
height: 15px;
border-radius: 10px;
background:#FFC239;
display: block;
float: left;
margin-top:-2px;
}
.yuanR {
width: 15px;
height: 15px;
border-radius: 10px;
background:#8E9AAE;
display: block;
float: left;
margin-top:-2px;
}
.hengG {
width: 20px;
height: 3px;
background:#3BBD51;
display: block;
float: left;
margin-top:4px;
}
.hengR {
width: 20px;
height: 3px;
background:#8E9AAE;
display: block;
float: left;
margin-top:4px;
}
.fixed-table-container {
border: 0px;
}
.nav-tabs{
border:0px solid #ddd
}
.ctab_5_1{
table-layout:fixed;/* 只有定义了表格的布局算法为fixed下面td的定义才能起作用。 */
}
.ctab_5_1 thead {
border: 0px;
background:#CBEFFF;
}
.bootstrap-table .ctab_5_1 thead tr th{
border: 1px solid #CBEFFF;
border-bottom:0px;
}
.ctab_5_1 tbody tr:nth-of-type(2n+1){
background:#FFFFFF;
}
.ctab_5_1 tbody tr{
border: 0px;
}
.ctab_5_1 tbody tr td{
border-bottom: 1px solid #CBEFFF; /* 整体表格边框 */
border-right:0px;
border-left:0px;
word-break:keep-all;/* 不换行 */
white-space:nowrap;/* 不换行 */
overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) 需与overflow:hidden;一起使用*/
}
.ctab_5_3{
table-layout:fixed;/* 只有定义了表格的布局算法为fixed下面td的定义才能起作用。 */
}
.ctab_5_3 thead {
border: 0px;
background:#CBEFFF;
}
.bootstrap-table .ctab_5_3 thead tr th{
border: 1px solid #CBEFFF;
border-bottom:0px;
}
.ctab_5_3 tbody tr:nth-of-type(2n+1){
background:#FFFFFF;
}
.ctab_5_3 tbody tr{
border: 0px;
}
.ctab_5_3 tbody tr td{
border-bottom: 1px solid #CBEFFF; /* 整体表格边框 */
border-right:0px;
border-left:0px;
word-break:keep-all;/* 不换行 */
white-space:nowrap;/* 不换行 */
overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) 需与overflow:hidden;一起使用*/
}
.ctab_9_1 thead {
background:#F2F2F2;
}
.sjdbth {
height:20px;text-align:center;
}
.sjdbtd {
height:45px;text-align:center;border-bottom:1px solid #DADADA;
}
.sidebar{
height: 1500px;
}
.gauge_cont{
height:35px;
width:100%;
padding:0 5px;
}
.text_cost{
height: 100%;
width: 22%;
float: left;
line-height: 2;
font-size: 20px;
padding: 0 5px;
}
.text_cost_good{
width: 50%;
}
.number_cost{
height: 100%;
float: left;
font-weight: 700;
line-height: 1.5;
font-size: 25px;
padding:0 5px;
}
.number_red{
color: rgb(253, 0, 0);
}
.equ_pie_cont{
height:25px;
width:100%;
}
.equ_pie_text{
height:100%;
width:50%;
float:left;
line-height: 1;
font-size: 14px;
color: #b5b5b5;
text-align: right;
padding-right:10px;
}
.equ_pie_number{
height:100%;
width:50%;
float:left;
font-weight: 700;
line-height: 1;
font-size: 16px;
padding-left:10px;
}
</style>
<script type="text/javascript">
var mychart;
var mychart1;
var mychart2;
var mychart3;
var mychart9;
var mychart10;
$(function () {
/* var data = [
{value: 90, name: '运行'},
{value: 80, name: '成本'},
{value: 90, name: '设备'},
{value: 80, name: '安全'},
]
var dataSum = 90;
pie('pie_healthy',dataSum,data,'水厂运行健康状况评价');
var legendData = ['总分','运行', '成本', '设备', '安全'];
var xAxisData = ['大岭山', '厚街', '石排', '横岭', '花都', '三水', '占陇', '空港', '增城']
var seriesData = [
{
name: '总分',
type: 'bar',
data: [18, 23, 29, 10, 13, 63, 43, 23, 33]
},
{
name: '运行',
type: 'bar',
data: [18, 23, 29, 10, 13, 63, 43, 23, 33]
},
{
name: '成本',
type: 'bar',
data: [19, 23, 31, 12, 13, 68, 23, 33, 43]
},
{
name: '设备',
type: 'bar',
data: [19, 23, 31, 12, 13, 68, 23, 33, 43]
},
{
name: '安全',
type: 'bar',
data: [19, 23, 31, 12, 13, 68, 23, 33, 43]
}
]
bar('bar_healthy',legendData,xAxisData,seriesData,'得分情况');
var tableData = [
{"name":"大岭山区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"厚街区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"石排区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"横岭区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"花都区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"三水区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"空港区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"占陇区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"},
{"name":"增城区域","targetWater":"30","actualWater":"25","completionWater":"85%","qualityWater":"85%","targetMua":"40","actualMua":"50","completionMua":"85%","qualityMua":"85%"}
];
showtable_water(tableData); */
$('#time_input').datepicker({
language: 'zh-CN',
autoclose: true,
todayHighlight: true,
format:'yyyy-mm-dd',
}).on('hide',function(e) {
//当日期选择框关闭时,执行刷新校验
var search_pid = $('#search_pid').val();
getData(search_pid);
});
//init();
//简易公司combotree
$.post(ext.contextPath + '/user/getUnitForTreeNotD.do', { ng: '' }, function (data) {
//console.log("data",data[0]);
if (data.length == 1 && !data[0].hasOwnProperty("nodes")) {
//当登陆者的pid以下没有子节点时显示单独一个span
$("#search_pid").val(data[0].id);
$("#companyselect").hide();
$("#companyName").text("公司:" + data[0].text);
// showtable();
} else if ((data.length == 1 && data.nodes != "") || data.length > 1) {
//第一次加载时赋值
$("#search_pid").val(data[0].id);
$("#cname_input").val(data[0].text);
// showtable();
//$table.bootstrapTable('refresh');//异步加载重新刷新,待修改
$('#companytree').treeview({
data: data,
showBorder: true,
});
$('#companytree').on('nodeSelected', function (event, data) {
$("#search_pid").val(data.id);
$("#cname_input").val(data.text);
getData($("#search_pid").val());
// $("ul#companyselect").hide();
});
} else {
//待完善
};
getData($("#search_pid").val());
}, 'json');
$('#removea').click(function () {
$('#search_name').val("");
})
});
//处理量图表
function bar(id,legendData,xAxisData,seriesData,title) {
var option = {
title: {
text: title,
x:'center',
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
}
},
legend: {
data: legendData,
x:'center',
y: 'bottom',
},
grid: {
top: '10%',
left: '3%',
right: '3%',
bottom: '11%',
containLabel: true
},
xAxis: {
type: 'category',
data: xAxisData
},
yAxis: {
type: 'value',
},
series: seriesData
};
var myChart = echarts.init(document.getElementById(id));
myChart.setOption(option, true);
}
function pie(id,dataSum,data,title){
var option = {
title: [{
text: title,
x:'center',
top: 10,
textStyle: {
fontSize: '15',
},
}, {
text: dataSum,
x: 'center',
top: '37%',
textStyle: {
fontSize: '60',
color: '#008DFF',
foontWeight: '700',
},
}],
tooltip: {
trigger: 'item',
formatter: '{b}: {c} ({d}%)'
},
legend: {
x: 'center',
y: 'bottom',
width: '70%' ,
padding: 10,
textStyle: {
fontSize: 16 ,
},
formatter: function(name) {
var value;
for (let i = 0, l = data.length; i < l; i++) {
if (data[i].name == name) {
value = data[i].value;
}
}
var arr = name + " "+value;
return arr;
},
},
series: [
{
name: '',
type: 'pie',
center: ['50%', '45%'],
radius: ['35%', '55%'],
avoidLabelOverlap: false,
label: {
show:false,
},
data: data
}
]
};
var myChart = echarts.init(document.getElementById(id));
myChart.setOption(option, true);
}
function showtable_water(data) {
var htmlStr1= "";
$("#table_healthy_tbody").empty();
for(var a=0;a<data.length;a++){
htmlStr1 += "<tr>"+
"<td>"+(a+1)+"</td>"+
"<td>"+data[a].name+"</td>"+
"<td>"+data[a].score+"</td>"+
"<td>"+data[a].score_technology+"</td>"+
"<td>"+data[a].score_system+"</td>"+
"<td>"+data[a].score_equipment+"</td>"+
"<td>"+data[a].score_security+"</td>"+
"</tr>";
}
$("#table_healthy_tbody").append(htmlStr1);
$("#table_healthy").bootstrapTable();
}
function getData(bizid){
var time_input = $('#time_input').val();
$.post(ext.contextPath + '/todo/getValue4Group.do', {bizid:bizid,time:time_input,jsp_id:'healthy'} , function(data) {
var arr= JSON.parse(data);
console.log(arr);
var data = []
var dataSum = 0;
var legendData = ['总分','运行', '成本', '设备', '安全'];
if(arr.rows!=null && arr.rows!=undefined && arr.rows!=''){
for(var i=0;i<arr.rows.length;i++){
if(arr.rows[i].elementCode=='score_technology'){
var value = {value: arr.rows[i].visualCacheData.value, name: '运行'};
data.push(value);
dataSum += arr.rows[i].visualCacheData.value;
}
if(arr.rows[i].elementCode=='score_system'){
var value = {value: arr.rows[i].visualCacheData.value, name: '成本'};
data.push(value);
dataSum += arr.rows[i].visualCacheData.value;
}
if(arr.rows[i].elementCode=='score_equipment'){
var value = {value: arr.rows[i].visualCacheData.value, name: '设备'};
data.push(value);
dataSum += arr.rows[i].visualCacheData.value;
}
if(arr.rows[i].elementCode=='score_security'){
var value = {value: arr.rows[i].visualCacheData.value, name: '安全'};
data.push(value);
dataSum += arr.rows[i].visualCacheData.value;
}
}
}
var xAxisData = [];
var tableData = [];
var score_data = [];
var score_technology = [];
var score_system = [];
var score_equipment = [];
var score_security = [];
if(arr.children!=null && arr.children!=undefined && arr.children!='' && arr.children.length>0){
for(var i=0;i<arr.children.length;i++){
xAxisData[i]=arr.children[i].sname;
var table ={name:arr.children[i].sname,score_technology:"0",score_system:"0",score_equipment:"0",score_security:"0"};
var score=0;
if(arr.children[i].rows!=null && arr.children[i].rows!=undefined && arr.children[i].rows!=''){
for(var j=0;j<arr.children[i].rows.length;j++){
if(arr.children[i].rows[j].elementCode=='score_technology'){
table.score_technology=arr.children[i].rows[j].visualCacheData.value;
score_technology[i]= arr.children[i].rows[j].visualCacheData.value;
score += arr.children[i].rows[j].visualCacheData.value;
}
if(arr.children[i].rows[j].elementCode=='score_system'){
table.score_system=arr.children[i].rows[j].visualCacheData.value;
score_system[i]= arr.children[i].rows[j].visualCacheData.value;
score += arr.children[i].rows[j].visualCacheData.value;
}
if(arr.children[i].rows[j].elementCode=='score_equipment'){
table.score_equipment=arr.children[i].rows[j].visualCacheData.value;
score_equipment[i]= arr.children[i].rows[j].visualCacheData.value;
score += arr.children[i].rows[j].visualCacheData.value;
}
if(arr.children[i].rows[j].elementCode=='score_security'){
table.score_security=arr.children[i].rows[j].visualCacheData.value;
score_security[i]= arr.children[i].rows[j].visualCacheData.value;
score += arr.children[i].rows[j].visualCacheData.value;
}
}
}
table.score=(score/4).toFixed(0);
tableData[i] = table;
score_data[i]=(score/4).toFixed(0);
}
}
var seriesData = [
{
name: '总分',
type: 'bar',
data: score_data
},
{
name: '运行',
type: 'bar',
data: score_technology
},
{
name: '成本',
type: 'bar',
data: score_system
},
{
name: '设备',
type: 'bar',
data: score_equipment
},
{
name: '安全',
type: 'bar',
data: score_security
}
]
pie('pie_healthy',(dataSum/4).toFixed(0),data,'水厂运行健康状况评价');
bar('bar_healthy',legendData,xAxisData,seriesData,'得分情况');
showtable_water(tableData);
});
}
</script>
</head>
<body class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper" style=" overflow-x: auto;padding:20px;">
<!-- BEGIN CONTAINER -->
<input type="hidden" name="todayAddnum" value="${todayAddnum}">
<input type="hidden" name="todonum" value="${todonum}">
<input type="hidden" name="donownum" value="${donownum}">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<input id="search_pid" name="search_pid" type="hidden" />
<span id="companyName" style="width:220px;border: none;background: transparent;"></span>
<ul class="col-md-2 col-sm-6 col-xs-6" id="companyselect" style="list-style-type:none;">
<li class="dropdown messages-menu" >
<!-- Menu toggle button -->
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="width:80px;">
<div class="input-group" style="height: 25px">
<span class="input-group-addon" style="height:25px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">层级选择:</span>
<input class="form-control " id="cname_input" name="cname_input" style="height:28px;width:150px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;text-align:center;"
readonly />
</div>
</a>
<ul id="company_select" class="dropdown-menu" data-stopPropagation="true" >
<li >
<!-- <a href="javascript:company_selectchange();"> -->
<!-- -->
<div id="companytree" style="width: 275px;overflow:auto;"></div>
</li>
</ul>
</li>
</ul>
<ul class="col-md-2 col-sm-6 col-xs-6" id="timeselect" style="list-style-type:none;">
<li class="dropdown" >
<!-- Menu toggle button -->
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" style="width:80px;">
<div class="input-group" style="height: 25px">
<span class="input-group-addon"
style="height:25px;color:#000000;border-top-left-radius: 4px;border-bottom-left-radius: 4px;font-weight:bold">时间选择:</span>
<input class="form-control " id="time_input" name="time_input"
style="height:28px;width:120px;border-top-right-radius: 4px;border-bottom-right-radius: 4px;text-align:center;"
value="${nowDate}"
readonly />
</div>
</a>
</li>
</ul>
</div>
</div>
<div class="row" >
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div style="background-color: #fff;border-radius: 5px;margin-bottom: 20px;">
<div class="row">
<div class="col-lg-3 col-md-3 col-sm-6 col-xs-6">
<div id="pie_healthy" style="height:350px;"></div>
</div>
<div class="col-lg-9 col-md-9 col-sm-6 col-xs-6">
<div id="bar_healthy" style="height:350px;"></div>
</div>
</div>
</div>
<div style="background-color: #fff;">
<table class="table table-bordered text-center" id="table_healthy">
<thead>
<tr>
<th>序号</th><th>区域/水厂名称</th>
<th data-sortable='true'>评价得分</th><th data-sortable='true'>运行</th>
<th data-sortable='true'>成本</th><th data-sortable='true'>设备</th><th data-sortable='true'>安全</th>
</tr>
</thead>
<tbody id="table_healthy_tbody"></tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
<div id="AbnormalView" style="display:none;height: 400px"></div>
<div id="AbnormalDetails" style="display:none;height: 600px"></div>
</html>