瀏覽代碼

后台框架升级

sugar1569 7 年之前
父節點
當前提交
a9e88fbd9b

+ 472 - 59
application/admin/controller/Index.php

@@ -5,14 +5,13 @@ namespace app\admin\controller;
 use app\admin\model\store\StoreProduct;
 use app\admin\model\system\SystemConfig;
 use app\admin\model\system\SystemMenus;
-use app\admin\model\system\SystemNotice as NoticeModel;
-use app\admin\model\system\SystemNotice;
 use app\admin\model\system\SystemRole;
-use app\admin\model\order\StoreOrder;
-use app\admin\model\user\UserExtract;
-use service\CacheService;
-use service\UpgradeService;
-use service\UpgradeApi;
+use app\admin\model\order\StoreOrder as StoreOrderModel;//订单
+use app\admin\model\user\UserExtract as UserExtractModel;//分销
+use app\admin\model\user\User as UserModel;//用户
+use app\admin\model\store\StoreProductReply as StoreProductReplyModel;//评论
+use app\admin\model\store\StoreProduct as ProductModel;//产品
+use FormBuilder\Json;
 use think\DB;
 
 /**
@@ -42,19 +41,19 @@ class Index extends AuthController
     public function main()
     {
         /*首页第一行统计*/
-        $now_month = strtotime(date('Y-m'));
-        $pre_month = strtotime(date('Y-m',strtotime('-1 month')));
-        $now_day = strtotime(date('Y-m-d'));
+        $now_month = strtotime(date('Y-m'));//本月
+        $pre_month = strtotime(date('Y-m',strtotime('-1 month')));//上月
+        $now_day = strtotime(date('Y-m-d'));//今日
         $pre_day = strtotime(date('Y-m-d',strtotime('-1 day')));//昨天时间戳
-        $day = strtotime(date('Y-m-d',strtotime('0 day')));//今天时间戳
+        $beforyester_day = strtotime(date('Y-m-d',strtotime('-2 day')));//前天时间戳
         //昨天待发货数量
-        $topData['orderDeliveryNum'] = StoreOrder::isMainYesterdayCount($pre_day,$day)
+        $topData['orderDeliveryNum'] = StoreOrderModel::isMainYesterdayCount($pre_day,$now_day)
             ->where('status',0)
             ->where('paid',1)
             ->where('refund_status',0)
             ->count();
         //昨天退换货订单数
-        $topData['orderRefundNum'] = StoreOrder::isMainYesterdayCount($pre_day,$day)
+        $topData['orderRefundNum'] = StoreOrderModel::isMainYesterdayCount($pre_day,$now_day)
             ->where('paid',1)
             ->where('refund_status','IN','1,2')
             ->count();
@@ -62,24 +61,33 @@ class Index extends AuthController
         $replenishment_num = SystemConfig::getValue('store_stock') > 0 ? SystemConfig::getValue('store_stock') : 20;//库存预警界限
         $topData['stockProduct'] = StoreProduct::where('stock','<=',$replenishment_num)->where('is_del',0)->count();
         //待处理提现
-        $topData['treatedExtract'] = UserExtract::where('status',0)->count();
+        $topData['treatedExtract'] = UserExtractModel::where('status',0)->count();
         //昨日订单数
-        $topData['orderNum'] = StoreOrder::isMainYesterdayCount($pre_day,$day)->count();
-        //昨日交易额
-        $orderPriceNum = StoreOrder::isMainYesterdayCount($pre_day,$day)->field('sum(pay_price) as pay_price')->find()['pay_price'];
-        $topData['orderPriceNum'] = $orderPriceNum ? $orderPriceNum : 0;
-        //总收入->日
-        $now_day_order_p = StoreOrder::where('paid',1)->where('pay_time','gt',$now_day)->value('sum(pay_price)');
-        $pre_day_order_p = StoreOrder::where('paid',1)->where('pay_time','gt',$pre_day)->where('pay_time','lt',$now_day)->value('sum(pay_price)');
-        $first_line['d_price'] = [
+        $topData['orderNum'] = StoreOrderModel::isMainYesterdayCount($pre_day,$now_day)->count();
+//        //昨日交易额
+//        $orderPriceNum = StoreOrderModel::isMainYesterdayCount($pre_day,$now_day)->field('sum(pay_price) as pay_price')->find()['pay_price'];
+//        $topData['orderPriceNum'] = $orderPriceNum ? $orderPriceNum : 0;
+        //订单数->日
+        $now_day_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$now_day)->count();
+        $pre_day_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_day)->where('pay_time','lt',$now_day)->count();
+        $first_line['d_num'] = [
             'data' => $now_day_order_p ? $now_day_order_p : 0,
             'percent' => abs($now_day_order_p - $pre_day_order_p),
             'is_plus' => $now_day_order_p - $pre_day_order_p > 0 ? 1 : ($now_day_order_p - $pre_day_order_p == 0 ? -1 : 0)
         ];
 
-        //总收入->月
-        $now_month_order_p = StoreOrder::where('paid',1)->where('pay_time','gt',$now_month)->value('sum(pay_price)');
-        $pre_month_order_p = StoreOrder::where('paid',1)->where('pay_time','gt',$pre_month)->where('pay_time','lt',$now_month)->value('sum(pay_price)');
+        //交易额->昨天
+        $now_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_day)->value('sum(pay_price)');
+        $pre_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$beforyester_day)->where('pay_time','lt',$pre_day)->value('sum(pay_price)');
+        $first_line['d_price'] = [
+            'data' => $now_month_order_p > 0 ? $now_month_order_p : 0,
+            'percent' => abs($now_month_order_p - $pre_month_order_p),
+            'is_plus' => $now_month_order_p - $pre_month_order_p > 0 ? 1 : ($now_month_order_p - $pre_month_order_p == 0 ? -1 : 0)
+        ];
+
+        //交易额->月
+        $now_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$now_month)->value('sum(pay_price)');
+        $pre_month_order_p = StoreOrderModel::where('paid',1)->where('pay_time','gt',$pre_month)->where('pay_time','lt',$now_month)->value('sum(pay_price)');
         $first_line['m_price'] = [
             'data' => $now_month_order_p > 0 ? $now_month_order_p : 0,
             'percent' => abs($now_month_order_p - $pre_month_order_p),
@@ -105,23 +113,9 @@ class Index extends AuthController
             'is_plus' => $now_month_user - $pre_month_user > 0 ? 1 : ($now_month_user - $pre_month_user == 0 ? -1 : 0)
         ];
 
-        /*首页第二行统计*/
-        $second_line['order_count_max'] = 50; //max最小为100
-        for ($i=0; $i < 7; $i++) {
-            $time = strtotime('-'.$i.' day');
-            $now_day_info = strtotime(date('Y-m-d',strtotime('-'.($i-1).' day')));
-            $pre_day_info = strtotime(date('Y-m-d',strtotime('-'.$i.' day')));
-            $order_count[$i]['y'] = date('Y',$time);
-            $order_count[$i]['m'] = date('m',$time);
-            $order_count[$i]['d'] = date('d',$time);
-            $order_count[$i]['count'] = StoreOrder::where('add_time','gt',$pre_day_info)->where('add_time','lt',$now_day_info)->count();
-            $second_line['order_count_max'] = $second_line['order_count_max'] > $order_count[$i]['count'] ? $second_line['order_count_max'] : $order_count[$i]['count'];
-        }
-        $second_line['order_count'] = $order_count;
-
         //本月订单总数
-        $now_order_info_c = StoreOrder::where('add_time','gt',$now_month)->count();
-        $pre_order_info_c = StoreOrder::where('add_time','gt',$pre_month)->where('add_time','lt',$now_month)->count();
+        $now_order_info_c = StoreOrderModel::where('add_time','gt',$now_month)->count();
+        $pre_order_info_c = StoreOrderModel::where('add_time','gt',$pre_month)->where('add_time','lt',$now_month)->count();
         $order_info['first'] = [
             'data' => $now_order_info_c ? $now_order_info_c : 0,
             'percent' => abs($now_order_info_c - $pre_order_info_c),
@@ -131,8 +125,8 @@ class Index extends AuthController
         //上月订单总数
         $second_now_month = strtotime(date('Y-m',strtotime('-1 month')));
         $second_pre_month = strtotime(date('Y-m',strtotime('-2 month')));
-        $now_order_info_c = StoreOrder::where('add_time','gt',$pre_month)->where('add_time','lt',$now_month)->count();
-        $pre_order_info_c = StoreOrder::where('add_time','gt',$second_pre_month)->where('add_time','lt',$second_now_month)->count();
+        $now_order_info_c = StoreOrderModel::where('add_time','gt',$pre_month)->where('add_time','lt',$now_month)->count();
+        $pre_order_info_c = StoreOrderModel::where('add_time','gt',$second_pre_month)->where('add_time','lt',$second_now_month)->count();
         $order_info["second"] = [
             'data' => $now_order_info_c ? $now_order_info_c : 0,
             'percent' => abs($now_order_info_c - $pre_order_info_c),
@@ -140,29 +134,448 @@ class Index extends AuthController
         ];
         $second_line['order_info'] = $order_info;
 
-        /*首页第三行统计*/
-        $third_line['order_count_max'] = 100; //max最小为100
-        for ($x=0; $x < 30; $x++) {
-            $time = strtotime('-'.$x.' day');
-            $now_day_info = strtotime(date('Y-m-d',strtotime('-'.($x-1).' day')));
-            $pre_day_info = strtotime(date('Y-m-d',strtotime('-'.$x.' day')));
-            $price_count[$x]['y'] = date('Y',$time);
-            $price_count[$x]['m'] = date('m',$time);
-            $price_count[$x]['d'] = date('d',$time);
-            $price_count[$x]['count'] = StoreOrder::where('paid',1)->where('pay_time','gt',$pre_day_info)->where('pay_time','lt',$now_day_info)->value('sum(pay_price)');
-            $third_line['order_count_max'] = $third_line['order_count_max'] > $price_count[$x]['count'] ? $third_line['order_count_max'] : $price_count[$x]['count'];
-        }
-        $third_line['price_count'] = $price_count;
+
         $this->assign([
             'first_line' => $first_line,
             'second_line' => $second_line,
-            'third_line' => $third_line,
             'topData' => $topData,
         ]);
         return $this->fetch();
     }
