Merge branch 'sprint/220_liumengyi_24009' into 'master'

* Fix bug #24009.

See merge request easycorp/zentaopms!4660
This commit is contained in:
王怡栋
2022-07-26 08:16:08 +00:00
3 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -191,7 +191,8 @@ class execution extends control
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Get tasks. */
$tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager);
$allTasks = $this->task->getExecutionTasks($executionID);
$tasks = $this->execution->getTasks($productID, $executionID, $this->executions, $browseType, $queryID, $moduleID, $sort, $pager);
if(empty($tasks) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
@@ -221,7 +222,7 @@ class execution extends control
/* Assign. */
$this->view->tasks = $tasks;
$this->view->allTasksNum = $this->task->getExecutionTasks($executionID);
$this->view->allTasks = $allTasks;
$this->view->summary = $this->execution->summary($tasks);
$this->view->tabID = 'task';
$this->view->pager = $pager;
+2
View File
@@ -3410,6 +3410,8 @@ class executionModel extends model
->orderBy($orderBy)
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'task', true);
if(empty($tasks)) return array();
$taskTeam = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in(array_keys($tasks))->andWhere('type')->eq('task')->fetchGroup('root');
+1 -1
View File
@@ -198,7 +198,7 @@ body {margin-bottom: 25px;}
<div class="table-empty-tip">
<p>
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
<?php if($canBeChanged and common::hasPriv('task', 'create') and empty($allTasksNum)):?>
<?php if($canBeChanged and common::hasPriv('task', 'create') and empty($allTasks)):?>
<?php echo html::a($taskCreateLink, "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
<?php endif;?>
</p>