| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/init.css" rel="stylesheet" />
- <script src="../css/laydate/laydate.js"></script>
- <link rel="stylesheet" href="../css/init.css" />
- <title>日流量统计</title>
- </head>
- <style>
- @font-face {
- font-family: 'iconfont';
- src: url('fonts/iconfont.eot');
- /* IE9*/
- src: url('fonts/iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
- url('fonts/iconfont.woff') format('woff'), /* chrome、firefox */
- url('fonts/iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
- url('fonts/iconfont.svg#iconfont') format('svg');
- /* iOS 4.1- */
- }
-
- .iconfont {
- font-family: "iconfont";
- font-style: normal;
- }
- ul,
- li,
- ol {
- list-style: none;
- }
-
- a {
- text-decoration: none
- }
- .clearfix:after {
- content: "";
- display: block;
- clear: both;
- }
- .hut-top{
- background: #f3f3f4;
- /*height: 60px;*/
- padding: 10px 20px;
-
- }
- .hut-tcon{
- float: right;
- }
- .dhLeft a{
- color: #999;
- }
- .huTable thead td{
- background: #00a1cb!important;
- color: #fff!important;
- }
-
- </style>
- <body class="gray-bg" style="background: #fefefe;">
- <div class="hu-total wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn><i class="syIcon"></i>位置:<a id="ReIndex" href="javaScript:;">首页</a>><a href="javaScript:;">报表管理</a>><a href="" class="nowPosition">日流量统计</a></sapn>
- </div>
- <div class="dhRight"><a href="" title="刷新"><i class="fa fa-refresh"></i></a></div>
- </div>
- <div class="toolBar clearfix">
- <div class="toolRight" style="float: right;">
- <span>选择日期:</span>
- <!--<select name="" id="chooseTime" class="select_">-->
- <input type="text" class="laydate-icon" id="chooseTime" />
- </select>
- <button class="btns sear">搜索</button>
- <!--<a class="btns export">导出</a>-->
- </div>
- </div>
- <div class="hu-content">
- <div class="hu-con-right">
- <div id="huData" style="width:100%; height: 500px;">
-
- </div>
- </div>
-
- </div>
- </div>
- <script src="../js/echarts.common.min.js"></script>
- <script>
- var myChart;
- var token = $.cookie("token");
- $(document).ready(function(){
- //返回首页
- $('#ReIndex').click(function(){
- top.home_index();
- })
- laydate.skin('blue');
- laydate({
- elem: '#chooseTime',
- event: 'focus'
- });
- //图形
- myChart = echarts.init(document.getElementById('huData'));
- myChart.setOption({
- color: ['#00a1cb'],
- tooltip: {
- trigger: 'axis',
- axisPointer: { // 坐标轴指示器,坐标轴触发有效
- type: 'line' // 默认为直线,可选为:'line' | 'shadow'
- }
- },
- toolbox: {
- show: true,
- },
- calculable: true,
- xAxis: [{
- type: 'category',
- name: '时',
- splitLine: {
- show: false
- }, //去除网格线
- data: [],
- axisTick: {
- alignWithLabel: true
- }
- }],
- yAxis: [{
- type: 'value',
- name: '数量',
- nameLocation: 'end',
- splitLine: {
- show: false
- } //去除网格线
- }],
- series: [{
- name: '流量',
- type: 'bar',
- barWidth: 20, //图形宽度
- data:[],
- itemStyle: {
- normal: {
- label: {
- show: true,
- textStyle: {
- color: '#FF9800' //顶部数据颜色
- }
- }
- }
- },
- label: {
- normal: {
- show: true,
- position: 'top' //顶部数据显示位置
- }
- }
- }
- ]
- })
- Ajax();
- function Ajax(){
- $.ajax({
- type:"get",
- url: huayi.config.callcenter_url + "FlowAnalysis/GetDayCount",
- async:true,
- dataType:'json',
- data:{
- token:token,
- date:$('#chooseTime').val()
- },
- success:function(data){
- if(data.state.toLowerCase()=="success"){
- myChart.setOption({
- xAxis:[{
- data: data.data.hours
- }],
- series:[{
- data:data.data.counts
- }]
- });
-
- }
-
- }
- });
-
- }
- //搜索事件
- $('.sear').click(function(){
- Ajax();
- })
-
-
-
-
- })
-
-
-
-
-
-
-
- </script>
- </body>
- </html>
|