-    public function test(){
-        UpgradeService::start();
+
+    /**
+     * 订单图表
+     */
+    public function orderchart(){
+        header('Content-type:text/json');
+        $cycle = $this->request->param('cycle')?:'thirtyday';//默认30天
+        $datalist = [];
+        switch ($cycle){
+            case 'thirtyday':
+                $datebefor = date('Y-m-d',strtotime('-30 day'));
+                $dateafter = date('Y-m-d');
+                //上期
+                $pre_datebefor = date('Y-m-d',strtotime('-60 day'));
+                $pre_dateafter = date('Y-m-d',strtotime('-30 day'));
+                for($i=-30;$i < 0;$i++){
+                    $datalist[date('m-d',strtotime($i.' day'))] = date('m-d',strtotime($i.' day'));
+                }
+                $order_list = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%m-%e') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                if(empty($order_list)) return false;
+                foreach ($order_list as $k=>&$v){
+                    $order_list[$v['day']] = $v;
+                }
+                $cycle_list = [];
+                foreach ($datalist as $dk=>$dd){
+                    if(!empty($order_list[$dd])){
+                        $cycle_list[$dd] = $order_list[$dd];
+                    }else{
+                        $cycle_list[$dd] = ['count'=>0,'day'=>$dd,'price'=>''];
+                    }
+                }
+                $chartdata = [];
+                $data = [];//临时
+                $chartdata['yAxis']['maxnum'] = 0;//最大值数量
+                $chartdata['yAxis']['maxprice'] = 0;//最大值金额
+                foreach ($cycle_list as $k=>$v){
+                    $data['day'][] = $v['day'];
+                    $data['count'][] = $v['count'];
+                    $data['price'][] = round($v['price'],2);
+                    if($chartdata['yAxis']['maxnum'] < $v['count'])
+                        $chartdata['yAxis']['maxnum'] = $v['count'];//日最大订单数
+                    if($chartdata['yAxis']['maxprice'] < $v['price'])
+                        $chartdata['yAxis']['maxprice'] = $v['price'];//日最大金额
+                }
+                $chartdata['legend'] = ['订单金额','订单数'];//分类
+                $chartdata['xAxis'] = $data['day'];//X轴值
+                //,'itemStyle'=>$series
+                $series= ['normal'=>['label'=>['show'=>true,'position'=>'top']]];
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][0],'type'=>'bar','itemStyle'=>$series,'data'=>$data['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][1],'type'=>'bar','itemStyle'=>$series,'data'=>$data['count']];//分类2值
+                //统计总数上期
+                $pre_total = StoreOrderModel::where('add_time','between time',[$pre_datebefor,$pre_dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($pre_total){
+                    $chartdata['pre_cycle']['count'] = [
+                        'data' => $pre_total['count']? : 0
+                    ];
+                    $chartdata['pre_cycle']['price'] = [
+                        'data' => $pre_total['price']? : 0
+                    ];
+                }
+                //统计总数
+                $total = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($total){
+                    $cha_count = intval($pre_total['count']) - intval($total['count']);
+                    $pre_total['count'] = $pre_total['count']==0 ? 1 : $pre_total['count'];
+                    $chartdata['cycle']['count'] = [
+                        'data' => $total['count']? : 0,
+                        'percent' => round((abs($cha_count)/intval($pre_total['count'])*100),2),
+                        'is_plus' => $cha_count > 0 ? -1 : ($cha_count == 0 ? 0 : 1)
+                    ];
+                    $cha_price = round($pre_total['price'],2) - round($total['price'],2);
+                    $pre_total['price'] = $pre_total['price']==0 ? 1 : $pre_total['price'];
+                    $chartdata['cycle']['price'] = [
+                        'data' => $total['price']? : 0,
+                        'percent' => round(abs($cha_price)/$pre_total['price']*100,2),
+                        'is_plus' => $cha_price > 0 ? -1 : ($cha_price == 0 ? 0 : 1)
+                    ];
+                }
+                return Json::succ('ok',$chartdata);
+                break;
+            case 'week':
+                $weekarray=array(['周日'],['周一'],['周二'],['周三'],['周四'],['周五'],['周六']);
+                $datebefor = date('Y-m-d',strtotime('-1 week Monday'));
+                $dateafter = date('Y-m-d',strtotime('-1 week Sunday'));
+                $order_list = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%w') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理
+                $new_order_list = [];
+                foreach ($order_list as $k=>$v){
+                    $new_order_list[$v['day']] = $v;
+                }
+                $now_datebefor = date('Y-m-d', (time() - ((date('w') == 0 ? 7 : date('w')) - 1) * 24 * 3600));
+                $now_dateafter = date('Y-m-d',strtotime("+1 day"));
+                $now_order_list = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%w') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理 key 变为当前值
+                $new_now_order_list = [];
+                foreach ($now_order_list as $k=>$v){
+                    $new_now_order_list[$v['day']] = $v;
+                }
+                foreach ($weekarray as $dk=>$dd){
+                    if(!empty($new_order_list[$dk])){
+                        $weekarray[$dk]['pre'] = $new_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['pre'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                    if(!empty($new_now_order_list[$dk])){
+                        $weekarray[$dk]['now'] = $new_now_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['now'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                }
+                $chartdata = [];
+                $data = [];//临时
+                $chartdata['yAxis']['maxnum'] = 0;//最大值数量
+                $chartdata['yAxis']['maxprice'] = 0;//最大值金额
+                foreach ($weekarray as $k=>$v){
+                    $data['day'][] = $v[0];
+                    $data['pre']['count'][] = $v['pre']['count'];
+                    $data['pre']['price'][] = round($v['pre']['price'],2);
+                    $data['now']['count'][] = $v['now']['count'];
+                    $data['now']['price'][] = round($v['now']['price'],2);
+                    if($chartdata['yAxis']['maxnum'] < $v['pre']['count'] || $chartdata['yAxis']['maxnum'] < $v['now']['count']){
+                        $chartdata['yAxis']['maxnum'] = $v['pre']['count']>$v['now']['count']?$v['pre']['count']:$v['now']['count'];//日最大订单数
+                    }
+                    if($chartdata['yAxis']['maxprice'] < $v['pre']['price'] || $chartdata['yAxis']['maxprice'] < $v['now']['price']){
+                        $chartdata['yAxis']['maxprice'] = $v['pre']['price']>$v['now']['price']?$v['pre']['price']:$v['now']['price'];//日最大金额
+                    }
+                }
+                $chartdata['legend'] = ['上周金额','本周金额','上周订单数','本周订单数'];//分类
+                $chartdata['xAxis'] = $data['day'];//X轴值
+                //,'itemStyle'=>$series
+                $series= ['normal'=>['label'=>['show'=>true,'position'=>'top']]];
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][0],'type'=>'bar','itemStyle'=>$series,'data'=>$data['pre']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][1],'type'=>'bar','itemStyle'=>$series,'data'=>$data['now']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][2],'type'=>'line','itemStyle'=>$series,'data'=>$data['pre']['count']];//分类2值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][3],'type'=>'line','itemStyle'=>$series,'data'=>$data['now']['count']];//分类2值
+
+                //统计总数上期
+                $pre_total = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($pre_total){
+                    $chartdata['pre_cycle']['count'] = [
+                        'data' => $pre_total['count']? : 0
+                    ];
+                    $chartdata['pre_cycle']['price'] = [
+                        'data' => $pre_total['price']? : 0
+                    ];
+                }
+                //统计总数
+                $total = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($total){
+                    $cha_count = intval($pre_total['count']) - intval($total['count']);
+                    $pre_total['count'] = $pre_total['count']==0 ? 1 : $pre_total['count'];
+                    $chartdata['cycle']['count'] = [
+                        'data' => $total['count']? : 0,
+                        'percent' => round((abs($cha_count)/intval($pre_total['count'])*100),2),
+                        'is_plus' => $cha_count > 0 ? -1 : ($cha_count == 0 ? 0 : 1)
+                    ];
+                    $cha_price = round($pre_total['price'],2) - round($total['price'],2);
+                    $pre_total['price'] = $pre_total['price']==0 ? 1 : $pre_total['price'];
+                    $chartdata['cycle']['price'] = [
+                        'data' => $total['price']? : 0,
+                        'percent' => round(abs($cha_price)/$pre_total['price']*100,2),
+                        'is_plus' => $cha_price > 0 ? -1 : ($cha_price == 0 ? 0 : 1)
+                    ];
+                }
+                return Json::succ('ok',$chartdata);
+                break;
+            case 'month':
+                $weekarray=array('01'=>['1'],'02'=>['2'],'03'=>['3'],'04'=>['4'],'05'=>['5'],'06'=>['6'],'07'=>['7'],'08'=>['8'],'09'=>['9'],'10'=>['10'],'11'=>['11'],'12'=>['12'],'13'=>['13'],'14'=>['14'],'15'=>['15'],'16'=>['16'],'17'=>['17'],'18'=>['18'],'19'=>['19'],'20'=>['20'],'21'=>['21'],'22'=>['22'],'23'=>['23'],'24'=>['24'],'25'=>['25'],'26'=>['26'],'27'=>['27'],'28'=>['28'],'29'=>['29'],'30'=>['30'],'31'=>['31']);
+
+                $datebefor = date('Y-m-01',strtotime('-1 month'));
+                $dateafter = date('Y-m-d',strtotime(date('Y-m-01')));
+                $order_list = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%d') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理
+                $new_order_list = [];
+                foreach ($order_list as $k=>$v){
+                    $new_order_list[$v['day']] = $v;
+                }
+                $now_datebefor = date('Y-m-01');
+                $now_dateafter = date('Y-m-d',strtotime("+1 day"));
+                $now_order_list = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%d') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理 key 变为当前值
+                $new_now_order_list = [];
+                foreach ($now_order_list as $k=>$v){
+                    $new_now_order_list[$v['day']] = $v;
+                }
+                foreach ($weekarray as $dk=>$dd){
+                    if(!empty($new_order_list[$dk])){
+                        $weekarray[$dk]['pre'] = $new_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['pre'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                    if(!empty($new_now_order_list[$dk])){
+                        $weekarray[$dk]['now'] = $new_now_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['now'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                }
+                $chartdata = [];
+                $data = [];//临时
+                $chartdata['yAxis']['maxnum'] = 0;//最大值数量
+                $chartdata['yAxis']['maxprice'] = 0;//最大值金额
+                foreach ($weekarray as $k=>$v){
+                    $data['day'][] = $v[0];
+                    $data['pre']['count'][] = $v['pre']['count'];
+                    $data['pre']['price'][] = round($v['pre']['price'],2);
+                    $data['now']['count'][] = $v['now']['count'];
+                    $data['now']['price'][] = round($v['now']['price'],2);
+                    if($chartdata['yAxis']['maxnum'] < $v['pre']['count'] || $chartdata['yAxis']['maxnum'] < $v['now']['count']){
+                        $chartdata['yAxis']['maxnum'] = $v['pre']['count']>$v['now']['count']?$v['pre']['count']:$v['now']['count'];//日最大订单数
+                    }
+                    if($chartdata['yAxis']['maxprice'] < $v['pre']['price'] || $chartdata['yAxis']['maxprice'] < $v['now']['price']){
+                        $chartdata['yAxis']['maxprice'] = $v['pre']['price']>$v['now']['price']?$v['pre']['price']:$v['now']['price'];//日最大金额
+                    }
+
+                }
+                $chartdata['legend'] = ['上月金额','本月金额','上月订单数','本月订单数'];//分类
+                $chartdata['xAxis'] = $data['day'];//X轴值
+                //,'itemStyle'=>$series
+                $series= ['normal'=>['label'=>['show'=>true,'position'=>'top']]];
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][0],'type'=>'bar','itemStyle'=>$series,'data'=>$data['pre']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][1],'type'=>'bar','itemStyle'=>$series,'data'=>$data['now']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][2],'type'=>'line','itemStyle'=>$series,'data'=>$data['pre']['count']];//分类2值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][3],'type'=>'line','itemStyle'=>$series,'data'=>$data['now']['count']];//分类2值
+
+                //统计总数上期
+                $pre_total = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($pre_total){
+                    $chartdata['pre_cycle']['count'] = [
+                        'data' => $pre_total['count']? : 0
+                    ];
+                    $chartdata['pre_cycle']['price'] = [
+                        'data' => $pre_total['price']? : 0
+                    ];
+                }
+                //统计总数
+                $total = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($total){
+                    $cha_count = intval($pre_total['count']) - intval($total['count']);
+                    $pre_total['count'] = $pre_total['count']==0 ? 1 : $pre_total['count'];
+                    $chartdata['cycle']['count'] = [
+                        'data' => $total['count']? : 0,
+                        'percent' => round((abs($cha_count)/intval($pre_total['count'])*100),2),
+                        'is_plus' => $cha_count > 0 ? -1 : ($cha_count == 0 ? 0 : 1)
+                    ];
+                    $cha_price = round($pre_total['price'],2) - round($total['price'],2);
+                    $pre_total['price'] = $pre_total['price']==0 ? 1 : $pre_total['price'];
+                    $chartdata['cycle']['price'] = [
+                        'data' => $total['price']? : 0,
+                        'percent' => round(abs($cha_price)/$pre_total['price']*100,2),
+                        'is_plus' => $cha_price > 0 ? -1 : ($cha_price == 0 ? 0 : 1)
+                    ];
+                }
+                return Json::succ('ok',$chartdata);
+                break;
+            case 'year':
+                $weekarray=array('01'=>['一月'],'02'=>['二月'],'03'=>['三月'],'04'=>['四月'],'05'=>['五月'],'06'=>['六月'],'07'=>['七月'],'08'=>['八月'],'09'=>['九月'],'10'=>['十月'],'11'=>['十一月'],'12'=>['十二月']);
+                $datebefor = date('Y-01-01',strtotime('-1 year'));
+                $dateafter = date('Y-12-31',strtotime('-1 year'));
+                $order_list = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%m') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理
+                $new_order_list = [];
+                foreach ($order_list as $k=>$v){
+                    $new_order_list[$v['day']] = $v;
+                }
+                $now_datebefor = date('Y-01-01');
+                $now_dateafter = date('Y-m-d');
+                $now_order_list = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("FROM_UNIXTIME(add_time,'%m') as day,count(*) as count,sum(pay_price) as price")
+                    ->group("FROM_UNIXTIME(add_time, '%Y%m')")
+                    ->order('add_time asc')
+                    ->select()->toArray();
+                //数据查询重新处理 key 变为当前值
+                $new_now_order_list = [];
+                foreach ($now_order_list as $k=>$v){
+                    $new_now_order_list[$v['day']] = $v;
+                }
+                foreach ($weekarray as $dk=>$dd){
+                    if(!empty($new_order_list[$dk])){
+                        $weekarray[$dk]['pre'] = $new_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['pre'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                    if(!empty($new_now_order_list[$dk])){
+                        $weekarray[$dk]['now'] = $new_now_order_list[$dk];
+                    }else{
+                        $weekarray[$dk]['now'] = ['count'=>0,'day'=>$weekarray[$dk][0],'price'=>'0'];
+                    }
+                }
+                $chartdata = [];
+                $data = [];//临时
+                $chartdata['yAxis']['maxnum'] = 0;//最大值数量
+                $chartdata['yAxis']['maxprice'] = 0;//最大值金额
+                foreach ($weekarray as $k=>$v){
+                    $data['day'][] = $v[0];
+                    $data['pre']['count'][] = $v['pre']['count'];
+                    $data['pre']['price'][] = round($v['pre']['price'],2);
+                    $data['now']['count'][] = $v['now']['count'];
+                    $data['now']['price'][] = round($v['now']['price'],2);
+                    if($chartdata['yAxis']['maxnum'] < $v['pre']['count'] || $chartdata['yAxis']['maxnum'] < $v['now']['count']){
+                        $chartdata['yAxis']['maxnum'] = $v['pre']['count']>$v['now']['count']?$v['pre']['count']:$v['now']['count'];//日最大订单数
+                    }
+                    if($chartdata['yAxis']['maxprice'] < $v['pre']['price'] || $chartdata['yAxis']['maxprice'] < $v['now']['price']){
+                        $chartdata['yAxis']['maxprice'] = $v['pre']['price']>$v['now']['price']?$v['pre']['price']:$v['now']['price'];//日最大金额
+                    }
+                }
+                $chartdata['legend'] = ['去年金额','今年金额','去年订单数','今年订单数'];//分类
+                $chartdata['xAxis'] = $data['day'];//X轴值
+                //,'itemStyle'=>$series
+                $series= ['normal'=>['label'=>['show'=>true,'position'=>'top']]];
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][0],'type'=>'bar','itemStyle'=>$series,'data'=>$data['pre']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][1],'type'=>'bar','itemStyle'=>$series,'data'=>$data['now']['price']];//分类1值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][2],'type'=>'line','itemStyle'=>$series,'data'=>$data['pre']['count']];//分类2值
+                $chartdata['series'][] = ['name'=>$chartdata['legend'][3],'type'=>'line','itemStyle'=>$series,'data'=>$data['now']['count']];//分类2值
+
+                //统计总数上期
+                $pre_total = StoreOrderModel::where('add_time','between time',[$datebefor,$dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($pre_total){
+                    $chartdata['pre_cycle']['count'] = [
+                        'data' => $pre_total['count']? : 0
+                    ];
+                    $chartdata['pre_cycle']['price'] = [
+                        'data' => $pre_total['price']? : 0
+                    ];
+                }
+                //统计总数
+                $total = StoreOrderModel::where('add_time','between time',[$now_datebefor,$now_dateafter])
+                    ->field("count(*) as count,sum(pay_price) as price")
+                    ->find();
+                if($total){
+                    $cha_count = intval($pre_total['count']) - intval($total['count']);
+                    $pre_total['count'] = $pre_total['count']==0 ? 1 : $pre_total['count'];
+                    $chartdata['cycle']['count'] = [
+                        'data' => $total['count']? : 0,
+                        'percent' => round((abs($cha_count)/intval($pre_total['count'])*100),2),
+                        'is_plus' => $cha_count > 0 ? -1 : ($cha_count == 0 ? 0 : 1)
+                    ];
+                    $cha_price = round($pre_total['price'],2) - round($total['price'],2);
+                    $pre_total['price'] = $pre_total['price']==0 ? 1 : $pre_total['price'];
+                    $chartdata['cycle']['price'] = [
+                        'data' => $total['price']? : 0,
+                        'percent' => round(abs($cha_price)/$pre_total['price']*100,2),
+                        'is_plus' => $cha_price > 0 ? -1 : ($cha_price == 0 ? 0 : 1)
+                    ];
+                }
+                return Json::succ('ok',$chartdata);
+                break;
+            default:
+                break;
+        }
+
+
+    }
+    /**
+     * 用户图表
+     */
+    public function userchart(){
+        header('Content-type:text/json');
+
+        $starday = date('Y-m-d',strtotime('-30 day'));
+        $yesterday = date('Y-m-d');
+
+        $user_list = UserModel::where('add_time','between time',[$starday,$yesterday])
+            ->field("FROM_UNIXTIME(add_time,'%m-%e') as day,count(*) as count")
+            ->group("FROM_UNIXTIME(add_time, '%Y%m%e')")
+            ->order('add_time asc')
+            ->select()->toArray();
+        $chartdata = [];
+        $data = [];
+        $chartdata['legend'] = ['用户数'];//分类
+        $chartdata['yAxis']['maxnum'] = 0;//最大值数量
+        foreach ($user_list as $k=>$v){
+            $data['day'][] = $v['day'];
+            $data['count'][] = $v['count'];
+            if($chartdata['yAxis']['maxnum'] < $v['count'])
+                $chartdata['yAxis']['maxnum'] = $v['count'];
+        }
+        $chartdata['xAxis'] = $data['day'];//X轴值
+        $chartdata['series'] = $data['count'];//分类1值
+
+        return Json::succ('ok',$chartdata);
+    }
+
+    /**待办事统计
+     * @param Request|null $request
+     */
+    public function Jnotice()
+    {
+        header('Content-type:text/json');
+        $data = [];
+        $data['ordernum'] = StoreOrderModel::statusByWhere(1)->count();//待发货
+        $replenishment_num = SystemConfig::getValue('store_stock') > 0 ? SystemConfig::getValue('store_stock') : 2;//库存预警界限
+        $data['inventory'] = ProductModel::where('stock','<=',$replenishment_num)->where('is_del',0)->count();//库存
+        $data['commentnum'] = StoreProductReplyModel::where('is_reply',0)->count();//评论
+        $data['reflectnum'] = UserExtractModel::where('status',0)->count();;//提现
+        $data['msgcount'] = intval($data['ordernum'])+intval($data['inventory'])+intval($data['commentnum'])+intval($data['reflectnum']);
+        return Json::succ('ok',$data);
     }
 }
 

+ 182 - 10
application/admin/view/index/index.php

@@ -26,7 +26,11 @@
                 <li class="nav-header">
                     <div class="dropdown profile-element admin_open">
                         <span>
-                            <img alt="image" class="imgbox" src="{$site_logo}" onerror="javascript:this.src='{__ADMIN_PATH}images/admin_logo.png';"/>
+                            {if condition="$site_logo"}
+                            <img alt="image" class="imgbox" src="{$site_logo}"/>
+                            {else/}
+                            <img alt="image" class="" src="{__FRAME_PATH}img/profile_small.jpg" />
+                            {/if}
                         </span>
                         <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                             <span class="clear" style="margin-top: 20px;">
@@ -77,18 +81,58 @@
     <!--左侧导航结束-->
     <!--右侧部分开始-->
     <div id="page-wrapper" class="gray-bg dashbard-1">
-        <div class="row content-tabs" @touchmove.prevent>
-            <button class="roll-nav roll-left navbar-minimalize minimalize-styl-2 btn" style="padding: 0;margin: 0;"><i class="fa fa-bars"></i></button>
-            <button class="roll-nav J_tabLeft" style="right: 241px;"><i class="fa fa-backward"></i></button>
+        <div class="row content-tabs" @touchmove.prevent  >
+            <button class="roll-nav roll-left navbar-minimalize" style="padding: 0;margin: 0;"><i class="fa fa-bars"></i></button>
+
             <nav class="page-tabs J_menuTabs">
                 <div class="page-tabs-content">
                     <a href="javascript:;" class="active J_menuTab" data-id="{:Url('Index/main')}">首页</a>
                 </div>
             </nav>
-            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
-            </button>
+            <button class="roll-nav roll-right J_tabLeft"><i class="fa fa-backward"></i></button>
+            <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i></button>
+
+            <a href="javascript:void(0);" class="roll-nav roll-right J_tabReply" title="返回"><i class="fa fa-reply"></i> </a>
+            <a href="javascript:void(0);" class="roll-nav roll-right J_tabRefresh" title="刷新"><i class="fa fa-refresh"></i> </a>
+            <a href="javascript:void(0);" class="roll-nav roll-right J_tabFullScreen" title="全屏"><i class="fa fa-arrows"></i> </a>
+            <a href="javascript:void(0);" class="roll-nav roll-right J_notice" data-toggle="dropdown" aria-expanded="true" title="消息"><i class="fa fa-bell"></i> <span class="badge badge-danger" id="msgcount">0</span></a>
+            <ul class="dropdown-menu dropdown-alerts dropdown-menu-right" >
+                <li>
+                    <a class="J_menuItem" href="{:Url('order.store_order/index')}">
+                        <div>
+                            <i class="fa fa-building-o"></i> 待发货
+                            <span class="pull-right text-muted small" id="ordernum">0个</span>
+                        </div>
+                    </a>
+                </li>
+                <li class="divider"></li>
+                <li>
+                    <a class="J_menuItem" href="{:Url('store.store_product/index',array('type'=>5))}">
+                        <div>
+                            <i class="fa fa-pagelines"></i> 库存预警 <span class="pull-right text-muted small" id="inventory">0个</span>
+                        </div>
+                    </a>
+                </li>
+                <li class="divider"></li>
+                <li>
+                    <a class="J_menuItem" href="{:Url('store.store_product_reply/index')}">
+                        <div>
+                            <i class="fa fa-comments-o"></i> 新评论 <span class="pull-right text-muted small" id="commentnum">0个</span>
+                        </div>
+                    </a>
+                </li>
+                <li class="divider"></li>
+                <li>
+                    <a class="J_menuItem" href="{:Url('finance.user_extract/index')}">
+                        <div>
+                            <i class="fa fa-cny"></i> 申请提现 <span class="pull-right text-muted small" id="reflectnum">0个</span>
+                        </div>
+                    </a>
+                </li>
+            </ul>
+            <a href="javascript:void(0);" class="roll-nav roll-right J_tabSetting right-sidebar-toggle" title="更多"><i class="fa fa-tasks"></i></a>
             <div class="btn-group roll-nav roll-right">
-                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
+                <button class="dropdown J_tabClose" data-toggle="dropdown">关闭<span class="caret"></span>
                 </button>
                 <ul role="menu" class="dropdown-menu dropdown-menu-right">
                     <li class="J_tabShowActive"><a>定位当前选项卡</a>
@@ -100,8 +144,6 @@
                     </li>
                 </ul>
             </div>
-            <a href="javascript:void(0);" class="roll-nav roll-right J_tabReply"><i class="fa fa-reply"></i> 返回</a>
-            <a href="javascript:void(0);" class="roll-nav roll-right J_tabRefresh"><i class="fa fa-refresh"></i> 刷新</a>
         </div>
         <!--内容展示模块-->
         <div class="row J_mainContent" id="content-main">
@@ -109,12 +151,123 @@
         </div>
         <!--底部版权-->
         <div class="footer"  @touchmove.prevent>
-            <div class="pull-right">&copy; 2014-2018 <a href="http://www.crmeb.com/" target="_blank">CRMEB</a>
+            <div class="pull-right">© 2014-2018 <a href="http://www.crmeb.com/" target="_blank">CRMEB</a>
             </div>
         </div>
     </div>
     <!--右侧部分结束-->
+    <!--右侧边栏开始-->
+    <div id="right-sidebar">
+        <div class="sidebar-container">
+            <ul class="nav nav-tabs navs-3">
+                <li class="active">
+                    <a data-toggle="tab" href="#tab-1">
+                        <i class="fa fa-bell"></i>通知
+                    </a>
+                </li>
+                <li class="">
+                    <a data-toggle="tab" href="#tab-2">
+                        <i class="fa fa-gear"></i> 设置
+                    </a>
+                </li>
+                
+            </ul>
+            <div class="tab-content">
+                <div id="tab-1" class="tab-pane active">
+                    <div class="sidebar-title">
+                        <h3><i class="fa fa-comments-o"></i> 最新通知</h3>
+                        <small><i class="fa fa-tim"></i> 您当前有0条未读信息</small>
+                    </div>
+                    <div>
+                        <!--<div class="sidebar-message">
+                            <a href="#">
+                                <div class="pull-left text-center">
+                                    <img alt="image" class="img-circle message-avatar" src="http://ozwpnu2pa.bkt.clouddn.com/a1.jpg">
+                                    <div class="m-t-xs">
+                                        <i class="fa fa-star text-warning"></i> <i class="fa fa-star text-warning"></i>
+                                    </div>
+                                </div>
+                                <div class="media-body">
+
+                                    据天津日报报道:瑞海公司董事长于学伟,副董事长董社轩等10人在13日上午已被控制。 <br>
+                                    <small class="text-muted">今天 4:21 <a class="J_menuItem admin_close" href="/admin/setting.system_admin/admininfo.html" data-index="0">【查看】</a></small>
+                                </div>
+                            </a>
+                        </div>-->
+                    </div>
+                </div>
+                <div id="tab-2" class="tab-pane ">
+                    <div class="sidebar-title">
+                        <h3><i class="fa fa-comments-o"></i> 提示</h3>
+                        <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
+                    </div>
+                    <div class="skin-setttings">
+                        <div class="title">设置</div>
+                        <div class="setings-item">
+                            <span>收起左侧菜单</span>
+                            <div class="switch">
+                                <div class="onoffswitch">
+                                    <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox" id="collapsemenu">
+                                    <label class="onoffswitch-label" for="collapsemenu">
+                                        <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span>
+                                    </label>
+                                </div>
+                            </div>
+                        </div>
+
+                        <div class="setings-item">
+                                <span>固定宽度</span>
+                            <div class="switch">
+                                <div class="onoffswitch">
+                                    <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox" id="boxedlayout">
+                                    <label class="onoffswitch-label" for="boxedlayout">
+                                        <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span>
+                                    </label>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="setings-item">
+                            <span>菜单点击刷新</span>
+                            <div class="switch">
+                                <div class="onoffswitch">
+                                    <input type="checkbox" name="refresh" class="onoffswitch-checkbox" id="refresh">
+                                    <label class="onoffswitch-label" for="refresh">
+                                        <span class="onoffswitch-inner"></span> <span class="onoffswitch-switch"></span>
+                                    </label>
+                                </div>
+                            </div>
+                        </div>
+                        <div class="title">皮肤选择</div>
+                        <div class="setings-item default-skin nb">
+                                <span class="skin-name ">
+                         <a href="#" class="s-skin-0">
+                             默认皮肤
+                         </a>
+                    </span>
+                        </div>
+                        <div class="setings-item blue-skin nb">
+                                <span class="skin-name ">
+                        <a href="#" class="s-skin-1">
+                            蓝色主题
+                        </a>
+                    </span>
+                        </div>
+                        <div class="setings-item yellow-skin nb">
+                                <span class="skin-name ">
+                        <a href="#" class="s-skin-3">
+                            黄色/紫色主题
+                        </a>
+                    </span>
+                        </div>
+                    </div>
+                </div>
+
+            </div>
+        </div>
+    </div>
+    <!--右侧边栏结束-->
 </div>
+<!--vue调用不能删除-->
 <div id="vm"></div>
 <script src="{__FRAME_PATH}js/jquery.min.js"></script>
 <script src="{__FRAME_PATH}js/bootstrap.min.js"></script>
@@ -126,5 +279,24 @@
 <script src="{__FRAME_PATH}js/plugins/pace/pace.min.js"></script>
 {include file="public/style"}
 <script src="{__ADMIN_PATH}js/index.js"></script>
+<script>
+    $(function() {
+        function getnotice() {
+            $.getJSON("{:Url('Jnotice')}",function(res){
+                console.log(res);
+                var info = eval("("+res+")");
+                var data = info.data;
+                $('#msgcount').html(data.msgcount + '个');
+                $('#ordernum').html(data.ordernum + '个');
+                $('#inventory').html(data.inventory + '个');
+                $('#commentnum').html(data.commentnum + '个');
+                $('#reflectnum').html(data.reflectnum + '个');
+            });
+        }
+        getnotice();
+        setInterval(getnotice, 3000);
+    });
+
+</script>
 </body>
 </html>

+ 336 - 306
application/admin/view/index/main.php

@@ -1,206 +1,194 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <meta charset="utf-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="renderer" content="webkit">
-    <base href="{__FRAME_PATH}">
-    <link href="css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
-    <link href="css/font-awesome.min.css?v=4.3.0" rel="stylesheet">
-
-    <!-- Morris -->
-    <link href="css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">
-
-    <!-- Gritter -->
-    <link href="js/plugins/gritter/jquery.gritter.css" rel="stylesheet">
-
-    <link href="css/animate.min.css" rel="stylesheet">
-    <link href="css/style.min.css?v=3.0.0" rel="stylesheet">
-
-</head>
-
-<body class="gray-bg">
-<div class="wrapper wrapper-content">
+{extend name="public/container"}
+{block name="head_top"}
+<!-- 全局js -->
+<script src="{__PLUG_PATH}echarts/echarts.common.min.js"></script>
+<script src="{__PLUG_PATH}echarts/theme/macarons.js"></script>
+<script src="{__PLUG_PATH}echarts/theme/westeros.js"></script>
+{/block}
+{block name="content"}
     <div class="row">
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">订单</span>
-                    <h5>待发货订单</h5>
+                    <span class="label label-danger pull-right">急</span>
+                    <h5>订单</h5>
                 </div>
                 <div class="ibox-content">
                     <h1 class="no-margins">{$topData.orderDeliveryNum}</h1>
+                    <small><a href="{:Url('order.store_order/index')}">待发货</a> </small>
                 </div>
             </div>
         </div>
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">订单</span>
-                    <h5>退换货订单</h5>
+                    <span class="label label-info pull-right"></span>
+                    <h5>订单</h5>
                 </div>
                 <div class="ibox-content">
                     <h1 class="no-margins">{$topData.orderRefundNum}</h1>
+                    <small><a href="{:Url('order.store_order/index')}">退换货</a></small>
                 </div>
             </div>
         </div>
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable" >
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">商品</span>
-                    <h5>库存预警</h5>
+                    <span class="label label-danger pull-right">急</span>
+                    <h5>商品</h5>
                 </div>
                 <div class="ibox-content">
                     <h1 class="no-margins">{$topData.stockProduct}</h1>
+                    <small><a href="{:Url('store.store_product/index',array('type'=>5))}">库存预警</a></small>
                 </div>
             </div>
         </div>
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">用户</span>
-                    <h5>待处理提现</h5>
+                    <span class="label label-danger pull-right">待</span>
+                    <h5>待提现</h5>
                 </div>
                 <div class="ibox-content">
                     <h1 class="no-margins">{$topData.treatedExtract}</h1>
+                    <small><a href="{:Url('finance.user_extract/index')}">待提现</a></small>
+                </div>
+            </div>
+        </div>
+        <div class="col-sm-3 ui-sortable">
+            <div class="ibox float-e-margins">
+                <div class="ibox-title">
+                    <span class="label label-info pull-right">昨</span>
+                    <h5>订单</h5>
+                </div>
+                <div class="ibox-content">
+                    <h1 class="no-margins">{$first_line.d_num.data}</h1>
+                    <div class="stat-percent font-bold text-navy">
+                        {$first_line.d_num.percent}%
+                        {if condition='$first_line.d_num.is_plus egt 0'}<i class="fa {if condition='$first_line.d_num.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                    </div>
+                    <small>昨日订单数</small>
+                </div>
+            </div>
+        </div>
+        <div class="col-sm-3 ui-sortable">
+            <div class="ibox float-e-margins">
+                <div class="ibox-title">
+                    <span class="label label-info pull-right">昨</span>
+                    <h5>交易</h5>
+                </div>
+                <div class="ibox-content">
+                    <h1 class="no-margins">{$first_line.d_price.data}</h1>
+                    <div class="stat-percent font-bold text-info">
+                        {$first_line.d_price.percent}%
+                        {if condition='$first_line.d_price.is_plus egt 0'}<i class="fa {if condition='$first_line.d_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                    </div>
+                    <small>昨日交易额</small>
                 </div>
             </div>
         </div>
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">订单</span>
-                    <h5>昨日订单数</h5>
+                    <span class="label label-info pull-right"></span>
+                    <h5>粉丝</h5>
                 </div>
                 <div class="ibox-content">
-                    <h1 class="no-margins">{$topData.orderNum}</h1>
+                    <h1 class="no-margins">{$first_line.day.data}</h1>
+                    <div class="stat-percent font-bold text-info">
+                        {$first_line.day.percent}%
+                        {if condition='$first_line.day.is_plus egt 0'}<i class="fa {if condition='$first_line.day.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                    </div>
+                    <small>今日新增粉丝</small>
                 </div>
             </div>
         </div>
-        <div class="col-lg-2">
+        <div class="col-sm-3 ui-sortable">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <span class="label label-info pull-right">订单</span>
-                    <h5>昨日交易额</h5>
+                    <span class="label label-info pull-right"></span>
+                    <h5>粉丝</h5>
                 </div>
                 <div class="ibox-content">
-                    <h1 class="no-margins">{$topData.orderPriceNum}</h1>
+                    <h1 class="no-margins">{$first_line.month.data}</h1>
+                    <div class="stat-percent font-bold text-info">
+                        {$first_line.month.percent}%
+                        {if condition='$first_line.month.is_plus egt 0'}<i class="fa {if condition='$first_line.month.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                    </div>
+                    <small>本月新增粉丝</small>
                 </div>
             </div>
         </div>
-<!--        <div class="col-lg-3">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-info pull-right">今天</span>-->
-<!--                    <h5>日收入</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.d_price.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-info">-->
-<!--                        {$first_line.d_price.percent}%-->
-<!--                        {if condition='$first_line.d_price.is_plus egt 0'}<i class="fa {if condition='$first_line.d_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small>总收入</small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-lg-3">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-success pull-right">月</span>-->
-<!--                    <h5>月收入</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.m_price.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-success">-->
-<!--                        {$first_line.m_price.percent}%-->
-<!--                        {if condition='$first_line.m_price.is_plus egt 0'}<i class="fa {if condition='$first_line.m_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small>总收入</small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-lg-3">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-primary pull-right">今天</span>-->
-<!--                    <h5>日增粉丝</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.day.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-navy">-->
-<!--                        {$first_line.day.percent}%-->
-<!--                        {if condition='$first_line.day.is_plus egt 0'}<i class="fa {if condition='$first_line.day.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small>新粉丝</small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
-<!--        <div class="col-lg-3">-->
-<!--            <div class="ibox float-e-margins">-->
-<!--                <div class="ibox-title">-->
-<!--                    <span class="label label-danger pull-right">月</span>-->
-<!--                    <h5>月增粉丝</h5>-->
-<!--                </div>-->
-<!--                <div class="ibox-content">-->
-<!--                    <h1 class="no-margins">{$first_line.month.data}</h1>-->
-<!--                    <div class="stat-percent font-bold text-danger">-->
-<!--                        {$first_line.month.percent}%-->
-<!--                        {if condition='$first_line.month.is_plus egt 0'}<i class="fa {if condition='$first_line.month.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}-->
-<!--                    </div>-->
-<!--                    <small>新粉丝</small>-->
-<!--                </div>-->
-<!--            </div>-->
-<!--        </div>-->
+
     </div>
+<div id="app">
     <div class="row">
         <div class="col-lg-12">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
                     <h5>订单</h5>
+                    <div class="pull-right">
+                        <div class="btn-group">
+                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'thirtyday'}" v-on:click="getlist('thirtyday')">30天</button>
+                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'week'}" v-on:click="getlist('week')">周</button>
+                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'month'}" v-on:click="getlist('month')">月</button>
+                            <button type="button" class="btn btn-xs btn-white" :class="{'active': active == 'year'}" v-on:click="getlist('year')">年</button>
+                        </div>
+                    </div>
                 </div>
                 <div class="ibox-content">
                     <div class="row">
                         <div class="col-lg-9">
