|
@@ -46,7 +46,8 @@ class Preview extends CatchController
|
|
|
// $deviceList=$this->deviceModel->dataRange()->limit($start,$limit)->cache(60)->column('id,point_x,point_y,addr,well_type');
|
|
|
// var_dump($deviceList);
|
|
|
$addrList=array();
|
|
|
- for($i=0;$i<50;$i++){
|
|
|
+ $addrList1=array();
|
|
|
+ for($i=0;$i<20;$i++){
|
|
|
$a=mt_rand();
|
|
|
$b=mt_getrandmax();
|
|
|
$c=$a/$b;
|
|
@@ -56,12 +57,23 @@ class Preview extends CatchController
|
|
|
// var_dump($lat);
|
|
|
$item=array('value'=>[$lng, $lat],'name'=>"测试风场".$i,'address'=>'风场位置'.$i,'number'=>mt_rand(0, 20));
|
|
|
array_push($addrList,$item);
|
|
|
+
|
|
|
+ $a=mt_rand();
|
|
|
+ $b=mt_getrandmax();
|
|
|
+ $c=$a/$b;
|
|
|
+ $lng=mt_rand(100, 118)+$c;
|
|
|
+ $lat=mt_rand(25, 35)+$c;
|
|
|
+ // var_dump($lng);
|
|
|
+ // var_dump($lat);
|
|
|
+ $item=array('value'=>[$lng, $lat],'name'=>"测试风场".$i,'address'=>'风场位置'.$i,'number'=>mt_rand(0, 20));
|
|
|
+ array_push($addrList1,$item);
|
|
|
}
|
|
|
// foreach($deviceList as $val){
|
|
|
// $item=array('value'=>[$val['point_y'], $val['point_x']],'name'=>$val['addr']);
|
|
|
// array_push($addrList,$item);
|
|
|
// }
|
|
|
$res['addrList']=$addrList;
|
|
|
+ $res['addrList1']=$addrList1;
|
|
|
// $res['total']=$this->deviceModel->dataRange()->count();
|
|
|
$res['total']=80;
|
|
|
return CatchResponse::success($res);
|