From 1fcf8fddd4d72ca4d648d205cbb3fc681c903e35 Mon Sep 17 00:00:00 2001 From: daitingting Date: Fri, 6 Dec 2024 02:19:43 +0000 Subject: [PATCH] * [task#133868,doing,1.5h] Set execution story list. --- .../doc/ui/zentaolist.executionstory.html.php | 36 +++++++++++++++++++ module/doc/zen.php | 32 +++++++++++++++-- 2 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 module/doc/ui/zentaolist.executionstory.html.php diff --git a/module/doc/ui/zentaolist.executionstory.html.php b/module/doc/ui/zentaolist.executionstory.html.php new file mode 100644 index 0000000000..4cb602cb67 --- /dev/null +++ b/module/doc/ui/zentaolist.executionstory.html.php @@ -0,0 +1,36 @@ +loadModel('execution')->getPairs(); + + $searchConditions = array(); + foreach($lang->execution->featureBar['story'] as $key => $label) $searchConditions[$key] = $label; + + return array + ( + formRow + ( + formGroup + ( + set::width('1/2'), + set::name('execution'), + set::label($lang->doc->execution), + set::items($executions) + ) + ), + 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 d97d8084ea..e732fecac7 100644 --- a/module/doc/zen.php +++ b/module/doc/zen.php @@ -1126,7 +1126,35 @@ class docZen extends doc $data = $this->loadModel('story')->getByList($idList); } - $this->view->cols = array_values($cols); - $this->view->data = array_values($data); + $this->view->cols = $cols; + $this->view->data = $data; + } + + /** + * 预览执行需求列表。 + * Preview execution story. + * + * @param string $view + * @param string $idList + * @access protected + * @return void + */ + protected function previewExecutionStory(string $view, string $idList): void + { + $cols = $this->loadModel('datatable')->getSetting('execution', 'story', false, 'story'); + unset($cols['actions']); + + $data = array(); + if(!empty($_POST) && $view === 'setting') + { + $data = $this->loadModel('story')->getExecutionStories((int)$this->post->execution, 0, '', $this->post->search, '', 'story'); + } + elseif($view === 'list') + { + $data = $this->loadModel('story')->getByList($idList); + } + + $this->view->cols = $cols; + $this->view->data = $data; } }