-                            <div class="flot-chart">
-                                <div class="flot-chart-content" id="flot-dashboard-chart1"></div>
-                            </div>
+                            <div class="flot-chart-content echarts" ref="order_echart" id="flot-dashboard-chart1"></div>
                         </div>
                         <div class="col-lg-3">
                             <ul class="stat-list">
                                 <li>
-                                    <h2 class="no-margins ">{$first_line.m_price.data}</h2>
-                                    <small>本月销售额</small>
-                                    <div class="stat-percent">
-                                        {$first_line.m_price.percent}%
-                                        {if condition='$first_line.m_price.is_plus egt 0'}<i class="fa text-navy {if condition='$first_line.m_price.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
-                                    </div>
-                                    <div class="progress progress-mini">
-                                        <div style="width: {$first_line.m_price.percent}%;" class="progress-bar"></div>
-                                    </div>
+                                    <h2 class="no-margins ">{{pre_cycleprice}}</h2>
+                                    <small>{{precyclename}}销售额</small>
                                 </li>
                                 <li>
-                                    <h2 class="no-margins">{$second_line.order_info.first.data}</h2>
-                                    <small>本月订单总数</small>
-                                    <div class="stat-percent">
-                                        {$second_line.order_info.first.percent}%
-                                        {if condition='$second_line.order_info.first.is_plus egt 0'}<i class="fa text-navy {if condition='$second_line.order_info.first.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                                    <h2 class="no-margins ">{{cycleprice}}</h2>
+                                    <small>{{cyclename}}销售额</small>
+                                    <div class="stat-percent text-navy" v-if='cycleprice_is_plus ===1'>
+                                        {{cycleprice_percent}}%
+                                        <i  class="fa fa-level-up"></i>
+                                    </div>
+                                    <div class="stat-percent text-danger" v-else-if='cycleprice_is_plus === -1'>
+                                        {{cycleprice_percent}}%
+                                        <i class="fa fa-level-down"></i>
+                                    </div>
+                                    <div class="stat-percent" v-else>
+                                        {{cycleprice_percent}}%
                                     </div>
                                     <div class="progress progress-mini">
