|
...
|
...
|
@@ -75,17 +75,18 @@ class TaskController extends BaseController |
|
|
|
$map['manage_id'] = $this->map['manage_id'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}elseif (isset($this->map['content']) && !empty($this->map['content'])){
|
|
|
|
$ids = $task->where('content', 'like','%'.$this->map['content'].'%')->pluck('id')->toArray();
|
|
|
|
$manage_ids = $taskOwnerModel->formatQuery(['task_id'=>['in',$ids]])->pluck('manage_id')->toArray();
|
|
|
|
$map['manage_id'] = ['in',$manage_ids];
|
|
|
|
}elseif (isset($this->map['search_type']) && !empty($this->map['search_type'])){
|
|
|
|
if(isset($this->map['search']) && !empty($this->map['search'])) {
|
|
|
|
$projectModel = new Project();
|
|
|
|
$ids = $projectModel->where('title', 'like', '%' . $this->map['search'] . '%')->pluck('id')->toArray();
|
|
|
|
$manage_ids = $taskOwnerModel->formatQuery(['project'=>['in',$ids]])->pluck('manage_id')->toArray();
|
|
|
|
$map['manage_id'] = ['in',$manage_ids];
|
|
|
|
|
|
|
|
if($this->map['search_type'] == 'project'){
|
|
|
|
$ids = $projectModel->where('title', 'like', '%' . $this->map['search'] . '%')->pluck('id')->toArray();
|
|
|
|
$manage_ids = $taskOwnerModel->formatQuery(['project'=>['in',$ids]])->pluck('manage_id')->toArray();
|
|
|
|
$map['manage_id'] = ['in',$manage_ids];
|
|
|
|
}else{
|
|
|
|
$ids = $task->where('content', 'like','%'.$this->map['search'].'%')->pluck('id')->toArray();
|
|
|
|
$manage_ids = $taskOwnerModel->formatQuery(['task_id'=>['in',$ids]])->pluck('manage_id')->toArray();
|
|
|
|
$map['manage_id'] = ['in',$manage_ids];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if(isset($this->map['search_type']) && !empty($this->map['search_type'])){
|
...
|
...
|
|