Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3

This commit is contained in:
tianshujie
2023-04-04 20:52:39 +08:00
3 changed files with 32 additions and 11 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ $lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|a
$lang->dividerMenu = ',kanban,oa,admin,';
$lang->mainNav->menuOrder[5] = 'my';
$lang->mainNav->menuOrder[5] = 'my';
$lang->mainNav->menuOrder[10] = 'program';
$lang->mainNav->menuOrder[15] = 'product';
$lang->mainNav->menuOrder[20] = 'project';
+21
View File
@@ -1054,6 +1054,27 @@ class commonModel extends model
}
}
/* Check whether the menu of this group have permissions. If yes, point to them. */
if($display == false and isset($lang->$group->menu))
{
foreach($lang->$group->menu as $menu)
{
if(!isset($menu['link'])) continue;
$linkPart = explode('|', $menu['link']);
if(count($linkPart) < 3) continue;
list($label, $module, $method) = $linkPart;
if(common::hasPriv($module, $method))
{
$display = true;
$currentModule = $module;
$currentMethod = $method;
if(!isset($menu['target'])) break; // Try to jump to the method without opening a new window.
}
}
}
if(!$display) continue;
/* Assign vars. */
+10 -10
View File
@@ -55,13 +55,6 @@ class screenModel extends model
*/
public function getByID($screenID, $year = '', $dept = '', $account = '')
{
$this->filter = new stdclass();
$this->filter->screen = $screenID;
$this->filter->year = $year;
$this->filter->dept = $dept;
$this->filter->account = $account;
$this->filter->charts = array();
$screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch();
if(!isset($screen->scheme) or empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');
$screen->chartData = $this->genChartData($screen, $year, $dept, $account);
@@ -73,14 +66,21 @@ class screenModel extends model
* Generate chartData of screen.
*
* @param object $screen
* @param int $year
* @param int $dept
* @param string $year
* @param string $dept
* @param string $account
* @access public
* @return object
*/
public function genChartData($screen)
public function genChartData($screen, $year, $dept, $account)
{
$this->filter = new stdclass();
$this->filter->screen = $screen->id;
$this->filter->year = $year;
$this->filter->dept = $dept;
$this->filter->account = $account;
$this->filter->charts = array();
$config = new stdclass();
$config->width = 1300;
$config->height = 1080;