* [task#133868,doing,1.5h] Set execution story list.

This commit is contained in:
daitingting
2024-12-06 10:59:03 +08:00
committed by 綦新志
parent 884fbb7132
commit 1fcf8fddd4
2 changed files with 66 additions and 2 deletions
@@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
namespace zin;
$fnGenerateFormRows = function () use ($lang)
{
$executions = $this->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)
)
)
);
};
+30 -2
View File
@@ -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;
}
}