|
|
|
|
@ -137,7 +137,7 @@ class ProjectController extends CommonController
|
|
|
|
|
$links[] = [
|
|
|
|
|
'admin_id' => $item,
|
|
|
|
|
'area_id' => $res->id,
|
|
|
|
|
'project_id'=>$res->project_id,
|
|
|
|
|
'project_id' => $res->project_id,
|
|
|
|
|
'created_at' => date('Y-m-d H:i:s')
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
@ -199,15 +199,16 @@ class ProjectController extends CommonController
|
|
|
|
|
$res = (new Building())->find($request->id)->update($data);
|
|
|
|
|
break;
|
|
|
|
|
case "area":
|
|
|
|
|
$res = (new Area())->find($request->id)->update($data);
|
|
|
|
|
$area = (new Area())->find($request->id);
|
|
|
|
|
$area->update($data);
|
|
|
|
|
// 删除原来关联,添加新关联
|
|
|
|
|
AdminAreaLink::where('area_id',$request->id)->delete();
|
|
|
|
|
AdminAreaLink::where('area_id', $request->id)->delete();
|
|
|
|
|
$links = [];
|
|
|
|
|
foreach ($request->head as $item) {
|
|
|
|
|
$links[] = [
|
|
|
|
|
'admin_id' => $item,
|
|
|
|
|
'area_id' => $request->id,
|
|
|
|
|
'project_id'=>$res->project_id,
|
|
|
|
|
'project_id' => $area->project_id,
|
|
|
|
|
'created_at' => date('Y-m-d H:i:s')
|
|
|
|
|
];
|
|
|
|
|
}
|
|
|
|
|
|