* [story#69800,0.5h] use session with product case.

This commit is contained in:
qixinzhi
2024-12-06 14:19:11 +08:00
committed by 宋辰轩
parent 822863875b
commit c4f87a3636
2 changed files with 11 additions and 7 deletions
@@ -3,7 +3,7 @@ declare(strict_types=1);
namespace zin;
$fnGenerateFormRows = function () use ($lang)
$fnGenerateFormRows = function () use ($lang, $settings)
{
$productList = $this->loadModel('product')->getPairs();
$this->app->loadLang('testcase');
@@ -21,6 +21,7 @@ $fnGenerateFormRows = function () use ($lang)
set::required(),
set::control(array('contorl' => 'picker', 'required' => false, 'maxItemsCount' => 50)),
set::items($productList),
set::value(isset($settings['product']) ? $settings['product'] : ''),
span
(
setClass('error-tip text-danger hidden'),
@@ -38,6 +39,7 @@ $fnGenerateFormRows = function () use ($lang)
set::required(),
set::control(array('contorl' => 'picker', 'required' => false, 'maxItemsCount' => 50)),
set::items($conditions),
set::value(isset($settings['condition']) ? $settings['condition'] : ''),
span
(
setClass('error-tip text-danger hidden'),
+8 -6
View File
@@ -1058,10 +1058,11 @@ class docZen extends doc
*/
protected function previewPlanStory(string $view, array $settings, string $idList): void
{
$cols = $this->loadModel('datatable')->getSetting('product', 'browse');
$data = array();
$cols = $this->loadModel('datatable')->getSetting('product', 'browse');
$data = array();
$action = $settings['action'];
if($settings['action'] === 'preview' && $view === 'setting')
if($action === 'preview' && $view === 'setting')
{
$data = $this->loadModel('story')->getPlanStories((int)$settings['plan']);
}
@@ -1109,10 +1110,11 @@ class docZen extends doc
protected function previewProductCase(string $view, array $settings, string $idList): void
{
$this->loadModel('testcase');
$cols = $this->config->testcase->dtable->fieldList;
$data = array();
$cols = $this->config->testcase->dtable->fieldList;
$data = array();
$action = $settings['action'];
if(!empty($_POST) && $view === 'setting')
if($action === 'preview' && $view === 'setting')
{
$data = $this->loadModel('testcase')->getTestCases((int)$settings['product'], '', $settings['condition'], 0, 0);
}