<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>KGCMS企业应用管理平台 - Powered by KGCMS</title>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<meta name="renderer" content="webkit">
	<!-- <meta http-equiv="cache-control" content="no-siteapp" /> -->
	<link rel="stylesheet" type="text/css" href="{{kg['tpl_url']}}style/web_statistics.css">
	<script src="{{kg['tpl_url']}}script/jquery.min.js"></script>
	<script src="{{kg['server']['HTTP_HOST']}}/tools/amazeui/js/amazeui.min.js"></script>
	<script src="{{kg['tpl_url']}}script/echarts.min.js"></script>
	<script src="{{kg['tpl_url']}}script/common.js"></script>
	<script src="{{kg['tpl_url']}}script/web_statistics.js"></script>
</head>

<body>
	{% include 'component_header.tpl' %}
	<div class="tpl-page-container tpl-page-header-fixed">
		<div class="scrollbar-wrap">
		{% include 'component_left.tpl' %}
		<div class="tpl-content-wrapper">
			<div class="tpl-content-page-title">
				流量统计
			</div>
			<ol class="am-breadcrumb">
				<li><a href="./" class="am-icon-home">首页</a></li>
				<li class="am-active">网站概况</li>
			</ol>
			<div class="tpl-portlet-components ngwe-L17-marginB">
				<!-- 1 -->
				<div class="portlet-title">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;今日流量
					</div>
				</div>
				<div class="am-g">
					<div class="am-u-sm-12 ngco-No-paddingR">
						<form class="am-form">
							<table class="am-table am-table-striped am-table-hover table-main">
								<thead>
									<tr>
										<th class="table-title"> </th>
										<th class="table-title">浏览量(PV)</th>
										<th class="table-title">访客数(UV)</th>
										<th class="table-title">IP数</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>今日</td>
										<td><span class="chengse">{{data['day'][1]}}</span></td>
										<td><span class="chengse">{{data['old'] + data['new']}}</span></td>
										<td><span class="qianlanse">{{data['day'][0]}}</span></td>
									</tr>
									<tr>
										<td>昨日</td>
										<td><span class="chengse">{{data['upday'][1]}}</span></td>
										<td><span class="chengse">{{data['yesterday']}}</span></td>
										<td><span class="qianlanse">{{data['upday'][0]}}</span></td>
									</tr>
									<tr>
										<td>预计今日</td>
										<td><span class="chengse">{{data['predict'][0]}}</span></td>
										<td><span class="chengse">{{data['predict'][1]}}</span></td>
										<td><span class="qianlanse">{{data['predict'][2]}}</span></td>
									</tr>
								</tbody>
							</table>
						</form>
					</div>
				</div>
			</div>
			<!-- 2 -->
			<div class="tpl-portlet-components ngco-No-marginB">
				<div class="portlet-title ngco-row-mb-tihuan">
					<div class="caption font-green bold">
						<span class="am-icon-code"></span>&nbsp;网站概况
					</div>
					<div class="tpl-portlet-input tpl-fz-ml am-no-margintop ngwe-HSZ-marginR" style="">
						<div class="portlet-input input-small input-inline">
							<div class="input-icon right am-fr">
								<div class="am-btn-group am-btn-group-xs">
									<a href="web_statistics?action=refresh"
										class="am-btn am-btn-secondary ng-add-hightB"><span
											class="am-icon-search"></span>&nbsp;刷新数据</a>
								</div>
							</div>
							<div class="am-cf"></div>
						</div>
					</div>
					<div class="am-g">
						<div class="am-u-sm-12 ngco-No-paddingR">
							<form class="am-form">
								<div
									class="am-table am-table-striped am-table-hover table-main am-table-box change-table">
									<div class="change-tbody">
										<ul class="change-tr-td change-nth web-survey">
											<li>今日访问量：<span class="chengse">{{data['day'][0]}}</span> ( <span
													class="qianlanse">{{data['day'][1]}}</span>)&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;昨日访问量：<span
													class="chengse">{{data['upday'][0]}}</span> ( <span
													class="qianlanse">{{data['upday'][1]}}</span>)&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;本周访问量：<span
													class="chengse">{{data['week'][0]}}</span> ( <span
													class="qianlanse">{{data['week'][1]}}</span>)
												<p class="ngwe-RF ngco-No-marginB ngco-No-marginT">
													应用：{{web['name']}}
												</p>
											</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>今日新客户量：<span class="chengse">
													{{data['new']}}</span>&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;今日老客户量：<span
													class="chengse">{{data['old']}}</span>
												<p class="ngwe-RF ngco-No-marginB ngco-No-marginT">
													域名：<a href="http://{{web['domain'][0]}}"
														target="_blank">{{web['domain'][0]}}</a>
												</p>
											</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>1分钟同时在线：<span
													class="chengse">{{data['one']}}</span>&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;5分钟同时在线：<span
													class="chengse">{{data['five']}}</span>&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;15分钟同时在线：<span
													class="chengse">{{data['fifteen']}}</span>
												<p class="ngwe-RF ngco-No-marginB ngco-No-marginT">
													起始日期：{{data['start']}}
												</p>
											</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>上周访问量：<span class="chengse">{{data['upweek'][0]}}</span> (<span
													class="qianlanse">{{data['upweek'][1]}}</span>)&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;本月访问量：<span
													class="chengse">{{data['month'][0]}}</span> (<span
													class="qianlanse">{{data['month'][1]}}</span>)&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;上月访问量：<span
													class="chengse">{{data['upmonth'][0]}}</span> (<span
													class="qianlanse">{{data['upmonth'][1]}}</span>)</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>本年访问量：<span class="chengse">{{data['year'][0]}}</span> (<span
													class="qianlanse">{{data['year'][1]}}</span>)&nbsp;&nbsp;&nbsp;&nbsp;/&nbsp;&nbsp;&nbsp;&nbsp;网站累计访问量：<span
													class="chengse">{{data['all'][0]}}</span> (<span
													class="qianlanse">{{data['all'][1]}}</span>)&nbsp;&nbsp;[自{{data['start']}}起，累计统计<span
													class="chengse">{{data['count_day']}}</span>天]
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>最大日访问量：<span class="chengse"> {{data['max']['max_day']['ip']}}</span>
												(<span class="qianlanse">{{data['max']['max_day']['pv']}}</span>)
												[{{data['max']['max_day']['time']}}]（注：本数据以页面总访问量（PV）为准）</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>最大周访问量：<span class="chengse">{{data['max']['max_week']['ip']}}</span>
												(<span class="qianlanse">{{data['max']['max_week']['pv']}}</span>)
												[{{data['max']['max_week']['start']}} ～
												{{data['max']['max_week']['end']}}]（注：本数据以页面总访问量（PV）为准）</li>
										</ul>
										<ul class="change-tr-td change-nth web-survey">
											<li>最大月访问量：<span class="chengse">{{data['max']['max_month']['ip']}}</span>
												(<span class="qianlanse">{{data['max']['max_month']['pv']}}</span>)
												[{{data['max']['max_month']['time']}}]（注：本数据以页面总访问量（PV）为准）</li>
										</ul>
									</div>
								</div>
							</form>
						</div>
					</div>
				</div>
				<!-- 3 -->
				<div class="tpl-portlet-components ngre-Hdadd-paddidngB">
					<div class="portlet-title ngco-No-marginB">
						<div class="caption font-green bold">
							<span class="am-icon-code"></span>&nbsp;数据概况
						</div>
					</div>
					<div class="row">
						<div class="am-u-md-6 am-u-sm-12 ngwe-Osz-paddingL ngwe-Osz-paddingT">
							<div class="tpl-portlet">
								<div class="tpl-portlet-title">
									<div class="tpl-caption font-green ">
										<i class="am-icon-cloud-download"></i>
										<span>&nbsp;Cloud&nbsp;数据统计</span>
									</div>
									<div class="actions">
										<ul class="actions-btn">
											<li id="day-table" class="red-on">今天</li>
											<li id="week-table" class="blue">本周</li>
										</ul>
									</div>
								</div>
								<!--此部分数据请在 js文件夹下中的 app.js 中的 “百度图表A” 处修改数据 插件使用的是 百度echarts-->
								<div class="tpl-echarts" id="tpl-echarts-A">
								</div>
								<div class="tpl-echarts" id="tpl-echarts-B">
								</div>
							</div>
						</div>
						<div class="am-u-md-6 am-u-sm-12 ngwe-Osz-paddingT">
							<div class="tpl-portlet">
								<div class="tpl-portlet-title">
									<div class="tpl-caption font-green ">
										<span>Top10来源网站</span>
									</div>
									<div class="actions">
										<ul class="actions-btn">
											<li id="day-source" class="red-on">今天</li>
											<li id="week-source" class="blue">本周</li>
										</ul>
									</div>
								</div>
								<div class="tpl-scrollable">
									<div class="am-tabs tpl-index-tabs" data-am-tabs="">
										<table class="am-table tpl-table">
											<thead>
												<tr class="tpl-table-uppercase web-source">
													<th>来源网站</th>
													<th>访问量</th>
													<th>来路比率</th>
												</tr>
											</thead>
											<tbody id="source-day">
												{% for row in data['analysis']['day']['source'] %}
												<tr class="web-source">
													<td>
														<a class="user-name" href="">
															{% if row['a'] %}
															{{row['a']}}
															{% else %}
															直接访问
															{% endif %}
														</a>
													</td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
											<tbody id="source-week" class="table-hidden">
												{% for row in data['analysis']['week']['source'] %}
												<tr class="web-source">
													<td>
														<a class="user-name" href="">
															{% if row['a'] %}
															{{row['a']}}
															{% else %}
															直接访问
															{% endif %}
														</a>
													</td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="am-u-md-6 am-u-sm-12 ngwe-Osz-paddingL ngwe-Osz-paddingT ngwe-Osz-paddingB">
							<div class="tpl-portlet">
								<div class="tpl-portlet-title">
									<div class="tpl-caption font-green ">
										<span>Top10受访页面</span>
									</div>
									<div class="actions">
										<ul class="actions-btn">
											<li id="day-page" class="red-on">今天</li>
											<li id="week-page" class="blue">本周</li>
										</ul>
									</div>
								</div>
								<div class="tpl-scrollable">
									<div class="am-tabs tpl-index-tabs" data-am-tabs="">
										<table class="am-table tpl-table">
											<thead>
												<tr class="tpl-table-uppercase web-visited">
													<th>受访地址</th>
													<th>标题</th>
													<th>访问量</th>
													<th>受访比率</th>
												</tr>
											</thead>
											<tbody id="page-day">
												{% for row in data['analysis']['day']['page'] %}
												<tr class="web-visited">
													<td><a class="user-name" href="">{{row['url']}}</a></td>
													<td><a href="" class="user-name">{{row['a']}}</a></td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
											<tbody id="page-week" class="table-hidden">
												{% for row in data['analysis']['week']['page'] %}
												<tr class="web-visited">
													<td><a class="user-name" href="">{{row['url']}}</a></td>
													<td><a href="" class="user-name">{{row['a']}}</a></td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
						<div class="am-u-md-6 am-u-sm-12 ngwe-Osz-paddingT ngwe-Osz-paddingB">
							<div class="tpl-portlet">
								<div class="tpl-portlet-title ">
									<div class="tpl-caption font-green ">
										<span>Top10地域分布</span>
									</div>
									<div class="actions">
										<ul class="actions-btn">
											<li id="day-pro" class="red-on">今天</li>
											<li id="week-pro" class="blue">本周</li>
										</ul>
									</div>
								</div>
								<div class="tpl-scrollable">
									<div class="am-tabs tpl-index-tabs" data-am-tabs="">
										<table class="am-table tpl-table">
											<thead>
												<tr class="tpl-table-uppercase web-region">
													<th>区域名</th>
													<th>访问量</th>
													<th>访问比率</th>
												</tr>
											</thead>
											<tbody id="pro-day">
												{% for row in data['analysis']['day']['province'] %}
												<tr class="web-region">
													<td><a class="user-name" href="">{{row['a']}}</a></td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
											<tbody id="pro-week" class="table-hidden">
												{% for row in data['analysis']['week']['province'] %}
												<tr class="web-region">
													<td><a class="user-name" href="">{{row['a']}}</a></td>
													<td>{{row['b']}}</td>
													<td>{{row['rate']}}%</td>
												</tr>
												{% endfor %}
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			{% include 'component_footer.tpl' %}
		</div>
		</div><!-- /.scrollbar-wrap -->
	</div>
	<script>
		$(function () {
			// 基于准备好的dom，初始化echarts实例
			var myChart = echarts.init(document.getElementById('tpl-echarts-A'));
			// 指定图表的配置项和数据
			option = {
				xAxis: {
					type: 'category',
					data: ['00:00', '03:00', '06:00', '09:00', '12:00', '15:00', '18:00', '21:00', '24:00']
				},
				yAxis: {
					type: 'value'
				},
				series: [{
					data: {{ data['echarts_day'] }},
				type: 'line'
		}]
			};
		// 使用刚指定的配置项和数据显示图表。
		myChart.setOption(option);
		// 周
		var myChart = echarts.init(document.getElementById('tpl-echarts-B'));
		// 指定图表的配置项和数据
		option = {
			xAxis: {
				type: 'category',
				data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
			},
			yAxis: {
				type: 'value'
			},
			series: [{
				data: {{ data['echarts_week'] }},
			type: 'line'
				}]
			};
		// 使用刚指定的配置项和数据显示图表。
		myChart.setOption(option);
		$("#tpl-echarts-B").hide();
		})
	</script>
</body>

</html>