|
@@ -23,8 +23,7 @@ class Report extends CatchController
|
|
*/
|
|
*/
|
|
public function homePageCountData(Request $request)
|
|
public function homePageCountData(Request $request)
|
|
{
|
|
{
|
|
- // 基站数据
|
|
|
|
- // $station_data = $this->reportModel->getStationCountData() ?: [];
|
|
|
|
|
|
+
|
|
// 部门数据
|
|
// 部门数据
|
|
$department_data = $this->reportModel->getDepartmentCountData() ?: [];
|
|
$department_data = $this->reportModel->getDepartmentCountData() ?: [];
|
|
// 用户数据
|
|
// 用户数据
|
|
@@ -55,4 +54,155 @@ class Report extends CatchController
|
|
|
|
|
|
return CatchResponse::success($data);
|
|
return CatchResponse::success($data);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 设备类型统计
|
|
|
|
+ * @param Request $request
|
|
|
|
+ */
|
|
|
|
+ public function hydraulicCount(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $list =array(
|
|
|
|
+ ['type'=>'液压泵','name'=>'在线','value'=>103],
|
|
|
|
+ ['type'=>'液压泵','name'=>'离线','value'=>17],
|
|
|
|
+ ['type'=>'液压泵','name'=>'其他','value'=>28],
|
|
|
|
+ ['type'=>'液压泵','name'=>'总数','value'=>148],
|
|
|
|
+
|
|
|
|
+ ['type'=>'液压扳手','name'=>'合格','value'=>140],
|
|
|
|
+ ['type'=>'液压扳手','name'=>'不合格','value'=>24],
|
|
|
|
+ ['type'=>'液压扳手','name'=>'总数','value'=>164],
|
|
|
|
+ );
|
|
|
|
+ $pump_bar=array(
|
|
|
|
+ 'xData'=>['总数','B1','B2','B3','B4','B5',],
|
|
|
|
+ 'yData'=>[250,100,20,30,60,40],
|
|
|
|
+ );
|
|
|
|
+ $pump_pie=array(
|
|
|
|
+ ['name'=>'在线','value'=>113],
|
|
|
|
+ ['name'=>'离线','value'=>17],
|
|
|
|
+ ['name'=>'其他','value'=>18],
|
|
|
|
+ );
|
|
|
|
+ $wrench_bar=array(
|
|
|
|
+ 'xData'=>['总数','A1','A2','A3','A4','A5',],
|
|
|
|
+ 'yData'=>[230,103,17,50,35,25],
|
|
|
|
+ );
|
|
|
|
+ $wrench_pie=array(
|
|
|
|
+ ['name'=>'合格','value'=>103],
|
|
|
|
+ ['name'=>'不合格','value'=>17],
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ $data=array(
|
|
|
|
+ 'list'=>$list,
|
|
|
|
+ 'pump_bar'=>$pump_bar,
|
|
|
|
+ 'pump_pie'=>$pump_pie,
|
|
|
|
+ 'wrench_bar'=>$wrench_bar,
|
|
|
|
+ 'wrench_pie'=>$wrench_pie,
|
|
|
|
+ );
|
|
|
|
+ return CatchResponse::success($data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 风场设备统计
|
|
|
|
+ * @param Request $request
|
|
|
|
+ */
|
|
|
|
+ public function windCount(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $list =array(
|
|
|
|
+ ['name'=>'风场1','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场2','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场3','total'=>42,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场4','total'=>10,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场5','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场6','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场7','total'=>123,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场8','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+ ['name'=>'风场9','total'=>103,'online'=>20,'offline'=>40],
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+ $xdata=['风场1','风场2','风场3','风场4','风场5','风场6','风场7','风场8','风场9',];
|
|
|
|
+ $ydata=[20,30,49,20,56,54,87,23,69];
|
|
|
|
+
|
|
|
|
+ $data=array(
|
|
|
|
+ 'list'=>$list,
|
|
|
|
+ 'xdata'=>$xdata,
|
|
|
|
+ 'ydata'=>$ydata,
|
|
|
|
+ );
|
|
|
|
+ return CatchResponse::success($data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 告警统计
|
|
|
|
+ * @param Request $request
|
|
|
|
+ */
|
|
|
|
+ public function alarmDeviceCount(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $list =array(
|
|
|
|
+ ['type'=>'液压泵','name'=>'电量告警','value'=>100],
|
|
|
|
+ ['type'=>'液压泵','name'=>'液压油偏低','value'=>120],
|
|
|
|
+ ['type'=>'液压泵','name'=>'液压油偏高','value'=>30],
|
|
|
|
+ ['type'=>'液压泵','name'=>'总数','value'=>250],
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ );
|
|
|
|
+ $pump_bar=array(
|
|
|
|
+ 'xData'=>['总数','电量告警','液压油偏低','液压油偏高'],
|
|
|
|
+ 'yData'=>[250,100,120,30],
|
|
|
|
+ );
|
|
|
|
+ $pump_pie=array(
|
|
|
|
+ ['name'=>'电量告警','value'=>100],
|
|
|
|
+ ['name'=>'液压油偏低','value'=>120],
|
|
|
|
+ ['name'=>'液压油偏高','value'=>30],
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $data=array(
|
|
|
|
+ 'list'=>$list,
|
|
|
|
+ 'pump_bar'=>$pump_bar,
|
|
|
|
+ 'pump_pie'=>$pump_pie,
|
|
|
|
+ );
|
|
|
|
+ return CatchResponse::success($data);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
|
|
+ * 告警统计
|
|
|
|
+ * @param Request $request
|
|
|
|
+ */
|
|
|
|
+ public function companyCount(Request $request)
|
|
|
|
+ {
|
|
|
|
+ $list =array(
|
|
|
|
+ ['type'=>'测试部门1','name'=>'液压泵','value'=>100],
|
|
|
|
+ ['type'=>'测试部门1','name'=>'液压扳手','value'=>120],
|
|
|
|
+ ['type'=>'测试部门1','name'=>'法兰','value'=>30],
|
|
|
|
+ ['type'=>'测试部门1','name'=>'总数','value'=>250],
|
|
|
|
+
|
|
|
|
+ ['type'=>'测试部门2','name'=>'液压泵','value'=>100],
|
|
|
|
+ ['type'=>'测试部门2','name'=>'液压扳手','value'=>120],
|
|
|
|
+ ['type'=>'测试部门2','name'=>'法兰','value'=>30],
|
|
|
|
+ ['type'=>'测试部门2','name'=>'总数','value'=>250],
|
|
|
|
+
|
|
|
|
+ ['type'=>'测试部门3','name'=>'液压泵','value'=>100],
|
|
|
|
+ ['type'=>'测试部门3','name'=>'液压扳手','value'=>120],
|
|
|
|
+ ['type'=>'测试部门3','name'=>'法兰','value'=>30],
|
|
|
|
+ ['type'=>'测试部门3','name'=>'总数','value'=>250],
|
|
|
|
+ );
|
|
|
|
+ $bar_data=array(
|
|
|
|
+ 'xData'=>['测试部门1','测试部门2','测试部门3'],
|
|
|
|
+ 'pump_yData'=>[120,120,130],
|
|
|
|
+ 'wrench_yData'=>[40,150,90],
|
|
|
|
+ 'flange_yData'=>[100,80,30],
|
|
|
|
+ );
|
|
|
|
+ $pump_pie=array(
|
|
|
|
+ ['name'=>'电量告警','value'=>100],
|
|
|
|
+ ['name'=>'液压油偏低','value'=>120],
|
|
|
|
+ ['name'=>'液压油偏高','value'=>30],
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ $data=array(
|
|
|
|
+ 'list'=>$list,
|
|
|
|
+ 'bar_data'=>$bar_data,
|
|
|
|
+ 'pump_pie'=>$pump_pie,
|
|
|
|
+ );
|
|
|
|
+ return CatchResponse::success($data);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|