sprint_sunjun_53665

This commit is contained in:
sunjun
2022-05-10 06:42:34 +00:00
parent 5090da4280
commit 631601a39b
2 changed files with 22 additions and 7 deletions
+11 -1
View File
@@ -3148,7 +3148,16 @@ class execution extends control
}
$projectExecutions = array();
foreach($orderedExecutions as $execution) $projectExecutions[$execution->project][] = $execution;
$parentIdList = array();
foreach($orderedExecutions as $execution)
{
$projectExecutions[$execution->project][] = $execution;
if($execution->type != 'stage') continue;
if($execution->grade == 2 and $execution->project != $execution->parent) $parentIdList[$execution->parent] = $execution->parent;
}
$parents = array();
if($parentIdList) $parents = $this->execution->getByIdList($parentIdList);
$this->view->link = $this->execution->getLink($module, $method, $extra);
$this->view->module = $module;
@@ -3157,6 +3166,7 @@ class execution extends control
$this->view->extra = $extra;
$this->view->projects = $projectPairs;
$this->view->executions = $projectExecutions;
$this->view->parents = $parents;
$this->display();
}
+11 -6
View File
@@ -46,7 +46,12 @@ foreach($executions as $projectID => $projectExecutions)
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account]))) $executionCounts[$projectID]['myExecution'] ++;
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM != $this->app->user->account and !isset($execution->teams[$this->app->user->account])) $executionCounts[$projectID]['others'] ++;
if($execution->status == 'done' or $execution->status == 'closed') $executionCounts[$projectID]['closed'] ++;
$executionNames[] = $execution->name;
$onlyChildStage = $execution->grade == 2 and $execution->project != $execution->parent;
$executionNames[$execution->id] = $execution->name;
if($onlyChildStage and isset($parents[$execution->parent]))
{
$executionNames[$execution->id] = $parents[$execution->parent]->name . '/' . $execution->name;
}
}
}
$executionsPinYin = common::convert2Pinyin($executionNames);
@@ -77,7 +82,7 @@ foreach($executions as $projectID => $projectExecutions)
$selected = $execution->id == $executionID ? 'selected' : '';
if($execution->status != 'done' and $execution->status != 'closed' and ($execution->PM == $this->app->user->account or isset($execution->teams[$this->app->user->account])))
{
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected clickable' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
$myExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $executionNames[$execution->id], '', "class='$selected clickable' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
if($selected == 'selected') $tabActive = 'myExecution';
@@ -85,7 +90,7 @@ foreach($executions as $projectID => $projectExecutions)
}
else if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM != $this->app->user->account and !isset($execution->teams[$this->app->user->account]))
{
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected clickable' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
$normalExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $executionNames[$execution->id], '', "class='$selected clickable' title='{$execution->name}' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
if($selected == 'selected') $tabActive = 'other';
@@ -93,7 +98,7 @@ foreach($executions as $projectID => $projectExecutions)
}
else if($execution->status == 'done' or $execution->status == 'closed')
{
$closedExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $execution->name, '', "class='$selected clickable' title='$execution->name' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
$closedExecutionsHtml .= '<li>' . html::a(sprintf($link, $execution->id), $executionNames[$execution->id], '', "class='$selected clickable' title='$execution->name' data-key='" . zget($executionsPinYin, $execution->name, '') . "' data-app='{$this->app->tab}'") . '</li>';
if($selected == 'selected') $tabActive = 'closed';
}
@@ -171,7 +176,7 @@ $(function()
$('li.has-list div.hide-in-search').removeClass('hidden');
$('.nav-tabs li.active').find('span').show();
}
if($('.form-control.search-input').val().length > 0)
{
$('#closed').attr("hidden", false);
@@ -191,7 +196,7 @@ $(function()
$('#closed').attr("hidden", true);
$('#gray-line').attr("hidden", true);
}
var listItem = $(this).find('.has-list');
listItem.each(function ()
{