-                                        <div style="width: {$second_line.order_info.first.percent}%;" class="progress-bar"></div>
+                                        <div :style="{width:cycleprice_percent+'%'}" class="progress-bar box"></div>
                                     </div>
                                 </li>
                                 <li>
-                                    <h2 class="no-margins ">{$second_line.order_info.second.data}</h2>
-                                    <small>上月订单总数</small>
-                                    <div class="stat-percent">
-                                        {$second_line.order_info.second.percent}%
-                                        {if condition='$second_line.order_info.second.is_plus egt 0'}<i class="fa text-navy {if condition='$second_line.order_info.second.is_plus eq 1'}fa-level-up{else /}fa-level-down{/if}"></i>{/if}
+                                    <h2 class="no-margins ">{{pre_cyclecount}}</h2>
+                                    <small>{{precyclename}}订单总数</small>
+                                </li>
+                                <li>
+                                    <h2 class="no-margins">{{cyclecount}}</h2>
+                                    <small>{{cyclename}}订单总数</small>
+                                    <div class="stat-percent text-navy" v-if='cyclecount_is_plus ===1'>
+                                        {{cyclecount_percent}}%
+                                        <i class="fa fa-level-up"></i>
+                                    </div>
+                                    <div class="stat-percent text-danger" v-else-if='cyclecount_is_plus === -1'>
+                                        {{cyclecount_percent}}%
+                                        <i  class="fa fa-level-down"></i>
+                                    </div>
+                                    <div class="stat-percent " v-else>
+                                        {{cyclecount_percent}}%
                                     </div>
                                     <div class="progress progress-mini">
