123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <{include file="./admin/header.html"}>
- <{include file="./admin/left.html"}>
- <{include file="./admin/nav.html"}>
- <style>
- .input-group-addon {
- padding: 5px 7px;
- border-radius: 1px;
- }
- </style>
- <script src="<{$web_cfg.cdn}>/public/echarts/build/dist/echarts.js"></script>
- <div id="activity_container">
- <div class="activity_center">
- <{include file="./admin/activity/common_nav.html"}>
- <form class="form-inline" method="get" action="<{$web_cfg.domain}>/?c=Admin_Activity_Log&a=PageList&events_id=<{$events_Data.events.id}>">
- <input name="events_id" type="hidden" value="<{$events_Data.events.id}>">
- <input name="c" type="hidden" value="Admin_Activity_Log">
- <input name="a" type="hidden" value="PageList">
- <div class="form-group"><label>时间选择:</label></div>
- <div class="form-group"><label><a href="<{$web_cfg.domain}>/?c=Admin_Activity_Log&a=PageList&events_id=<{$events_Data.events.id}>&select=7" class="button button-tiny">最近7天</a></label></div>
- <div class="form-group"><label><a href="<{$web_cfg.domain}>/?c=Admin_Activity_Log&a=PageList&events_id=<{$events_Data.events.id}>&select=30" class="button button-tiny">最近30天</a></label></div>
- <div class="form-group"><label>
- <input name="b_time" type="text" class="form-control" placeholder="开始时间" value="<{$b_time|date_format:'%Y-%m-%d'}>">
- </label></div>
- <div class="form-group"><label>
- <input name="e_time" type="text" class="form-control" placeholder="结束时间" value="<{$e_time|date_format:'%Y-%m-%d'}>">
- </label></div>
- <div class="form-group"><label><input type="submit" class="button button-inverse button-tiny" value="查看"></label></div>
- </form>
-
- <div class="panel panel-default">
- <div class="panel-body">
- <div id="chart" style="height:400px"></div>
- </div>
- </div>
- <div class="panel panel-default">
- <div class="panel-body">
- <table class="table">
- <thead>
- <tr>
- <th>概况统计</th>
- <th>浏览量(pv)</th>
- <th>访问数量(uv)</th>
- </tr>
- </thead>
- <tbody>
- <{foreach from=$logData item=item}>
- <tr>
- <td><{$item.date|date_format:'%Y-%m-%d'}></td>
- <td><{$item.pv_num}></td>
- <td><{$item.uv_num}></td>
- </tr>
- <{/foreach}>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- <{include file="./admin/activity/common_right.html"}>
- </div>
- <script type="text/javascript">
- //路径配置
- require.config({
- paths: {
- echarts: VG.conf.cdn_domain + '/public/echarts/build/dist'
- }
- });
- //使用
- require(
- [
- 'echarts',
- 'echarts/chart/line' // 使用柱状图就加载bar模块,按需加载
- ],
-
- function (ec) {
- // 基于准备好的dom,初始化echarts图表
- var myChart = ec.init(document.getElementById('chart'));
-
- var option = {
- title : {
- text: '流量统计图',
- subtext: '<{$b_time|date_format:'%Y-%m-%d'}> 至 <{$e_time|date_format:'%Y-%m-%d'}>'
- },
- tooltip : {
- trigger: 'axis'
- },
- legend: {
- data:['浏览量(pv)','访问数量(uv)']
- },
- toolbox: {
- show : true,
- feature : {
- mark : {show: true},
- saveAsImage : {show: true}
- }
- },
- calculable : true,
- xAxis : [
- {
- type : 'category',
- boundaryGap : false,
- data : [<{$xAxis}>]
- }
- ],
- yAxis : [
- {
- type : 'value',
- axisLabel : {
- formatter: '{value}'
- }
- }
- ],
- series : [
- {
- name:'浏览量(pv)',
- type:'line',
- data:[<{$pvs}>],
- markLine : {
- data : [
- {type : 'average', name: '平均值'}
- ]
- }
- },
- {
- name:'访问数量(uv)',
- type:'line',
- data:[<{$uvs}>],
- markLine : {
- data : [
- {type : 'average', name: '平均值'}
- ]
- }
- }
- ]
- };
- // 为echarts对象加载数据
- myChart.setTheme('macarons');
- myChart.setOption(option);
- }
- );
- KISSY.use('node, io, gallery/datetimepicker/2.0.0/index', function (S, Node, IO, Datetimepicker) {
- var $ = S.all;
-
- //日期
- new Datetimepicker({
- start : 'input[name=b_time]',
- timepicker : false,
- closeOnDateSelect : true
- });
- //日期
- new Datetimepicker({
- start : 'input[name=e_time]',
- timepicker : false,
- closeOnDateSelect : true
- });
- });
- </script>
- <{include file="./admin/bottom.html"}>
|