|  | @@ -5,6 +5,7 @@ namespace App\Admin\Controllers\Health;
 | 
	
		
			
				|  |  |  use App\Admin\Extensions\Form\ValidateForm;
 | 
	
		
			
				|  |  |  use App\Http\Controllers\Controller;
 | 
	
		
			
				|  |  |  use App\Models\ArticleCategory;
 | 
	
		
			
				|  |  | +use App\Models\PostAppoint;
 | 
	
		
			
				|  |  |  use App\Models\Presentation;
 | 
	
		
			
				|  |  |  use App\Models\PresentationAppoint;
 | 
	
		
			
				|  |  |  use Encore\Admin\Auth\Permission;
 | 
	
	
		
			
				|  | @@ -296,4 +297,48 @@ class IndexController extends Controller
 | 
	
		
			
				|  |  |                  'search_data' => $search_data
 | 
	
		
			
				|  |  |              ]));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +    public function post_appoint_list(Content $content, Request $request){
 | 
	
		
			
				|  |  | +        Permission::check('presentation_appoint_list');
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $search_data = $request->all();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $where = [];
 | 
	
		
			
				|  |  | +        if (isset($search_data['id'])) {
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            foreach ($search_data as $k => $v) {
 | 
	
		
			
				|  |  | +                if ($k == 'realname') {
 | 
	
		
			
				|  |  | +                    $where[] = [$k, 'like', "%$v%"];
 | 
	
		
			
				|  |  | +                } elseif ($k != '_pjax' and $k != 'page' && $k != 'perpage') {
 | 
	
		
			
				|  |  | +                    $where[] = [$k, '=', $v];
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        $perpage = 20;
 | 
	
		
			
				|  |  | +        $list = PostAppoint::where($where)
 | 
	
		
			
				|  |  | +            ->select('*')
 | 
	
		
			
				|  |  | +            ->orderBy('updated_at','desc')
 | 
	
		
			
				|  |  | +            ->paginate($perpage);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        foreach ($list as $k => $v){
 | 
	
		
			
				|  |  | +            if($v->sex == 0){
 | 
	
		
			
				|  |  | +                $list[$k]['sex'] = '女';
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                $list[$k]['sex'] = '男';
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +            if($v->status == 0){
 | 
	
		
			
				|  |  | +                $list[$k]['status'] = '未下载';
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                $list[$k]['status'] = '已下载';
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        return $content
 | 
	
		
			
				|  |  | +            ->header('信息管理')
 | 
	
		
			
				|  |  | +            ->description('投递岗位人员信息列表')
 | 
	
		
			
				|  |  | +            ->body(view('admin.health.post_appoint_list')->with([
 | 
	
		
			
				|  |  | +                'list' => $list,
 | 
	
		
			
				|  |  | +                'search_data' => $search_data
 | 
	
		
			
				|  |  | +            ]));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  |  }
 |