-                                        <div style="width: {$second_line.order_info.second.percent}%;" class="progress-bar"></div>
+                                        <div :style="{width:cyclecount_percent+'%'}" class="progress-bar box"></div>
                                     </div>
                                 </li>
+
+
                             </ul>
                         </div>
                     </div>
@@ -208,17 +196,17 @@
             </div>
         </div>
     </div>
-    <div class="row">
+    <div class="row" >
         <div class="col-lg-12">
             <div class="ibox float-e-margins">
                 <div class="ibox-title">
-                    <h5>收入</h5>
+                    <h5>用户</h5>
                 </div>
                 <div class="ibox-content">
                     <div class="row">
                         <div class="col-lg-12">
                             <div class="flot-chart">
-                                <div class="flot-chart-content" id="flot-dashboard-chart2"></div>
+                                <div class="flot-chart-content" ref="user_echart" id="flot-dashboard-chart2"></div>
                             </div>
                         </div>
                     </div>
@@ -227,188 +215,230 @@
         </div>
     </div>
 </div>
-
-<!-- 全局js -->
-<script src="js/jquery-2.1.1.min.js"></script>
-<script src="js/bootstrap.min.js?v=3.4.0"></script>
-
-
-
-<!-- Flot -->
-<script src="js/plugins/flot/jquery.flot.js"></script>
-<script src="js/plugins/flot/jquery.flot.tooltip.min.js"></script>
-<script src="js/plugins/flot/jquery.flot.spline.js"></script>
-<script src="js/plugins/flot/jquery.flot.resize.js"></script>
-<script src="js/plugins/flot/jquery.flot.pie.js"></script>
-<script src="js/plugins/flot/jquery.flot.symbol.js"></script>
-
-<!-- Peity -->
-<script src="js/plugins/peity/jquery.peity.min.js"></script>
-
-
-<!-- 自定义js -->
-<script src="js/content.min.js?v=1.0.0"></script>
-
-
-<!-- jQuery UI -->
-<script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>
-
-<!-- Jvectormap -->
-<script src="js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
-<script src="js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
-
-<!-- EayPIE -->
-<script src="js/plugins/easypiechart/jquery.easypiechart.js"></script>
-
-<!-- Sparkline -->
-<script src="js/plugins/sparkline/jquery.sparkline.min.js"></script>
-
-
-
+{/block}
+{block name="script"}
+<style scoped>
+    .box{width:0px;}
+</style>
 <script>
