{{-- 文件功能:后台职务管理页面 按部门分组展示所有职务,支持新增/编辑/删除职务 编辑时可通过多选框配置该职务可任命的目标职务列表(任命白名单) @author ChatRoom Laravel @version 1.0.0 --}} @extends('admin.layouts.app') @section('title', '职务管理') @section('content')
{{-- 头部 --}}

职务管理

管理各部门职务,配置等级、图标、人数上限和任命权限

← 部门管理 🎖️ 任命管理 → @if (Auth::id() === 1) @endif
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- 按部门分组展示职务 --}} @foreach ($departments as $dept)

{{ $dept->name }}

位阶 {{ $dept->rank }}
@php $superLvl = (int) \App\Models\Sysparam::getValue('superlevel', '100'); @endphp @if (Auth::user()->user_level >= $superLvl) @endif @forelse ($dept->positions as $pos) @php $appointableIds = $pos->appointablePositions->pluck('id')->toArray(); @endphp @empty @endforelse
图标 职务名 位阶 等级 人数上限 当前在职 奖励上限 任命权操作
{{ $pos->icon }} {{ $pos->name }} {{ $pos->rank }} Lv.{{ $pos->level }} {{ $pos->max_persons ?? '不限' }} {{ $pos->active_user_positions_count }} 人 {{ $pos->max_reward ? number_format($pos->max_reward) . '金币' : '不限' }} @if (count($appointableIds) > 0) {{ count($appointableIds) }} 个职务 @else @endif @php $superLvl = (int) \App\Models\Sysparam::getValue('superlevel', '100'); @endphp @if (Auth::user()->user_level >= $superLvl) @endif @if (Auth::id() === 1)
@csrf @method('DELETE')
@endif
该部门暂无职务
@endforeach {{-- 新增/编辑弹窗 --}}
@endsection