From 8afa89802ab48bbfa1490ed231c760d6fd06a0b3 Mon Sep 17 00:00:00 2001 From: daitingting Date: Thu, 5 Dec 2024 07:35:55 +0000 Subject: [PATCH] * [task#133867,doing,1.5h] Preview project story. --- .../doc/ui/zentaolist.projectstory.html.php | 47 +++++++++++++++++++ module/doc/zen.php | 28 +++++++++++ 2 files changed, 75 insertions(+) create mode 100644 module/doc/ui/zentaolist.projectstory.html.php diff --git a/module/doc/ui/zentaolist.projectstory.html.php b/module/doc/ui/zentaolist.projectstory.html.php new file mode 100644 index 0000000000..a9d63b4481 --- /dev/null +++ b/module/doc/ui/zentaolist.projectstory.html.php @@ -0,0 +1,47 @@ +loadModel('project')->getPairsByProgram(); + + $this->app->loadLang('projectstory'); + $searchConditions = array(); + foreach($lang->projectstory->featureBar['story'] as $key => $label) + { + if($key == 'more') + { + foreach($lang->projectstory->moreSelects['story']['more'] as $moreKey => $moreLabel) $searchConditions[$moreKey] = $moreLabel; + } + else + { + $searchConditions[$key] = $label; + } + } + + return array + ( + formRow + ( + formGroup + ( + set::width('1/2'), + set::name('project'), + set::label($lang->doc->project), + set::items($projects) + ) + ), + formRow + ( + formGroup + ( + set::width('1/2'), + set::name('search'), + set::label($lang->doc->searchCondition), + set::items($searchConditions) + ) + ) + ); +}; diff --git a/module/doc/zen.php b/module/doc/zen.php index 789753e244..24b3828ded 100644 --- a/module/doc/zen.php +++ b/module/doc/zen.php @@ -1101,4 +1101,32 @@ class docZen extends doc $this->view->cols = $cols; $this->view->data = $data; } + + /** + * 预览项目研发需求列表。 + * Preview project story. + * + * @param string $view + * @param string $idList + * @access protected + * @return void + */ + protected function previewProjectStory(string $view, string $idList): void + { + $cols = $this->loadModel('datatable')->getSetting('product', 'browse'); + unset($cols['actions']); + + $data = array(); + if(!empty($_POST) && $view === 'setting') + { + $data = $this->loadModel('story')->getExecutionStories((int)$this->post->project, 0, '', $this->post->search); + } + elseif($view === 'list') + { + $data = $this->loadModel('story')->getByList($idList); + } + + $this->view->cols = array_values($cols); + $this->view->data = array_values($data); + } }