-    $(document).ready(function(){
-        var a1=[
-            {volist name="second_line.order_count" id="vo"}
-                [c({$vo.y},{$vo.m},{$vo.d}),{$vo.count}],
-            {/volist}
-        ];
-        var a2=[
-            {
-                label:"订单数",
-                data:a1,
-                color:"#1ab394",
-                bars:{
-                    show:true,
-                    align:"center",
-                    barWidth:24*60*60*600,
-                    lineWidth:0
-                }
-            }
-        ];
-        var a3={
-            xaxis:{
-                mode:"time",
-                tickSize:[1,"day"],
-                tickLength:0,
-                axisLabel:"Date",
-                axisLabelUseCanvas:true,
-                axisLabelFontSizePixels:12,
-                axisLabelFontFamily:"Arial",
-                axisLabelPadding:10,
-                color:"#838383",
+     require(['vue','axios','layer'],function(Vue,axios,layer){
+        new Vue({
+            el:"#app",
+            data:{
+                option:{},
+                myChart:{},
+                active:'thirtyday',
+                cyclename:'最近30天',
+                precyclename:'上个30天',
+                cyclecount:0,
+                cycleprice:0,
+                cyclecount_percent:0,
+                cycleprice_percent:0,
+                cyclecount_is_plus:0,
+                cycleprice_is_plus:0,
+                pre_cyclecount:0,
+                pre_cycleprice:0
             },
-            
-            yaxes:[
-                {
-                    position:"left",
-                    max:'{$second_line.order_count_max}',
-                    color:"#838383",
-                    axisLabelUseCanvas:true,
-                    axisLabelFontSizePixels:12,
-                    axisLabelFontFamily:"Arial",
-                    axisLabelPadding:3
+            methods:{
+                info:function () {
+                    var that=this;
+                    axios.get("{:Url('userchart')}").then((res)=>{
+                        that.myChart.user_echart.setOption(that.userchartsetoption(res.data.data));
+                    });
                 },
-            ],
-            legend:{
-                noColumns:1,
-                labelBoxBorderColor:"#000000",
-                position:"nw"
-            },
-            grid:{
-                hoverable:false,
-                borderWidth:0,
-                color:"#838383"
-            }
-        };
-        $.plot($("#flot-dashboard-chart1"),a2,a3);
-
-        var b1=[
-            {volist name="third_line.price_count" id="vo"}
-                [c({$vo.y},{$vo.m},{$vo.d}),{$vo.count}],
-            {/volist}
-        ];
-        var b2=[
-            {
-                label:"总金额",
-                data:b1,
-                color:"#1ab394",
-                bars:{
-                    show:true,
-                    align:"center",
-                    barWidth:24*60*60*600,
-                    lineWidth:0
-                }
-            }
-        ];
-        var b3={
-            xaxis:{
-                mode:"time",
-                tickSize:[1,"day"],
-                tickLength:0,
-                axisLabel:"Date",
-                axisLabelUseCanvas:true,
-                axisLabelFontSizePixels:12,
-                axisLabelFontFamily:"Arial",
-                axisLabelPadding:10,
-                color:"#838383",
-            },
-            yaxes:[
-                {
-                    position:"left",
-                    max:{$third_line.order_count_max},
-                    color:"#838383",
-                    axisLabelUseCanvas:true,
-                    axisLabelFontSizePixels:12,
-                    axisLabelFontFamily:"Arial",
-                    axisLabelPadding:3
+                getlist:function (e) {
+                    var that=this;
+                    var cycle = e!=null ? e :'thirtyday';
+                    axios.get("{:Url('orderchart')}?cycle="+cycle).then((res)=>{
+                            that.myChart.order_echart.clear();
+                            that.myChart.order_echart.setOption(that.orderchartsetoption(res.data.data));
+                            that.active = cycle;
+                            switch (cycle){
+                                case 'thirtyday':
+                                    that.cyclename = '最近30天';
+                                    that.precyclename = '上个30天';
+                                    break;
+                                case 'week':
+                                    that.precyclename = '上周';
+                                    that.cyclename = '本周';
+                                    break;
+                                case 'month':
+                                    that.precyclename = '上月';
+                                    that.cyclename = '本月';
+                                    break;
+                                case 'year':
+                                    that.cyclename = '去年';
+                                    that.precyclename = '今年';
+                                    break;
+                                default:
+                                    break;
+                            }
+                            that.cyclecount = res.data.data.cycle.count.data;
+                            that.cyclecount_percent = res.data.data.cycle.count.percent;
+                            that.cyclecount_is_plus = res.data.data.cycle.count.is_plus;
+                            that.cycleprice = res.data.data.cycle.price.data;
+                            that.cycleprice_percent = res.data.data.cycle.price.percent;
+                            that.cycleprice_is_plus = res.data.data.cycle.price.is_plus;
+                            that.pre_cyclecount = res.data.data.pre_cycle.count.data;
+                            that.pre_cycleprice = res.data.data.pre_cycle.price.data;
+                    });
                 },
-            ],
-            legend:{
-                noColumns:1,
-                labelBoxBorderColor:"#000000",
-                position:"nw"
-            },
-            grid:{
-                hoverable:false,
-                borderWidth:0,
-                color:"#838383"
-            }
-        };
-        $.plot($("#flot-dashboard-chart2"),b2,b3);
+                orderchartsetoption:function(data){
 
+                        this.option = {
+                            tooltip: {
+                                trigger: 'axis',
+                                axisPointer: {
+                                    type: 'cross',
+                                    crossStyle: {
+                                        color: '#999'
+                                    }
+                                }
+                            },
+                            toolbox: {
+                                feature: {
+                                    dataView: {show: true, readOnly: false},
+                                    magicType: {show: true, type: ['line', 'bar']},
+                                    restore: {show: false},
+                                    saveAsImage: {show: true}
+                                }
+                            },
+                            legend: {
+                                data:data.legend
+                            },
+                            grid: {
+                                x: 70,
+                                x2: 50,
+                                y: 60,
+                                y2: 50
+                            },
+                            xAxis: [
+                                {
+                                    type: 'category',
+                                    data: data.xAxis,
+                                    axisPointer: {
+                                        type: 'shadow'
+                                    },
+                                    axisLabel:{
+                                        interval: 0,
+                                        rotate:40
+                                    }
 
 
-        $(".chart").easyPieChart({
-            barColor:"#f8ac59",scaleLength:5,lineWidth:4,size:80
-        });
-        $(".chart2").easyPieChart({
-            barColor:"#1c84c6",scaleLength:5,lineWidth:4,size:80
-        });
-        function c(j,k,i){
-            return new Date(j,k-1,i).getTime()
-        }
-        var b=null,d=null;
+                                }
+                            ],
+                            yAxis:[{type : 'value'}],
+//                            yAxis: [
+//                                {
+//                                    type: 'value',
+//                                    name: '',
+//                                    min: 0,
+//                                    max: data.yAxis.maxprice,
+////                                    interval: 0,
+//                                    axisLabel: {
+//                                        formatter: '{value} 元'
+//                                    }
+//                                },
+//                                {
+//                                    type: 'value',
+//                                    name: '',
+//                                    min: 0,
+//                                    max: data.yAxis.maxnum,
+//                                    interval: 5,
+//                                    axisLabel: {
+//                                        formatter: '{value} 个'
+//                                    }
+//                                }
+//                            ],
+                            series: data.series
+                        };
+                    return  this.option;
+                },
+                userchartsetoption:function(data){
+                    this.option = {
+                        tooltip: {
+                            trigger: 'axis',
+                            axisPointer: {
+                                type: 'cross',
+                                crossStyle: {
+                                    color: '#999'
+                                }
+                            }
+                        },
+                        toolbox: {
+                            feature: {
+                                dataView: {show: false, readOnly: false},
+                                magicType: {show: true, type: ['line', 'bar']},
+                                restore: {show: false},
+                                saveAsImage: {show: false}
+                            }
+                        },
+                        legend: {
+                            data:data.legend
+                        },
+                        grid: {
+                            x: 70,
+                            x2: 50,
+                            y: 60,
+                            y2: 50
+                        },
+                        xAxis: [
+                            {
+                                type: 'category',
+                                data: data.xAxis,
+                                axisPointer: {
+                                    type: 'shadow'
+                                }
+                            }
+                        ],
+                        yAxis: [
+                            {
+                                type: 'value',
+                                name: '人数',
+                                min: 0,
+                                max: data.yAxis.maxnum,
+                                interval: 5,
+                                axisLabel: {
+                                    formatter: '{value} 人'
+                                }
+                            }
+                        ],
+//                        series: data.series
+                        series : [ {
+                            name : '人数',
+                            type : 'bar',
+                            barWidth : '50%',
+                            itemStyle: {
+                                normal: {
+                                    label: {
+                                        show: true, //开启显示
+                                        position: 'top', //在上方显示
+                                        textStyle: { //数值样式
+                                            color: '#666',
+                                            fontSize: 12
+                                        }
+                                    }
+                                }
+                            },
+                            data : data.series
+                        } ]
 
-        var f={"US":298,"SA":200,"DE":220,"FR":540,"CN":120,"AU":760,"BR":550,"IN":200,"GB":120,};
-        $("#world-map").vectorMap({
-            map:"world_mill_en",
-            backgroundColor:"transparent",
-            regionStyle:{
-                initial:{
-                    fill:"#e4e4e4","fill-opacity":0.9,stroke:"none","stroke-width":0,"stroke-opacity":0
+                    };
+                    return  this.option;
+                },
+                setChart:function(name,myChartname){
+                    this.myChart[myChartname] = echarts.init(name,'macarons');//初始化echart
                 }
             },
-            series:{
-                regions:[
-                    {
-                        values:f,
-                        scale:["#1ab394","#22d6b1"],
-                        normalizeFunction:"polynomial"
-                    }
-                ]
+            mounted:function () {
+                const self = this;
+                this.setChart(self.$refs.order_echart,'order_echart');//订单图表
+                this.setChart(self.$refs.user_echart,'user_echart');//用户图表
+                this.info();
+                this.getlist();
+
             }
-        })
+        });
     });
 </script>
-</body>
-</html>
+{/block}

File diff suppressed because it is too large
+ 22 - 0
public/static/plug/echarts/echarts.common.min.js


+ 540 - 0
public/static/plug/echarts/theme/macarons.js

@@ -0,0 +1,540 @@
+
+(function (root, factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define(['exports', 'echarts'], factory);
+    } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
+        // CommonJS
+        factory(exports, require('echarts'));
+    } else {
+        // Browser globals
+        factory({}, root.echarts);
+    }
+}(this, function (exports, echarts) {
+    var log = function (msg) {
+        if (typeof console !== 'undefined') {
+            console && console.error && console.error(msg);
+        }
+    };
+    if (!echarts) {
+        log('ECharts is not Loaded');
+        return;
+    }
+    echarts.registerTheme('macarons', {
+        "color": [
+            "#2ec7c9",
+            "#b6a2de",
+            "#5ab1ef",
+            "#ffb980",
+            "#d87a80",
+            "#8d98b3",
+            "#e5cf0d",
+            "#97b552",
+            "#95706d",
+            "#dc69aa",
+            "#07a2a4",
+            "#9a7fd1",
+            "#588dd5",
+            "#f5994e",
+            "#c05050",
+            "#59678c",
+            "#c9ab00",
+            "#7eb00a",
+            "#6f5553",
+            "#c14089"
+        ],
+        "backgroundColor": "rgba(0,0,0,0)",
+        "textStyle": {},
+        "title": {
+            "textStyle": {
+                "color": "#008acd"
+            },
+            "subtextStyle": {
+                "color": "#aaaaaa"
+            }
+        },
+        "line": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 1
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": 2
+                }
+            },
+            "symbolSize": 3,
+            "symbol": "emptyCircle",
+            "smooth": true
+        },
+        "radar": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 1
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": 2
+                }
+            },
+            "symbolSize": 3,
+            "symbol": "emptyCircle",
+            "smooth": true
+        },
+        "bar": {
+            "itemStyle": {
+                "normal": {
+                    "barBorderWidth": 0,
+                    "barBorderColor": "#ccc"
+                },
+                "emphasis": {
+                    "barBorderWidth": 0,
+                    "barBorderColor": "#ccc"
+                }
+            }
+        },
+        "pie": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "scatter": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "boxplot": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "parallel": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "sankey": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "funnel": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "gauge": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "candlestick": {
+            "itemStyle": {
+                "normal": {
+                    "color": "#d87a80",
+                    "color0": "#2ec7c9",
+                    "borderColor": "#d87a80",
+                    "borderColor0": "#2ec7c9",
+                    "borderWidth": 1
+                }
+            }
+        },
+        "graph": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": 1,
+                    "color": "#aaaaaa"
+                }
+            },
+            "symbolSize": 3,
+            "symbol": "emptyCircle",
+            "smooth": true,
+            "color": [
+                "#2ec7c9",
+                "#b6a2de",
+                "#5ab1ef",
+                "#ffb980",
+                "#d87a80",
+                "#8d98b3",
+                "#e5cf0d",
+                "#97b552",
+                "#95706d",
+                "#dc69aa",
+                "#07a2a4",
+                "#9a7fd1",
+                "#588dd5",
+                "#f5994e",
+                "#c05050",
+                "#59678c",
+                "#c9ab00",
+                "#7eb00a",
+                "#6f5553",
+                "#c14089"
+            ],
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                }
+            }
+        },
+        "map": {
+            "itemStyle": {
+                "normal": {
+                    "areaColor": "#dddddd",
+                    "borderColor": "#eeeeee",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "areaColor": "rgba(254,153,78,1)",
+                    "borderColor": "#444444",
+                    "borderWidth": 1
+                }
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#d87a80"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "rgb(100,0,0)"
+                    }
+                }
+            }
+        },
+        "geo": {
+            "itemStyle": {
+                "normal": {
+                    "areaColor": "#dddddd",
+                    "borderColor": "#eeeeee",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "areaColor": "rgba(254,153,78,1)",
+                    "borderColor": "#444444",
+                    "borderWidth": 1
+                }
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#d87a80"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "rgb(100,0,0)"
+                    }
+                }
+            }
+        },
+        "categoryAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#008acd"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#333"
+                }
+            },
+            "splitLine": {
+                "show": false,
+                "lineStyle": {
+                    "color": [
+                        "#eee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.3)",
+                        "rgba(200,200,200,0.3)"
+                    ]
+                }
+            }
+        },
+        "valueAxis": {
+            "axisLine": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#008acd"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#333"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.3)",
+                        "rgba(200,200,200,0.3)"
+                    ]
+                }
+            }
+        },
+        "logAxis": {
+            "axisLine": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#008acd"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#333"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": true,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.3)",
+                        "rgba(200,200,200,0.3)"
+                    ]
+                }
+            }
+        },
+        "timeAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#008acd"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#333"
+                }
+            },
+            "splitLine": {
+                "show": false,
+                "lineStyle": {
+                    "color": [
+                        "#eee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.3)",
+                        "rgba(200,200,200,0.3)"
+                    ]
+                }
+            }
+        },
+        "toolbox": {
+            "iconStyle": {
+                "normal": {
+                    "borderColor": "#2ec7c9"
+                },
+                "emphasis": {
+                    "borderColor": "#18a4a6"
+                }
+            }
+        },
+        "legend": {
+            "textStyle": {
+                "color": "#333333"
+            }
+        },
+        "tooltip": {
+            "axisPointer": {
+                "lineStyle": {
+                    "color": "#008acd",
+                    "width": "1"
+                },
+                "crossStyle": {
+                    "color": "#008acd",
+                    "width": "1"
+                }
+            }
+        },
+        "timeline": {
+            "lineStyle": {
+                "color": "#008acd",
+                "width": 1
+            },
+            "itemStyle": {
+                "normal": {
+                    "color": "#008acd",
+                    "borderWidth": 1
+                },
+                "emphasis": {
+                    "color": "#a9334c"
+                }
+            },
+            "controlStyle": {
+                "normal": {
+                    "color": "#008acd",
+                    "borderColor": "#008acd",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "color": "#008acd",
+                    "borderColor": "#008acd",
+                    "borderWidth": 0.5
+                }
+            },
+            "checkpointStyle": {
+                "color": "#2ec7c9",
+                "borderColor": "rgba(46,199,201,0.4)"
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#008acd"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "#008acd"
+                    }
+                }
+            }
+        },
+        "visualMap": {
+            "color": [
+                "#5ab1ef",
+                "#e0ffff"
+            ]
+        },
+        "dataZoom": {
+            "backgroundColor": "rgba(47,69,84,0)",
+            "dataBackgroundColor": "rgba(239,239,255,1)",
+            "fillerColor": "rgba(182,162,222,0.2)",
+            "handleColor": "#008acd",
+            "handleSize": "100%",
+            "textStyle": {
+                "color": "#333333"
+            }
+        },
+        "markPoint": {
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                }
+            }
+        }
+    });
+}));

