liyinglin 3 years ago
parent 1b79df0f5d
commit 4c9298eefb

@ -102,10 +102,10 @@ class ProjectController extends CommonController
$headList = Admin::whereIn('id', $adminIds)->get(); $headList = Admin::whereIn('id', $adminIds)->get();
// 获取病区选中的护工 // 获取病区选中的护工
foreach ($headList as $item) { foreach ($headList as $item) {
$item->selected = ''; $item->selected = 'false';
if ($areaId) { if ($areaId) {
$has = AdminAreaLink::where('area_id', $areaId)->where('admin_id', $item->id)->count(); $has = AdminAreaLink::where('area_id', $areaId)->where('admin_id', $item->id)->count();
if ($has) $item->selected = 'selected'; if ($has) $item->selected = 'true';
} }
} }
return $this->ajaxResponse($headList); return $this->ajaxResponse($headList);

Loading…
Cancel
Save