From 720bc02308b3b3115fdcec0b4ef021b59ef6644a Mon Sep 17 00:00:00 2001 From: sunjun Date: Wed, 6 Jul 2022 03:23:53 +0000 Subject: [PATCH] sprint_59471 --- module/dept/model.php | 2 +- module/report/control.php | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/module/dept/model.php b/module/dept/model.php index f85ae68a9c..5c59828e36 100644 --- a/module/dept/model.php +++ b/module/dept/model.php @@ -113,7 +113,7 @@ class deptModel extends model krsort($deptMenu); $topMenu = array_pop($deptMenu); $topMenu = explode("\n", trim((string)$topMenu)); - $lastMenu[] = '/'; + $lastMenu[] = '/无部门'; foreach($topMenu as $menu) { if(!strpos($menu, '|')) continue; diff --git a/module/report/control.php b/module/report/control.php index d5de7198bc..60e3ff54e9 100644 --- a/module/report/control.php +++ b/module/report/control.php @@ -315,7 +315,14 @@ class report extends control $users[''] = $this->lang->report->annualData->allUser; $depts = $this->loadModel('dept')->getOptionMenu(); - $depts = array('' => $this->lang->report->annualData->allDept) + $depts; + if(!$this->app->user->admin) + { + foreach($depts as $id => $name) if($id != $this->app->user->dept) unset($depts[$id]); + } + else + { + $depts = array('' => $this->lang->report->annualData->allDept) + $depts; + } if(empty($userID)) unset($depts[0]); $accounts = array();