+ 512 - 0
public/static/plug/echarts/theme/westeros.js

@@ -0,0 +1,512 @@
+(function (root, factory) {
+    if (typeof define === 'function' && define.amd) {
+        // AMD. Register as an anonymous module.
+        define(['exports', 'echarts'], factory);
+    } else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
+        // CommonJS
+        factory(exports, require('echarts'));
+    } else {
+        // Browser globals
+        factory({}, root.echarts);
+    }
+}(this, function (exports, echarts) {
+    var log = function (msg) {
+        if (typeof console !== 'undefined') {
+            console && console.error && console.error(msg);
+        }
+    };
+    if (!echarts) {
+        log('ECharts is not Loaded');
+        return;
+    }
+    echarts.registerTheme('westeros', {
+        "color": [
+            "#516b91",
+            "#59c4e6",
+            "#edafda",
+            "#93b7e3",
+            "#a5e7f0",
+            "#cbb0e3"
+        ],
+        "backgroundColor": "rgba(0,0,0,0)",
+        "textStyle": {},
+        "title": {
+            "textStyle": {
+                "color": "#516b91"
+            },
+            "subtextStyle": {
+                "color": "#93b7e3"
+            }
+        },
+        "line": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": "2"
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": "2"
+                }
+            },
+            "symbolSize": "6",
+            "symbol": "emptyCircle",
+            "smooth": true
+        },
+        "radar": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": "2"
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": "2"
+                }
+            },
+            "symbolSize": "6",
+            "symbol": "emptyCircle",
+            "smooth": true
+        },
+        "bar": {
+            "itemStyle": {
+                "normal": {
+                    "barBorderWidth": 0,
+                    "barBorderColor": "#ccc"
+                },
+                "emphasis": {
+                    "barBorderWidth": 0,
+                    "barBorderColor": "#ccc"
+                }
+            }
+        },
+        "pie": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "scatter": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "boxplot": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "parallel": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "sankey": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "funnel": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "gauge": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                },
+                "emphasis": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            }
+        },
+        "candlestick": {
+            "itemStyle": {
+                "normal": {
+                    "color": "#edafda",
+                    "color0": "transparent",
+                    "borderColor": "#d680bc",
+                    "borderColor0": "#8fd3e8",
+                    "borderWidth": "2"
+                }
+            }
+        },
+        "graph": {
+            "itemStyle": {
+                "normal": {
+                    "borderWidth": 0,
+                    "borderColor": "#ccc"
+                }
+            },
+            "lineStyle": {
+                "normal": {
+                    "width": 1,
+                    "color": "#aaaaaa"
+                }
+            },
+            "symbolSize": "6",
+            "symbol": "emptyCircle",
+            "smooth": true,
+            "color": [
+                "#516b91",
+                "#59c4e6",
+                "#edafda",
+                "#93b7e3",
+                "#a5e7f0",
+                "#cbb0e3"
+            ],
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                }
+            }
+        },
+        "map": {
+            "itemStyle": {
+                "normal": {
+                    "areaColor": "#f3f3f3",
+                    "borderColor": "#516b91",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "areaColor": "rgba(165,231,240,1)",
+                    "borderColor": "#516b91",
+                    "borderWidth": 1
+                }
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#000000"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "rgb(81,107,145)"
+                    }
+                }
+            }
+        },
+        "geo": {
+            "itemStyle": {
+                "normal": {
+                    "areaColor": "#f3f3f3",
+                    "borderColor": "#516b91",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "areaColor": "rgba(165,231,240,1)",
+                    "borderColor": "#516b91",
+                    "borderWidth": 1
+                }
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#000000"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "rgb(81,107,145)"
+                    }
+                }
+            }
+        },
+        "categoryAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#cccccc"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#999999"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eeeeee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.05)",
+                        "rgba(200,200,200,0.02)"
+                    ]
+                }
+            }
+        },
+        "valueAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#cccccc"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#999999"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eeeeee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.05)",
+                        "rgba(200,200,200,0.02)"
+                    ]
+                }
+            }
+        },
+        "logAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#cccccc"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#999999"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eeeeee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.05)",
+                        "rgba(200,200,200,0.02)"
+                    ]
+                }
+            }
+        },
+        "timeAxis": {
+            "axisLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": "#cccccc"
+                }
+            },
+            "axisTick": {
+                "show": false,
+                "lineStyle": {
+                    "color": "#333"
+                }
+            },
+            "axisLabel": {
+                "show": true,
+                "textStyle": {
+                    "color": "#999999"
+                }
+            },
+            "splitLine": {
+                "show": true,
+                "lineStyle": {
+                    "color": [
+                        "#eeeeee"
+                    ]
+                }
+            },
+            "splitArea": {
+                "show": false,
+                "areaStyle": {
+                    "color": [
+                        "rgba(250,250,250,0.05)",
+                        "rgba(200,200,200,0.02)"
+                    ]
+                }
+            }
+        },
+        "toolbox": {
+            "iconStyle": {
+                "normal": {
+                    "borderColor": "#999999"
+                },
+                "emphasis": {
+                    "borderColor": "#666666"
+                }
+            }
+        },
+        "legend": {
+            "textStyle": {
+                "color": "#999999"
+            }
+        },
+        "tooltip": {
+            "axisPointer": {
+                "lineStyle": {
+                    "color": "#cccccc",
+                    "width": 1
+                },
+                "crossStyle": {
+                    "color": "#cccccc",
+                    "width": 1
+                }
+            }
+        },
+        "timeline": {
+            "lineStyle": {
+                "color": "#8fd3e8",
+                "width": 1
+            },
+            "itemStyle": {
+                "normal": {
+                    "color": "#8fd3e8",
+                    "borderWidth": 1
+                },
+                "emphasis": {
+                    "color": "#8fd3e8"
+                }
+            },
+            "controlStyle": {
+                "normal": {
+                    "color": "#8fd3e8",
+                    "borderColor": "#8fd3e8",
+                    "borderWidth": 0.5
+                },
+                "emphasis": {
+                    "color": "#8fd3e8",
+                    "borderColor": "#8fd3e8",
+                    "borderWidth": 0.5
+                }
+            },
+            "checkpointStyle": {
+                "color": "#8fd3e8",
+                "borderColor": "rgba(138,124,168,0.37)"
+            },
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#8fd3e8"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "#8fd3e8"
+                    }
+                }
+            }
+        },
+        "visualMap": {
+            "color": [
+                "#516b91",
+                "#59c4e6",
+                "#a5e7f0"
+            ]
+        },
+        "dataZoom": {
+            "backgroundColor": "rgba(0,0,0,0)",
+            "dataBackgroundColor": "rgba(255,255,255,0.3)",
+            "fillerColor": "rgba(167,183,204,0.4)",
+            "handleColor": "#a7b7cc",
+            "handleSize": "100%",
+            "textStyle": {
+                "color": "#333333"
+            }
+        },
+        "markPoint": {
+            "label": {
+                "normal": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                },
+                "emphasis": {
+                    "textStyle": {
+                        "color": "#eeeeee"
+                    }
+                }
+            }
+        }
+    });
+}));

+ 27 - 19
public/system/frame/css/style.min.css

@@ -36,7 +36,7 @@ body.body-small .navbar-top-links li:last-child{margin-right:10px}
 .dropdown-alerts li a,.dropdown-messages li a{font-size:12px}
 .dropdown-alerts li em,.dropdown-messages li em{font-size:10px}
 .nav.navbar-top-links .dropdown-alerts a{font-size:12px}
