perf: 添加任务窗口

This commit is contained in:
kuaifan
2021-12-24 23:49:09 +08:00
parent 7171d1d6b2
commit e65c80962d
7 changed files with 255 additions and 94 deletions

View File

@@ -32,6 +32,9 @@ class ProjectController extends AbstractController
* - all全部
* - no未归档默认
* - yes已归档
* @apiParam {String} [andcolumn] 同时取项目列表
* - no不取默认
* - yes取列表
* @apiParam {Object} [keys] 搜索条件
* - keys.name 项目名称
*
@@ -44,6 +47,7 @@ class ProjectController extends AbstractController
//
$all = Request::input('all');
$archived = Request::input('archived', 'no');
$andcolumn = Request::input('andcolumn', 'no');
//
if ($all) {
$user->identity('admin');
@@ -52,6 +56,10 @@ class ProjectController extends AbstractController
$builder = Project::select(Project::projectSelect)->authData();
}
//
if ($andcolumn == 'yes') {
$builder->with(['projectColumn']);
}
//
if ($archived == 'yes') {
$builder->whereNotNull('projects.archived_at');
} elseif ($archived == 'no') {