|
|
@@ -389,7 +389,7 @@ class BasicPanel extends Controller
|
|
|
->get()->toArray();
|
|
|
$city_totle_count = 0;
|
|
|
if(!empty($result)){
|
|
|
- $city_totle_count = array_sum(array_column($result->toArray(), 'count'));
|
|
|
+ $city_totle_count = array_sum(array_column($result, 'count'));
|
|
|
//计算占比
|
|
|
foreach ($result as $key => $value) {
|
|
|
$result[$key]['percent'] = round(($value['count'] / $city_totle_count) * 100, 2);
|
|
|
@@ -655,7 +655,7 @@ class BasicPanel extends Controller
|
|
|
->get()->toArray();
|
|
|
$province_totle_count = 0;
|
|
|
if (!empty($result)) {
|
|
|
- $province_totle_count = array_sum(array_column($result->toArray(), 'count'));
|
|
|
+ $province_totle_count = array_sum(array_column($result, 'count'));
|
|
|
foreach ($result as $key => $value) {
|
|
|
$result[$key]['percent'] = round(($value['count'] / $province_totle_count) * 100, 2);
|
|
|
}
|
|
|
@@ -732,7 +732,7 @@ class BasicPanel extends Controller
|
|
|
->get()->toArray();
|
|
|
$city_totle_count = 0;
|
|
|
if (!empty($result)) {
|
|
|
- $city_totle_count = array_sum(array_column($result->toArray(), 'count'));
|
|
|
+ $city_totle_count = array_sum(array_column($result, 'count'));
|
|
|
foreach ($result as $key => $value) {
|
|
|
$result[$key]['percent'] = round(($value['count'] / $city_totle_count) * 100, 2);
|
|
|
}
|