Merge branch 'tanghucheng_task' into 'master'
* Finish task #63794. See merge request easycorp/zentaopms!4863
This commit is contained in:
@@ -547,11 +547,26 @@ $lang->execution->statusColorList['suspended'] = '#fdc137';
|
||||
$lang->execution->statusColorList['closed'] = '#838A9D';
|
||||
|
||||
if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass();
|
||||
$lang->execution->gantt->color[0] = 'bbb';
|
||||
$lang->execution->gantt->color[1] = 'ff5d5d';
|
||||
$lang->execution->gantt->color[2] = 'ff9800';
|
||||
$lang->execution->gantt->color[3] = '16a8f8';
|
||||
$lang->execution->gantt->color[4] = '00da88';
|
||||
$lang->execution->gantt->progressColor[0] = '#B7B7B7';
|
||||
$lang->execution->gantt->progressColor[1] = '#FF8287';
|
||||
$lang->execution->gantt->progressColor[2] = '#FFC73A';
|
||||
$lang->execution->gantt->progressColor[3] = '#6BD5F5';
|
||||
$lang->execution->gantt->progressColor[4] = '#9DE88A';
|
||||
$lang->execution->gantt->progressColor[5] = '#9BA8FF';
|
||||
|
||||
$lang->execution->gantt->color[0] = '#E7E7E7';
|
||||
$lang->execution->gantt->color[1] = '#FFDADB';
|
||||
$lang->execution->gantt->color[2] = '#FCECC1';
|
||||
$lang->execution->gantt->color[3] = '#D3F3FD';
|
||||
$lang->execution->gantt->color[4] = '#DFF5D9';
|
||||
$lang->execution->gantt->color[5] = '#EBDCF9';
|
||||
|
||||
$lang->execution->gantt->stage = new stdclass();
|
||||
$lang->execution->gantt->stage->progressColor = '#70B8FE';
|
||||
$lang->execution->gantt->stage->color = '#D2E7FC';
|
||||
|
||||
$lang->execution->gantt->textColor = '000000';
|
||||
$lang->execution->gantt->bar_height = '24';
|
||||
|
||||
$lang->execution->gantt->exportImg = 'Export as Image';
|
||||
$lang->execution->gantt->exportPDF = 'Export as PDF';
|
||||
|
||||
@@ -547,11 +547,26 @@ $lang->execution->statusColorList['suspended'] = '#fdc137';
|
||||
$lang->execution->statusColorList['closed'] = '#838A9D';
|
||||
|
||||
if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass();
|
||||
$lang->execution->gantt->color[0] = 'bbb';
|
||||
$lang->execution->gantt->color[1] = 'ff5d5d';
|
||||
$lang->execution->gantt->color[2] = 'ff9800';
|
||||
$lang->execution->gantt->color[3] = '16a8f8';
|
||||
$lang->execution->gantt->color[4] = '00da88';
|
||||
$lang->execution->gantt->progressColor[0] = '#B7B7B7';
|
||||
$lang->execution->gantt->progressColor[1] = '#FF8287';
|
||||
$lang->execution->gantt->progressColor[2] = '#FFC73A';
|
||||
$lang->execution->gantt->progressColor[3] = '#6BD5F5';
|
||||
$lang->execution->gantt->progressColor[4] = '#9DE88A';
|
||||
$lang->execution->gantt->progressColor[5] = '#9BA8FF';
|
||||
|
||||
$lang->execution->gantt->color[0] = '#E7E7E7';
|
||||
$lang->execution->gantt->color[1] = '#FFDADB';
|
||||
$lang->execution->gantt->color[2] = '#FCECC1';
|
||||
$lang->execution->gantt->color[3] = '#D3F3FD';
|
||||
$lang->execution->gantt->color[4] = '#DFF5D9';
|
||||
$lang->execution->gantt->color[5] = '#EBDCF9';
|
||||
|
||||
$lang->execution->gantt->stage = new stdclass();
|
||||
$lang->execution->gantt->stage->progressColor = '#70B8FE';
|
||||
$lang->execution->gantt->stage->color = '#D2E7FC';
|
||||
|
||||
$lang->execution->gantt->textColor = '000000';
|
||||
$lang->execution->gantt->bar_height = '24';
|
||||
|
||||
$lang->execution->gantt->exportImg = 'Export as Image';
|
||||
$lang->execution->gantt->exportPDF = 'Export as PDF';
|
||||
|
||||
@@ -547,11 +547,26 @@ $lang->execution->statusColorList['suspended'] = '#fdc137';
|
||||
$lang->execution->statusColorList['closed'] = '#838A9D';
|
||||
|
||||
if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass();
|
||||
$lang->execution->gantt->color[0] = 'bbb';
|
||||
$lang->execution->gantt->color[1] = 'ff5d5d';
|
||||
$lang->execution->gantt->color[2] = 'ff9800';
|
||||
$lang->execution->gantt->color[3] = '16a8f8';
|
||||
$lang->execution->gantt->color[4] = '00da88';
|
||||
$lang->execution->gantt->progressColor[0] = '#B7B7B7';
|
||||
$lang->execution->gantt->progressColor[1] = '#FF8287';
|
||||
$lang->execution->gantt->progressColor[2] = '#FFC73A';
|
||||
$lang->execution->gantt->progressColor[3] = '#6BD5F5';
|
||||
$lang->execution->gantt->progressColor[4] = '#9DE88A';
|
||||
$lang->execution->gantt->progressColor[5] = '#9BA8FF';
|
||||
|
||||
$lang->execution->gantt->color[0] = '#E7E7E7';
|
||||
$lang->execution->gantt->color[1] = '#FFDADB';
|
||||
$lang->execution->gantt->color[2] = '#FCECC1';
|
||||
$lang->execution->gantt->color[3] = '#D3F3FD';
|
||||
$lang->execution->gantt->color[4] = '#DFF5D9';
|
||||
$lang->execution->gantt->color[5] = '#EBDCF9';
|
||||
|
||||
$lang->execution->gantt->stage = new stdclass();
|
||||
$lang->execution->gantt->stage->progressColor = '#70B8FE';
|
||||
$lang->execution->gantt->stage->color = '#D2E7FC';
|
||||
|
||||
$lang->execution->gantt->textColor = '000000';
|
||||
$lang->execution->gantt->bar_height = '24';
|
||||
|
||||
$lang->execution->gantt->exportImg = 'Export as Image';
|
||||
$lang->execution->gantt->exportPDF = 'Export as PDF';
|
||||
|
||||
@@ -547,11 +547,26 @@ $lang->execution->statusColorList['suspended'] = '#fdc137';
|
||||
$lang->execution->statusColorList['closed'] = '#838A9D';
|
||||
|
||||
if(!isset($lang->execution->gantt)) $lang->execution->gantt = new stdclass();
|
||||
$lang->execution->gantt->color[0] = 'bbb';
|
||||
$lang->execution->gantt->color[1] = 'ff5d5d';
|
||||
$lang->execution->gantt->color[2] = 'ff9800';
|
||||
$lang->execution->gantt->color[3] = '16a8f8';
|
||||
$lang->execution->gantt->color[4] = '00da88';
|
||||
$lang->execution->gantt->progressColor[0] = '#B7B7B7';
|
||||
$lang->execution->gantt->progressColor[1] = '#FF8287';
|
||||
$lang->execution->gantt->progressColor[2] = '#FFC73A';
|
||||
$lang->execution->gantt->progressColor[3] = '#6BD5F5';
|
||||
$lang->execution->gantt->progressColor[4] = '#9DE88A';
|
||||
$lang->execution->gantt->progressColor[5] = '#9BA8FF';
|
||||
|
||||
$lang->execution->gantt->color[0] = '#E7E7E7';
|
||||
$lang->execution->gantt->color[1] = '#FFDADB';
|
||||
$lang->execution->gantt->color[2] = '#FCECC1';
|
||||
$lang->execution->gantt->color[3] = '#D3F3FD';
|
||||
$lang->execution->gantt->color[4] = '#DFF5D9';
|
||||
$lang->execution->gantt->color[5] = '#EBDCF9';
|
||||
|
||||
$lang->execution->gantt->stage = new stdclass();
|
||||
$lang->execution->gantt->stage->progressColor = '#70B8FE';
|
||||
$lang->execution->gantt->stage->color = '#D2E7FC';
|
||||
|
||||
$lang->execution->gantt->textColor = '000000';
|
||||
$lang->execution->gantt->bar_height = '24';
|
||||
|
||||
$lang->execution->gantt->exportImg = '导出图片';
|
||||
$lang->execution->gantt->exportPDF = '导出 PDF';
|
||||
|
||||
@@ -116,7 +116,6 @@ class programplan extends control
|
||||
$this->view->dateDetails = $dateDetails;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->ganttType = $type;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -183,23 +183,27 @@ class programplanModel extends model
|
||||
$realEnd = helper::isZeroDate($plan->realEnd) ? '' : $plan->realEnd;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->id = $plan->id;
|
||||
$data->type = 'plan';
|
||||
$data->text = empty($plan->milestone) ? $plan->name : $plan->name . $isMilestone ;
|
||||
$data->percent = $plan->percent;
|
||||
$data->attribute = zget($this->lang->stage->typeList, $plan->attribute);
|
||||
$data->milestone = zget($this->lang->programplan->milestoneList, $plan->milestone);
|
||||
$data->owner_id = $plan->PM;
|
||||
$data->status = $this->processStatus('execution', $plan);
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = $realBegan ? substr($realBegan, 0, 10) : '';
|
||||
$data->realEnd = $realEnd ? substr($realEnd, 0, 10) : '';;
|
||||
$data->parent = $plan->grade == 1 ? 0 :$plan->parent;
|
||||
$data->open = true;
|
||||
$data->start_date = $realBegan ? $realBegan : $start;
|
||||
$data->endDate = $realEnd ? $realEnd : $end;
|
||||
$data->duration = 1;
|
||||
$data->id = $plan->id;
|
||||
$data->type = 'plan';
|
||||
$data->text = empty($plan->milestone) ? $plan->name : $plan->name . $isMilestone ;
|
||||
$data->percent = $plan->percent;
|
||||
$data->attribute = zget($this->lang->stage->typeList, $plan->attribute);
|
||||
$data->milestone = zget($this->lang->programplan->milestoneList, $plan->milestone);
|
||||
$data->owner_id = $plan->PM;
|
||||
$data->status = $this->processStatus('execution', $plan);
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = $realBegan ? substr($realBegan, 0, 10) : '';
|
||||
$data->realEnd = $realEnd ? substr($realEnd, 0, 10) : '';;
|
||||
$data->parent = $plan->grade == 1 ? 0 :$plan->parent;
|
||||
$data->open = true;
|
||||
$data->start_date = $realBegan ? $realBegan : $start;
|
||||
$data->endDate = $realEnd ? $realEnd : $end;
|
||||
$data->duration = 1;
|
||||
$data->color = $this->lang->execution->gantt->stage->color;
|
||||
$data->progressColor = $this->lang->execution->gantt->stage->progressColor;
|
||||
$data->textColor = $this->lang->execution->gantt->textColor;
|
||||
$data->bar_height = $this->lang->execution->gantt->bar_height;
|
||||
|
||||
if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1;
|
||||
if($data->start_date) $data->start_date = date('d-m-Y', strtotime($data->start_date));
|
||||
@@ -254,29 +258,33 @@ class programplanModel extends model
|
||||
if($start > $end) $end = $start;
|
||||
|
||||
$data = new stdclass();
|
||||
$data->id = $task->execution . '-' . $task->id;
|
||||
$data->type = 'task';
|
||||
$data->text = $taskSign . $priIcon . $task->name;
|
||||
$data->percent = '';
|
||||
$data->status = $this->processStatus('task', $task);
|
||||
$data->owner_id = $task->assignedTo;
|
||||
$data->attribute = '';
|
||||
$data->milestone = '';
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = $realBegan ? substr($realBegan, 0, 10) : '';
|
||||
$data->realEnd = $realEnd ? substr($realEnd, 0, 10) : '';
|
||||
$data->pri = $task->pri;
|
||||
$data->parent = $task->parent > 0 ? $task->execution . '-' . $task->parent : $task->execution;
|
||||
$data->open = true;
|
||||
$progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) : 0;
|
||||
$data->progress = $progress;
|
||||
$data->taskProgress = ($progress * 100) . '%';
|
||||
$data->start_date = $start;
|
||||
$data->endDate = $end;
|
||||
$data->duration = 1;
|
||||
$data->estimate = $task->estimate;
|
||||
$data->consumed = $task->consumed;
|
||||
$data->id = $task->execution . '-' . $task->id;
|
||||
$data->type = 'task';
|
||||
$data->text = $taskSign . $priIcon . $task->name;
|
||||
$data->percent = '';
|
||||
$data->status = $this->processStatus('task', $task);
|
||||
$data->owner_id = $task->assignedTo;
|
||||
$data->attribute = '';
|
||||
$data->milestone = '';
|
||||
$data->begin = $start;
|
||||
$data->deadline = $end;
|
||||
$data->realBegan = $realBegan ? substr($realBegan, 0, 10) : '';
|
||||
$data->realEnd = $realEnd ? substr($realEnd, 0, 10) : '';
|
||||
$data->pri = $task->pri;
|
||||
$data->parent = $task->parent > 0 ? $task->execution . '-' . $task->parent : $task->execution;
|
||||
$data->open = true;
|
||||
$progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) : 0;
|
||||
$data->progress = $progress;
|
||||
$data->taskProgress = ($progress * 100) . '%';
|
||||
$data->start_date = $start;
|
||||
$data->endDate = $end;
|
||||
$data->duration = 1;
|
||||
$data->estimate = $task->estimate;
|
||||
$data->consumed = $task->consumed;
|
||||
$data->color = zget($this->lang->execution->gantt->color, $task->pri);
|
||||
$data->progressColor = zget($this->lang->execution->gantt->progressColor, $task->pri);
|
||||
$data->textColor = $this->lang->execution->gantt->textColor;
|
||||
$data->bar_height = $this->lang->execution->gantt->bar_height;
|
||||
|
||||
/* If multi task then show the teams. */
|
||||
if($task->mode == 'multi' and !empty($taskTeams[$task->id]))
|
||||
@@ -337,7 +345,6 @@ class programplanModel extends model
|
||||
}
|
||||
|
||||
$datas['data'] = isset($datas['data']) ? array_values($datas['data']) : array();
|
||||
|
||||
return $returnJson ? json_encode($datas) : $datas;
|
||||
}
|
||||
|
||||
@@ -426,6 +433,7 @@ class programplanModel extends model
|
||||
$dataGroup->open = true;
|
||||
$dataGroup->progress = '';
|
||||
$dataGroup->taskProgress = '';
|
||||
$dataGroup->bar_height = $this->lang->execution->gantt->bar_height;
|
||||
|
||||
$groupKey = $groupID . $group;
|
||||
$datas['data'][$groupKey] = $dataGroup;
|
||||
@@ -474,6 +482,10 @@ class programplanModel extends model
|
||||
$data->duration = 1;
|
||||
$data->estimate = $task->estimate;
|
||||
$data->consumed = $task->consumed;
|
||||
$data->color = zget($this->lang->execution->gantt->color, $task->pri);
|
||||
$data->progressColor = zget($this->lang->execution->gantt->progressColor, $task->pri);
|
||||
$data->textColor = $this->lang->execution->gantt->textColor;
|
||||
$data->bar_height = $this->lang->execution->gantt->bar_height;
|
||||
|
||||
if($data->endDate > $data->start_date) $data->duration = helper::diffDate($data->endDate, $data->start_date) + 1;
|
||||
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
.gantt_task_content span.task-label, .gantt_task_content span.label-pri{display: none;}
|
||||
#ganttPris > span {display: inline-block; line-height: 20px; min-width: 20px; border-radius: 2px;}
|
||||
.gantt_task_line {background: #<?php echo $lang->execution->gantt->color[0]?>; border-color: #<?php echo $lang->execution->gantt->color[0]?>;}
|
||||
.gantt_task_progress {background: rgba(0,0,0,.1)}
|
||||
.gantt_task_line.pri-1 {background: #<?php echo $lang->execution->gantt->color[1]?>; border-color: #<?php echo $lang->execution->gantt->color[1]?>}
|
||||
.gantt_task_line.pri-2 {background: #<?php echo $lang->execution->gantt->color[2]?>; border-color: #<?php echo $lang->execution->gantt->color[2]?>}
|
||||
.gantt_task_line.pri-3 {background: #<?php echo $lang->execution->gantt->color[3]?>; border-color: #<?php echo $lang->execution->gantt->color[3]?>}
|
||||
.gantt_task_line.pri-4 {background: #<?php echo $lang->execution->gantt->color[4]?>; border-color: #<?php echo $lang->execution->gantt->color[4]?>}
|
||||
.gantt_task_line.gantt_selected {box-shadow: 0 1px 1px rgba(0,0,0,.05), 0 2px 6px 0 rgba(0,0,0,.045)}
|
||||
.gantt_link_arrow_right {border-left-color: #2196F3;}
|
||||
.gantt_link_arrow_left {border-right-color: #2196F3;}
|
||||
@@ -65,7 +59,11 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
.gantt-fullscreen #footer {display: none!important;}
|
||||
.gantt-fullscreen #mainContent {position: fixed; top: 0; right: 0; bottom: 0; left: 0}
|
||||
.gantt_grid_head_cell.gantt_grid_head_text{overflow:visible;}
|
||||
|
||||
.gantt_grid_head_cell, .gantt_scale_cell{color:#000000!important;}
|
||||
.gantt_tree_content{color:#838A9D;}
|
||||
.gantt_row > div:first-child .gantt_tree_content{color:#3C4353;}
|
||||
.gantt_task_line.gantt_task_inline_color{border:0px;}
|
||||
.gantt_grid_scale, .gantt_task_scale, .gantt_task_vscroll{background-color: #F2F7FF;}
|
||||
</style>
|
||||
<?php js::set('customUrl', $this->createLink('programplan', 'ajaxCustom'));?>
|
||||
<?php js::set('dateDetails', $dateDetails);?>
|
||||
@@ -85,8 +83,8 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
</div>
|
||||
<div class='btn btn-link' id='ganttPris'>
|
||||
<strong><?php echo $lang->task->pri . " : "?></strong>
|
||||
<?php foreach($lang->execution->gantt->color as $pri => $color):?>
|
||||
<span style="background:#<?php echo $color?>"><?php echo $pri;?></span>
|
||||
<?php foreach($lang->execution->gantt->progressColor as $pri => $color):?>
|
||||
<span style="background:<?php echo $color?>"><?php echo $pri;?></span>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -470,7 +468,6 @@ $(function()
|
||||
var ganttData = $.parseJSON(<?php echo json_encode(json_encode($plans));?>);
|
||||
if(!ganttData.data) ganttData.data = [];
|
||||
|
||||
|
||||
<?php
|
||||
$userList = array();
|
||||
foreach($users as $account => $realname)
|
||||
@@ -494,11 +491,11 @@ $(function()
|
||||
gantt.config.smart_scales = true;
|
||||
gantt.config.static_background = true;
|
||||
gantt.config.show_task_cells = false;
|
||||
gantt.config.row_height = 25;
|
||||
gantt.config.row_height = 32;
|
||||
gantt.config.min_column_width = 40;
|
||||
gantt.config.details_on_create = false;
|
||||
gantt.config.scales = [{unit: "year", step: 1, format: "%Y"}, {unit: 'day', step: 1, format: '%m-%d'}];
|
||||
gantt.config.scale_height = 22 * gantt.config.scales.length;
|
||||
gantt.config.scale_height = 18 * gantt.config.scales.length;
|
||||
gantt.config.duration_unit = "day";
|
||||
|
||||
gantt.config.columns = [
|
||||
|
||||
Reference in New Issue
Block a user