From f09fd6d981ff9718707fd26299f04cb56322d032 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Thu, 4 Aug 2022 14:07:02 +0800 Subject: [PATCH] fix bug resize move --- module/programplan/model.php | 14 ++++++++++++-- module/programplan/view/gantt.html.php | 3 ++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/module/programplan/model.php b/module/programplan/model.php index 4a4e475a9c..7f993dfeeb 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -144,7 +144,6 @@ class programplanModel extends model * @param int $baselineID * @param string $selectCustom * @param bool $returnJson - * @param string $type * @access public * @return string */ @@ -334,6 +333,17 @@ class programplanModel extends model return $returnJson ? json_encode($datas) : $datas; } + /** + * Get gantt data group by assigned. + * + * @param int $executionID + * @param int $productID + * @param int $baselineID + * @param string $selectCustom + * @param bool $returnJson + * @access public + * @return string + */ public function getDataForGanttGroupByAssignedTo($executionID, $productID, $baselineID = 0, $selectCustom = '', $returnJson = true) { $plans = $this->getStage($executionID, $productID); @@ -413,7 +423,7 @@ class programplanModel extends model //TODO $dataGroup->start_date = '03-11-2021'; $dataGroup->endDate = '2021-12-01'; - $dataGroup->duration = 1; + $dataGroup->duration = 0; //TODO $dataGroup->taskProgress = ''; diff --git a/module/programplan/view/gantt.html.php b/module/programplan/view/gantt.html.php index 0843e6157f..de74b9a541 100644 --- a/module/programplan/view/gantt.html.php +++ b/module/programplan/view/gantt.html.php @@ -431,7 +431,6 @@ function validateResources(id) type: "post", success: function(response) { - response = JSON.parse(response); if(response.result == 'fail' && response.message) { new $.zui.Messager(response.message, { @@ -479,6 +478,8 @@ $(function() gantt.config.order_branch = ganttType == 'assignedTo' ? false : 'marker'; gantt.config.drag_progress = false; gantt.config.drag_links = false; + gantt.config.drag_move = ganttType == 'assignedTo' ? false : true; + gantt.config.drag_resize = ganttType == 'assignedTo' ? false : true; gantt.config.smart_rendering = true; gantt.config.smart_scales = true; gantt.config.static_background = true;