Files
EasySoft-ZenTaoPMS/module/testcase/js/browse.ui.js
T
2023-06-15 01:04:17 +00:00

46 lines
990 B
JavaScript

/**
* 移除场景名称的链接。
* Remove link of scene's title.
*
* @param object result
* @param object info
* @access public
* @return object
*/
window.onRenderCell = function(result, {row, col})
{
if(result && row.data.isCase == 2 && col.name == 'title')
{
result.pop();
result.push({html: row.data.title});
}
return result;
}
/**
* 计算表格信息的统计。
* Set summary for table footer.
*
* @param element element
* @param array checks
* @access public
* @return object
*/
window.setStatistics = function(element, checks)
{
if(checks.length)
{
runCaseCount = 0;
checks.forEach((id) => {
const scene = element.getRowInfo(id).data;
if(scene.isCase == 1 && scene.lastRunResult != '') runCaseCount++;
});
return zui.formatString(checkedSummary, {
checked: checks.length,
run: runCaseCount
});
}
return pageSummary;
}