|
|
|
@ -110,6 +110,21 @@ class ParkingSpaceController extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if ($request->has('parking_id')) { |
|
|
|
$parking_id = $request->input('parking_id'); |
|
|
|
if (!empty($parking_id)) { |
|
|
|
$floorIds = AdminFloor::query()->where( |
|
|
|
'building_floor', |
|
|
|
$parking_id |
|
|
|
)->pluck('id'); |
|
|
|
if ($floorIds) { |
|
|
|
$query->whereIn('floor_id', $floorIds); |
|
|
|
} else { |
|
|
|
$query->where('id', 0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 分页 |
|
|
|
$page = $request->input('page', 1); |
|
|
|
$perPage = $request->input('per_page', 10); |
|
|
|
@ -145,6 +160,7 @@ class ParkingSpaceController extends BaseController |
|
|
|
try { |
|
|
|
$data = [ |
|
|
|
'floor_data' => AdminFloor::getData(), |
|
|
|
'parking_list' => Parking::getData(), |
|
|
|
'space_type_data' => ParkingSpaceType::getData(), |
|
|
|
'space_attr_data' => ParkingSpaceAttributes::getData(), |
|
|
|
'status_data' => get_select_child_data( |
|
|
|
|