-.nav-header{padding:33px 25px}
+.nav-header{padding:20px 25px}
 .nav>li.active{border-left:4px solid #0092DC;background:#293846}
 .nav.nav-second-level>li.active{border:none}
 .nav.nav-second-level.collapse[style]{height:auto!important}
@@ -77,6 +77,7 @@ body.mini-navbar .navbar-default .nav>li>.nav-second-level li a{font-size:12px;b
 .body-small .navbar-fixed-top{margin-left:0}
 body.mini-navbar .navbar-static-side{width:70px}
 body.mini-navbar .nav-label,body.mini-navbar .navbar-default .nav li a span,body.mini-navbar .profile-element{display:none}
+body.mini-navbar .navbar-default .nav .nav-second-level li a span{display: block}
 body.canvas-menu .profile-element{display:block}
 body:not(.fixed-sidebar):not(.canvas-menu).mini-navbar .nav-second-level{display:none}
 body.mini-navbar .navbar-default .nav>li>a{font-size:16px}
@@ -92,8 +93,10 @@ body.body-small.fixed-sidebar.mini-navbar #page-wrapper,body.fixed-sidebar.mini-
 body.body-small.fixed-sidebar.mini-navbar .navbar-static-side{width:70px}
 .fixed-sidebar.mini-navbar .nav li>.nav-second-level{display:none}
 .fixed-sidebar.mini-navbar .nav li.active{border-left-width:0}
-.fixed-sidebar.mini-navbar .slimScrollDiv .nav{position:absolute !important;}
-.canvas-menu.mini-navbar .nav li:hover>.nav-second-level,.fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level{position:absolute;left:70px;top:0;background-color:#2f4050;padding:10px 10px 0;font-size:12px;display:block;min-width:140px;border-radius:2px}
+.fixed-sidebar.mini-navbar .nav{position:absolute !important;}
+.fixed-sidebar.mini-navbar .nav-second-level{position:absolute !important;}
+.fixed-sidebar.mini-navbar .slimScrollDiv .nav-third-level{position:static !important;}
+.canvas-menu.mini-navbar .nav li:hover>.nav-second-level,.fixed-sidebar.mini-navbar .nav li:hover>.nav-second-level{position:absolute;left:70px;top:0;background-color:#2f4050;padding:10px 10px 0;font-size:12px;display:block;min-width:160px;border-radius:2px}
 body.fixed-sidebar.mini-navbar .navbar-default .nav>li>.nav-second-level li a{font-size:12px;border-radius:3px}
 body.canvas-menu.mini-navbar .navbar-default .nav>li>.nav-second-level li a{font-size:13px;border-radius:3px}
 .canvas-menu.mini-navbar .nav-second-level li a,.fixed-sidebar.mini-navbar .nav-second-level li a{padding:10px 10px 10px 15px}
@@ -266,7 +269,7 @@ a.list-group-item.active,a.list-group-item.active:focus,a.list-group-item.active
 .elements-list .list-group-item.active,.elements-list .list-group-item:hover{background:#f3f3f4;color:inherit;border-color:#e7eaec;border-radius:0}
 .elements-list li.active{-webkit-transition:none;transition:none}
 .element-detail-box{padding:25px}
-.flot-chart{display:block;height:200px}
+.flot-chart{display:block;height:260px}
 .widget .flot-chart.dashboard-chart{display:block;height:120px;margin-top:40px}
 .flot-chart.dashboard-chart{display:block;height:180px;margin-top:40px}
 .flot-chart-content{width:100%;height:100%}
@@ -512,12 +515,12 @@ a.forum-item-title:hover{color:inherit}
 .sidebard-panel .list-group{margin-bottom:10px}
 .sidebard-panel .list-group .list-group-item{padding:5px 0;font-size:12px;border:0}
 .sidebar-content .wrapper,.wrapper.sidebar-content{padding-right:240px!important}
-#right-sidebar{background-color:#fff;border-left:1px solid #e7eaec;border-top:1px solid #e7eaec;overflow:hidden;position:fixed;top:60px;width:260px!important;z-index:1009;bottom:0;right:-260px}
+#right-sidebar{background-color:#fff;border-left:1px solid #e7eaec;border-top:1px solid #e7eaec;overflow:hidden;position:fixed;top:40px;width:260px!important;z-index:1009;bottom:0;right:-260px}
 #right-sidebar.sidebar-open{right:0}
 #right-sidebar.sidebar-open.sidebar-top{top:0;border-top:none}
-.sidebar-container ul.nav-tabs{border:none}
+.sidebar-container ul.nav-tabs{border:none;width: 100%;}
 .sidebar-container ul.nav-tabs.navs-4 li{width:25%}
-.sidebar-container ul.nav-tabs.navs-3 li{width:33.3333%}
+.sidebar-container ul.nav-tabs.navs-3 li{width:50%}
 .sidebar-container ul.nav-tabs.navs-2 li{width:50%}
 .sidebar-container ul.nav-tabs li{border:none}
 .sidebar-container ul.nav-tabs li a{border:none;padding:12px 10px;margin:0;border-radius:0;background:#2f4050;color:#fff;text-align:center;border-right:1px solid #334556}
@@ -528,8 +531,8 @@ a.forum-item-title:hover{color:inherit}
 .sidebar-container .sidebar-message:nth-child(2n+2){background:#f9f9f9}
 .sidebar-container ul.sidebar-list li a{text-decoration:none;color:inherit}
 .sidebar-container .sidebar-content{padding:15px 20px;font-size:12px}
-.sidebar-container .sidebar-title{background:#f9f9f9;padding:20px;border-bottom:1px solid #e7eaec}
-.sidebar-container .sidebar-title h3{margin-bottom:3px;padding-left:2px}
+.sidebar-container .sidebar-title{background:#f9f9f9;padding:20px;border-bottom:1px solid #e7eaec;margin-top:1px;}
+.sidebar-container .sidebar-title h3{margin-bottom:3px;padding-left:2px;}
 .sidebar-container .tab-content h4{margin-bottom:5px}
 .sidebar-container .sidebar-message>a>.pull-left{margin-right:10px}
 .sidebar-container .sidebar-message>a{text-decoration:none;color:inherit}
@@ -594,11 +597,16 @@ nav.page-tabs .page-tabs-content{float:left}
 .page-tabs a{display:block;float:left;border-right:solid 1px #eee;padding:0 15px}
 .page-tabs a i:hover{color:#c00}
 .content-tabs .roll-nav:hover,.page-tabs a:hover{color:#777;background:#f2f2f2;cursor:pointer}
-.roll-right.J_tabRight{right:201px}
-.roll-right.btn-group{right:120px;width:80px;padding:0}
-.roll-right.btn-group button{width:80px}
-.roll-right.J_tabRefresh{background:#fff;height:40px;width:60px;outline:0}
-.roll-right.J_tabReply{background:#fff;height:40px;width:60px;right:60px;outline:0}
+.roll-right.btn-group{right:201px;width:50px;padding:0}
+.roll-right.btn-group button{width:50px}
+.roll-right.J_tabLeft{right:290px}
+.roll-right.J_tabRight{right:250px}
+.roll-right.J_tabReply{background:#fff;height:40px;width:40px;right:160px;outline:0}
+.roll-right.J_tabRefresh{background:#fff;height:40px;width:40px;outline:0;right:120px;}
+.roll-right.J_tabFullScreen{background:#fff;height:40px;width:40px;outline:0;right:80px;}
+.roll-right.J_notice{background:#fff;height:40px;width:40px;outline:0;right:40px;}
+.roll-right.J_notice .badge{padding: 3px;position: absolute;left: 18px;z-index: 100;}
+.roll-right.J_tabSetting{background:#fff;height:40px;width:40px;outline:0;right:0;}
 .dropdown-menu-right{left:auto}
 #content-main{height:calc(100% - 78px);overflow:hidden}
 .fixed-nav #content-main{height:calc(100% - 80px);overflow:hidden}
@@ -1209,8 +1217,8 @@ body.rtls .top-navigation #page-wrapper,body.rtls .top-navigation .footer.fixed,
 .skin-name a{text-transform:uppercase}
 .setings-item a{color:#fff}
 .blue-skin,.default-skin,.ultra-skin,.yellow-skin{text-align:center}
-.default-skin{font-weight:600;background:#0092DC}
-.default-skin:hover{background:#199d82}
+.default-skin{font-weight:600;background:#2F4050}
+.default-skin:hover{background:#293846}
 .blue-skin{font-weight:600;background:url(patterns/header-profile-skin-1.png) repeat scroll 0 0}
 .blue-skin:hover{background:#0d8ddb}
 .yellow-skin{font-weight:600;background:url(patterns/header-profile-skin-3.png) repeat scroll 0 100%}
@@ -1231,7 +1239,6 @@ body.rtls .top-navigation #page-wrapper,body.rtls .top-navigation .footer.fixed,
 .skin-1 .nav>li.active{background:#3a4459}
 .skin-1 .nav>li>a{color:#9ea6b9}
 .skin-1 .nav>li.active>a{color:#fff}
-.skin-1 .navbar-minimalize{background:#0e9aef;border-color:#0e9aef}
 body.skin-1{background:#3e495f}
 .skin-1 .navbar-static-top{background:#fff}
 .skin-1 .dashboard-header{background:0 0;border-bottom:none!important;border-top:none;padding:20px 30px 10px}
@@ -1265,7 +1272,6 @@ body.boxed-layout.skin-3 #wrapper{background:#3e2c42}
 .fixed-nav.skin-3 .navbar-fixed-top{background:#fff}
 .skin-3 .nav>li>a{color:#948b96}
 .skin-3 .nav>li.active>a{color:#fff}
-.skin-3 .navbar-minimalize{background:#ecba52;border-color:#ecba52}
 body.skin-3{background:#3e2c42}
 .skin-3 .navbar-static-top{background:#fff}
 .skin-3 .dashboard-header{background:0 0;border-bottom:none!important;border-top:none;padding:20px 30px 10px}
@@ -1303,6 +1309,7 @@ body.skin-3{background:#3e2c42}
 .nav-close{padding:10px;position:absolute;right:0;top:0;font-size:1.4em;cursor:pointer;z-index:10;display:none;color:rgba(255,255,255,.3)}
 @media (max-width:350px){body.fixed-sidebar.mini-navbar .navbar-static-side{width:0}
     .nav-close{display:block}
+    #side-menu{position:relative !important;}
     .timeline-item .date{text-align:left;width:110px;position:relative;padding-top:30px}
     .timeline-item .date i{position:absolute;top:0;left:15px;padding:5px;width:30px;text-align:center;border:1px solid #e7eaec;background:#f8f8f8}
     .timeline-item .content{border-left:none;border-top:1px solid #e7eaec;padding-top:10px;min-height:100px}
@@ -1335,7 +1342,7 @@ body.skin-3{background:#3e2c42}
 .checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{margin-top:-4px}
 @media (max-width:1000px){.welcome-message{display:none}
 }
-.echarts{height:240px}
+.echarts{height:280px}
 .checkbox-inline,.checkbox-inline+.checkbox-inline,.radio-inline,.radio-inline+.radio-inline{margin:0 15px 0 0}
 .navbar-toggle{background-color:#fff}
 .J_menuTab{-webkit-transition:all .3s ease-out 0s;transition:all .3s ease-out 0s}
@@ -1370,6 +1377,7 @@ body.skin-3{background:#3e2c42}
     body.mini-navbar #page-wrapper{margin:0!important}
     .nav-close{display:block}
     #page-wrapper{margin-left:0!important}
+    #side-menu{position:relative !important;}
     body.canvas-menu .navbar-static-side,body.fixed-sidebar .navbar-static-side{width:60%}
     .pace-done .dashbard-1{transform:translate3d(59%,0,0)}
     .mini-navbar .dashbard-1{transform:translate3d(0,0,0)}

+ 5 - 3
public/system/frame/js/contabs.min.js

@@ -7,6 +7,7 @@ $(function() {
         return k
     }
     function g(n) {
+
         var o = f($(n).prevAll()),
             q = f($(n).nextAll());
         var l = f($(".content-tabs").children().not(".J_menuTabs"));
@@ -102,12 +103,14 @@ $(function() {
         if (o == undefined || $.trim(o).length == 0) {
             return false
         }
+        if(localStorage.getItem("refresh") == "on"){
+            ref();//点击左边菜单刷新
+        }
         $(".J_menuTab").each(function() {
             if ($(this).data("id") == o) {
                 if (!$(this).hasClass("active")) {
                     $(this).addClass("active").siblings(".J_menuTab").removeClass("active");
                     g(this);
-                    ref();
                     $(".J_mainContent .J_iframe").each(function() {
                         if ($(this).data("id") == o) {
                             $(this).show().siblings(".J_iframe").hide();
@@ -239,8 +242,7 @@ $(function() {
     })
     //返回
     function rep() {
-        //$(".J_iframe:visible")[0].contentWindow.history.go(-1);
-        window.frames[$(".page-tabs-content .active").index()].history.go(-1);
+        $(".J_iframe:visible")[0].contentWindow.history.go(-1);
     }
     $(".J_tabReply").on("click", rep);
     //刷新

File diff suppressed because it is too large
+ 181 - 1
public/system/frame/js/hplus.min.js