Răsfoiți Sursa

大屏修改租赁

moonsflyer 8 luni în urmă
părinte
comite
558d3cfbe1
2 a modificat fișierele cu 18 adăugiri și 10 ștergeri
  1. 3 0
      app/count/controller/IndexController.php
  2. 15 10
      app/count/view/count/index.html

+ 3 - 0
app/count/controller/IndexController.php

@@ -19,6 +19,7 @@
 namespace app\count\controller;
 
 
+use app\common\model\asset\AssetLeaseInfo;
 use app\common\model\Order;
 use app\common\model\OrderGoods;
 use app\common\model\GoodsCategory as GoodsCategoryModel;
@@ -339,6 +340,7 @@ class IndexController extends BaseAdminController
         $leaseing = 0;
         $leaseend = 0;
         $demain = 'https://admin.gxsmlt.com/';
+//        $demain = 'http://zhgx.asset.deom.com/';
         $asset_url = $demain.'/adminapi/asset.asset/getAssetData';
         $asset_info = httpRequest($asset_url);
         $asset_info = json_decode($asset_info,true);
@@ -372,6 +374,7 @@ class IndexController extends BaseAdminController
         $asset_infos['total_asset_num']=$total_asset_num;
 
         $data['asset_info'] = $asset_infos;
+        $data['asset_lease_info'] = json_encode($a_data['pay_info']);
         /**资产数据 end**/
 //        dump($data);
         return view('/count/index', $data);

+ 15 - 10
app/count/view/count/index.html

@@ -304,6 +304,10 @@
 		<input id="month_arr_data" value="{$order_refund_info.MonthData}" hidden/>
 		<input id="order_month_info" value="{$order_refund_info.order_month_info}" hidden/>
 		<input id="refund_month_info" value="{$order_refund_info.refund_month_info}" hidden/>
+		<input id="leaseing" value="{$asset_info.leaseing}" hidden/>
+		<input id="unlease" value="{$asset_info.unlease}" hidden/>
+		<input id="leaseend" value="{$asset_info.leaseend}" hidden/>
+		<input id="pay_info" value="{$asset_lease_info}" hidden>
 	</div>
 </body>
 <script >
@@ -398,6 +402,11 @@
 
 		var month_data = JSON.parse(document.getElementById('month_data').value);
 		var month_order_data = JSON.parse(document.getElementById('month_order_data').value);
+
+		var unlease = JSON.parse(document.getElementById('unlease').value);
+		var leaseing = JSON.parse(document.getElementById('leaseing').value);
+		var leaseend = JSON.parse(document.getElementById('leaseend').value);
+		var pay_info = JSON.parse(document.getElementById('pay_info').value);
 		// 基于准备好的dom,初始化echarts实例
 		var myChart = echarts.init(document.getElementById('fb01'));
 		var myChart2 = echarts.init(document.getElementById('fb02'));
@@ -427,7 +436,7 @@
 			},
 			series: [
 				{
-					name:'年龄分布',
+					name:'资产分布',
 					type:'pie',
 					center: ['35%', '50%'],
 					radius: ['40%', '50%'],
@@ -436,9 +445,9 @@
 					labelLine: {show:false},
 					data:[
 
-						{value:4, name:'租赁中'},
-						{value:2, name:'闲置中'},
-						{value:2, name:'待续约'}
+						{value:leaseing, name:'租赁中'},
+						{value:unlease, name:'闲置中'},
+						{value:leaseend, name:'待续约'}
 					]
 				}
 			]
@@ -465,18 +474,14 @@
 			},
 			series: [
 				{
-					name:'学历构成',
+					name:'费用构成',
 					type:'pie',
 					center: ['40%', '50%'],
 					radius: ['40%', '50%'],
 					color: ['#62c98d', '#2f89cf', '#4cb9cf', '#e0c828','#e58c00','#eb295b'],
 					label: {show:false},
 					labelLine: {show:false},
-					data:[
-						{value:10, name:'已缴费'},
-						{value:20, name:'未缴费'}
-
-					]
+					data:pay_info
 				}
 			]
 		};