From 6792f108fe047f0c7a6bd7e1e0b1cfe25da0fefd Mon Sep 17 00:00:00 2001 From: hdm Date: Mon, 26 Dec 2022 15:54:07 +0800 Subject: [PATCH] =?UTF-8?q?#I5TVHG=20=E4=BB=BB=E5=8A=A1=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=BB=BA=E8=AE=AE=E5=A2=9E=E5=8A=A0=E5=85=B3=E8=81=94=E2=80=9C?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E2=80=9D=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/project/model/ProjectTask.php | 5 +++++ app/project/view/task/index.html | 1 + 2 files changed, 6 insertions(+) diff --git a/app/project/model/ProjectTask.php b/app/project/model/ProjectTask.php index 38762e1..39bb513 100644 --- a/app/project/model/ProjectTask.php +++ b/app/project/model/ProjectTask.php @@ -92,6 +92,11 @@ class ProjectTask extends Model $item['assist_admin_names'] = '-'; } else { $item['assist_admin_names'] = implode(',', $assist_admin_names); + } + if ($item['project_id'] == 0) { + $item['project_name'] = '-'; + } else { + $item['project_name'] = Db::name('Project')->where(['id' => $item['project_id']])->value('name'); } $item['end_time'] = date('Y-m-d', $item['end_time']); $item['delay'] = 0; diff --git a/app/project/view/task/index.html b/app/project/view/task/index.html index a70c83c..9889336 100644 --- a/app/project/view/task/index.html +++ b/app/project/view/task/index.html @@ -104,6 +104,7 @@ return html; } } + , { field: 'project_name', title: '关联项目', width: 120 } , { field: 'director_name', title: '负责人', align: 'center', width: 80 } , { field: 'assist_admin_names', title: '协作人', width: 200 } , { field: 'plan_hours', title: '预估工时', align: 'center', width: 80 }