index.html
2.8 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
<%
var headContent = {
include("/pages/template/head.html"){}
%>
<script type="text/javascript" src="static/component/echarts/echarts-plain.js"></script>
<!-- 时间组件 -->
<% include("/pages/includes/my97.html"){} %>
<script type="text/javascript">
$(function() {
/**
* echarts
*/
var myChart = echarts.init(document.getElementById('echarts'));
myChart.showLoading({
text: '正在努力的读取数据中...' //loading话术
});
// ajax return
myChart.hideLoading();
// 图表使用-------------------
option = {
tooltip : {
trigger: 'axis',
},
legend: {
data:['访问量']
},
toolbox: {
show : false,
feature : {
mark : {show: true},
dataView : {show: false, readOnly: false},
magicType : {show: false, type: ['line', 'bar']},
restore : {show: true},
saveAsImage : {show: false}
}
},
calculable : true,
xAxis : [
{
type : 'category',
boundaryGap : false,
data : [${createDay}]
}
],
yAxis : [
{
type : 'value'
}
],
series : [
{
name:'访问量',
type:'line',
data:[${cnt}]
}
]
};
myChart.setOption(option);
//显示Menu索引
showMenu('page_pageview');
});
function oper_list(){
form1.action = "admin/pageview";
form1.submit();
}
</script>
<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-inline" role="form">
<!-- 菜单 -->
<% include("/pages/template/menu.html"){} %>
<div class="tableSearch">
<div class="form-group">
<label class="sr-only">区间</label>
<input type="text" name="start_day" class="form-control" style="width: 140px;"
value="${start_day}" placeholder="开始时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
-<input type="text" name="end_day" class="form-control" style="width: 140px;"
value="${end_day}" placeholder="结束时间" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" />
</div>
<button type="button" class="btn btn-default" onclick="oper_list();" name="search">
<span class="glyphicon glyphicon-search"></span> 查 询
</button>
<button type="button" class="btn btn-default" onclick="resetForm();">
<span class="glyphicon glyphicon-refresh"></span> 重 置
</button>
</div>
<% if(cnt==''){ %>
<div style="text-align: center;font-size:24px;color: gray;font-weight: bold;">没有符合的数据</div>
<% } else { %>
<div id="echarts" style="height:450px;border:1px solid #ccc;padding:10px;"></div>
<% } %>
</form>
<%}; %>
<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
<%} %>