Merge branch '18.4' of https://git.zcorp.cc/easycorp/zentaopms into 18.4
This commit is contained in:
@@ -1939,6 +1939,7 @@ class docModel extends model
|
||||
|
||||
$files = $this->dao->select('*')->from(TABLE_FILE)->alias('t1')
|
||||
->where('size')->gt('0')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->andWhere("(objectType = '$type' and objectID = $objectID)", true)
|
||||
->orWhere("(objectType = 'doc' and objectID in ($docIdList))")
|
||||
->orWhere("(objectType = 'bug' and objectID in ($bugIdList))")
|
||||
|
||||
@@ -1,2 +1,93 @@
|
||||
<?php
|
||||
$config->pivot = new stdclass();
|
||||
$config->pivot->widthInput = 128;
|
||||
$config->pivot->widthDate = 248;
|
||||
|
||||
$config->pivot->fileType = array('xlsx' => 'xlsx', 'xls' => 'xls', 'html' => 'html', 'mht' => 'mht');
|
||||
|
||||
$config->pivot->create = new stdclass();
|
||||
$config->pivot->create->requiredFields = 'type,group';
|
||||
|
||||
$config->pivot->edit = new stdclass();
|
||||
$config->pivot->edit->requiredFields = 'type,group';
|
||||
|
||||
$config->pivot->design = new stdclass();
|
||||
$config->pivot->design->requiredFields = 'group';
|
||||
|
||||
$config->pivot->multiColumn = array('cluBarX' => 'yaxis', 'cluBarY' => 'yaxis', 'radar' => 'yaxis', 'line' => 'yaxis', 'stackedBar' => 'yaxis', 'stackedBarY' => 'yaxis');
|
||||
|
||||
$config->pivot->checkForm = array();
|
||||
$config->pivot->checkForm['line'] = array('cantequal' => 'xaxis,yaxis');
|
||||
$config->pivot->checkForm['cluBarX'] = array('cantequal' => 'xaxis,yaxis');
|
||||
$config->pivot->checkForm['cluBarY'] = array('cantequal' => 'xaxis,yaxis');
|
||||
$config->pivot->checkForm['radar'] = array('cantequal' => 'xaxis,yaxis');
|
||||
$config->pivot->checkForm['stackedBar'] = array('cantequal' => 'xaxis,yaxis');
|
||||
$config->pivot->checkForm['stackedBarY'] = array('cantequal' => 'xaxis,yaxis');
|
||||
global $lang;
|
||||
$config->pivot->settings = array();
|
||||
$config->pivot->settings['cluBarX'] = array();
|
||||
$config->pivot->settings['cluBarX']['xaxis'] = array();
|
||||
$config->pivot->settings['cluBarX']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['cluBarX']['yaxis'] = array();
|
||||
$config->pivot->settings['cluBarX']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['cluBarX']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['cluBarY'] = array();
|
||||
$config->pivot->settings['cluBarY']['xaxis'] = array();
|
||||
$config->pivot->settings['cluBarY']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['cluBarY']['yaxis'] = array();
|
||||
$config->pivot->settings['cluBarY']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['cluBarY']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['stackedBarY'] = array();
|
||||
$config->pivot->settings['stackedBarY']['xaxis'] = array();
|
||||
$config->pivot->settings['stackedBarY']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['stackedBarY']['yaxis'] = array();
|
||||
$config->pivot->settings['stackedBarY']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['stackedBarY']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['line'] = array();
|
||||
$config->pivot->settings['line']['xaxis'] = array();
|
||||
$config->pivot->settings['line']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['line']['yaxis'] = array();
|
||||
$config->pivot->settings['line']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['line']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['pie'] = array();
|
||||
$config->pivot->settings['pie']['group'] = array();
|
||||
$config->pivot->settings['pie']['group'][] = array('field' => 'group', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['pie']['metric'] = array();
|
||||
$config->pivot->settings['pie']['metric'][] = array('field' => 'metric', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['pie']['stat'] = array();
|
||||
$config->pivot->settings['pie']['stat'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['radar'] = array();
|
||||
$config->pivot->settings['radar']['xaxis'] = array();
|
||||
$config->pivot->settings['radar']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['radar']['yaxis'] = array();
|
||||
$config->pivot->settings['radar']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['radar']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['stackedBar'] = array();
|
||||
$config->pivot->settings['stackedBar']['xaxis'] = array();
|
||||
$config->pivot->settings['stackedBar']['xaxis'][] = array('field' => 'xaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 4);
|
||||
|
||||
$config->pivot->settings['stackedBar']['yaxis'] = array();
|
||||
$config->pivot->settings['stackedBar']['yaxis'][] = array('field' => 'yaxis', 'type' => 'select', 'options' => 'field', 'required' => true, 'placeholder' => $lang->pivot->chooseField, 'col' => 2);
|
||||
$config->pivot->settings['stackedBar']['yaxis'][] = array('field' => 'agg', 'type' => 'select', 'options' => 'aggList', 'required' => false, 'placeholder' => $lang->pivot->aggType, 'col' => 2);
|
||||
|
||||
$config->pivot->settings['testingReport'] = array('field' => array('type' => 'td'));
|
||||
|
||||
$config->pivot->transTypes = array();
|
||||
$config->pivot->transTypes['int'] = 'number';
|
||||
$config->pivot->transTypes['float'] = 'number';
|
||||
$config->pivot->transTypes['double'] = 'number';
|
||||
$config->pivot->transTypes['datetime'] = 'date';
|
||||
$config->pivot->transTypes['date'] = 'date';
|
||||
|
||||
@@ -18,6 +18,6 @@ function changeParams(obj)
|
||||
}
|
||||
|
||||
var params = window.btoa('begin=' + begin + '&end=' + end + '&product=' + product + '&execution=' + execution);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=pivot&method=bugcreate¶ms=' + params);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=bugcreate¶ms=' + params);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ $('#conditions input:checkbox').change(function()
|
||||
conditions = conditions.substring(0, conditions.length - 1);
|
||||
|
||||
var params = window.btoa('conditions=' + conditions);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=pivot&method=productSummary¶ms=' + params);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=productSummary¶ms=' + params);
|
||||
location.href = link;
|
||||
})
|
||||
|
||||
@@ -31,6 +31,6 @@ function changeDate(begin, end)
|
||||
}
|
||||
|
||||
var params = window.btoa('begin=' + begin + '&end=' + end);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=pivot&method=projectdeviation¶ms=' + params);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=projectdeviation¶ms=' + params);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ function changeParams(obj)
|
||||
}
|
||||
|
||||
var params = window.btoa('begin=' + begin + '&end=' + end + '&days=' + days + '&workday=' + workday + '&dept=' + dept + '&assign=' + assign);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + group + '&module=pivot&method=workload¶ms=' + params);
|
||||
var link = createLink('pivot', 'preview', 'dimension=' + dimension + '&group=' + groupID + '&module=pivot&method=workload¶ms=' + params);
|
||||
location.href = link;
|
||||
}
|
||||
|
||||
|
||||
+44
-37
@@ -112,9 +112,16 @@ class pivotModel extends model
|
||||
$pivots = array_merge($pivots, $charts);
|
||||
}
|
||||
|
||||
$pager->setRecTotal(count($pivots));
|
||||
$pager->setPageTotal();
|
||||
if($pager->pageID > $pager->pageTotal) $pager->setPageID($pager->pageTotal);
|
||||
if(!empty($pager))
|
||||
{
|
||||
$pager->setRecTotal(count($pivots));
|
||||
$pager->setPageTotal();
|
||||
if($pager->pageID > $pager->pageTotal) $pager->setPageID($pager->pageTotal);
|
||||
|
||||
$pivots = array_chunk($pivots, $pager->recPerPage);
|
||||
$pivots = $pivots[$pager->pageID - 1];
|
||||
|
||||
}
|
||||
|
||||
return $this->processPivot($pivots, false);
|
||||
}
|
||||
@@ -1390,19 +1397,16 @@ class pivotModel extends model
|
||||
|
||||
/* Process rows. */
|
||||
$connectSQL = '';
|
||||
if(empty($settings['filterType']) or $settings['filterType'] == 'result')
|
||||
if(!empty($filters) && !isset($filters[0]['from']))
|
||||
{
|
||||
if(!empty($filters))
|
||||
$wheres = array();
|
||||
foreach($filters as $field => $filter)
|
||||
{
|
||||
$wheres = array();
|
||||
foreach($filters as $field => $filter)
|
||||
{
|
||||
$wheres[] = "tt.`$field` {$filter['operator']} {$filter['value']}";
|
||||
}
|
||||
|
||||
$whereStr = implode(' and ', $wheres);
|
||||
$connectSQL .= " where $whereStr";
|
||||
$wheres[] = "tt.`$field` {$filter['operator']} {$filter['value']}";
|
||||
}
|
||||
|
||||
$whereStr = implode(' and ', $wheres);
|
||||
$connectSQL .= " where $whereStr";
|
||||
}
|
||||
|
||||
$groupSQL = " group by $groupList";
|
||||
@@ -1411,36 +1415,39 @@ class pivotModel extends model
|
||||
$number = 0;
|
||||
$groupsRow = array();
|
||||
$showColTotal = zget($settings, 'columnTotal', 'noShow');
|
||||
foreach($settings['columns'] as $column)
|
||||
if(isset($settings['columns']))
|
||||
{
|
||||
$stat = $column['stat'];
|
||||
$field = $column['field'];
|
||||
$slice = zget($column, 'slice', 'noSlice');
|
||||
$uuName = $field . $number;
|
||||
$number ++;
|
||||
|
||||
if($stat == 'distinct')
|
||||
foreach($settings['columns'] as $column)
|
||||
{
|
||||
$columnSQL = "count(distinct tt.`$field`) as `$uuName`";
|
||||
}
|
||||
else
|
||||
{
|
||||
$columnSQL = "$stat(tt.`$field`) as `$uuName`";
|
||||
}
|
||||
$stat = $column['stat'];
|
||||
$field = $column['field'];
|
||||
$slice = zget($column, 'slice', 'noSlice');
|
||||
$uuName = $field . $number;
|
||||
$number ++;
|
||||
|
||||
if($slice != 'noSlice') $columnSQL = "select $groupList,`$slice`,$columnSQL from ($sql) tt" . $connectSQL . $groupSQL . ",tt.`$slice`" . $orderSQL . ",tt.`$slice`";
|
||||
if($slice == 'noSlice') $columnSQL = "select $groupList,$columnSQL from ($sql) tt" . $connectSQL . $groupSQL . $orderSQL;
|
||||
if($stat == 'distinct')
|
||||
{
|
||||
$columnSQL = "count(distinct tt.`$field`) as `$uuName`";
|
||||
}
|
||||
else
|
||||
{
|
||||
$columnSQL = "$stat(tt.`$field`) as `$uuName`";
|
||||
}
|
||||
|
||||
$columnRows = $this->dao->query($columnSQL)->fetchAll();
|
||||
if($slice != 'noSlice') $columnSQL = "select $groupList,`$slice`,$columnSQL from ($sql) tt" . $connectSQL . $groupSQL . ",tt.`$slice`" . $orderSQL . ",tt.`$slice`";
|
||||
if($slice == 'noSlice') $columnSQL = "select $groupList,$columnSQL from ($sql) tt" . $connectSQL . $groupSQL . $orderSQL;
|
||||
|
||||
$cols = $this->getTableHeader($columnRows, $column, $fields, $cols, $sql, $langs);
|
||||
if($slice != 'noSlice') $columnRows = $this->processSliceData($columnRows, $groups, $slice, $uuName);
|
||||
$columnRows = $this->processShowData($columnRows, $groups, $column, $showColTotal, $uuName);
|
||||
$columnRows = $this->dao->query($columnSQL)->fetchAll();
|
||||
|
||||
foreach($columnRows as $key => $row)
|
||||
{
|
||||
if(!isset($groupsRow[$key])) $groupsRow[$key] = new stdclass();
|
||||
$groupsRow[$key] = (object)array_merge((array)$groupsRow[$key], (array)$row);
|
||||
$cols = $this->getTableHeader($columnRows, $column, $fields, $cols, $sql, $langs);
|
||||
if($slice != 'noSlice') $columnRows = $this->processSliceData($columnRows, $groups, $slice, $uuName);
|
||||
$columnRows = $this->processShowData($columnRows, $groups, $column, $showColTotal, $uuName);
|
||||
|
||||
foreach($columnRows as $key => $row)
|
||||
{
|
||||
if(!isset($groupsRow[$key])) $groupsRow[$key] = new stdclass();
|
||||
$groupsRow[$key] = (object)array_merge((array)$groupsRow[$key], (array)$row);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -983,7 +983,7 @@ class task extends control
|
||||
$story = $this->story->getById($task->story, $task->storyVersion);
|
||||
$task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec);
|
||||
$task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify);
|
||||
$task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story);
|
||||
$task->storyFiles = $story->files;
|
||||
}
|
||||
|
||||
if($task->team) $this->lang->task->assign = $this->lang->task->transfer;
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
<div class='detail-content article-content'>
|
||||
<?php echo (!empty($task->storySpec) || !empty($task->storyFiles)) ? $task->storySpec : "<div class='text-center text-muted'>" . $lang->noData . '</div>';?>
|
||||
</div>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
|
||||
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false', 'object' => $task, 'method' => 'view', 'showDelete' => false));?>
|
||||
</div>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->task->storyVerify;?></div>
|
||||
|
||||
Reference in New Issue
Block a user