select(['id', 'cn_title'])->where(['id' => $siteId])->first(); if (!$site) { return abort(404); } $roleScope = array_keys(FlowInfoTpl::RoleScope); unset($roleScope[1]); //删除客户 $mapUsers = User::query()->select(['id', 'role_id', 'nickname'])->whereIn('role_id', $roleScope)->get()->keyBy('id')->toArray(); $site = Site::query()->select(['cn_title'])->find($siteId); $mapUsers['-1'] = ['id' => -1, 'role_id' => -1, 'nickname' => $site->cn_title ?? '站点名称']; $bqFlowInfo = BqFlow::query()->where(['site_id' => $siteId]) ->with('bqFlowInfo')->get(); return view('wap.optimization_flow', [ 'site' => $site, 'stageList' => $bqFlowInfo, 'mapUsers' => $mapUsers, ]); } }