Merge branch dev/task-145383 of zentao/zentaopms (#9797)

This commit is contained in:
刘刚
2025-06-23 17:10:06 +08:00
committed by Gitfox
2 changed files with 24 additions and 2 deletions
+12 -2
View File
@@ -202,12 +202,22 @@ class doc extends control
}
else
{
$data = (array)zget($blockData->content, 'data', array());
if($type == 'task')
{
foreach($data as $taskID => $task)
{
$task->canView = $this->execution->checkPriv($task->execution);
$data[$taskID] = $task;
}
}
$this->app->loadClass('pager', true);
$this->view->idList = (array)zget($blockData->content, 'idList', array());
$this->view->cols = (array)zget($blockData->content, 'cols', array());
$this->view->data = (array)zget($blockData->content, 'data', array());
$this->view->pager = new pager(count($this->view->data), 10);
$this->view->data = $data;
$this->view->pager = new pager(count($data), 10);
}
$this->view->type = $type;
+12
View File
@@ -280,6 +280,18 @@ window.renderCell = function(result, info)
if(info.row.data.reviewedDate == '0000-00-00') info.row.data.reviewedDate = '';
}
if(blockType == 'task')
{
if(result)
{
if(info.col.name == 'name' && !info.row.data.canView)
{
result.shift();
result.push({html: info.row.data.name});
}
}
}
return result;
};