Merge branch 'sprint/192_hufangzhou_bugreport' into 'master'

# Finish task #54484,#54485,#54486.

See merge request easycorp/zentaopms!3514
This commit is contained in:
王怡栋
2022-05-19 06:28:41 +00:00
5 changed files with 32 additions and 4 deletions
+16
View File
@@ -338,3 +338,19 @@ $config->bug->datatable->fieldList['actions']['title'] = 'actions';
$config->bug->datatable->fieldList['actions']['fixed'] = 'right';
$config->bug->datatable->fieldList['actions']['width'] = '150';
$config->bug->datatable->fieldList['actions']['required'] = 'yes';
$config->bug->colorList = new stdclass();
$config->bug->colorList->pri[1] = '#d50000';
$config->bug->colorList->pri[2] = '#ff9800';
$config->bug->colorList->pri[3] = '#2098ee';
$config->bug->colorList->pri[4] = '#009688';
$config->bug->colorList->pri[5] = '#919090';
$config->bug->colorList->pri[6] = '#B6B4B4';
$config->bug->colorList->pri[7] = '#BDBEBD';
$config->bug->colorList->severity[1] = '#c62828';
$config->bug->colorList->severity[2] = '#ff8f00';
$config->bug->colorList->severity[3] = '#fdd835';
$config->bug->colorList->severity[4] = '#cddc39';
$config->bug->colorList->severity[5] = '#8bc34a';
$config->bug->colorList->severity[6] = '#B6B4B4';
$config->bug->colorList->severity[7] = '#BDBEBD';
+1 -1
View File
@@ -267,7 +267,7 @@ class bug extends control
public function report($productID, $browseType, $branchID, $moduleID, $chartType = 'default')
{
$this->loadModel('report');
$this->view->charts = array();
$this->view->charts = array();
if(!empty($_POST))
{
+1 -1
View File
@@ -2328,7 +2328,7 @@ class bugModel extends model
$commonOption = $this->lang->bug->report->options;
$chartOption->graph->caption = $this->lang->bug->report->charts[$chartType];
if(!isset($chartOption->type)) $chartOption->type = $commonOption->type;
if(!isset($chartOption->type)) $chartOption->type = $commonOption->type;
if(!isset($chartOption->width)) $chartOption->width = $commonOption->width;
if(!isset($chartOption->height)) $chartOption->height = $commonOption->height;
+12 -1
View File
@@ -65,8 +65,19 @@
<th class='w-60px text-right'><?php echo $lang->report->percent;?></th>
</tr>
</thead>
<?php
$colorList = array();
if(strpos(strtolower($chartType), 'pri') !== false)
{
$colorList = $config->bug->colorList->pri;
}
elseif(strpos(strtolower($chartType), 'severity') !== false)
{
$colorList = $config->bug->colorList->severity;
}
?>
<?php foreach($datas[$chartType] as $key => $data):?>
<tr>
<tr data-color="<?php echo !empty($colorList) ? zget($colorList, $key, '#C0C0C0') : '';?>">
<td class='chart-color'><i class='chart-color-dot'></i></td>
<td class='chart-label text-left' title='<?php echo isset($data->title) ? $data->title : $data->name;?>'><?php echo $data->name;?></td>
<td class='chart-value text-right'><?php echo $data->value;?></td>
@@ -177,7 +177,8 @@
}
if(empty($label) and empty($data)) continue;
?>
<tr class='text-center'>
<?php $colorList = $infoKey == 'bugSeverityGroups' ? $config->bug->colorList->severity : array();?>
<tr class='text-center' data-color="<?php echo !empty($colorList) ? zget($colorList, $label, '#C0C0C0') : '';?>">
<td class='chart-color c-icon'><i class='chart-color-dot'></i></td>
<td class='chart-label'><?php echo $label;?></td>
<td class='chart-value'><?php echo $data;?></td>