Browse Source

图表字段调整

q 1 year atrás
parent
commit
c29f20b78a

+ 8 - 4
Modules/OpcData/Http/Controllers/Api/CarDownCurrInfoController.php

@@ -29,11 +29,13 @@ class CarDownCurrInfoController extends BaseController
         $sqlStr = "select per_name, dep from down_personnel_info";
         $list = $this->executeSql($sqlStr);
 
-        $sqlStr = 'SELECT dep, count(1) con FROM `down_personnel_info` GROUP BY dep';
+        $sqlStr = 'SELECT dep name, count(1) value FROM `down_personnel_info` GROUP BY dep';
         $groupCon = $this->executeSql($sqlStr);
 
         $data = [
-            'charts'=>$groupCon,
+            'charts'=>['data'=>[
+                $groupCon
+            ]],
             'list'=>$list
         ];
 
@@ -52,7 +54,7 @@ class CarDownCurrInfoController extends BaseController
         $list = $this->executeSql($sqlStr);
 
         $sqlStr = /** @lang text */
-            "select task_info, count(1) con from down_task_info
+            "select task_info name, count(1) value from down_task_info
               where DATE_FORMAT(apply_time,'%Y-%m-%d') =
                     (select max(DATE_FORMAT(apply_time,'%Y-%m-%d'))
                        FROM down_task_info)
@@ -61,7 +63,9 @@ class CarDownCurrInfoController extends BaseController
         $groupCon = $this->executeSql($sqlStr);
 
         $data = [
-            'charts'=>$groupCon,
+            'charts'=>['data'=>[
+                $groupCon
+            ]],
             'list'=>$list
         ];