diff --git a/module/testcase/js/browse.ui.js b/module/testcase/js/browse.ui.js
index 9b369dc629..9b4077a08c 100644
--- a/module/testcase/js/browse.ui.js
+++ b/module/testcase/js/browse.ui.js
@@ -57,9 +57,10 @@ window.onRenderCell = function(result, {row, col})
result.push({html: data.title}); // 添加不带链接的场景名称
if(data.parent > 0) result.unshift({html: '' + children + ''}); // 添加子场景标签
result.unshift({html: '' + scene + ''}); // 添加场景标签
- if(browseType != 'onlyscene' && caseScenes[data.id] === undefined) result.push({html: '(' + noCase + ')'}); // 添加暂无用例标签
+ if(!this.options.customData.isOnlyScene && this.options.customData.caseScenes[data.id] === undefined) result.push({html: '(' + noCase + ')'}); // 添加暂无用例标签
}
}
+
return result;
}
@@ -87,7 +88,7 @@ window.setStatistics = function(element, checks)
});
}
- return element.options.defaultSummary;
+ return element.options.customData.pageSummary;
}
/**
diff --git a/module/testcase/ui/browse.html.php b/module/testcase/ui/browse.html.php
index b39e35362a..7f68992f3c 100644
--- a/module/testcase/ui/browse.html.php
+++ b/module/testcase/ui/browse.html.php
@@ -17,8 +17,6 @@ $topSceneCount = count(array_filter(array_map(function($scene){return $scene->is
$topCaseCount = count(array_filter(array_map(function($scene){return $scene->isCase == 1 && $scene->scene == 0;}, $scenes)));
$pageSummary = sprintf($isOnlyScene ? $lang->testcase->summaryScene : $lang->testcase->summary, $topSceneCount, $topCaseCount);
-jsVar('caseScenes', $caseScenes);
-
$canBatchRun = hasPriv('testtask', 'batchRun') && !$isOnlyScene;
$canBatchEdit = hasPriv('testcase', 'batchEdit') && !$isOnlyScene;
$canBatchReview = hasPriv('testcase', 'batchReview') && !$isOnlyScene && ($config->testcase->needReview || !empty($config->testcase->forceReview));
@@ -165,7 +163,7 @@ dtable
set::checkInfo(jsRaw('function(checks){return window.setStatistics(this, checks);}')),
set::footToolbar($footToolbar),
set::footPager(usePager()),
- set::defaultSummary($pageSummary)
+ set::customData(array('isOnlyScene' => $isOnlyScene, 'caseScenes' => $caseScenes, 'pageSummary' => $pageSummary))
);
modal
diff --git a/module/testcase/ui/header.html.php b/module/testcase/ui/header.html.php
index 5541050a40..8820ce9d3f 100644
--- a/module/testcase/ui/header.html.php
+++ b/module/testcase/ui/header.html.php
@@ -10,7 +10,6 @@ declare(strict_types=1);
*/
namespace zin;
-jsVar('browseType', strtolower($browseType));
jsVar('scene', $lang->testcase->sceneb);
jsVar('automated', $lang->testcase->automated);
jsVar('children', $lang->childrenAB);