boundCount.html
4.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<div class="page-head">
<div class="page-title">
<h1>越界异常</h1>
</div>
</div>
<ul class="page-breadcrumb breadcrumb">
<li><a href="/pages/home.html" data-pjax>主页</a> <i class="fa fa-circle"></i></li>
<li><span class="active">异常查看</span> <i class="fa fa-circle"></i></li>
<li><span class="active">越界异常</span></li>
</ul>
<div class="row">
<div class="col-md-12">
<!-- Begin: life time stats -->
<div class="portlet light portlet-fit portlet-datatable bordered">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-times-circle"></i> <span
class="caption-subject font-dark sbold uppercase">越界异常数据统计</span>
</div>
</div>
<div class="portlet-body">
<div class="table-container" style="margin-top: 10px">
<table
class="table table-striped table-bordered table-hover table-checkable"
id="datatable_bound">
<tr role="row" class="filter">
<td><label style="padding: 6px 12px;">线路 </label></td>
<td>
<select class="form-control" name="line" id="line" style="width: 180px;"></select>
</td>
<td><label style="padding: 6px 12px;">日期</label></td>
<td>
<input class="form-control" type="text" id="date" style="width: 180px;"/>
</td>
<td>
<button id="bottomId" class="btn btn-sm green btn-outline filter-submit margin-bottom" >
<i class="fa fa-search"></i> 搜索</button>
<button class="btn btn-sm red btn-outline filter-cancel">
<i class="fa fa-times"></i> 重置</button>
</td>
</tr>
</table>
</div>
<div class="row">
<div class="col-md-12">
<div class="portlet light portlet-fit bordered">
<div class="portlet-body">
<div id="echarts_bar" style="height:500px;"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
Echart();
function Echart() {
var line=$("#line").val();
var dataTime=$("#date").val();
getEchart_server("bound", "线路", "统计图", "line", "xl","/bound/getReport.do", "1", "echarts_bar", line, dataTime);
}
$("#bottomId").click(function(){
Echart();
})
$(function(){
//搜索线路
$('#line').select2({
ajax: {
url: '/realSchedule/findLine',
type: 'post',
dataType: 'json',
delay: 150,
data: function(params){
return{line: params.term};
},
processResults: function (data) {
return {
results: data
};
},
cache: true
},
templateResult: function(repo){
if (repo.loading) return repo.text;
var h = '<span>'+repo.text+'</span>';
return h;
},
escapeMarkup: function (markup) { return markup; },
minimumInputLength: 1,
templateSelection: function(repo){
return repo.text;
},
language: {
noResults: function(){
return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
},
inputTooShort : function(e) {
return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
},
searching : function() {
return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
}
}
});
//重置
$('tr.filter .filter-cancel').on('click', function(){
$('tr.filter input, select').val('').change();
Echart();
});
$("#date").datetimepicker({
format : 'YYYY-MM-DD',
locale : 'zh-cn'
});
var myDate = new Date();
var year=myDate.getFullYear();
var month=myDate.getMonth()+1;
var day=myDate.getDate();
if((month+"").length<2){
$("#date").val(year+"-0"+month+"-"+day);
}else{
$("#date").val(year+"-"+month+"-"+day);
}
})
</script>