From c315a791545733391c15e42bc747e34293d36a99 Mon Sep 17 00:00:00 2001 From: colly_wyx <wangyixiong_007@163.com> Date: Sat, 28 Apr 2018 14:50:19 +0800 Subject: [PATCH] 更新版本 --- application/modules/Admin/views/index/index.phtml | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 236 insertions(+), 1 deletions(-) diff --git a/application/modules/Admin/views/index/index.phtml b/application/modules/Admin/views/index/index.phtml index fce7cdf..8a269f5 100644 --- a/application/modules/Admin/views/index/index.phtml +++ b/application/modules/Admin/views/index/index.phtml @@ -1,2 +1,237 @@ -<?=$word;?> \ No newline at end of file + <link rel="stylesheet" href="/themes/echats/css/echartsHome.css"> + <link rel="stylesheet" href="/themes/AdminLTE/plugins/daterangepicker/daterangepicker.css"> + <script type="text/javascript" src="/themes/AdminLTE/plugins/daterangepicker/moment.min.js"></script> + <script type="text/javascript" src="/themes/AdminLTE/plugins/daterangepicker/daterangepicker.js"></script> + +<style> +#time{text-align: center; font-size: 26px; padding: 20px 0;} +</style> + <!-- Main content --> + <section class="content"> + <div class="row"> + <div class="col-xs-12"> + <div class="box"> + <div id="time"���style="">���������������</div> + <!-- /.box-header --> + <div class="box-body"> + <div id="main" class="main"></div> + </div> + <!-- /.box-body --> + </div> + </div> + </div> + <div class="row"> + <div class="col-md-6"> + <div class="box box-primary"> + <div class="box-header with-border"> + <h3 class="box-title">������������</h3> + + <div class="box-tools pull-right"> + <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> + </button> + <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> + </div> + </div> + <!-- /.box-header --> + <div class="box-body"> + <ul class="products-list product-list-in-box"> + <?php foreach ($system_news as $key => $system_new):?> + <li class="item"> + <i class="fa fa-file-text-o"> + </i> + <a href="/admin/index/look/id/<?php echo $system_new['_id']?>"> + <?php echo $system_new['name']?> + <span class=" pull-right">[<?php echo $system_new['create_time']?>]</span> + </a> + </li> + + <?php endforeach;?> + + + <!-- /.item --> + </ul> + </div> + </div> + </div> + <div class="col-md-6"> + <div class="box box-primary"> + <div class="box-header with-border"> + <h3 class="box-title">������������</h3> + + <div class="box-tools pull-right"> + <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> + </button> + <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> + </div> + </div> + <!-- /.box-header --> + <div class="box-body"> + <ul class="products-list product-list-in-box"> + <?php foreach ($industry_news as $key => $industry_new):?> + <li class="item"> + <i class="fa fa-file-text-o"> + </i> + <a href="/admin/index/look/id/<?php echo $system_new['_id']?>"> + <?php echo $industry_new['name']?> + <span class=" pull-right">[<?php echo $industry_new['create_time']?>]</span> + </a> + </li> + + <?php endforeach;?> + + + <!-- /.item --> + </ul> + </div> + </div> + </div> + </div> + <div class="row"> + <div class="col-md-6"> + <div class="box box-primary"> + <div class="box-header with-border"> + <h3 class="box-title">���������������</h3> + + <div class="box-tools pull-right"> + <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> + </button> + <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> + </div> + </div> + <!-- /.box-header --> + <div class="box-body"> + <ul class="products-list product-list-in-box"> + <?php foreach ($ffs_news as $key => $ffs_new):?> + <li class="item"> + <i class="fa fa-file-text-o"> + </i> + <a href="/admin/index/look/id/<?php echo $system_new['_id']?>"> + <?php echo $ffs_new['name']?> + <span class=" pull-right">[<?php echo $ffs_new['create_time']?>]</span> + </a> + </li> + + <?php endforeach;?> + + + <!-- /.item --> + </ul> + </div> + </div> + </div> + <div class="col-md-6"> + <div class="box box-primary"> + <div class="box-header with-border"> + <h3 class="box-title">������������</h3> + + <div class="box-tools pull-right"> + <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i> + </button> + <button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button> + </div> + </div> + <!-- /.box-header --> + <div class="box-body"> + <ul class="products-list product-list-in-box"> + <?php foreach ($my_news as $key => $my_new):?> + <li class="item"> + <i class="fa fa-file-text-o"> + </i> + <a href="/admin/index/look/id/<?php echo $system_new['_id']?>"> + <?php echo $my_new['name']?> + <span class=" pull-right">[<?php echo $my_new['create_time']?>]</span> + </a> + </li> + + <?php endforeach;?> + + + <!-- /.item --> + </ul> + </div> + </div> + </div> + </div> + </div> + <!-- /.box --> + </section> + <script type="text/javascript" src="/themes/echats/js/echarts-all.js"></script> +<script> + myChart = echarts.init(document.getElementById('main')); + window.onresize = myChart.resize; + var option = { + title : { + text: '������������������������', + // subtext: '' + }, + tooltip : { + trigger: 'axis' + }, + calculable : true, + xAxis : [ + { + type : 'category', + boundaryGap : false, + data : [ + <?php foreach ($days_arr as $day): ?> + <?php echo "'".$day."',"?> + <?php endforeach ?> + ] + } + ], + yAxis : [ + { + type : 'value', + axisLabel : { + formatter: '{value}' + } + } + ], + series : [ + { + name:'���������������������', + type:'line', + data:[ + <?php $day_daily_arr[] =array();?> + <?php foreach ($user_dailys as $user_daily):?> + <?php $day_daily_arr[$user_daily['date']] = $user_daily['day_avg'];?> + <?php endforeach;?> + <?php foreach ($days_arr as $day): ?> + <?php if(isset($day_daily_arr[$day])):?> + <?php echo $day_daily_arr[$day].',';?> + <?php else:?> + 0, + <?php endif;?> + <?php endforeach;?> + ], + markPoint : { + data : [ + {type : 'max', name: '���������'}, + {type : 'min', name: '���������'} + ] + }, + }, + ] + }; + myChart.setOption(option); + + $(function(){ + + + function getDay(add_days){ + var date = new Date(); + date.setDate(date.getDate()+add_days); + var year = date.getFullYear(); + var month = date.getMonth()+1; + var day = date.getDate(); + return year+"-0"+month+"-0"+day; + } + + var start_time = getDay(-7); + var end_time = getDay(-1); + var max_time = getDay(-1); + $('#time').text('���������������['+start_time+" ��� "+ end_time + ']'); + + }); +</script> -- Gitblit v1.8.0