Files
SIPAIIS_WMS_JSSW/WebRoot/jsp/equipment/pumpOneManagementCQ.jsp

900 lines
42 KiB
Plaintext
Raw Permalink Normal View History

2026-01-16 14:13:44 +08:00
<%@ 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>
<script type="text/javascript" src="<%=request.getContextPath()%>/plugins/echarts/echarts5.0.2.js" charset="utf-8"></script>
<link rel="stylesheet" href="<%=request.getContextPath()%>/node_modules/iconfont-pump/iconfont.css" />
<style type="text/css">
.bgimg-map{
width: 100%;
background-image: url(<%=request.getContextPath()%>/IMG/pump/pump_one_bg_CQ.png) ;
background-repeat: no-repeat;
background-position: center center;
position: relative;
}
.bg_color{
background: #2d2d2d;
border:0;
}
.thumbnail, .nav>li>a {
padding: 0px;
}
.nav-tabs-custom>.nav-tabs {
border: 0;
border-bottom-color: #2d2d2d;
}
.nav-tabs-custom > .nav-tabs > li {
width: 170px;
height: 35px;
margin-bottom: 0;
margin-right: 20px;
border: 0;
}
.nav-tabs-custom>.nav-tabs>li.active {
opacity: 1;
background: linear-gradient(180deg,rgba(0,238,255,0.00), rgba(0,246,251,0.15) 46%, #00fff6);
}
.nav-tabs-custom>.nav-tabs>li>a {
border-radius: 0;
width: 100%;
height: 100%;
opacity: 1;
font-size: 20px;
font-family: Source Han Sans CN, Source Han Sans CN-Bold;
font-weight: 700;
text-align: center;
color: #bfbfbf;
border: 0;
}
.nav-tabs-custom>.nav-tabs>li.active>a, .nav-tabs-custom>.nav-tabs>li.active:hover>a {
color: #ffffff;
background-color: inherit;
}
.pump-text{
font-size: 22px;
font-family: Source Han Sans CN, Source Han Sans CN-Regular;
font-weight: 400;
text-align: left;
}
.pump-text-small{
font-size: 18px;
}
.pump-text-white{
font-size: 22px;
color: #ffffff;
padding: 0 11%;
}
.pump-text-blue{
color: #30d4ff;
}
.pump-text-red{
color: #d19bff;
}
label {
margin-bottom: 10px;
}
.table-text-white{
color: #ffffff;
}
th{
font-weight: 400;
}
.table-font-red{
color: #FF0000;
}
.table-font-green{
color: #1BCE5D;
}
.table-font-yellow{
color: #FFDD00;
}
.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
border: 0;
}
.table>tbody>tr.active>td, .table>tbody>tr.active>th,
.table>tbody>tr>td.active, .table>tbody>tr>th.active,
.table>tfoot>tr.active>td, .table>tfoot>tr.active>th,
.table>tfoot>tr>td.active, .table>tfoot>tr>th.active,
.table>thead>tr.active>td, .table>thead>tr.active>th,
.table>thead>tr>td.active, .table>thead>tr>th.active {
background-color: RGBA(209,155,255,0.3);
}
tbody>.active{
border:1px solid #d19bff;
}
.radio {
margin-top: 0px;
margin-bottom: 0px;
}
.bar_title{
font-size: 12px;
background: #000000;
border-radius: 5px;
margin:5px;
}
.calculation{
background: rgba(0,168,255,0.89);
border-radius: 6px;
padding:5px;
}
.bar_title>div{
padding:3px;
}
</style>
<script type="text/javascript">
var heightV =1;
var widthIMG =1;
var widthV =1;
$(function () {
getInitialization();
var tab1_ul_children = $("#tab1_ul").children(".active");
$("#jsp_id").val(tab1_ul_children.find("a").attr("id"));
if(unitId==null || unitId=='' || unitId==undefined){
unitId = '${unitId}';
}
//沙口临时写死
var search_pid = unitId;
search_pid = unitId;
$("#tab1_ul li a").click(function(){
var href = $(this).attr('href');
if(!$(href+"_1").hasClass("active")){
$(href+"_1").addClass("active");
}
$(href+"_1").siblings().removeClass("active");
$("#jsp_id").val($(this).attr("id"));
getData(search_pid);
});
getData(search_pid);
$(window).resize(function() {
getInitialization();
getData(search_pid);
});
});
function getInitialization(){
heightV = $(window).height()/1080;
widthV = $(window).width()/1690;
widthIMG = $(window).width()/1920;
$(".bgimg-map").css("height",1050*heightV);
$(".bgimg-map").css("background-size",""+(820*widthIMG)+"px "+(815*heightV)+"px");
$(".chart_line").css("height",170*heightV);
}
var pumps = [];
var pressure = [];
function getData(bizid){
var jsp_id = $('#jsp_id').val();
var time_input = $('#time_input').val();
$.post(ext.contextPath + '/equipment/pump/getWaterForecastData.do', {bizid:bizid,time:time_input,jsp_id:jsp_id} , function(data) {
var arr= JSON.parse(data);
console.log(arr);
$(".bgimg-map").empty();
var htmlStr = '<div class=" bar_title" style="width: '+(170*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;left: '+(100*widthV)+'px;top: '+(80*heightV)+'px;">'+
'<div class="col-xs-5">河床液位</div><div class="col-xs-4 riverbed_liquid_level pump-text-blue"></div><div class="col-xs-3">m</div></div>'+
'<div class=" bar_title" style="width: '+(170*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;left: '+(690*widthV)+'px;top: '+(515*heightV)+'px;">'+
'<div class="col-xs-5">总流量</div><div class="col-xs-4 total_flow pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>';
/* '<div class=" bar_title" style="width: '+(130*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;left: '+(230*widthV)+'px;top: '+(550*heightV)+'px;">'+
'<div class="col-xs-5">液位</div><div class="col-xs-4 bar_two pump-text-blue"></div><div class="col-xs-3">m</div></div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;right: '+(10*widthV)+'px;top: '+(60*heightV)+'px;">'+
'<div class="col-xs-5">1#原水流量计</div><div class="col-xs-4 raw_water_flowmeter_1 pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;right: '+(10*widthV)+'px;top: '+(100*heightV)+'px;">'+
'<div class="col-xs-5">2#原水流量计</div><div class="col-xs-4 raw_water_flowmeter_2 pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;right: '+(10*widthV)+'px;top: '+(140*heightV)+'px;">'+
'<div class="col-xs-5">3#原水流量计</div><div class="col-xs-4 raw_water_flowmeter_3 pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;position: absolute;right: '+(10*widthV)+'px;top: '+(180*heightV)+'px;">'+
'<div class="col-xs-5">原水流量</div><div class="col-xs-4 raw_water_flow pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>'+
'<div class="calculation" style="position: absolute;right: '+(5*widthV)+'px;top: '+(240*heightV)+'px;">'+
'<div style="width: '+(180*widthIMG)+'px;height: '+(30*heightV)+'px;">方案<lable class="calculation_title_number">1</lable>计算值</div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;">'+
'<div class="col-xs-5">出口压力</div><div class="col-xs-4 calculation_outlet_pressure pump-text-blue"></div><div class="col-xs-3">MPa</div></div>'+
'<div class=" bar_title" style="width: '+(250*widthIMG)+'px;height: '+(30*heightV)+'px;">'+
'<div class="col-xs-5">出口流量</div><div class="col-xs-4 calculation_outlet_flow pump-text-blue"></div><div class="col-xs-3">m³/h</div></div>'+
'</div>'+
'<div id="bar_one" style="width: '+(66*widthIMG)+'px;height: '+(465*heightV)+'px;position: absolute;left: '+(260*widthV)+'px;top: '+(45*heightV)+'px;"></div>'+
'<div id="bar_two" style="width: '+(66*widthIMG)+'px;height: '+(380*heightV)+'px;position: absolute;left: '+(260*widthV)+'px;top: '+(614*heightV)+'px;"></div>';
'<div id="bar_three" style="width: '+(120*widthIMG)+'px;height: '+(318*heightV)+'px;position: absolute;left: '+(238*widthV)+'px;top: '+(690*heightV)+'px;"></div>' */
$(".bgimg-map").append(htmlStr);
var low_pressure_flow_dataseries=[];
var low_pressure_flow_dataxAxis=[];
var low_pressure_dataseries=[];
var low_pressure_dataxAxis=[];
var high_pressure_flow_dataseries=[];
var high_pressure_flow_dataxAxis=[];
var high_pressure_dataseries=[];
var high_pressure_dataxAxis=[];
var imgs_0 =[];
var imgs_1 =[];
var imgs_2 =[];
if(arr.rows!=null && arr.rows!=undefined && arr.rows!=''){
for(var i=0;i<arr.rows.length;i++){
var value =0;
var numtail=0;
var dataMax=0;
var rate = 1;
var nowdate = getNowTime();
var mpcode = "";
if(arr.rows[i].visualCacheConfig!=null
&& arr.rows[i].visualCacheConfig!=undefined
&& arr.rows[i].visualCacheConfig!=''){
var visualCacheConfig = arr.rows[i].visualCacheConfig;
if(visualCacheConfig.numtail!=null && visualCacheConfig.numtail!=undefined && visualCacheConfig.numtail!=''){
numtail = visualCacheConfig.numtail;
}
}
if(arr.rows[i].visualCacheData!=null
&& arr.rows[i].visualCacheData!=undefined
&& arr.rows[i].visualCacheData!=''){
var visualCacheData = arr.rows[i].visualCacheData;
if(visualCacheData.inivalue!=null && visualCacheData.inivalue!=undefined && visualCacheData.inivalue!=''){
value = visualCacheData.inivalue;
}else{
if(visualCacheData.value!=null && visualCacheData.value!=undefined && visualCacheData.value!=''){
value = visualCacheData.value;
}else{
if(arr.rows[i].mPoint!=null && arr.rows[i].mPoint!=undefined && arr.rows[i].mPoint!=''){
var mPoint = arr.rows[i].mPoint;
if(mPoint.parmvalue!=null && mPoint.parmvalue!=undefined && mPoint.parmvalue!=''){
value = mPoint.parmvalue;
}
if(mPoint.spanrange!=null && mPoint.spanrange!=undefined && mPoint.spanrange!=''){
dataMax = mPoint.spanrange;
}
if(mPoint.numtail!=null && mPoint.numtail!=undefined && mPoint.numtail!=''){
numtail = mPoint.numtail;
}
if(mPoint.measuredt!=null && mPoint.measuredt!=undefined && mPoint.measuredt!=''){
nowdate = mPoint.measuredt;
}
}
}
}
if(visualCacheData.numtail!=null && visualCacheData.numtail!=undefined && visualCacheData.numtail!=''){
numtail = visualCacheData.numtail;
}
if(visualCacheData.insdt!=null && visualCacheData.insdt!=undefined && visualCacheData.insdt!=''){
nowdate = visualCacheData.insdt;
}
if(visualCacheData.rate!=null && visualCacheData.rate!=undefined && visualCacheData.rate!=''){
rate = visualCacheData.rate;
}
if(visualCacheData.mpcode!=null && visualCacheData.mpcode!=undefined && visualCacheData.mpcode!=''){
mpcode = visualCacheData.mpcode;
}
}else{
var mPoint = arr.rows[i].mPoint;
if(mPoint!=null && mPoint!=undefined && mPoint!=''){
if(mPoint.parmvalue!=null && mPoint.parmvalue!=undefined && mPoint.parmvalue!=''){
value = mPoint.parmvalue;
}
if(mPoint.spanrange!=null && mPoint.spanrange!=undefined && mPoint.spanrange!=''){
dataMax = mPoint.spanrange;
}
if(mPoint.numtail!=null && mPoint.numtail!=undefined && mPoint.numtail!=''){
numtail = mPoint.numtail;
}
if(mPoint.measuredt!=null && mPoint.measuredt!=undefined && mPoint.measuredt!=''){
nowdate = mPoint.measuredt;
}
}
}
value = parseFloat(value)*rate;
value = value.toFixed(numtail);
if($("."+arr.rows[i].elementCode).length > 0){
$("."+arr.rows[i].elementCode).html(toThousands(value));
$("."+arr.rows[i].elementCode).attr("data-mpcode", mpcode);
}
if($("."+arr.rows[i].elementCode+"_td").length > 0){
var faStr = '<i class="fa fa-dot-circle-o table-font-red"></i>';
if(value==1){
faStr = '<i class="fa fa-dot-circle-o table-font-green"></i>';
}
if(value==0){
faStr = '<i class="fa fa-dot-circle-o table-font-red"></i>';
}
$("."+arr.rows[i].elementCode+"_td").html(faStr);
}
if(arr.rows[i].elementCode=='low_pressure_flow'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
low_pressure_flow_dataseries[0]=dataseries;
}
if(arr.rows[i].elementCode=='low_pressure_flow_forecast'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
//low_pressure_flow_dataxAxis.push(mPointHistory[m].measuredt.substr(11,16));
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
low_pressure_flow_dataseries[1]=dataseries;
}
if(arr.rows[i].elementCode=='low_pressure'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
low_pressure_dataseries[0]=dataseries;
}
if(arr.rows[i].elementCode=='low_pressure_forecast'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
//low_pressure_dataxAxis.push(mPointHistory[m].measuredt.substr(11,16));
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
low_pressure_dataseries[1]=dataseries;
}
if(arr.rows[i].elementCode=='high_pressure_flow'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
high_pressure_flow_dataseries[0]=dataseries;
}
if(arr.rows[i].elementCode=='high_pressure_flow_forecast'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
//high_pressure_flow_dataxAxis.push(mPointHistory[m].measuredt.substr(11,16));
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
high_pressure_flow_dataseries[1]=dataseries;
}
if(arr.rows[i].elementCode=='high_pressure'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
high_pressure_dataseries[0]=dataseries;
}
if(arr.rows[i].elementCode=='high_pressure_forecast'){
var mPointHistory = arr.rows[i].mPointHistory;
var dataseries =[];
for(var m=0;m<mPointHistory.length;m++){
//high_pressure_dataxAxis.push(mPointHistory[m].measuredt.substr(11,16));
var dataserie =[];
dataserie.push(mPointHistory[m].measuredt.substr(11,16));
dataserie.push(mPointHistory[m].parmvalue.toFixed(numtail));
dataseries.push(dataserie);
}
high_pressure_dataseries[1]=dataseries;
}
if(arr.rows[i].elementCode=='bar_one'){
showBar("bar_one",value,dataMax);
}
if(arr.rows[i].elementCode=='bar_two'){
showBar("bar_two",value,dataMax);
}
/* if(arr.rows[i].elementCode=='bar_three'){
showBar("bar_three",value,dataMax);
} */
if(arr.rows[i].elementCode=='pressure_1'){
pressure[0] = value;
}
if(arr.rows[i].elementCode=='pressure_2'){
pressure[1] = value;
}
if(arr.rows[i].elementCode=='pressure_3'){
pressure[2] = value;
}
if(arr.rows[i].elementCode=='pressure_4'){
pressure[3] = value;
}
if(arr.rows[i].elementCode=='pressure_5'){
pressure[4] = value;
}
if(arr.rows[i].elementCode=='pressure_6'){
pressure[5] = value;
}
if(arr.rows[i].elementCode=='pressure_7'){
pressure[6] = value;
}
if(arr.rows[i].elementCode=='pressure_8'){
pressure[7] = value;
}
if(arr.rows[i].elementCode=='pressure_9'){
pressure[8] = value;
}
if(arr.rows[i].elementCode.indexOf("pump_1") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"200","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_2") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"415","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_3") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"575","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_4") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"765","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_5") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"445","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_6") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"583","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_7") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"693","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_8") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"800","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
if(arr.rows[i].elementCode.indexOf("pump_9") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"908","value":value,"text":arr.rows[i].name};
if(arr.rows[i].elementCode.indexOf("calculation_1_pump")>= 0){
imgs_1.push(obj);
}else
if(arr.rows[i].elementCode.indexOf("calculation_2_pump")>= 0){
imgs_2.push(obj);
}else{
imgs_0.push(obj);
}
}
/* if(arr.rows[i].elementCode.indexOf("pump_9") >= 0){
var obj = {"id":arr.rows[i].elementCode,"left":"379","top":"920","value":value,"text":arr.rows[i].name};
imgs.push(obj)
} */
}
}
showDoubleLine('low_pressure_flow',low_pressure_flow_dataxAxis,low_pressure_flow_dataseries);
showDoubleLine('low_pressure',low_pressure_dataxAxis,low_pressure_dataseries);
showDoubleLine('high_pressure_flow',high_pressure_flow_dataxAxis,high_pressure_flow_dataseries);
showDoubleLine('high_pressure',high_pressure_dataxAxis,high_pressure_dataseries);
pumps[0]=imgs_0;
pumps[1]=imgs_1;
pumps[2]=imgs_2;
pumpsShow(imgs_0);
var radio_val = $('input:radio[name=optionsRadios]:checked').val();
$(".calculation_title_number").html(radio_val);
var outlet_pressure = $(".calculation_"+radio_val+"_outlet_pressure").html();
var outlet_flow = $(".calculation_"+radio_val+"_outlet_flow").html();;
$(".calculation_outlet_pressure").html(outlet_pressure);
$(".calculation_outlet_flow").html(outlet_flow);
doRowEditPost('target_outlet_pressure');
doRowEditPost('target_outlet_flow');
});
$('input[type=radio][name=optionsRadios]').change(function() {
$(".calculation_title_number").html(this.value);
var radio_val = this.value;
var outlet_pressure = $(".calculation_"+radio_val+"_outlet_pressure").html();
var outlet_flow = $(".calculation_"+radio_val+"_outlet_flow").html();;
$(".calculation_outlet_pressure").html(outlet_pressure);
$(".calculation_outlet_flow").html(outlet_flow);
//找到tr
var element = $(this).parent().parent().parent().parent();
element.siblings().removeClass("active");
element.addClass("active");
//pumpsShow(pumps[radio_val]);
});
}
function pumpsShow(imgs){
var htmlStr="";
for(var i=0;i<imgs.length;i++){
var src = "<%=request.getContextPath()%>/IMG/pump/pump.png";
if(imgs[i].value!=null && imgs[i].value!=undefined && imgs[i].value!='NULL' ){
if(imgs[i].value==1){
src = "<%=request.getContextPath()%>/IMG/pump/pump_green.png";
}else{
if(imgs[i].value==0){
src = "<%=request.getContextPath()%>/IMG/pump/pump_red.png";
}else{
src = "<%=request.getContextPath()%>/IMG/pump/pump_red.png";
}
}
}
htmlStr += '<label style="position: absolute;left: '+(imgs[i].left*widthV-25)+'px;top: '+(imgs[i].top*heightV+40)+'px;">'+imgs[i].text+'</label>';
htmlStr += '<img id="'+imgs[i].id+'" src= "'+src+'" '+
' style="width: '+(111*widthIMG)+'px;height: '+(80*heightV)+'px;position: absolute;left: '+(imgs[i].left*widthV)+'px;top: '+(imgs[i].top*heightV)+'px;"/>';
htmlStr += '<div class="bar_title" style="width: '+(150*widthIMG)+'px;height: '+(30*heightV)+'px;'+
'position: absolute;left: '+(imgs[i].left*widthV+90)+'px;top: '+(imgs[i].top*heightV)+'px;">'+
'<div class="col-xs-4">压力</div><div class="col-xs-5 pressure_'+(i+1)+' pump-text-blue">'+pressure[i]+'</div><div class="col-xs-3">MPa</div>'+
'</div>';
$("#"+imgs[i].id).remove();
$(".bgimg-map").append(htmlStr);
}
}
function showDoubleLine(id,dataxAxis,dataseries){
var option = {
color: ['#30d4ff', '#d19bff'],
tooltip: {
trigger: 'axis',
},
grid: {
top:'5%',
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
//data: dataxAxis,
splitLine: {
show: true ,
lineStyle: {
color: ['#aaa'] ,
type: 'dashed' ,
}
},
},
yAxis: {
type: 'value',
splitLine: {
show: true ,
lineStyle: {
color: ['#aaa'] ,
type: 'dashed' ,
}
},
},
series: [
{
name: '实时值',
type: 'line',
areaStyle: {},
data: dataseries[0]
},
{
name: '预测值',
type: 'line',
areaStyle: {},
data: dataseries[1]
},
]
};
var myChart = echarts.init(document.getElementById(id));
myChart.setOption(option, true);
}
function showBar(id,data,dataMax){
var option = {
grid: {
left: 0 ,
top: 0 ,
right: 0 ,
bottom: 0 ,
},
xAxis: {
type: 'category',
axisLabel: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
splitLine: {
show: false
}
},
yAxis: {
type: 'value',
axisLabel: {
show: false
},
axisTick: {
show: false
},
axisLine: {
show: false
},
splitLine: {
show: false
},
max:dataMax,
},
series: [{
data: [data],
type: 'bar',
itemStyle: {
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1,
[
{offset: 0, color: '#94EBFF'},
{offset: 0.5, color: '#62D1FF'},
{offset: 1, color: '#2AB4FF'}
]
)
},
}]
};
var myChart = echarts.init(document.getElementById(id));
myChart.setOption(option, true);
}
//添加千分位符合
function toThousands(num) {
var nums =num;
var re=/\d{1,3}(?=(\d{3})+$)/g;
var n1=0;
if(nums!=null && nums!='' && nums!=undefined){
n1=nums.toString().replace(/^(\d+)((\.\d+)?)$/,function(s,s1,s2){return s1.replace(re,"$&,")+s2;});
}
return n1;
}
//行内编辑
function doRowEditPost(id){
var search_pid = unitId;
$("#"+id).editable({
url: function (params) {
var mpointid = $(this).attr("data-mpcode");
var value = params.value;
//异步提交修改
$.ajax({
type: 'POST',
url: ext.contextPath + '/equipment/pump/doRowEditPost.do',
data: {value:value,mpointid:mpointid,bizid:search_pid},
dataType:"json",
success: function (data) {
if(data.result==1){
alert("修改成功!");
refresh();
}else{
alert("修改失败!");
}
},
error: function () { alert("出错了");}
});
},
type: 'text',
disabled: false, //是否禁用编辑
mode: "popup", //编辑框的模式支持popup和inline两种模式默认是popup
validate: function (value) { //字段验证
if (!$.trim(value)) {
return '不能为空';
}
}
});
}
</script>
</head>
<body class="hold-transition ${cu.themeclass} sidebar-mini">
<div class="wrapper">
<div class="content-wrapper bg_color" style=" overflow-x: auto;padding:10px 20px 0px 20px;">
<!-- BEGIN CONTAINER -->
<input type="hidden" name="todayAddnum" value="${todayAddnum}">
<input type="hidden" name="todonum" value="${todonum}">
<input type="hidden" name="donownum" value="${donownum}">
<input type="hidden" name="jsp_id" id="jsp_id" value="">
<input type="hidden" name="time_input" id="time_input" value="${nowDate}">
<div class="row" >
<div class="col-lg-7 col-md-7 col-sm-12 col-xs-12">
<div class="bgimg-map text-center table-text-white">
</div>
</div>
<div class="col-lg-5 col-md-5 col-sm-12 col-xs-12">
<div class="floattop_div_1 thumbnail bg_color" style="overflow:hidden;">
<div class="nav-tabs-custom bg_color" style="margin-bottom:0px;">
<ul class="nav nav-tabs" id="tab1_ul" >
<li id="tab_1_li" role="presentation" class="active" >
<a href="#tab_1" role="tab" data-toggle="tab" aria-expanded="true" id="CQBYT_OptimalScheduling_One">泵组优化调度</a>
</li> -->
<!-- <li id="tab_2_li" role="presentation" >
<a href="#tab_2" role="tab" data-toggle="tab" aria-expanded="true" id="shakou_QuantityQuality_One">泵组水量预测</a>
</li> -->
</ul>
</div>
<div class="tab-content" style="padding: 10px;">
<div role="tabpanel" class="tab-pane " id="tab_2">
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-blue"><i class="iconfont iconshishigailan pump-text-small"></i> 实时值</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-red"><i class="iconfont iconyuce pump-text-small"></i> 预测值</label>
</div>
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">低压流量<span class="pump-text-white low_pressure_flow">0</span>m³/h</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-red">低压流量<span class="pump-text-white low_pressure_flow_forecast">25</span>m³/h</label>
</div>
<div class="chart_line" id="low_pressure_flow" style="width: 650px;height: 150px;"></div>
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">低压压力<span class="pump-text-white low_pressure">0</span>Mpa</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-red">低压压力<span class="pump-text-white low_pressure_forecast">25</span>Mpa</label>
</div>
<div class="chart_line" id="low_pressure" style="width: 650px;height: 150px;"></div>
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">高压流量<span class="pump-text-white high_pressure_flow">0</span>m³/h</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-red">高压流量<span class="pump-text-white high_pressure_flow_forecast">25</span>m³/h</label>
</div>
<div class="chart_line" id="high_pressure_flow" style="width: 650px;height: 150px;"></div>
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">高压压力<span class="pump-text-white high_pressure">0</span>Mpa</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-red">高压压力<span class="pump-text-white high_pressure_forecast">25</span>Mpa</label>
</div>
<div class="chart_line" id="high_pressure" style="width: 650px;height: 150px;"></div>
</div>
<div role="tabpanel" class="tab-pane active" id="tab_1">
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-blue">输入参数</label>
</div>
<div class="row" >
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">泵组目标压力
<a href="javascript:;" id="target_outlet_pressure" class="pump-text-white target_outlet_pressure" data-mpcode="">0</a>MPa</label>
<label class="col-lg-6 col-md-6 col-sm-12 col-xs-12 pump-text pump-text-small pump-text-blue">泵组目标流量
<a href="javascript:;" id="target_outlet_flow" class="pump-text-white target_outlet_flow" data-mpcode="">0</a>m³/h</label>
</div>
<table class="table table-condensed text-center table-text-white pump-text-small pump-table">
<thead>
<tr>
<th></th>
<th>方案</th>
<th colspan="4">泵组开停情况</th>
<th>扬程</th>
<th>出口流量</th>
<th>单耗</th>
</tr>
<tr>
<th></th>
<th>编号</th>
<th>1#</th>
<th>2#</th>
<th>3#</th>
<th>4#</th>
<th>m</th>
<th>m³/h</th>
<th>kWh/km³</th>
</tr>
</thead>
<tbody>
<tr class="active">
<td>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" value="1" checked>
</label>
</div>
</td>
<td>1</td>
<td class="calculation_1_pump_1_td"></td>
<td class="calculation_1_pump_2_td"></td>
<td class="calculation_1_pump_3_td"></td>
<td class="calculation_1_pump_4_td"></td>
<td class="calculation_1_outlet_pressure"></td>
<td class="calculation_1_outlet_flow"></td>
<td class="calculation_1_unit_consumption"></td>
</tr>
<tr class="">
<td>
<div class="radio">
<label>
<input type="radio" name="optionsRadios" value="2">
</label>
</div>
</td>
<td>2</td>
<td class="calculation_2_pump_1_td"></td>
<td class="calculation_2_pump_2_td"></td>
<td class="calculation_2_pump_3_td"></td>
<td class="calculation_2_pump_4_td"></td>
<td class="calculation_2_outlet_pressure"></td>
<td class="calculation_2_outlet_flow"></td>
<td class="calculation_2_unit_consumption"></td>
</tr>
</tbody>
</table>
</div>
</div>
</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>