将用户管理操作接入职务权限体系

This commit is contained in:
2026-04-21 18:00:02 +08:00
parent a066580014
commit b0028c515f
8 changed files with 462 additions and 85 deletions
+5
View File
@@ -27,6 +27,9 @@
$superLevel = (int) \App\Models\Sysparam::getValue('superlevel', '100');
$myLevel = Auth::user()->user_level;
$positionPermissions = array_keys(array_filter($roomPermissionMap ?? []));
$operatorActivePosition = Auth::user()->activePosition?->load('position.department')->position;
$operatorDepartmentRank = (int) ($operatorActivePosition?->department?->rank ?? 0);
$operatorPositionRank = (int) ($operatorActivePosition?->rank ?? 0);
@endphp
<script>
window.chatContext = {
@@ -84,6 +87,8 @@
$posName = $activePos?->position?->name ?? '';
@endphp
welcomePrefix: "{{ $deptName ? "{$deptName} {$posName} {$user->username}" : $user->username }}",
operatorDepartmentRank: {{ $operatorDepartmentRank }},
operatorPositionRank: {{ $operatorPositionRank }},
myMaxReward: @php
if (Auth::id() === 1) {
// 超级管理员(id=1)无需职务,直接拥有不限量奖励权