diff --git a/module/pivot/ui/projectdeviation.html.php b/module/pivot/ui/projectdeviation.html.php new file mode 100644 index 0000000000..ff336dc7d4 --- /dev/null +++ b/module/pivot/ui/projectdeviation.html.php @@ -0,0 +1,48 @@ + + * @package pivot + * @link https://www.zentao.net + */ +namespace zin; + +$generateData = function() use ($module, $method, $lang, $executions) +{ + if(empty($module) || empty($method)) return div(setClass('bg-white center text-gray w-full h-40'), $lang->error->noData); + + $canViewProject = hasPriv('product', 'index'); + + $cols = array( + 'executionID' => array('title' => $lang->pivot->id, 'width' => '70', 'fixed' => 'left'), + 'projectName' => array('title' => $lang->pivot->project, 'fixed' => 'left', 'link' => $canViewProject ? createLink('project', 'index', "id={projectID}") : ''), + 'executionName' => array('title' => $lang->pivot->execution, 'type' => 'html', 'fixed' => 'left'), + 'estimate' => array('title' => $lang->pivot->estimate, 'width' => '100', 'align' => 'center'), + 'consumed' => array('title' => $lang->pivot->consumed, 'width' => '100', 'align' => 'center'), + 'deviation' => array('title' => $lang->pivot->deviation, 'width' => '100', 'align' => 'center'), + 'deviationRate' => array('title' => $lang->pivot->deviationRate, 'width' => '100', 'align' => 'center') + ); + + return div + ( + setClass('w-full'), + div + ( + setID('conditions'), + setClass('bg-white mb-4 p-2'), + ), + dtable + ( + set::cols($cols), + set::data($executions), + set::fixedLeftWidth('0.25'), + set::emptyTip($lang->error->noData) + ), + echarts + ( + ) + ); +};