* Mv milestone to qc.

This commit is contained in:
Yagami
2020-08-27 11:17:22 +08:00
parent eb47645a67
commit b3e27f70b3
28 changed files with 129 additions and 1616 deletions
+2
View File
@@ -293,3 +293,5 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('
ALTER TABLE `zt_block` ADD `type` char(30) NOT NULL AFTER `module`;
ALTER TABLE `zt_block` ADD UNIQUE `account_module_type_order` (`account`, `module`, `type`, `order`), DROP INDEX `accountModuleOrder`;
INSERT INTO `zt_cron` (`id`, `m`, `h`, `dom`, `mon`, `dow`, `command`, `remark`, `type`, `buildin`, `status`, `lastTime`) VALUES (15, '1', '0', '*', '*', '*', 'moduleName=weekly&methodName=computeWeekly', '更新项目周报', 'system', 0, 'normal', '2020-08-27 10:07:53');
+1 -1
View File
@@ -1212,7 +1212,7 @@ class block extends control
$longProgram = helper::diffDate($today, $begin) / 7 > 12;
while($begin < $end)
{
$charts['labels'][] = $longProgram ? $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->month : $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->week;
$charts['labels'][] = $longProgram ? $this->lang->block->time . $i . $this->lang->block->month : $this->lang->block->time . $i . $this->lang->block->week;
$charts['PV'] .= $this->weekly->getPV($programID, $begin) . ',';
$charts['EV'] .= $this->weekly->getEV($programID, $begin) . ',';
$charts['AC'] .= $this->weekly->getAC($programID, $begin) . ',';
+3
View File
@@ -59,6 +59,9 @@ $lang->block->doingProject = 'Doning ' . $lang->projectCommon;
$lang->block->finishProject = 'Finish ' . $lang->projectCommon;
$lang->block->estimatedHours = 'Estimated Hours';
$lang->block->consumedHours = 'Consumed Hours';
$lang->block->time = 'No';
$lang->block->week = 'Week';
$lang->block->month = 'Month';
$lang->block->params = new stdclass();
$lang->block->params->name = 'Name';
+3
View File
@@ -59,6 +59,9 @@ $lang->block->doingProject = '进行中的' . $lang->projectCommon;
$lang->block->finishProject = '累积' . $lang->projectCommon;
$lang->block->estimatedHours = '预计工时';
$lang->block->consumedHours = '已消耗';
$lang->block->time = '第';
$lang->block->week = '周';
$lang->block->month = '月';
$lang->block->params = new stdclass();
$lang->block->params->name = '参数名称';
+115 -1
View File
@@ -3,5 +3,119 @@
.block-cmmiprogress .milestone-chart {box-shadow: none}
.block-cmmiprogress .milestone-chart.has-scrollbar {margin-bottom: -10px}
</style>
<?php include '../../milestone/view/chart.html.php';?>
<div class='milestone-chart' id='milestoneChart'>
<div class='chart-canvas scrollbar-hover'>
<div class='chart-wrapper'>
<canvas width='400' height='120' data-responsive='true'></canvas>
</div>
</div>
<div class='chart-unit'><?php echo "({$lang->project->workHour})";?></div>
<div class='chart-legend'>
<span class="barline line-pv">PV</span>
<span class="barline line-ev">EV</span>
<span class="barline line-ac">AC</span>
</div>
</div>
<style>
.milestone-chart {position: relative}
.milestone-chart .chart-canvas {overflow: auto; max-width: 1002px}
.milestone-chart .chart-wrapper {background: none; padding: 15px 0 0 0}
.milestone-chart .chart-unit {position: absolute; left: 10px; top: 0;}
.milestone-chart .chart-legend {position: absolute; right: 5px; top: 0;}
.milestone-chart .barline {padding-left: 20px; position: relative; display: inline-block; line-height: 20px}
.milestone-chart .barline + .barline {margin-left: 5px}
.milestone-chart .barline:before {content: ' '; display: block; position: absolute; top: 8px; left: 0; width: 16px; height: 3px; background: #0c64eb}
.milestone-chart .barline.line-ev:before {background: rgb(0, 218, 136)}
.milestone-chart .barline.line-ac:before {background: rgb(255, 145, 0)}
</style>
<script>
function initMilestoneChart()
{
var data =
{
labels: <?php echo json_encode($charts['labels'])?>,
datasets: [
{
label: 'PV',
color: '#0c64eb',
pointColor: '#0c64eb',
pointStrokeColor: '#0c64eb',
pointHighlightStroke: '#0c64eb',
fillColor: 'rgba(0,106,241, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['PV']?>
},
{
label: 'EV',
color: 'rgb(0, 218, 136)',
pointColor: 'rgb(0, 218, 136)',
pointStrokeColor: 'rgb(0, 218, 136)',
pointHighlightStroke: 'rgb(0, 218, 136)',
fillColor: 'rgb(0, 218, 136, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['EV']?>
},
{
label: 'AC',
color: 'rgb(255, 145, 0)',
pointColor: 'rgb(255, 145, 0)',
pointStrokeColor: 'rgb(255, 145, 0)',
pointHighlightStroke: 'rgb(255, 145, 0)',
fillColor: 'rgb(255, 145, 0, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['AC']?>
}]
};
var betterWidth = data.labels.length * 15;
var renderChart = function()
{
var $chart = $('#milestoneChart');
var $wrapper = $chart.find('.chart-wrapper');
var $canvas = $chart.find('canvas');
var $chartCanvas = $chart.find('.chart-canvas');
if (betterWidth > 400)
{
var updateWrapperSize = function()
{
$wrapper.hide();
$chartCanvas.css('max-width', 'initial');
var maxWidth = $chartCanvas.width();
$chartCanvas.css('max-width', maxWidth);
$chart.toggleClass('has-scrollbar', maxWidth < betterWidth);
$wrapper.show();
};
updateWrapperSize();
$(window).on('resize', updateWrapperSize);
$wrapper.css('min-width', betterWidth);
$canvas.attr(
{
width: betterWidth,
height: Math.min(200, Math.floor(betterWidth / 4))
});
}
$canvas.lineChart(data,
{
animation: betterWidth < 400,
pointDotStrokeWidth: 1,
pointDotRadius: 2,
datasetStrokeWidth: 2,
datasetFill: false,
datasetStroke: true,
scaleShowBeyondLine: true,
responsive: true,
bezierCurve: false,
scaleFontColor: '#838A9D',
tooltipXPadding: 10,
tooltipYPadding: 10,
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->project->workHour;?> /h',
multiTooltipTemplate: '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>',
});
}
setTimeout(renderChart, betterWidth > 200 ? 100 : 10);
}
initMilestoneChart();
</script>
</div>
+1 -6
View File
@@ -1087,7 +1087,6 @@ $lang->workestimation = new stdclass();
$lang->budget = new stdclass();
$lang->programplan = new stdclass();
$lang->review = new stdclass();
$lang->weekly = new stdclass();
$lang->milestone = new stdclass();
$lang->design = new stdclass();
$lang->auditplan = new stdclass();
@@ -1103,7 +1102,6 @@ $lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
$lang->programplan->menu = new stdclass();
$lang->review->menu = new stdclass();
$lang->weekly->menu = new stdclass();
$lang->milestone->menu = new stdclass();
$lang->cmmiproduct->menu = new stdclass();
$lang->design->menu = new stdclass();
@@ -1125,15 +1123,12 @@ $lang->budget->menu = $lang->workestimation->menu;
$lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
$lang->weekly->menu->browse = '周报|weekly|index|program={PROGRAM}';
$lang->cmmiproduct->menu->plan = array('link' => '排期|productplan|browse|productID={PRODUCT}', 'subModule' => 'productplan');
$lang->cmmiproduct->menu->requirement = '用户需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=requirement';
$lang->cmmiproduct->menu->story = '软件需求|product|browse|product={PRODUCT}&branch=&browseType=unclosed&queryID=0&storyType=story';
$lang->cmmiproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}';
$lang->milestone->menu = $lang->weekly->menu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->nc->menu = $lang->auditplan->menu;
$lang->noMenuModule = array('my', 'todo', 'effort', 'program', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'holiday', 'custom', 'auditcl', 'subject', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search');
$lang->haveMenuMethod = array('custom');
-5
View File
@@ -1,5 +0,0 @@
<?php
$config->milestone = new stdclass();
$config->milestone->story = 'URS,SRS';
$config->milestone->design = 'HLDS,DDS';
$config->milestone->test = 'ITTC,STP,STTC,ITP';
-63
View File
@@ -1,63 +0,0 @@
<?php
class milestone extends control
{
public function index($programID = 0, $projectID = 0, $productID = 0)
{
$this->loadModel('program');
$this->loadModel('project');
list($this->lang->modulePageNav, $projectID) = $this->milestone->getPageNav($programID, $projectID, $productID);
$this->view->title = $this->lang->milestone->title;
if(!$projectID)
{
$this->view->projectID = $projectID;
$this->display();
die;
}
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$stageList = $this->loadModel('programplan')->getPairs($programID, $productID);
unset($stageList[0]);
$this->view->projectID = $projectID;
$this->view->programID = $programID;
$this->view->stageList = $stageList;
$this->view->basicInfo = $this->milestone->getBasicInfo($programID, $projectID);
$this->view->process = $this->milestone->getProcess($programID, $projectID);
$this->view->charts = $this->milestone->getCharts($programID, $projectID);
$this->view->productQuality = $this->milestone->getProductQuality($programID, $projectID);
$this->view->workhours = $this->milestone->getWorkhours($programID, $projectID);
$this->view->measures = $this->milestone->getMeasures($programID, $projectID);
$this->view->projectRisk = $this->milestone->getProjectRisk($programID);
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->stageInfo = $this->milestone->getStageDemand($programID, $projectID, $productID, $stageList);
$this->view->otherproblems = $this->milestone->otherProblemsList($programID, $projectID);
$this->view->nextMilestone = $this->milestone->getNextMilestone($programID, $projectID, $stageList);
$this->display();
}
public function ajaxAddMeasures()
{
$data = fixer::input('post')->get();
if(empty($data->projectID)) return 0;
return $this->milestone->ajaxAddMeasures($data);
}
public function saveOtherProblem()
{
$re = $this->milestone->saveOtherProblem();
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess));
}
public function ajaxSaveEstimate()
{
$taskID = $this->post->taskID;
$estimate = $this->post->estimate;
$re = $this->milestone->ajaxSaveEstimate($taskID,$estimate);
$this->send(array('result' => 'success','message' => $this->lang->saveSuccess));
}
}
-15
View File
@@ -1,15 +0,0 @@
#dropMenu .col-left .list-group {margin-bottom: 0px; }
.table, .cell{margin-bottom: 15px !important}
.main-table tbody>tr>td {position: relative; border-bottom: 0; border-bottom: 1px solid #ddd;}
.main-table tbody>tr:last-child>td {border-bottom: none;}
.cell{position: relative;}
#chartUnit {position: absolute; color: #000; top: 20px; left: 15px;}
#chartLegend {position: absolute; right: 0; width: 80px; height: 60px; top: 50%; margin-top: -30px; line-height: 30px; color: #838A9D; font-size: 12px;}
#chartLegend > div {position: relative; padding-left: 30px;}
#chartLegend > div > .barline {position: absolute; width: 20px; left: 0; top: 13px; height: 3px;}
#chartLegend .line-pv .barline{background: #1183fb}
#chartLegend .line-ev .barline{background: rgb(0, 218, 136)}
#chartLegend .line-ac .barline{background: rgb(255, 145, 0)}
.scroll-table {overflow-x: scroll}
.scroll-table > .table {min-width:350%}
-100
View File
@@ -1,100 +0,0 @@
<?php
$lang->milestone->index = 'Milestone Home';
$lang->milestone->title = 'Milestone Report';
$lang->milestone->common = 'Project Milestone Report';
$lang->milestone->name = 'Milestone Name';
$lang->milestone->stage = 'Milestone Stage';
$lang->milestone->save = 'Save';
$lang->milestone->startedWeeks = 'Started Weeks';
$lang->milestone->finishedWeeks = 'Finished Weeks';
$lang->milestone->offset = 'Milestone Deviation';
$lang->milestone->processCommon = 'Project Current Status';
$lang->milestone->process = 'Project Schedule';
$lang->milestone->projectCost = 'Project Cost';
$lang->milestone->toNow = 'So far';
$lang->milestone->targetRange = 'Target Range';
$lang->milestone->ge = 'ge';
$lang->milestone->le = 'le';
$lang->milestone->analysis = 'Analysis';
$lang->milestone->PV = 'The work to be done(PV)';
$lang->milestone->EV = 'Actual work done(EV)';
$lang->milestone->AC = 'Actual cost(AC)';
$lang->milestone->SPI = 'Project schedule performance(SPI)';
$lang->milestone->CPI = 'Project cost performance(CPI)';
$lang->milestone->SV = 'Rate of progress deviation(SV%)';
$lang->milestone->CV = 'Cost deviation rate(CV%)';
$lang->milestone->workHours = 'Workload (man-hour)';
$lang->milestone->allStage = 'Project Stage';
$lang->milestone->devHours = 'Development Workload';
$lang->milestone->toHours = 'Rework Workload';
$lang->milestone->qaHours = 'Test Workload';
$lang->milestone->rowSummary = 'Workload Subtotal';
$lang->milestone->rowPercent = 'Percentage Distribution(%)';
$lang->milestone->colPercent = 'Percentage of workload(%)';
$lang->milestone->colSummary = 'Total';
$lang->milestone->qatoDev = 'Test Development ratio';
$lang->milestone->projectRisk = '5.Project Risks (top five highest priority risks)';
$lang->milestone->riskCountermove = 'Risk Countermove';
$lang->milestone->riskDescriptio = 'Risk Description';
$lang->milestone->riskPossibility = 'Risk Possibility';
$lang->milestone->riskSeriousness = 'Risk Seriousness';
$lang->milestone->riskFactor = 'Risk Factor';
$lang->milestone->riskMeasures = 'Risk Measures';
$lang->milestone->riskAccumulate = 'Risk Accumulate';
$lang->milestone->otherIssue = 'Other Issue';
$lang->milestone->issueSolutions = 'Issue Solutions';
$lang->milestone->issueDescription = 'Issue Description';
$lang->milestone->needHelp = 'Help';
$lang->milestone->issuePropose = 'Issue Propose';
$lang->milestone->demandStatus = '4.Customer Demand Analysis';
$lang->milestone->storyUnit = 'Unit:Item';
$lang->milestone->engineeringStage = 'Engineering Stage';
$lang->milestone->rateChange = 'Rate of change in demand';
$lang->milestone->originalStory = 'Quantity of original demand';
$lang->milestone->modifyNumber = 'Total post-change requirements';
$lang->milestone->changeStory = 'Number of changed requirements';
$lang->milestone->paogressForecast = 'Project Forecast';
$lang->milestone->duration = 'Construction period(day)';
$lang->milestone->cost = 'Cost(hours)';
$lang->milestone->forecastResults = 'Forecast Results';
$lang->milestone->plannedValue = 'Planned Value';
$lang->milestone->predictedValue = 'Predicted Value';
$lang->milestone->predictedValueDesc = 'Rentenformel (Germany)If the project progress performance(SPI)=0,So the predicted value=0,Otherwise,Predicted value=Planned value divided by Project schedule performance(SPI)';
$lang->milestone->periodDeviation = 'Period Deviation';
$lang->milestone->costDeviation = 'Cost Deviation';
$lang->milestone->nextStage = 'Next Stage';
$lang->milestone->overallProject = 'Overall Project';
$lang->milestone->corrective = 'Corrective Measure';
$lang->milestone->timeOverrun = 'The total construction time will exceed:%s day.';
$lang->milestone->costOverrun = 'The total cost will exceed:%s unit';
$lang->milestone->saveOtherProblem = 'Save Other Problem';
$lang->milestone->chart = new stdclass();
$lang->milestone->chart->title = 'Trend Chart of project progress to date';
$lang->milestone->chart->time = 'No';
$lang->milestone->chart->week = 'week';
$lang->milestone->chart->month = 'month';
$lang->milestone->chart->workhour = 'Development Workload Analysis Chart';
$lang->milestone->otherproblem = '6.Other Problem';
$lang->milestone->problemandsuggest = 'Problem and Suggest';
$lang->milestone->suggest = 'Suggest';
$lang->milestone->needhelp = 'Does it require high-level support?';
$lang->milestone->prodescr = 'Problem Description';
$lang->milestone->quality = new stdclass();
$lang->milestone->quality->total = 'Total';
$lang->milestone->quality->identify = 'Defect identification phase';
$lang->milestone->quality->injection = 'Defect injection phase';
$lang->milestone->quality->scale = 'Scale';
$lang->milestone->quality->identifyRate = 'Defect recognition rate';
$lang->milestone->quality->injectionRate = 'Defect injection rate';
$lang->milestone->options = 'Options';
-101
View File
@@ -1,101 +0,0 @@
<?php
$lang->milestone->index = '报告首页';
$lang->milestone->title = '里程碑报告';
$lang->milestone->common = '项目里程碑报告';
$lang->milestone->name = '里程碑名称';
$lang->milestone->stage = '里程碑阶段';
$lang->milestone->save = '保存';
$lang->milestone->startedWeeks = '开始周数';
$lang->milestone->finishedWeeks = '结束周数';
$lang->milestone->offset = '里程碑工期偏差';
$lang->milestone->processCommon = '项目当前进展状况';
$lang->milestone->process = '项目进度';
$lang->milestone->projectCost = '项目成本';
$lang->milestone->toNow = '到目前为止';
$lang->milestone->targetRange = '目标控制范围';
$lang->milestone->ge = '大于等于';
$lang->milestone->le = '小于等于';
$lang->milestone->analysis = '分析结果';
$lang->milestone->PV = '计划完成的工作(PV)';
$lang->milestone->EV = '实际完成的工作(EV)';
$lang->milestone->AC = '实际花费的成本(AC)';
$lang->milestone->SPI = '项目进度绩效(SPI)';
$lang->milestone->CPI = '项目成本绩效(CPI)';
$lang->milestone->SV = '进度偏差率(SV%)';
$lang->milestone->CV = '成本偏差率(CV%)';
$lang->milestone->workHours = '工作量(人时)';
$lang->milestone->allStage = '工程阶段';
$lang->milestone->devHours = '研发工作量';
$lang->milestone->toHours = '返工工作量';
$lang->milestone->reviewHours = '评审工作量';
$lang->milestone->qaHours = '测试工作量';
$lang->milestone->rowSummary = '工作量小计';
$lang->milestone->rowPercent = '分布百分比(%)';
$lang->milestone->colPercent = '占工作量百分比(%)';
$lang->milestone->colSummary = '总和';
$lang->milestone->qatoDev = '测试研发比';
$lang->milestone->projectRisk = '5.项目风险(优先最高的前五项风险)';
$lang->milestone->riskCountermove = '风险对策';
$lang->milestone->riskDescriptio = '风险描述';
$lang->milestone->riskPossibility = '可能性';
$lang->milestone->riskSeriousness = '严重性';
$lang->milestone->riskFactor = '风险系数';
$lang->milestone->riskMeasures = '风险对策';
$lang->milestone->riskAccumulate = '累积的高风险';
$lang->milestone->otherIssue = '其它问题';
$lang->milestone->issueSolutions = '问题及解决建议';
$lang->milestone->issueDescription = '问题描述';
$lang->milestone->needHelp = '是否需要高层支持';
$lang->milestone->issuePropose = '解决建议';
$lang->milestone->demandStatus = '4.用户需求状况分析';
$lang->milestone->storyUnit = '单位:Item';
$lang->milestone->engineeringStage = '工程阶段';
$lang->milestone->rateChange = '需求变化率';
$lang->milestone->originalStory = '原始需求数量';
$lang->milestone->modifyNumber = '变更后需求总数';
$lang->milestone->changeStory = '变更的需求数';
$lang->milestone->paogressForecast = '项目进展预测';
$lang->milestone->duration = '工期(天)';
$lang->milestone->cost = '成本(人时)';
$lang->milestone->forecastResults = '预测结果分析';
$lang->milestone->plannedValue = '计划值';
$lang->milestone->predictedValue = '预测值';
$lang->milestone->predictedValueDesc = '计算公式:如果项目进度绩效(SPI)=0,那么预测值=0,否则,预测值=计划值 除以 项目进度绩效(SPI)';
$lang->milestone->periodDeviation = '工期偏差';
$lang->milestone->costDeviation = '成本偏差';
$lang->milestone->nextStage = '下一里程碑阶段';
$lang->milestone->overallProject = '项目总体';
$lang->milestone->corrective = '纠偏措施';
$lang->milestone->timeOverrun = '总工期将超出:%s天。';
$lang->milestone->costOverrun = '总成本将超出:%s个单位。';
$lang->milestone->saveOtherProblem = '保存其他问题';
$lang->milestone->chart = new stdclass();
$lang->milestone->chart->title = '到目前为止项目进展趋势图';
$lang->milestone->chart->time = '第';
$lang->milestone->chart->week = '周';
$lang->milestone->chart->month = '月';
$lang->milestone->chart->workhour = '研发工作量分析图';
$lang->milestone->otherproblem = '6.其它问题';
$lang->milestone->problemandsuggest = '问题及解决建议';
$lang->milestone->suggest = '解决建议';
$lang->milestone->needhelp = '是否需要高层支持?';
$lang->milestone->prodescr = '问题描述';
$lang->milestone->quality = new stdclass();
$lang->milestone->quality->total = '合计';
$lang->milestone->quality->identify = '缺陷识别阶段';
$lang->milestone->quality->injection = '缺陷注入阶段';
$lang->milestone->quality->scale = '规模';
$lang->milestone->quality->identifyRate = '缺陷识别率';
$lang->milestone->quality->injectionRate = '缺陷注入率';
$lang->milestone->options = '操作';
-606
View File
@@ -1,606 +0,0 @@
<?php
class milestoneModel extends model
{
public function getPageNav($programID, $projectID, $productID)
{
$milestones = $this->loadModel('programplan')->getMilestones($programID);
if(empty($milestones)) return false;
$current = zget($milestones, $projectID) ? zget($milestones, $projectID) : current($milestones);
$currentProjectID = $projectID ? $projectID : key($milestones);
$program = $this->loadModel('project')->getByID($programID);
$selectHtml = '';
if($program->category == 'multiple')
{
$products = $this->loadModel('product')->getPairs($programID);
$currentProductID = $productID ? $productID : $this->product->getProductIDByProject($projectID);
if(!$currentProductID) $currentProductID = key($products);
$productName = $this->dao->findByID($currentProductID)->from(TABLE_PRODUCT)->fetch('name');
$pinYin = common::convert2Pinyin($products);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn' title=$productName>" . $productName . " <span class='caret'></span></a>";
$selectHtml .= '<div id="dropMenu" class="dropdown-menu search-list load-indicator" data-ride="searchList">';
$selectHtml .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$selectHtml .= '<div class="list-group"><div class="table-row"><div class="table-col col-left"><div class="list-group">';
foreach($products as $id => $name)
{
$selectHtml .= html::a(helper::createLink('milestone', 'index', "program={$programID}&project=0&productID=$id"), "<i class='icon icon-folder-outline'></i> " . $name, '', "title='{$name}' data-key='" . zget($pinYin, $name, '') . "'");
}
$selectHtml .='</div></div></div></div></div></div>';
$milestones = $this->loadModel('programplan')->getMilestoneByProduct($currentProductID);
$current = zget($milestones, $projectID) ? zget($milestones, $projectID) : current($milestones);
$currentProjectID = $projectID ? $projectID : key($milestones);
if(!$current) $current = $this->lang->noData;
}
$pinYin = common::convert2Pinyin($milestones);
$selectHtml .= "<div class='btn-group angle-btn'>";
$selectHtml .= "<a data-toggle='dropdown' class='btn' title=$current>" . $current . " <span class='caret'></span></a>";
$selectHtml .= '<div id="dropMenu" class="dropdown-menu search-list load-indicator" data-ride="searchList">';
$selectHtml .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
$selectHtml .= '<div class="list-group"><div class="table-row"><div class="table-col col-left"><div class="list-group">';
foreach($milestones as $id => $name)
{
$selectHtml .= html::a(helper::createLink('milestone', 'index', "program={$programID}&project=$id"), "<i class='icon icon-folder-outline'></i> " . $name, '', "title='{$name}' data-key='" . zget($pinYin, $name, '') . "'");
}
$selectHtml .='</div></div></div></div></div></div>';
return array($selectHtml, $currentProjectID);
}
public function getBasicInfo($programID, $projectID)
{
$program = $this->loadModel('project')->getByID($programID);
$project = $this->loadModel('project')->getByID($projectID);
/* Get startedWeeks and finishedWeeks.*/
$project->startedWeeks = $project->realStarted == '0000-00-00' ? 0 : ceil((strtotime(helper::today()) - strtotime($project->realStarted )) / 3600 / 24 / 7);
$project->finishedWeeks = $project->realFinished == '0000-00-00' ? 0 : ceil((strtotime(helper::today()) - strtotime($project->realFinished)) / 3600 / 24 / 7);
$project->offset = $project->realFinished == '0000-00-00' ? 0 : helper::diffDate($project->end, $project->realFinished);
$basicInfo = new stdclass();
$basicInfo->program = $program;
$basicInfo->project = $project;
return $basicInfo;
}
public function getProcess($programID, $projectID)
{
$process = new stdclass();
$program = $this->loadModel('project')->getByID($programID);
$project = $this->loadModel('project')->getByID($projectID);
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$projectIdList = $this->loadModel('programplan')->getProjectsByProduct($productID);
$projectBegin = $project->begin;
$projectEnd = $project->end;
$programBegin = $program->begin;
$today = helper::today();
$process->milestonePV = $this->getPV($projectID, $projectBegin, $projectEnd);
$process->nowPV = $this->getPV($projectIdList, $programBegin, $projectEnd);
$process->milestoneEV = $this->getEV($projectID, $projectBegin, $projectEnd);
$process->nowEV = $this->getEV($projectIdList, $programBegin, $projectEnd);
$process->milestoneAC = $this->getAC($projectID, $projectBegin, $projectEnd);
$process->nowAC = $this->getAC($projectIdList, $projectBegin, $projectEnd);
$process->milestoneSPI = $process->milestonePV == 0 ? 0 : round($process->milestoneEV / $process->milestonePV, 2);
$process->nowSPI = $process->nowPV == 0 ? 0 : round($process->nowEV / $process->nowPV, 2);
$process->milestoneCPI = $process->milestoneAC == 0 ? 0 : round($process->milestoneEV / $process->milestoneAC, 2);
$process->nowCPI = $process->nowAC == 0 ? 0 : round($process->nowEV / $process->nowAC, 2);
$process->milestoneSV = $process->milestonePV == 0 ? 0 : round(($process->milestoneEV - $process->milestonePV) / $process->milestonePV, 2) * 100;
$process->nowSV = $process->nowPV == 0 ? 0 : round(($process->nowEV - $process->nowPV) / $process->nowPV, 2) * 100;
$process->milestoneCV = $process->milestoneAC == 0 ? 0 : round(($process->milestoneEV - $process->milestoneAC) / $process->milestoneAC, 2) * 100;
$process->nowCV = $process->nowAC == 0 ? 0 : round(($process->nowEV - $process->nowAC) / $process->nowAC, 2) * 100;
$process->spiMin = '';
$process->spiMax = '';
$process->svMin = '';
$process->svMax = '';
$process->cpiMin = '';
$process->cpiMax = '';
$process->cvMin = '';
$process->cvMax = '';
$process->cvMax = '';
$process->cvMax = '';
$process->cvMax = '';
$process->nowSpiTip = '';
$process->nowCpiTip = '';
$process->milestoneSpiTip = '';
$process->milestoneCpiTip = '';
$spiTip = isset($this->config->custom->SPI) ? json_decode($this->config->custom->SPI->progressTip) : new stdclass();
$svTip = isset($this->config->custom->SV) ? json_decode($this->config->custom->SV->progressTip) : new stdclass();
$cpiTip = isset($this->config->custom->CPI) ? json_decode($this->config->custom->CPI->costTip) : new stdclass();
$cvTip = isset($this->config->custom->CV) ? json_decode($this->config->custom->CV->costTip) : new stdclass();
foreach($spiTip as $tip)
{
if($tip->min <= $process->milestoneSPI and $process->milestoneSPI < $tip->max) $process->milestoneSpiTip = $tip->tip;
if($tip->min <= $process->nowSPI and $process->nowSPI < $tip->max) $process->nowSpiTip = $tip->tip;
if($tip->range)
{
$process->spiMin = $tip->min;
$process->spiMax = $tip->max;
}
}
foreach($svTip as $tip)
{
if($tip->range)
{
$process->svMin = $tip->min;
$process->svMax = $tip->max;
}
}
foreach($cpiTip as $tip)
{
if($tip->min <= $process->milestoneCPI and $process->milestoneCPI < $tip->max) $process->milestoneCpiTip = $tip->tip;
if($tip->min <= $process->nowCPI and $process->nowCPI < $tip->max) $process->nowCpiTip = $tip->tip;
if($tip->range)
{
$process->cpiMin = $tip->min;
$process->cpiMax = $tip->max;
}
}
foreach($cvTip as $tip)
{
if($tip->range)
{
$process->cvMin = $tip->min;
$process->cvMax = $tip->max;
}
}
return $process;
}
public function getCharts($programID, $projectID)
{
$this->loadModel('weekly');
$charts = array();
$program = $this->loadModel('project')->getByID($programID);
$project = $this->loadModel('project')->getByID($projectID);
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$projectIdList = $this->loadModel('programplan')->getProjectsByProduct($productID);
$today = helper::today();
$begin = $program->begin;
$projectEnd = $project->end;
$end = $today > $projectEnd ? $projectEnd : date('Y-m-d', strtotime("$today + 7 days"));
$charts['PV'] = '[';
$charts['EV'] = '[';
$charts['AC'] = '[';
$i = 1;
$start = $begin;
while($start < $end)
{
$charts['labels'][] = $this->lang->milestone->chart->time . $i . $this->lang->milestone->chart->week;
$sunday = $this->weekly->getThisSunday($start);
$charts['PV'] .= $this->getPV($projectIdList, $begin, $sunday) . ',';
$charts['EV'] .= $this->getEV($projectIdList, $begin, $sunday) . ',';
$charts['AC'] .= $this->getAC($projectIdList, $begin, $sunday) . ',';
$start = date('Y-m-d', strtotime("$start + 7 days"));
$i ++;
}
$charts['PV'] .= ']';
$charts['EV'] .= ']';
$charts['AC'] .= ']';
return $charts;
}
public function getPV($projectID, $begin, $end)
{
$tasks = $this->dao->select('*')->from(TABLE_TASK)
->where('project')->in($projectID)
->andWhere('estStarted')->ge($begin)
->andWhere("(estStarted < '$end' or estStarted='0000-00-00')")
->andWhere('deleted')->eq(0)
->fetchAll('id');
$PV = 0;
foreach($tasks as $task)
{
if($task->estStarted == '0000-00-00') $task->estStarted = date('Y-m-d', strtotime($task->openedDate));
if($task->deadline < $end)
{
$PV += $task->estimate;
continue;
}
$fullDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $task->deadline);
$passedDays = $this->loadModel('holiday')->getActualWorkingDays($task->estStarted, $end);
$PV += round(count($passedDays) * $task->estimate / count($fullDays), 2);
}
return $PV;
}
public function getEV($projectID, $begin, $end)
{
$tasks = $this->dao->select('*')->from(TABLE_TASK)
->where('estStarted')->ge($begin)
->andWhere('estStarted')->lt($end)
->andWhere('consumed')->gt(0)
->andWhere('status')->ne('cancel')
->andWhere('project')->in($projectID)
->fetchAll('id');
$EV = 0;
foreach($tasks as $task)
{
if($task->status == 'done' or $task->closedReason == 'done')
{
$EV += $task->estimate;
}
else
{
$task->progress = round($task->consumed / ($task->consumed + $task->left), 2) * 100;
$EV += round($task->estimate * $task->progress / 100, 2);
}
}
return $EV;
}
public function getAC($projectID, $begin, $end)
{
$consumed = $this->dao->select('sum(t1.consumed) as consumed')
->from(TABLE_TASKESTIMATE)->alias('t1')
->leftJoin(TABLE_TASK)->alias('t2')->on('t1.task=t2.id')
->where('t1.date')->ge($begin)
->andWhere('t1.date')->lt($end)
->andWhere('t2.project')->in($projectID)
->fetch('consumed');
if(!$consumed) $consumed = 0;
return round($consumed, 2);
}
public function getProductQuality($programID, $projectID)
{
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$stages = $this->loadModel('programplan')->getPairs($programID, $productID);
$reviews = $this->loadModel('review')->getPairs($programID, $productID);
unset($stages[0]);
foreach($reviews as $reviewID => $review)
{
foreach($stages as $stageID => $stageName)
{
$productQuality['stages'][$stageID]['total'] = 0;
$bugs = $this->dao->select("count(*) as bugs")->from(TABLE_BUG)
->where('project')->eq($stageID)
->andWhere('identify')->eq($reviewID)
->andWhere('resolution')->notin('bydesign,duplicate,notrepro,willnotfix')
->andWhere('deleted')->eq(0)
->fetch('bugs');
$issues = $this->dao->select("count(*) as issues")->from(TABLE_REVIEWISSUE)
->where('injection')->eq($stageID)
->andWhere('review')->eq($reviewID)
->andWhere('resolution')->notin('bydesign,duplicate,notrepro,willnotfix')
->andWhere('deleted')->eq(0)
->fetch('issues');
$productQuality['stages'][$stageID]['name'] = $stageName;
$productQuality['stages'][$stageID][$reviewID]['counts'] = ($bugs + $issues) == 0 ? '' : (int)($bugs + $issues);
//$productQuality['stages'][$stageID]['estimate'] = $this->dao->select('estimate')->from(TABLE_PROJECT)->where('id')->eq($stageID)->fetch('estimate');
}
}
if(isset($productQuality['stages']))
foreach($productQuality['stages'] as $stageID => $stages)
{
$total = 0;
foreach($stages as $reviewID => $stage) $total += (int) zget($stage, 'counts', 0);
$productQuality['stages'][$stageID]['total'] = $total;
}
$productQuality['reviews'] = $reviews;
return $productQuality;
}
public function getWorkhours($programID, $projectID)
{
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$stages = $this->loadModel('programplan')->getPairs($programID, $productID);
unset($stages[0]);
$dev = 0;
$to = 0;
$review = 0;
$qa = 0;
foreach($stages as $stageID => $stageName)
{
$workhours[$stageID]['name'] = $stageName;
$workhours[$stageID]['dev'] = $this->getWorkhourByType($stageID, 'devel');
$workhours[$stageID]['to'] = $this->getTo($stageID);
$workhours[$stageID]['review'] = $this->getReviewHours($stageID, $projectID);
$workhours[$stageID]['qa'] = $this->getWorkhourByType($stageID, 'test');;
$workhours[$stageID]['count'] = $workhours[$stageID]['dev'] + $workhours[$stageID]['to'] + $workhours[$stageID]['review'] + $workhours[$stageID]['qa'];
$workhours[$stageID]['qaToDev'] = ($workhours[$stageID]['dev'] + $workhours[$stageID]['to']) == 0 ? 0 : round($workhours[$stageID]['qa'] / ($workhours[$stageID]['dev'] + $workhours[$stageID]['to']), 2);
$dev += $workhours[$stageID]['dev'];
$to += $workhours[$stageID]['to'];
$review += $workhours[$stageID]['review'];
$qa += $workhours[$stageID]['qa'];
}
$workhours['count']['dev'] = $dev;
$workhours['count']['to'] = $to;
$workhours['count']['review'] = $review;
$workhours['count']['qa'] = $qa;
$workhours['count']['total'] = $dev + $to + $review + $qa;
return $workhours;
}
public function getWorkhourByType($stageID, $type)
{
$consumed = $this->dao->select('sum(consumed) as consumed')->from(TABLE_TASK)->where('project')->eq($stageID)->andWhere('type')->eq($type)->fetch('consumed');
return round($consumed, 2);
}
public function getReviewHours($stageID, $projectID = 0)
{
$productID = $this->loadModel('product')->getProductIDByProject($projectID);
$stage = $this->loadModel('programplan')->getByID($stageID);
$consumed = 0;
$consumed += $this->getWorkhourByType($stageID, 'review');
$attribute = isset($this->config->milestone->{$stage->attribute}) ? $this->config->milestone->{$stage->attribute} : '';
$reviewConsumed = $this->dao->select('sum(t1.consumed) as consumed')->from(TABLE_REVIEWRESULT)->alias('t1')
->leftJoin(TABLE_REVIEW)->alias('t2')->on('t1.review=t2.id')
->leftJoin(TABLE_OBJECT)->alias('t3')->on('t2.object=t3.id')
->where('t3.category')->in($attribute)
->andWhere('t3.product')->eq($productID)
->fetch('consumed');
$consumed += $reviewConsumed;
return round($consumed, 2);
}
public function getTo($stageID)
{
$tasks = $this->dao->select('id, activatedDate')->from(TABLE_TASK)->where('project')->eq($stageID)->andWhere('activatedDate')->ne('0000-00-00')->fetchPairs();
$to = 0;
foreach($tasks as $taskID => $activatedDate)
{
$consumed = $this->dao->select('sum(consumed) as consumed')->from(TABLE_TASKESTIMATE)
->where('task')->eq($taskID)
->andWhere('date')->ge($activatedDate)
->fetch('consumed');
$to += $consumed;
}
return round($to, 2);
}
public function getProjectRisk($programID)
{
return $this->dao->select('*,riskindex * 1 as riskindex')->from(TABLE_RISK)
->where('status')->eq('active')
->andWhere('program')->eq($programID)
->andWhere('deleted')->eq(0)
->orderBy('riskindex_desc')
->limit(5)
->fetchAll();
}
public function getStageDemand($programID, $projectID, $productID, $stageList = array())
{
$productList = array();
foreach($stageList as $stageID => $name) $productList[$stageID] = $productID;
$stages = $this->loadModel('programplan')->getPlans($programID, $productID);
$originStory = array();
$afterStory = array();
$changeStory = array();
foreach($stages as $id => $stage)
{
$productID = $productList[$id];
if($productID === 0) continue;
$originStory[$id] = $this->dao->select('count(id) as total')->from(TABLE_STORY)
->where('product')->eq($productID)
->andWhere('type')->eq('requirement')
->andWhere('openedDate')->between($stage->begin, $stage->end)
->fetch('total');
$afterStory[$id] = $this->dao->select('count(id) as total')->from(TABLE_STORY)
->where('product')->eq($productID)
->andWhere('type')->eq('requirement')
->andWhere('openedDate')->between($stage->begin, $stage->end)
->andWhere('deleted')->eq(0)
->fetch('total');
$sql = 'select count(id) as total from ' . TABLE_STORY;
$sql .= ' where (product = ' . $productID . ' and type = "requirement" and openedDate between "' . $stage->begin . '" and "' . $stage->end . '" and deleted = "1")';
$sql .= ' or (product = ' . $productID . ' and type = "requirement" and openedDate between "' . $stage->begin . '" and "' . $stage->end . '" and version > 1)';
$changeStory[$id] = $this->dao->query($sql)->fetch();
foreach($stage->children as $stage)
{
$id = $stage->id;
$productID = $productList[$id];
if($productID === 0) continue;
$originStory[$id] = $this->dao->select('count(id) as total')->from(TABLE_STORY)
->where('product')->eq($productID)
->andWhere('type')->eq('requirement')
->andWhere('openedDate')->between($stage->begin, $stage->end)
->fetch('total');
$afterStory[$id] = $this->dao->select('count(id) as total')->from(TABLE_STORY)
->where('product')->eq($productID)
->andWhere('type')->eq('requirement')
->andWhere('openedDate')->between($stage->begin, $stage->end)
->andWhere('deleted')->eq(0)
->fetch('total');
$sql = 'select count(id) as total from ' . TABLE_STORY;
$sql .= ' where (product = ' . $productID . ' and type = "requirement" and openedDate between "' . $stage->begin . '" and "' . $stage->end . '" and deleted = "1")';
$sql .= ' or (product = ' . $productID . ' and type = "requirement" and openedDate between "' . $stage->begin . '" and "' . $stage->end . '" and version > 1)';
$changeStory[$id] = $this->dao->query($sql)->fetch();
}
}
$stageInfo = array('origin' => array(), 'after' => array(), 'change' => array());
$beginID = 0;
foreach($stageList as $key => $stage)
{
$beginID === 0 ? $stageInfo['origin'][$key] = $originStory[$key] : $stageInfo['origin'][$key] = $afterStory[$beginID];
$stageInfo['after'][$key] = $afterStory[$key];
$stageInfo['change'][$key] = $changeStory[$key]->total;
$beginID = $key;
}
return $stageInfo;
}
public function getMeasures($programID, $projectID)
{
if(empty($projectID)) return array();
return $this->dao->select('id,contents')->from(TABLE_SOLUTIONS)
->where('program')->eq($programID)
->andWhere('project')->eq($projectID)
->andWhere('type')->eq('measures')
->andWhere('deleted')->eq(0)
->fetchPairs('id', 'contents');
}
public function ajaxAddMeasures($data)
{
$this->dao->update(TABLE_SOLUTIONS)
->set('deleted')->eq(1)
->where('program')->eq($data->programID)
->andWhere('project')->eq($data->projectID)
->andWhere('type')->eq('measures')
->exec();
foreach($data->measures as $item)
{
$item = trim($item);
if(empty($item)) continue;
$addData = new stdClass();
$addData->program = $data->programID;
$addData->project = $data->projectID;
$addData->contents = $item;
$addData->type = 'measures';
$addData->addedBy = $this->app->user->account;
$addData->addedDate = helper::now();
$addData->deleted = 0;
$this->dao->insert(TABLE_SOLUTIONS)->data($addData)->autoCheck()->exec();
}
return 1;
}
public function saveOtherProblem()
{
$data = fixer::input('post')->get();
$this->dao->update(TABLE_SOLUTIONS)
->set('deleted')->eq(1)
->where('program')->eq($data->programID)
->andWhere('project')->eq($data->projectID)
->andWhere('type')->eq('otherproblem')
->exec();
foreach($data->contents as $key => $contents){
$addData = new stdClass();
$addData->program = $data->programID;
$addData->project = $data->projectID;
$addData->contents = $contents;
$addData->support = $data->support[$key];
$addData->measures = $data->measures[$key];
$addData->type = 'otherproblem';
$addData->addedBy = $this->app->user->account;
$addData->addedDate = helper::now();
$addData->deleted = 0;
$this->dao->insert(TABLE_SOLUTIONS)->data($addData)->autoCheck()->exec();
}
}
public function otherProblemsList($programID,$projectID)
{
$list = $this->dao->select('*')
->from(TABLE_SOLUTIONS)
->where('program')->eq($programID)
->andWhere('project')->eq($projectID)
->andWhere('type')->eq('otherproblem')
->andWhere('deleted')->eq(0)
->fetchAll();
return $list;
}
public function getNextMilestone($programID, $projectID, $stageList)
{
$nextID = $this->dao->select('min(id) as id')->from(TABLE_PROJECT)
->where('id')->gt($projectID)
->andWhere('program')->eq($programID)
->andWhere('milestone')->eq(1)
->fetch('id');
$stageID = array_keys($stageList);
$nextID = in_array($nextID, $stageID) ? $nextID : 0;
$totalDays = $this->dao->select('sum(days) as days')->from(TABLE_PROJECT)
->where('id')->in($stageID)
->andWhere('program')->eq($programID)
->andWhere('deleted')->eq(0)
->fetch('days');
$totalHours = $this->dao->select('sum(days * hours) as totalHours')->from(TABLE_TEAM)
->where('root')->in($stageID)
->fetch('totalHours');
$nextHours = 0;
$nextDays = 0;
if($nextID)
{
$nextDays = $this->dao->select('days')->from(TABLE_PROJECT)
->where('id')->eq($nextID)
->andWhere('program')->eq($programID)
->andWhere('deleted')->eq(0)
->fetch('days');
$nextHours = $this->dao->select('sum(days * hours) as totalHours')->from(TABLE_TEAM)
->where('root')->eq($nextID)
->fetch('totalHours');
}
$result = new stdClass();
$result->nextDays = empty($nextDays) ? 0 : $nextDays;
$result->nextHours = empty($nextHours) ? 0 : $nextHours;
$result->totalDays = empty($totalDays) ? 0 : $totalDays;
$result->totalHours = empty($totalHours) ? 0 : $totalHours;
return $result;
}
public function ajaxSaveEstimate($taskID,$estimate)
{
$this->dao->update(TABLE_PROJECT)
->set('estimate')
->eq($estimate)
->where('id')->eq($taskID)
->exec();
if(dao::isError())
{
echo js::error(dao::getError());
}
}
}
-27
View File
@@ -1,27 +0,0 @@
<table class="table table-bordered basicInfo">
<tbody>
<tr>
<td rowspan='3'><strong><?php echo $lang->milestone->common;?></strong></td>
<th><?php echo $lang->program->name;?></th>
<td colspan='3'><?php echo $basicInfo->program->name;?></td>
<th><?php echo $lang->program->end;?></th>
<td><?php echo $basicInfo->project->end;?></td>
</tr>
<tr>
<th><?php echo $lang->program->PM;?></th>
<td><?php echo zget($users, $basicInfo->program->PM);?></td>
<th><?php echo $lang->milestone->name;?></th>
<td><?php echo $basicInfo->project->name;?></td>
<th><?php echo $lang->program->realFinished;?></th>
<td><?php echo $basicInfo->project->realFinished;?></td>
</tr>
<tr>
<th><?php echo $lang->milestone->startedWeeks;?></th>
<td><?php echo $basicInfo->project->startedWeeks;?></td>
<th><?php echo $lang->milestone->finishedWeeks;?></th>
<td><?php echo $basicInfo->project->finishedWeeks;?></td>
<th><?php echo $lang->milestone->offset;?></th>
<td><?php echo $basicInfo->project->offset;?></td>
</tr>
</tbody>
</table>
-115
View File
@@ -1,115 +0,0 @@
<div class='milestone-chart' id='milestoneChart'>
<div class='chart-canvas scrollbar-hover'>
<div class='chart-wrapper'>
<canvas width='400' height='120' data-responsive='true'></canvas>
</div>
</div>
<div class='chart-unit'><?php echo "({$lang->project->workHour})";?></div>
<div class='chart-legend'>
<span class="barline line-pv">PV</span>
<span class="barline line-ev">EV</span>
<span class="barline line-ac">AC</span>
</div>
</div>
<style>
.milestone-chart {position: relative}
.milestone-chart .chart-canvas {overflow: auto; max-width: 1002px}
.milestone-chart .chart-wrapper {background: none; padding: 15px 0 0 0}
.milestone-chart .chart-unit {position: absolute; left: 10px; top: 0;}
.milestone-chart .chart-legend {position: absolute; right: 5px; top: 0;}
.milestone-chart .barline {padding-left: 20px; position: relative; display: inline-block; line-height: 20px}
.milestone-chart .barline + .barline {margin-left: 5px}
.milestone-chart .barline:before {content: ' '; display: block; position: absolute; top: 8px; left: 0; width: 16px; height: 3px; background: #0c64eb}
.milestone-chart .barline.line-ev:before {background: rgb(0, 218, 136)}
.milestone-chart .barline.line-ac:before {background: rgb(255, 145, 0)}
</style>
<script>
function initMilestoneChart()
{
var data =
{
labels: <?php echo json_encode($charts['labels'])?>,
datasets: [
{
label: 'PV',
color: '#0c64eb',
pointColor: '#0c64eb',
pointStrokeColor: '#0c64eb',
pointHighlightStroke: '#0c64eb',
fillColor: 'rgba(0,106,241, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['PV']?>
},
{
label: 'EV',
color: 'rgb(0, 218, 136)',
pointColor: 'rgb(0, 218, 136)',
pointStrokeColor: 'rgb(0, 218, 136)',
pointHighlightStroke: 'rgb(0, 218, 136)',
fillColor: 'rgb(0, 218, 136, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['EV']?>
},
{
label: 'AC',
color: 'rgb(255, 145, 0)',
pointColor: 'rgb(255, 145, 0)',
pointStrokeColor: 'rgb(255, 145, 0)',
pointHighlightStroke: 'rgb(255, 145, 0)',
fillColor: 'rgb(255, 145, 0, .07)',
pointHighlightFill: '#fff',
data: <?php echo $charts['AC']?>
}]
};
var betterWidth = data.labels.length * 15;
var renderChart = function()
{
var $chart = $('#milestoneChart');
var $wrapper = $chart.find('.chart-wrapper');
var $canvas = $chart.find('canvas');
var $chartCanvas = $chart.find('.chart-canvas');
if (betterWidth > 400)
{
var updateWrapperSize = function()
{
$wrapper.hide();
$chartCanvas.css('max-width', 'initial');
var maxWidth = $chartCanvas.width();
$chartCanvas.css('max-width', maxWidth);
$chart.toggleClass('has-scrollbar', maxWidth < betterWidth);
$wrapper.show();
};
updateWrapperSize();
$(window).on('resize', updateWrapperSize);
$wrapper.css('min-width', betterWidth);
$canvas.attr(
{
width: betterWidth,
height: Math.min(200, Math.floor(betterWidth / 4))
});
}
$canvas.lineChart(data,
{
animation: betterWidth < 400,
pointDotStrokeWidth: 1,
pointDotRadius: 2,
datasetStrokeWidth: 2,
datasetFill: false,
datasetStroke: true,
scaleShowBeyondLine: true,
responsive: true,
bezierCurve: false,
scaleFontColor: '#838A9D',
tooltipXPadding: 10,
tooltipYPadding: 10,
multiTooltipTitleTemplate: '<%= label %> <?php echo $lang->project->workHour;?> /h',
multiTooltipTemplate: '<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>',
});
}
setTimeout(renderChart, betterWidth > 200 ? 100 : 10);
}
initMilestoneChart();
</script>
-49
View File
@@ -1,49 +0,0 @@
<div class='panel-body scroll-table' style='padding: 0;'>
<table class="table table-bordered">
<thead>
<tr>
<?php count($stageList) === 0 ? $totalStoryTd = 4 : $totalStoryTd = 3;?>
<th colspan="<?php echo $totalStoryTd + count($stageList);?>"><?php echo $lang->milestone->demandStatus;?></th>
</tr>
<tr>
<th rowspan="2"><?php echo $lang->milestone->storyUnit;?></th>
<th colspan="<?php echo count($stageList);?>" class="text-center"><?php echo $lang->milestone->engineeringStage;?></th>
<th rowspan="2" colspan="2"><?php echo $lang->milestone->rateChange;?></th>
</tr>
<tr>
<?php foreach($stageList as $stage):?>
<th><?php echo $stage;?></th>
<?php endforeach;?>
</tr>
</thead>
<tbody>
<tr>
<td><strong><?php echo $lang->milestone->originalStory;?></strong></td>
<?php if(count($stageList) === 0) echo '<td rowspan="3"></td>';?>
<?php foreach($stageList as $key => $stage):?>
<td><?php echo $stageInfo['origin'][$key];?></td>
<?php endforeach;?>
<td colspan="2" rowspan="3">
<?php
$rateNumber = '0%';
if(count($stageInfo['after']) && current($stageInfo['after']))
$rateNumber = round((array_sum($stageInfo['change'])/current($stageInfo['origin'])) * 100, 2).'%';
echo $rateNumber;
?>
</td>
</tr>
<tr>
<td><strong><?php echo $lang->milestone->modifyNumber;?></strong></td<>
<?php foreach($stageList as $key => $stage):?>
<td><?php echo $stageInfo['after'][$key];?></td>
<?php endforeach;?>
</tr>
<tr>
<td><strong><?php echo $lang->milestone->changeStory;?></strong></td>
<?php foreach($stageList as $key => $stage):?>
<td><?php echo $stageInfo['change'][$key];?></td>
<?php endforeach;?>
</tr>
</tbody>
</table>
</div>
-66
View File
@@ -1,66 +0,0 @@
<?php include '../../common/view/header.html.php';?>
<style>
table .btn.addItem, table .btn.delItem{padding: 3px 8px; font-size: 12px; line-height: 18px; border-radius: 4px;}
.measures-input{width: 80%; float: left; margin-right: 5px;}
.main-table tbody>tr>td:first-child{padding-left: 8px;}
.angle-btn+.angle-btn{ border-left: 1px solid #0c64eb;}
</style>
<?php if($projectID):?>
<div id="mainContent" class="main-row fade in">
<div class="main-col">
<div class="main-table">
<?php include 'basicinfo.html.php';?>
<?php include 'process.html.php';?>
<div class="cell"><?php include 'chart.html.php';?></div>
<?php include 'productquality.html.php';?>
<?php include 'workhour.html.php';?>
<?php include 'progress.html.php';?>
<?php include 'rectifying.html.php';?>
<?php include 'condition.html.php';?>
<?php include 'projectrisk.html.php';?>
<?php include 'otherproblem.html.php';?>
</div>
</div>
</div>
<?php js::set('measuresUrl', $this->createLink('milestone', 'ajaxAddMeasures'));?>
<script>
function addItem(add)
{
var rowspan = $("#measuresTd").attr("rowspan");
$("#measuresTd").attr("rowspan", Number(rowspan) + 1);
$(add).parent().parent().after('<tr>' + $("#measuresDiv").html() + '</tr>');
submitMeasurse();
}
function delItem(del)
{
if($(del).attr('id')) return false;
var rowspan = $("#measuresTd").attr("rowspan");
if(rowspan == '1') return false;
$("#measuresTd").attr("rowspan", Number(rowspan) - 1);
$(del).parent().parent().remove();
submitMeasurse();
}
function submitMeasurse()
{
$.ajax(
{
type: "post",
url: measuresUrl,
data: $("#ajaxFormMeasures").serialize(),
success: function(data)
{
}
});
}
</script>
<?php else:?>
<div class='main-col'>
<div class="table-empty-tip">
<p><?php echo $lang->noData;?></p>
</div>
</div>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>
@@ -1,73 +0,0 @@
<form target="hiddenwin" method="post" action="<?php echo $this->createLink('milestone','saveOtherProblem');?>">
<table class="table table-bordered" id="otherproblems">
<thead>
<tr>
<th colspan='5'><?php echo $lang->milestone->otherproblem;?></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan='<?php echo 2 + count($otherproblems);?>' id='problemTd'><?php echo $lang->milestone->problemandsuggest;?></td>
<td><?php echo $lang->milestone->prodescr;?></td>
<td><?php echo $lang->milestone->needhelp;?></td>
<td><?php echo $lang->milestone->suggest;?></td>
<td><?php echo $lang->milestone->options;?></td>
</tr>
<?php if(empty($otherproblems)): ?>
<tr>
<td><input type="text" value="" name="contents[]" class="form-control"/></td>
<td><input type="text" value="" name="support[]" class="form-control"/></td>
<td><input type="text" value="" name="measures[]" class="form-control"/></td>
<td>
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItems($(this))">
<i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItems($(this))">
<i class="icon icon-close"></i></button>
<?php echo html::submitButton('', '', 'btn btn-primary');?>
</td>
</tr>
<?php endif;?>
<?php foreach($otherproblems as $value):?>
<tr>
<td><input type="text" value="<?php echo $value->contents;?>" name="contents[]" class="form-control"/></td>
<td><input type="text" value="<?php echo $value->support;?>" name="support[]" class="form-control"/></td>
<td><input type="text" value="<?php echo $value->measures;?>" name="measures[]" class="form-control"/></td>
<td>
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItems($(this))">
<i class="icon icon-plus"></i></button>
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItems($(this))">
<i class="icon icon-close"></i></button>
<?php echo html::submitButton('', '', 'btn btn-primary');?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php echo html::hidden('programID', $programID);?>
<?php echo html::hidden('projectID', $projectID);?>
</form>
<?php js::set('save', $lang->milestone->save);?>
<script>
function addItems(obj)
{
var items = '<tr>\
<td><input type="text" value="" name="contents[]" class="form-control"/></td>\
<td><input type="text" value="" name="support[]" class="form-control"/></td>\
<td><input type="text" value="" name="measures[]" class="form-control"/></td>\
<td>\
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItems($(this))">\
<i class="icon icon-plus"></i></button>\
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItems($(this))">\
<i class="icon icon-close"></i></button>\
<button type="submit" id="submit" class="btn btn-primary">' + save +'</button>\
</td></tr>';
obj.parent('td').parent('tr').after(items);
$('#problemTd').attr('rowspan', $('#problemTd').attr('rowspan') + 1)
}
function deleteItems(obj)
{
var len = $('#otherproblems tbody tr').length;
if(len > 2) obj.parent('td').parent('tr').remove();
}
</script>
-74
View File
@@ -1,74 +0,0 @@
<table class="table table-bordered basicInfo">
<thead>
<tr>
<th rowspan='2'><?php echo $lang->milestone->processCommon;?></th>
<th rowspan='2'><?php echo $lang->milestone->stage;?></th>
<th rowspan='2'><?php echo $lang->milestone->toNow;?></th>
<th colspan='2' class='text-center'><?php echo $lang->milestone->targetRange;?></th>
<th rowspan='2' class='text-center'><?php echo $lang->milestone->analysis;?></th>
<th rowspan='2' class='text-center'><?php echo $lang->milestone->stage;?></th>
<th rowspan='2' class='text-center'><?php echo $lang->milestone->toNow;?></th>
</tr>
<tr>
<th class='text-center'><?php echo $lang->milestone->ge;?></th>
<th class='text-center'><?php echo $lang->milestone->le;?></th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $lang->milestone->PV;?></td>
<td><?php echo $process->milestonePV;?></td>
<td><?php echo $process->nowPV;?></td>
<td class='text-center'>-</td>
<td class='text-center'>-</td>
<td rowspan='3' class='text-center'><?php echo $lang->milestone->process;?></td>
<td rowspan='3'><?php echo $process->milestoneSpiTip;?></td>
<td rowspan='3'><?php echo $process->nowSpiTip;?></td>
</tr>
<tr>
<td><?php echo $lang->milestone->EV;?></td>
<td><?php echo $process->milestoneEV;?></td>
<td><?php echo $process->nowEV;?></td>
<td class='text-center'>-</td>
<td class='text-center'>-</td>
</tr>
<tr>
<td><?php echo $lang->milestone->AC;?></td>
<td><?php echo $process->milestoneAC;?></td>
<td><?php echo $process->nowAC;?></td>
<td class='text-center'>-</td>
<td class='text-center'>-</td>
</tr>
<tr>
<td><?php echo $lang->milestone->SPI;?></td>
<td><?php echo $process->milestoneSPI;?></td>
<td><?php echo $process->nowSPI;?></td>
<td class='text-center'><?php echo $process->spiMin;?></td>
<td class='text-center'><?php echo $process->spiMax;?></td>
<td rowspan='4' class='text-center'><?php echo $lang->milestone->projectCost;?></td>
<td rowspan='4'><?php echo $process->milestoneCpiTip;?></td>
<td rowspan='4'><?php echo $process->nowCpiTip;?></td>
</tr>
<tr>
<td><?php echo $lang->milestone->CPI;?></td>
<td><?php echo $process->milestoneCPI;?></td>
<td><?php echo $process->nowCPI;?></td>
<td class='text-center'><?php echo $process->cpiMin;?></td>
<td class='text-center'><?php echo $process->cpiMax;?></td>
</tr>
<tr>
<td><?php echo $lang->milestone->SV;?></td>
<td><?php echo $process->milestoneSV . '%';?></td>
<td><?php echo $process->nowSV . '%';?></td>
<td class='text-center'><?php echo $process->svMin . '%';?></td>
<td class='text-center'><?php echo $process->svMax . '%';?></td>
</tr>
<tr>
<td><?php echo $lang->milestone->CV;?></td>
<td><?php echo $process->milestoneCV . '%';?></td>
<td><?php echo $process->nowCV . '%';?></td>
<td class='text-center'><?php echo $process->cvMin . '%';?></td>
<td class='text-center'><?php echo $process->cvMax . '%';?></td>
</tr>
</tbody>
</table>
@@ -1,53 +0,0 @@
<div class='panel-body scroll-table' style='padding: 0;'>
<table class="table table-bordered">
<thead>
<tr>
<th rowspan='2'><?php echo $lang->milestone->quality->identify;?></th>
<th class='text-center' colspan='<?php if(isset($productQuality['stages'])) echo count($productQuality['stages']);?>'>
<?php echo $lang->milestone->quality->injection;?></th>
<th rowspan='2'><?php echo $lang->milestone->quality->scale;?></th>
<th rowspan='2'><?php echo $lang->milestone->quality->identifyRate;?></th>
</tr>
<tr>
<?php if(isset($productQuality['stages'])):?>
<?php foreach($productQuality['stages'] as $stages):?>
<th><?php echo $stages['name'];?></th>
<?php endforeach;?>
<?php endif;?>
</tr>
</thead>
<tbody>
<?php foreach($productQuality['reviews'] as $reviewID => $reviewName):?>
<tr>
<td><?php echo $reviewName;?></td>
<?php foreach($productQuality['stages'] as $stages):?>
<td><?php echo $stages[$reviewID]['counts'];?></td>
<?php endforeach;?>
<td></td>
<td></td>
</tr>
<?php endforeach;?>
<tr>
<th><?php echo $lang->milestone->quality->total;?></th>
<?php if(isset($productQuality['stages'])):?>
<?php foreach($productQuality['stages'] as $stages):?>
<td><?php echo $stages['total'];?></td>
<?php endforeach;?>
<?php endif;?>
<td></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->milestone->quality->injectionRate;?>
</th>
<?php if(isset($productQuality['stages'])):?>
<?php foreach($productQuality['stages'] as $stages):?>
<td></td>
<?php endforeach;?>
<?php endif;?>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
-76
View File
@@ -1,76 +0,0 @@
<table class="table table-bordered">
<thead>
<tr>
<th rowspan="2"><?php echo $lang->milestone->paogressForecast;?></th>
<th colspan="3" class="text-center"><?php echo $lang->milestone->duration;?></th>
<th colspan="3" class="text-center"><?php echo $lang->milestone->cost;?></th>
<th colspan="3" rowspan="2"><?php echo $lang->milestone->forecastResults;?></th>
</tr>
<tr>
<th><?php echo $lang->milestone->plannedValue;?></th>
<th><?php echo $lang->milestone->predictedValue;?>
<i class="icon icon-help" title="<?php echo $lang->milestone->predictedValueDesc;?>"></i>
</th>
<th><?php echo $lang->milestone->periodDeviation;?></th>
<th><?php echo $lang->milestone->plannedValue;?></th>
<th><?php echo $lang->milestone->predictedValue;?></th>
<th><?php echo $lang->milestone->costDeviation;?></th>
</tr>
</thead>
<tbody>
<tr>
<td><strong><?php echo $lang->milestone->nextStage;?></strong></td>
<td><?php echo $nextMilestone->nextDays;?></td>
<td>
<?php
$nextDuration = empty($process->milestoneSPI) || empty($nextMilestone->nextDays) ? 0 : round($nextMilestone->nextDays/$process->milestoneSPI, 2);
echo $nextDuration;
$nextDurationValue = $nextMilestone->nextDays - $nextDuration;
?>
</td>
<td><?php echo $nextDurationValue;?></td>
<td><?php echo $nextMilestone->nextHours;?></td>
<td>
<?php
$nextCost = empty($process->nowCPI) || empty($nextMilestone->nextHours) ? 0 : round($nextMilestone->nextHours/$process->milestoneCPI);
echo $nextCost;
$nextCostValue = $nextMilestone->nextHours - $nextCost;
?>
</td>
<td><?php echo $nextCostValue;?></td>
<td colspan="3">
<?php
if($nextDurationValue < 0) echo sprintf($lang->milestone->timeOverrun, abs($nextDurationValue));
if($nextCostValue < 0) echo sprintf($lang->milestone->costOverrun, abs($nextCostValue));
?>
</td>
</tr>
<tr>
<td><strong><?php echo $lang->milestone->overallProject;?></strong></td>
<td><?php echo $nextMilestone->totalDays;?></td>
<td>
<?php
$totalDuration = empty($process->milestoneSPI) || empty($nextMilestone->totalDays) ? 0 : round($nextMilestone->totalDays/$process->milestoneSPI, 2);
echo $totalDuration;
$totalDurationValue = $nextMilestone->totalDays - $totalDuration;
?>
</td>
<td><?php echo $totalDurationValue;?></td>
<td><?php echo $nextMilestone->totalHours;?></td>
<td>
<?php
$totalCost = empty($process->nowCPI) || empty($nextMilestone->totalHours) ? 0 : round($nextMilestone->totalHours/$process->nowCPI, 2);
echo $totalCost;
$totalCostValue = $nextMilestone->totalHours - $totalCost;
?>
</td>
<td><?php echo $totalCostValue;?></td>
<td colspan="3">
<?php
if($totalDurationValue < 0) echo sprintf($lang->milestone->timeOverrun, abs($totalDurationValue));
if($totalCostValue < 0) echo sprintf($lang->milestone->costOverrun, abs($totalCostValue));
?>
</td>
</tr>
</tbody>
</table>
@@ -1,29 +0,0 @@
<table class="table table-bordered">
<thead>
<tr><th colspan="6"><?php echo $lang->milestone->projectRisk;?></th></tr>
<tr>
<th><?php echo $lang->milestone->riskCountermove;?></th>
<th><?php echo $lang->milestone->riskDescriptio;?></th>
<th><?php echo $lang->milestone->riskPossibility;?></th>
<th><?php echo $lang->milestone->riskSeriousness;?></th>
<th><?php echo $lang->milestone->riskFactor;?></th>
<th><?php echo $lang->milestone->riskMeasures;?></th>
</tr>
</thead>
<tbody>
<?php $totalRisk = count($projectRisk);?>
<?php foreach($projectRisk as $risk):?>
<tr>
<?php if($totalRisk):?>
<td rowspan="<?php echo $totalRisk;?>"><strong><?php echo $lang->milestone->riskAccumulate;?></strong></td>
<?php endif;?>
<td><?php echo $risk->name;?></td>
<td><?php echo $risk->impact;?></td>
<td><?php echo $risk->probability;?></td>
<td><?php echo $risk->riskindex;?></td>
<td><?php echo $risk->prevention;?></td>
</tr>
<?php $totalRisk = 0;?>
<?php endforeach;?>
</tbody>
</table>
-42
View File
@@ -1,42 +0,0 @@
<form method="post" id="ajaxFormMeasures">
<table class="table table-bordered">
<tbody>
<?php if(count($measures)):?>
<?php $totalMeasures = count($measures);?>
<?php $delOrigin = 'id="delOrigin"';?>
<?php foreach($measures as $item):?>
<tr>
<?php if($totalMeasures):?>
<td rowspan="<?php echo $totalMeasures;?>" class="text-center" id="measuresTd"><strong><?php echo $lang->milestone->corrective;?></strong></td>
<?php endif;?>
<td colspan="6">
<?php echo html::input('measures[]', $item, 'class="form-control measures-input" onchange="submitMeasurse()";');?>
<?php echo html::a('javascript:;', '<i class="icon icon-plus"></i>', '', 'class="btn btn-link addItem" onclick="addItem(this)"');?>
<?php echo html::a('javascript:;', '<i class="icon icon-close"></i>', '', 'class="btn btn-link delItem" onclick="delItem(this)"' . $delOrigin);?>
<?php $totalMeasures = 0;?>
<?php $delOrigin = '';?>
</td>
</tr>
<?php endforeach;?>
<?php else:?>
<tr>
<td rowspan="1" class="text-center" id="measuresTd"><strong><?php echo $lang->milestone->corrective;?></strong></td>
<td colspan="6">
<?php echo html::input('measures[]', '', 'class="form-control measures-input" onchange="submitMeasurse()";');?>
<?php echo html::a('javascript:;', '<i class="icon icon-plus"></i>', '', 'class="btn btn-link addItem" onclick="addItem(this)"');?>
<?php echo html::a('javascript:;', '<i class="icon icon-close"></i>', '', 'class="btn btn-link delItem" onclick="delItem(this)" id="delOrigin"');?>
</td>
</tr>
<?php endif;?>
<tr class="hidden" id="measuresDiv">
<td colspan="6">
<?php echo html::input('measures[]', '', 'class="form-control measures-input" onchange="submitMeasurse()"');?>
<?php echo html::a('javascript:;', '<i class="icon icon-plus"></i>', '', 'class="btn btn-link addItem" onclick="addItem(this)"');?>
<?php echo html::a('javascript:;', '<i class="icon icon-close"></i>', '', 'class="btn btn-link delItem" onclick="delItem(this)"');?>
</td>
</tr>
</tbody>
<?php echo html::hidden('programID', $programID);?>
<?php echo html::hidden('projectID', $projectID);?>
</table>
</form>
-102
View File
@@ -1,102 +0,0 @@
<div class='panel-body scroll-table' style='padding: 0;'>
<table class="table table-bordered">
<thead>
<tr>
<th rowspan='2'><?php echo $lang->milestone->workHours;?></th>
<th class='text-center' colspan='<?php echo count($workhours) - 1;?>'><?php echo $lang->milestone->allStage;?></th>
<th rowspan='2' class='text-center'><?php echo $lang->milestone->colSummary;?></th>
<th rowspan='2' class='text-center'><?php echo $lang->milestone->colPercent;?></th>
</tr>
<tr>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<th><?php echo $stage['name'];?></th>
<?php endforeach;?>
</tr>
</thead>
<tbody>
<tr>
<th><?php echo $lang->milestone->devHours;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['dev'];?></td>
<?php endforeach;?>
<td class='text-center'><?php echo $workhours['count']['dev'];?></td>
<td class='text-center'><?php echo $workhours['count']['total'] == '0' ? '0%' : round($stage['dev'] / $workhours['count']['total'], 2) * 100 . '%';?> </td>
</tr>
<tr>
<th><?php echo $lang->milestone->toHours;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['to'];?></td>
<?php endforeach;?>
<td class='text-center'><?php echo $workhours['count']['to'];?></td>
<td class='text-center'><?php echo $workhours['count']['total'] == '0' ? '0%' : round($stage['to'] / $workhours['count']['total'], 2) * 100 . '%';?> </td>
</tr>
<tr>
<th><?php echo $lang->milestone->reviewHours;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['review'];?></td>
<?php endforeach;?>
<td class='text-center'><?php echo $workhours['count']['review'];?></td>
<td class='text-center'><?php echo $workhours['count']['total'] == '0' ? '0%' : round($stage['review'] / $workhours['count']['total'], 2) * 100 . '%';?> </td>
</tr>
<tr>
<th><?php echo $lang->milestone->qaHours;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['qa'];?></td>
<?php endforeach;?>
<td class='text-center'><?php echo $workhours['count']['qa'];?></td>
<td class='text-center'><?php echo $workhours['count']['total'] == '0' ? '0%' : round($stage['qa'] / $workhours['count']['total'], 2) * 100 . '%';?> </td>
</tr>
<tr>
<th><?php echo $lang->milestone->rowSummary;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['count'];?></td>
<?php endforeach;?>
<td class='text-center'><?php echo $workhours['count']['total'];?></td>
<td class='text-center'><?php echo $workhours['count']['total'] == '0' ? '0%' : round($stage['total'] / $workhours['count']['total'], 2) * 100 . '%';?> </td>
</tr>
<tr>
<th><?php echo $lang->milestone->rowPercent;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $workhours['count']['total'] == 0 ? '0%' : round($stage['count'] / $workhours['count']['total'] * 100, 2) . '%';?></td>
<?php endforeach;?>
<td class='text-center'>100%</td>
<td class='text-center'>100%</td>
</tr>
<tr>
<th><?php echo $lang->milestone->qatoDev;?></th>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<td><?php echo $stage['qaToDev'];?></td>
<?php endforeach;?>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
<div class='cell chart-row'>
<div class='main-col'>
<div class='chart-wrapper text-center'>
<h4><?php echo $lang->milestone->chart->workhour;?></h4>
<div class='chart-canvas'><canvas id='chart-workhour' width='400' height='140' data-responsive='true'></canvas></div>
</div>
</div>
<table class='table table-chart hidden' data-chart='bar' data-target='#chart-workhour' data-animation='false'>
<tbody>
<?php foreach($workhours as $id => $stage):?>
<?php if($id == 'count') continue;?>
<tr>
<td class='chart-label text-left'><?php echo $stage['name'];?></td>
<td class='chart-value text-right'><?php echo $workhours['count']['total'] == 0 ? '0%' : round($stage['count'] / $workhours['count']['total'] * 100, 2) . '%';?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
-2
View File
@@ -104,10 +104,8 @@ $lang->program->lastIteration = 'Latest iterations';
$lang->program->ongoingStage = 'Ongoing stage';
$lang->program->scrum = 'Scrum';
$lang->program->scrumTitle = 'Scrum development full process project management';
$lang->program->scrumDesc = '<strong>Introduction: </strong>Iterate in small steps, release quickly<br><strong>Contains function points: </strong>Project overview, iterations, plans, stories, etc.';
$lang->program->cmmi = 'CMMI';
$lang->program->cmmiTitle = 'CMMI management';
$lang->program->cmmiDesc = '<strong>Introduction: </strong>Standardized management by stages<br><strong>Contains function points: </strong>Estimate, plan, stage, report, etc.';
$lang->program->cannotCreateChild = 'The project already has actual content and can not add subprojects directly. You can create a parent project for the current project and then add a child project under the new parent project.';
$lang->program->hasChildren = 'This project has a subproject and can not be deleted.';
$lang->program->confirmDelete = 'Do you want to delete this project?';
-2
View File
@@ -104,10 +104,8 @@ $lang->program->lastIteration = '近期迭代';
$lang->program->ongoingStage = '进行中的阶段';
$lang->program->scrum = 'Scrum';
$lang->program->scrumTitle = '敏捷开发全流程项目管理';
$lang->program->scrumDesc = '<strong>简介:</strong>小步迭代,快速发布<br><strong>包含功能点:</strong>项目概览、迭代、计划、需求等';
$lang->program->cmmi = '瀑布';
$lang->program->cmmiTitle = '瀑布式项目管理';
$lang->program->cmmiDesc = '<strong>简介:</strong>按阶段规范化管理<br><strong>包含功能点:</strong>估算、计划、阶段、报告';
$lang->program->cannotCreateChild = '该项目已经有实际的内容,无法直接添加子项目。您可以为当前项目创建一个父项目,然后在新的父项目下面添加子项目。';
$lang->program->hasChildren = '该项目有子项目存在,不能删除。';
$lang->program->confirmDelete = "您确定删除项目[%s]吗?";
+3 -2
View File
@@ -49,9 +49,10 @@ foreach($programs as $program)
?>
</div>
<div class="col-footer">
<?php echo html::a(helper::createLink('program', 'createGuide'), '<i class="icon icon-plus"></i>' . $lang->program->create, '', 'class="not-list-item text-primary" data-toggle=modal'); ?>
<div class='pull-right'>
<div class='pull-left'>
<?php echo html::a(helper::createLink('program', 'browse', 'status=all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
</div>
<div class='pull-right'>
<span class='text-muted muted'> &nbsp; | &nbsp; </span>
<a class='toggle-right-col not-list-item'><?php echo $lang->project->doneProjects?><i class='icon icon-angle-right'></i></a>
</div>
-2
View File
@@ -19,7 +19,6 @@
<img class='program-type-img' data-type='scrum' src='<?php echo $config->webRoot . 'theme/default/images/main/scrum.png'?>'>
<h3><?php echo $lang->program->scrum; ?></h3>
<p><?php echo $lang->program->scrumTitle; ?></p>
<p class='text-left'><?php echo $lang->program->scrumDesc; ?></p>
</div>
</div>
<div class='col-xs-6'>
@@ -27,7 +26,6 @@
<img class='program-type-img' data-type='cmmi' src='<?php echo $config->webRoot . 'theme/default/images/main/cmmi.png'?>'>
<h3><?php echo $lang->program->cmmi; ?></h3>
<p><?php echo $lang->program->cmmiTitle; ?></p>
<p class='text-left'><?php echo $lang->program->cmmiDesc; ?></p>
</div>
</div>
</div>
+1 -4
View File
@@ -782,15 +782,12 @@ class upgradeModel extends model
$confirmContent .= file_get_contents($xuanxuanSql);
}
case '12_2': $confirmContent .= file_get_contents($this->getUpgradeFile('12.2'));
<<<<<<< HEAD
case '20_0': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0'));
=======
case '12_3':
case '12_3_1':
case '12_3_2': $confirmContent .= file_get_contents($this->getUpgradeFile('12.3.2'));
case '12_3_3': $confirmContent .= file_get_contents($this->getUpgradeFile('12.3.3'));
case '12_4': $confirmContent .= file_get_contents($this->getUpgradeFile('12.4'));
>>>>>>> master
case '20_0': $confirmContent .= file_get_contents($this->getUpgradeFile('20.0'));
}
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
}