Browse Source

修改状态child children

master
wanghongjun 2 weeks ago
parent
commit
2ce9f54842
  1. 2
      app/Services/ParkingSpaceService.php
  2. 6
      app/common.php

2
app/Services/ParkingSpaceService.php

@ -73,7 +73,7 @@ class ParkingSpaceService extends BaseService
foreach ($this->statusArr as $key => $value) { foreach ($this->statusArr as $key => $value) {
$arr[$key] = __('service.parking_space.' . $value); $arr[$key] = __('service.parking_space.' . $value);
if ($value == 'occupy' && $is_child) { if ($value == 'occupy' && $is_child) {
$arr['child'] = [ $arr['children'] = [
$key => [ $key => [
3 => __('service.parking_space.yes_license'), 3 => __('service.parking_space.yes_license'),
4 => __('service.parking_space.no_license') 4 => __('service.parking_space.no_license')

6
app/common.php

@ -73,9 +73,9 @@ if (!function_exists('get_select_child_data')) {
if ($is_all) { if ($is_all) {
$newData[] = [$str1 => __('admin.all'), $str2 => '']; $newData[] = [$str1 => __('admin.all'), $str2 => ''];
} }
$child = $data['child'] ?? []; $child = $data['children'] ?? [];
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
if ($key == 'child') { if ($key == 'children') {
continue; continue;
} }
$arr = [ $arr = [
@ -84,7 +84,7 @@ if (!function_exists('get_select_child_data')) {
]; ];
if (isset($child[$key])) { if (isset($child[$key])) {
foreach ($child[$key] as $childKey => $childValue) { foreach ($child[$key] as $childKey => $childValue) {
$arr['child'][] = [ $arr['children'][] = [
$str1 => $childValue, $str1 => $childValue,
$str2 => $childKey $str2 => $childKey
]; ];

Loading…
Cancel
Save