Commit 58c82d43 authored by Administrator's avatar Administrator

首页百分比数据类型

parent 0604a0c4
...@@ -47,8 +47,8 @@ class HomepageController extends Controller ...@@ -47,8 +47,8 @@ class HomepageController extends Controller
'device_alarm' => $device_alarm, 'device_alarm' => $device_alarm,
'device_normal' => $device_normal, 'device_normal' => $device_normal,
'device_offline' => $device_offline, 'device_offline' => $device_offline,
'percent_alarm' => number_format(($device_alarm/$devicecount) * 100, '2'), 'percent_alarm' => (float)number_format(($device_alarm/$devicecount) * 100, '2'),
'percent_online' => number_format(($device_online/$devicecount) * 100, '2'), 'percent_online' => (float)number_format(($device_online/$devicecount) * 100, '2'),
]); ]);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment