* [task#143873,doing,2h] Insert gantt chart in document.

This commit is contained in:
daitingting
2025-05-27 09:04:09 +00:00
parent 5b9d63618c
commit fde1afa600
4 changed files with 100 additions and 4 deletions
+15 -1
View File
@@ -46,10 +46,12 @@ class programplan extends control
* @param int $baselineID
* @param string $browseType
* @param int $queryID
* @param string $from
* @param int $blockID
* @access public
* @return void
*/
public function browse(int $projectID = 0, int $productID = 0, string $type = 'gantt', string $orderBy = 'id_asc', int $baselineID = 0, string $browseType = '', int $queryID = 0)
public function browse(int $projectID = 0, int $productID = 0, string $type = 'gantt', string $orderBy = 'id_asc', int $baselineID = 0, string $browseType = '', int $queryID = 0, string $from = 'project', int $blockID = 0)
{
if($type == 'lists')
{
@@ -57,6 +59,15 @@ class programplan extends control
return;
}
if($from == 'doc')
{
$this->loadModel('doc');
$projects = $this->loadModel('project')->getPairsByModel(array('ipd', 'waterfall', 'waterfallplus'));
if(empty($projects)) return $this->send(array('result' => 'fail', 'message' => $this->lang->doc->tips->noProject));
$this->view->projects = $projects;
}
$this->app->loadLang('stage');
$this->session->set('projectPlanList', $this->app->getURI(true), 'project');
$this->commonAction($projectID, $productID);
@@ -71,6 +82,9 @@ class programplan extends control
$browseType = strtolower($browseType);
$plans = $this->programplanZen->buildStages($projectID, $productID, $baselineID, $type, $orderBy, $browseType, $queryID);
$this->view->from = $from;
$this->view->blockID = $blockID;
/* Build gantt browse view. */
$this->programplanZen->buildBrowseView($projectID, $productID, $plans, $type, $orderBy, $baselineID, $browseType, $queryID);
}