From dab1c4b62561f1984878527446d033cc13787bb2 Mon Sep 17 00:00:00 2001 From: yaooo <272523191@qq.com> Date: Thu, 2 Nov 2023 13:55:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=A1=E6=89=B9=E8=A1=A8?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api/controller/ProjectIndex.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/api/controller/ProjectIndex.php b/app/api/controller/ProjectIndex.php index c2ba9ea..db24e22 100644 --- a/app/api/controller/ProjectIndex.php +++ b/app/api/controller/ProjectIndex.php @@ -297,7 +297,12 @@ class ProjectIndex extends ApiController ->order('s.sort asc') ->where(array('s.action_id' => $id, 's.type' => 2, 's.delete_time' => 0)) ->select()->toArray(); - + foreach ($step_array as $k => $v) { + $step_array[$k]['start_time'] = date('Y-m-d H:i:s', $v['start_time']); + $step_array[$k]['end_time'] = date('Y-m-d H:i:s', $v['end_time']); + $step_array[$k]['create_time'] = date('Y-m-d H:i:s', $v['create_time']); + } + //阶段操作记录 $step_record = Db::name('StepRecord') ->field('s.*,a.name as check_name,p.flow_name') @@ -330,6 +335,9 @@ class ProjectIndex extends ApiController $step['check_name'] = Db::name('Admin')->where(['id' => $step['flow_uid']])->value('name'); $flow_names = Db::name('Admin')->where([['id','in',$step['flow_ids']]])->column('name'); $step['flow_names'] = implode(',',$flow_names); + $step['start_time'] = date('Y-m-d H:i:s', $step['start_time']); + $step['end_time'] = date('Y-m-d H:i:s', $step['end_time']); + $step['create_time'] = date('Y-m-d H:i:s', $step['create_time']); if ($this->uid == $step['flow_uid']){ $is_check_admin = 1; }