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

182 lines
6.2 KiB
Plaintext

<%@page import="com.sipai.tools.CommString"%>
<%@ page language="java" pageEncoding="UTF-8"%>
<style type="text/css">
.select2-container .select2-selection--single{
height:34px;
line-height: 34px;
}
.select2-selection__arrow{
margin-top:3px;
}
</style>
<script type="text/javascript">
var beginTimeStore1 = '';
var endTimeStore1 = '';
function initDate1() {
//定义locale汉化插件
beginTimeStore1 = moment().subtract(1, 'month').format('YYYY-MM-DD HH:mm');
endTimeStore1 = moment().subtract(0, 'days').format('YYYY-MM-DD HH:mm');
var locale = {
"format": 'YYYY-MM-DD HH:mm',
"separator": " ~ ",
"applyLabel": "确定",
"cancelLabel": "取消",
"fromLabel": "起始时间",
"toLabel": "结束时间'",
"customRangeLabel": "自定义",
"weekLabel": "W",
"daysOfWeek": ["日", "一", "二", "三", "四", "五", "六"],
"monthNames": ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"],
"firstDay": 1
};
$('#reservationtime1').daterangepicker({
"timePicker": true,
"timePicker24Hour": true,
"linkedCalendars": false,
"autoUpdateInput": false,
"timePickerIncrement": 10,
"locale": locale,
//汉化按钮部分
ranges: {
// '今日': [moment(), moment().subtract(-1, 'days')],
'昨日': [moment().subtract(1, 'days'), moment()],
'最近7日': [moment().subtract(6, 'days'), moment().subtract(-1, 'days')],
'本月': [moment().startOf('month'), moment().endOf('month').subtract(-1, 'days')],
'上月': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month').subtract(-1, 'days')]
},
startDate: beginTimeStore1,
endDate: endTimeStore1
}, function(start, end, label) {
beginTimeStore1 = start.format(this.locale.format);
endTimeStore1 = end.format(this.locale.format);
if(!this.startDate){
this.element.val('');
}else{
this.element.val(this.startDate.format(this.locale.format) + this.locale.separator + this.endDate.format(this.locale.format));
}
});
$('#reservationtime1').val(beginTimeStore1 + locale.separator + endTimeStore1);
};
$(function() {
var windowhight=$(window).height();
var windowwidth=$(window).width();
$('#chart').attr("style","height:"+(windowhight-200)+"px;width:"+(windowwidth-100)+"px;");
initDate1();
doDetailEchart();
});
var color=[
"#2ec7c9",
"#b6a2de",
"#5ab1ef",
"#ffb980",
"#d87a80",
"#8d98b3",
"#e5cf0d",
"#97b552",
"#95706d",
"#dc69aa",
"#07a2a4",
"#9a7fd1",
"#588dd5",
"#f5994e",
"#c05050",
"#59678c",
"#c9ab00",
"#7eb00a",
"#6f5553",
"#c14089"
];
function doDetailEchart(){
$.post(ext.contextPath + '/efficiency/efficiencyOverview/getHisMpointJson.do', {unitId:unitId,mpid:'${param.mpid}',sdt:beginTimeStore1,edt:endTimeStore1} , function(data) {
// console.log(data);
if(data.length>0){
var seriesData=data[0].data;
var mychart=echarts.init(document.getElementById('chart'));
var option = {
color:color,
// title: {
// text: '历史曲线'
// },
tooltip: {
trigger: 'axis'
},
legend: {
data: [''+data[0].name+'']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'time'
},
yAxis: {
type: 'value'
},
series: [{
name:data[0].name,
data:seriesData,
symbol:'none',
type:'line',
markPoint: {
data: [
{type: 'max', name: '最大值'},
{type: 'min', name: '最小值'}
]
},
markLine: {
data: [
{type: 'average', name: '平均值'}
]
}
}]
};
mychart.setOption(option);
}
},'json');
}
</script>
<div class="modal fade" id="subModal">
<div style="padding: 5px;">
<div class="modal-content" >
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">详细内容</h4>
</div>
<div class="modal-body">
<div id="mainDiv" >
<div style="width: 100%;height: 100%;">
<div style="float: left;width: 100%;height:40px;" >
<input type="text" class="form-control pull-left" id="reservationtime1" style="width:270px" >
<div class="input-group-btn pull-left">
<button type="button" class="btn btn-default" onclick="doDetailEchart();" ><i class="fa fa-search"></i> 查询</button>
</div>
</div>
<div style="float: left;width: 100%;" >
<div id="chart" style="float: left;"></div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left" data-dismiss="modal">关闭</button>
<!-- <button type="button" class="btn btn-primary" onclick="doupdate()" id="btn_update">保存</button> -->
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>