作者 lyh

gx

... ... @@ -39,14 +39,6 @@ class HrController extends BaseController
* @time :2023/9/6 10:04
*/
public function info(HrLogic $logic){
//查看当前用户是否有人事权限
if($this->manage['gid'] != ManageHr::GID_ZERO){
$menuModel = new Menu();
$menuInfo = $menuModel->read(['gid'=>$this->manage['gid']]);
if (strpos(','.$menuInfo['rights'].',', ',20,') === false) {
$this->param['id'] = $this->manage['id'];
}
}
$this->request->validate([
'id'=>'required'
],[
... ...
... ... @@ -9,6 +9,7 @@ use App\Models\Manage\EntryPosition;
use App\Models\Manage\JobLevel;
use App\Models\Manage\Manage;
use App\Models\Manage\ManageHr;
use App\Models\Manage\Menu;
use Illuminate\Support\Facades\Hash;
/**
... ... @@ -72,6 +73,14 @@ class HrLogic extends BaseLogic
* @time :2023/7/25 9:27
*/
public function getHrInfo($id){
//查看当前用户是否有人事权限
if($this->manager['gid'] != ManageHr::GID_ZERO){
$menuModel = new Menu();
$menuInfo = $menuModel->read(['id'=>$this->manager['gid']]);
if (strpos(','.$menuInfo['rights'].',', ',20,') === false) {
$this->param['id'] = $this->manager['id'];
}
}
$data = $this->model->read(['id'=>$id]);
foreach ($this->model::specieField() as $v){
$data[$v] = json_decode($data[$v],true);
... ...