作者 lyh

gx

@@ -91,12 +91,12 @@ class ProjectController extends BaseController @@ -91,12 +91,12 @@ class ProjectController extends BaseController
91 */ 91 */
92 public function lists(Project $project){ 92 public function lists(Project $project){
93 $map = []; 93 $map = [];
  94 + //搜索参数处理
  95 + $map = $this->searchParam($map,$this->map);
94 //类型 96 //类型
95 if(isset($this->map['type'])){ 97 if(isset($this->map['type'])){
96 $map['type'] = $this->searchType($this->map['type']); 98 $map['type'] = $this->searchType($this->map['type']);
97 } 99 }
98 - //搜索参数处理  
99 - $map = $this->searchParam($map,$this->map);  
100 $filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'created_at']; 100 $filed = ['id', 'title', 'mysql_id' ,'channel','cooperate_date' ,'type', 'created_at'];
101 $lists = $project->formatQuery($map)->select($filed)->with('payment')->with('deploy_build') 101 $lists = $project->formatQuery($map)->select($filed)->with('payment')->with('deploy_build')
102 ->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page); 102 ->with('deploy_optimize')->with('online_check')->paginate($this->row, ['*'], 'page', $this->page);
@@ -209,17 +209,13 @@ class ProjectController extends BaseController @@ -209,17 +209,13 @@ class ProjectController extends BaseController
209 public function searchParam(&$map,$param){ 209 public function searchParam(&$map,$param){
210 //搜索技术组 210 //搜索技术组
211 if(!empty($param['dep_id'])){ 211 if(!empty($param['dep_id'])){
212 - $map['id'] = ['in', DeployBuild::where('dept_id', $this->param['dep_id'])->pluck('project_id')->toArray()]; 212 + $map['id'] = ['in', DeployBuild::where('dept_id', $param['dep_id'])->pluck('project_id')->toArray()];
213 } 213 }
214 //搜索技术人员 214 //搜索技术人员
215 if(!empty($param['manage_id'])){ 215 if(!empty($param['manage_id'])){
216 - $map['id'] = ['in', DeployBuild::where('leader_mid', $this->param['manage_id'])  
217 - ->orwhere('manager_mid', $this->param['manage_id'])  
218 - ->orwhere('designer_mid', $this->param['manage_id'])  
219 - ->orwhere('tech_mid', $this->param['manage_id'])  
220 - ->pluck('project_id')  
221 - ->toArray()];  
222 - 216 + $map['id'] = ['in', DeployBuild::where('leader_mid', $param['manage_id'])
  217 + ->orwhere('manager_mid', $param['manage_id'])->orwhere('designer_mid', $param['manage_id'])
  218 + ->orwhere('tech_mid', $param['manage_id'])->pluck('project_id')->toArray()];
223 } 219 }
224 //按类型搜索 220 //按类型搜索
225 if(!empty($param['search']) && !empty($param['search_type'])){ 221 if(!empty($param['search']) && !empty($param['search_type'])){