-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·227 lines (223 loc) · 7.27 KB
/
index.html
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<!--<link rel="stylesheet" href="css/bootstrap.min.css" />-->
<link rel="stylesheet" href="css/bootstrap-duallistbox.min.css" />
<link rel="stylesheet" href="css/jquery.datetimepicker.css" />
<style>
@media (min-width: 1200px){
.container {
margin: 10px 0;
width: 100%;
}
}
.table {
width: 98%;
margin-top: 20px;
margin-left: 10px;
box-shadow: 0px 2px 10px #aaa;
}
.form-horizontal .form-group {
margin-left: 0;
margin-right: 0;
}
#startDate,#endDate {
cursor: pointer;
}
@media (min-width: 768px){
.form-horizontal .control-label {
text-align: left;
}
}
#startDate.form-control,
#endDate.form-control {
display: inline-block;
height: 34px;
padding: 6px 12px;
margin: 0;
font-size: 14px;
font: inherit;
font-family: inherit;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
-webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-webkit-appearance: textfield;
-webkit-writing-mode: horizontal-tb;
text-rendering: auto;
letter-spacing: normal;
word-spacing: normal;
text-transform: none;
text-indent: 0px;
text-shadow: none;
text-align: start;
}
.txt {
position: absolute;
right: -7px;
top: 6px;
}
.width100 {
width: 70px;
float: left;
padding: 0;
}
.width120 {
width: 120px;
float: left;
}
.groupSearch {
margin: 20px 0;
}
select option:hover {
color: #000000;
background: #ccc;
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<form action="" method="get" class="form-horizontal" style="height: 140px;">
<div style="margin: 15px 0; border-bottom: 2px #CCCCCC dashed;">
<div class="form-group">
<label for="id_ad" class="col-sm-1 control-label">广告ID:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="id_ad" placeholder="请输入广告ID">
</div>
<div class="width120">
<button type="button" onclick="getApp();" class="btn btn-primary" style="margin-left: 15px;">显示该广告ID下的所有产品</button>
</div>
</div>
<div class="row groupSearch">
<div class="col-xs-12">
<select multiple="multiple" size="10" name="duallistbox_demo2" class="demo2" style="display: none;">
</select>
</div>
</div>
<div class="form-group">
<label for="id_app" class="col-sm-1 control-label">APP ID:</label>
<div class="col-sm-5">
<input type="text" class="form-control" id="id_app" placeholder="请输入APP ID">
</div>
<div class="col-xs-2">
<input id="startDate" class="form-control" readonly="readonly" placeholder="请选择开始时间" type="text" />
<span class="txt">至</span>
</div>
<div class="col-xs-2">
<input id="endDate" class="form-control" readonly="readonly" placeholder="请选择结束时间" type="text" />
</div>
<div class="col-sm-2">
<button type="button" onclick="doQuery();" class="btn btn-primary">查询</button>
</div>
</div>
</div>
<div style="margin:0 15px ;">
<div class="width100">
<label style="margin-top: 5px;">筛选:</label>
</div>
<div class="width100">
<button type="button" onclick="getHour();" class="btn btn-primary">小时</button>
</div>
<div class="width100">
<button type="button" onclick="getDay();" class="btn btn-primary"style="padding-left: 19px;padding-right: 19px;">天</button>
</div>
<div class="width100">
<button type="button" onclick="getAll();" class="btn btn-primary">全部</button>
</div>
<!--<div class="width120">
<button type="button" onclick="getRange();" class="btn btn-primary">按时间范围</button>
</div>-->
<!--<div class="width120">
<button type="button" onclick="$('#tabel_db').tableExport({tableName:'PV&UV',type:'excel',escape:'true',htmlContent:'false'});" class="btn btn-primary">导出至EXCEL</button>
</div>-->
</div>
</form>
</div>
<div class="row">
<table id="tabel_db" class="table table-hover table-bordered">
<thead>
<th>时间</th>
<th>View-PV</th>
<th>View-UV</th>
<th>Click-PV</th>
<th>Click-UV</th>
</thead>
<tbody id="count_body">
</tbody>
</table>
</div>
</div>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="js/jquery.bootstrap-duallistbox.min.js"></script>
<script type="text/javascript" src="js/jquery.datetimepicker.js"></script>
<script type="text/javascript" src="js/jquery.base64.js"></script>
<script src="js/tableExport.js"></script>
<script type="text/javascript" src="js/sprintf.js"></script>
<script type="text/javascript" src="js/base64.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript">
//查询按钮-点击事件
function doQuery() {
var params=getParams();//获取输入参数
if(params){
jsonAjax('http://10.1.14.57/Git/pv/js/view.json', params, 'json', getData);//post参数到后端
}
}
//ajax封装
function jsonAjax(url,data,dataType,successfn,loadingfn) {
data = (data==null || data=="" || typeof(data)=="undefined")? "": data;
$.ajax({
type:"post",
url:url,
data:data,
async:true,
dataType:dataType,
success:successfn,
beforeSend:loadingfn,
error:function(XMLHttpRequest, textStatus, errorThrown){
console.log(textStatus);
console.log(errorThrown);
}
});
}
//************* Bootstrap Dual Listbox.js init 双向选择框初始化***************//
var demo2 = $('.demo2').bootstrapDualListbox({
nonSelectedListLabel: 'Non-selected',
selectedListLabel: 'Selected',
preserveSelectionOnMove: 'moved',
moveOnSelect: false,
nonSelectedFilter: '',
filterTextClear:"显示全部",
filterPlaceHolder:"搜索",
selectedListLabel:"已选择",
nonSelectedListLabel:"未选择"
});
</script>
<script type="text/javascript">
//给相应的Input添加配置
$('#startDate,#endDate').datetimepicker({
lang: "ch", //语言选择中文
format: "Y-m-d H:i", //格式化日期
// value: '2016-02-03 14:00', //设置默认开始的日期时间
validateOnBlur: true,
yearStart: 2015, // 设置开始年份
yearEnd: 2050, // 设置结束年份
// minDate: 0,
// minTime: 0,
timepicker: true, //关闭时间选项
todayButton: true //关闭选择今天按钮
});
</script>
</body>
</html>