统一后台列表页样式并调整站长菜单
This commit is contained in:
@@ -11,13 +11,18 @@
|
||||
@section('title', '权限操作日志 · ' . $userPosition->user->username)
|
||||
|
||||
@section('content')
|
||||
<div class="mb-6">
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm text-indigo-600 hover:underline">← 返回任命管理</a>
|
||||
<h2 class="text-lg font-bold text-gray-800 mt-2">
|
||||
{{ $userPosition->position->icon }} {{ $userPosition->user->username }} · {{ $userPosition->position->name }}
|
||||
</h2>
|
||||
<p class="text-sm text-gray-500 mt-1">权限操作记录(共 {{ $logs->total() }} 条)</p>
|
||||
</div>
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
<div class="{{ $adminListHeaderCardClass }}">
|
||||
<div>
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-700">← 返回任命管理</a>
|
||||
<h2 class="mt-2 {{ $adminListHeaderTitleClass }}">
|
||||
{{ $userPosition->position->icon }} {{ $userPosition->user->username }} · {{ $userPosition->position->name }}
|
||||
</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">权限操作记录(共 {{ $logs->total() }} 条)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@php
|
||||
$actionColors = [
|
||||
@@ -32,42 +37,51 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">操作时间</th>
|
||||
<th class="px-4 py-3 text-center">操作类型</th>
|
||||
<th class="px-4 py-3 text-left">操作对象</th>
|
||||
<th class="px-4 py-3 text-left">目标职务</th>
|
||||
<th class="px-4 py-3 text-center">奖励金额</th>
|
||||
<th class="px-4 py-3 text-left">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse ($logs as $log)
|
||||
@php $colorClass = $actionColors[$log->action_type] ?? 'bg-gray-100 text-gray-600'; @endphp
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-4 py-3 text-gray-500 text-xs">{{ $log->created_at->format('m-d H:i:s') }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="text-xs px-2 py-0.5 rounded font-bold {{ $colorClass }}">
|
||||
{{ $log->action_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 font-bold text-gray-700">{{ $log->targetUser->username ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-gray-500">{{ $log->targetPosition?->name ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-center text-yellow-600 font-bold">
|
||||
{{ $log->amount ? number_format($log->amount) . ' 金币' : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-400 text-xs">{{ $log->remark ?? '—' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-12 text-center text-gray-400">暂无权限操作记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<h3 class="{{ $adminListSectionTitleClass }}">权限操作日志</h3>
|
||||
<p class="{{ $adminListSectionDescClass }}">覆盖任命周期内的任命、撤销、奖励、警告、踢出、禁言等权限动作。</p>
|
||||
</div>
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} whitespace-nowrap">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">操作时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">操作类型</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">操作对象</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">目标职务</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">奖励金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">备注</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($logs as $log)
|
||||
@php $colorClass = $actionColors[$log->action_type] ?? 'bg-gray-100 text-gray-600'; @endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">{{ $log->created_at->format('m-d H:i:s') }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold {{ $colorClass }}">
|
||||
{{ $log->action_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">{{ $log->targetUser->username ?? '—' }}</td>
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">{{ $log->targetPosition?->name ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-center text-sm font-semibold text-yellow-600">
|
||||
{{ $log->amount ? number_format($log->amount) . ' 金币' : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">{{ $log->remark ?? '—' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="{{ $adminListEmptyClass }}">暂无权限操作记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($logs->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $logs->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4">{{ $logs->links() }}</div>
|
||||
@endsection
|
||||
|
||||
@@ -11,70 +11,81 @@
|
||||
@section('title', '在职登录日志 · ' . $userPosition->user->username)
|
||||
|
||||
@section('content')
|
||||
<div class="mb-6">
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm text-indigo-600 hover:underline">← 返回任命管理</a>
|
||||
<h2 class="text-lg font-bold text-gray-800 mt-2">
|
||||
{{ $userPosition->position->icon }} {{ $userPosition->user->username }} · {{ $userPosition->position->name }}
|
||||
</h2>
|
||||
<p class="text-sm text-gray-500 mt-1">
|
||||
任命于 {{ $userPosition->appointed_at->format('Y-m-d') }},
|
||||
任命人:{{ $userPosition->appointedBy?->username ?? '系统' }}
|
||||
</p>
|
||||
</div>
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
<div class="{{ $adminListHeaderCardClass }}">
|
||||
<div>
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-700">← 返回任命管理</a>
|
||||
<h2 class="mt-2 {{ $adminListHeaderTitleClass }}">
|
||||
{{ $userPosition->position->icon }} {{ $userPosition->user->username }} · {{ $userPosition->position->name }}
|
||||
</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
任命于 {{ $userPosition->appointed_at->format('Y-m-d') }},任命人:{{ $userPosition->appointedBy?->username ?? '系统' }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 统计摘要 --}}
|
||||
<div class="grid grid-cols-3 gap-4 mb-6">
|
||||
<div class="bg-white rounded-xl p-5 border shadow-sm text-center">
|
||||
<div class="grid gap-4 md:grid-cols-3">
|
||||
<div class="{{ $adminListCardClass }} p-5 text-center">
|
||||
<div class="text-2xl font-bold text-indigo-600">{{ $logs->total() }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">总登录次数</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl p-5 border shadow-sm text-center">
|
||||
<div class="{{ $adminListCardClass }} p-5 text-center">
|
||||
<div class="text-2xl font-bold text-green-600">
|
||||
{{ intdiv($totalSeconds, 3600) }}h {{ intdiv($totalSeconds % 3600, 60) }}m
|
||||
</div>
|
||||
<div class="text-xs text-gray-500 mt-1">累计在线时长(所有)</div>
|
||||
</div>
|
||||
<div class="bg-white rounded-xl p-5 border shadow-sm text-center">
|
||||
<div class="{{ $adminListCardClass }} p-5 text-center">
|
||||
<div class="text-2xl font-bold text-orange-600">{{ $userPosition->total_rewarded_coins }}</div>
|
||||
<div class="text-xs text-gray-500 mt-1">在职期间发放金币</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">登录时间</th>
|
||||
<th class="px-4 py-3 text-left">退出时间</th>
|
||||
<th class="px-4 py-3 text-center">在线时长</th>
|
||||
<th class="px-4 py-3 text-center">房间</th>
|
||||
<th class="px-4 py-3 text-left">IP 地址</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse ($logs as $log)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-4 py-3 text-gray-700">{{ $log->login_at->format('m-d H:i:s') }}</td>
|
||||
<td class="px-4 py-3 text-gray-500">{{ $log->logout_at?->format('m-d H:i:s') ?? '在线中...' }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($log->duration_seconds)
|
||||
<span
|
||||
class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded">{{ $log->formatted_duration }}</span>
|
||||
@else
|
||||
<span class="text-xs text-gray-400">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center text-gray-500">{{ $log->room_id ? "房间#{$log->room_id}" : '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-400 font-mono text-xs">{{ $log->ip_address }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="px-4 py-12 text-center text-gray-400">暂无登录记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<h3 class="{{ $adminListSectionTitleClass }}">在职登录记录</h3>
|
||||
<p class="{{ $adminListSectionDescClass }}">记录该任职周期内的登录、退出、在线时长与所在房间信息。</p>
|
||||
</div>
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} whitespace-nowrap">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">登录时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">退出时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">在线时长</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">房间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">IP 地址</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($logs as $log)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">{{ $log->login_at->format('m-d H:i:s') }}</td>
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">{{ $log->logout_at?->format('m-d H:i:s') ?? '在线中...' }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($log->duration_seconds)
|
||||
<span class="inline-flex items-center rounded-full bg-blue-100 px-2 py-0.5 text-xs font-semibold text-blue-700">{{ $log->formatted_duration }}</span>
|
||||
@else
|
||||
<span class="{{ $adminListSecondaryTextClass }}">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center {{ $adminListBodyTextClass }}">{{ $log->room_id ? "房间#{$log->room_id}" : '—' }}</td>
|
||||
<td class="px-4 py-3 {{ $adminListNumericTextClass }} text-gray-400">{{ $log->ip_address }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="5" class="{{ $adminListEmptyClass }}">暂无登录记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($logs->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $logs->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4">{{ $logs->links() }}</div>
|
||||
@endsection
|
||||
|
||||
@@ -11,52 +11,67 @@
|
||||
@section('title', '历史任职记录')
|
||||
|
||||
@section('content')
|
||||
<div class="mb-6">
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm text-indigo-600 hover:underline">← 返回任命管理</a>
|
||||
<h2 class="text-lg font-bold text-gray-800 mt-2">历史任职记录</h2>
|
||||
<p class="text-sm text-gray-500 mt-1">已撤销的职务记录(共 {{ $history->total() }} 条)</p>
|
||||
</div>
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">用户</th>
|
||||
<th class="px-4 py-3 text-left">职务</th>
|
||||
<th class="px-4 py-3 text-left">任命人</th>
|
||||
<th class="px-4 py-3 text-center">任命时间</th>
|
||||
<th class="px-4 py-3 text-left">撤销人</th>
|
||||
<th class="px-4 py-3 text-center">撤销时间</th>
|
||||
<th class="px-4 py-3 text-center">在职天数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse ($history as $up)
|
||||
<tr class="hover:bg-gray-50">
|
||||
<td class="px-4 py-3 font-bold text-gray-800">{{ $up->user->username }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<span class="mr-1">{{ $up->position->icon }}</span>
|
||||
<span style="color: {{ $up->position->department->color }}">{{ $up->position->name }}</span>
|
||||
<span class="text-xs text-gray-400 ml-1">{{ $up->position->department->name }}</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-500">{{ $up->appointedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center text-gray-500 text-xs">{{ $up->appointed_at->format('Y-m-d') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-500">{{ $up->revokedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center text-gray-500 text-xs">
|
||||
{{ $up->revoked_at?->format('Y-m-d') ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded">{{ $up->duration_days }}
|
||||
天</span>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-12 text-center text-gray-400">暂无历史记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
<div class="{{ $adminListHeaderCardClass }}">
|
||||
<div class="flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<a href="{{ route('admin.appointments.index') }}" class="text-sm font-semibold text-indigo-600 hover:text-indigo-700">← 返回任命管理</a>
|
||||
<h2 class="mt-2 {{ $adminListHeaderTitleClass }}">历史任职记录</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">已撤销的职务记录(共 {{ $history->total() }} 条)</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<h3 class="{{ $adminListSectionTitleClass }}">任职历史列表</h3>
|
||||
<p class="{{ $adminListSectionDescClass }}">按撤销后的记录保留完整的任命与撤销链路,便于审计追踪。</p>
|
||||
</div>
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} whitespace-nowrap">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">用户</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">职务</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">任命人</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">任命时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">撤销人</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">撤销时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">在职天数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($history as $up)
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">{{ $up->user->username }}</td>
|
||||
<td class="px-4 py-3">
|
||||
<div class="flex items-center gap-1">
|
||||
<span>{{ $up->position->icon }}</span>
|
||||
<span class="text-sm font-semibold" style="color: {{ $up->position->department->color }}">{{ $up->position->name }}</span>
|
||||
<span class="{{ $adminListSecondaryTextClass }}">{{ $up->position->department->name }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">{{ $up->appointedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center {{ $adminListSecondaryTextClass }}">{{ $up->appointed_at->format('Y-m-d') }}</td>
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">{{ $up->revokedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center {{ $adminListSecondaryTextClass }}">{{ $up->revoked_at?->format('Y-m-d') ?? '—' }}</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="inline-flex items-center rounded-full bg-gray-100 px-2 py-0.5 text-xs font-semibold text-gray-600">{{ $up->duration_days }} 天</span>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无历史记录</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($history->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $history->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="mt-4">{{ $history->links() }}</div>
|
||||
@endsection
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
@section('title', '任命管理')
|
||||
|
||||
@section('content')
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div x-data="{
|
||||
showForm: false,
|
||||
username: '',
|
||||
@@ -52,79 +54,86 @@
|
||||
}
|
||||
}">
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
{{-- 头部 --}}
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<div>
|
||||
<h2 class="text-lg font-bold text-gray-800">任命管理</h2>
|
||||
<p class="text-sm text-gray-500">管理当前所有在职职位人员,执行任命或撤销操作</p>
|
||||
</div>
|
||||
<div class="flex space-x-2">
|
||||
<div class="{{ $adminListHeaderCardClass }}">
|
||||
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
|
||||
<div>
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">任命管理</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">管理当前所有在职职位人员,执行任命或撤销操作</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap items-center gap-2">
|
||||
<a href="{{ route('admin.appointments.history') }}"
|
||||
style="background-color:#e5e7eb;color:#374151;padding:0.5rem 1rem;border-radius:0.5rem;font-weight:700;font-size:0.875rem;display:inline-flex;align-items:center;text-decoration:none;"
|
||||
onmouseover="this.style.backgroundColor='#d1d5db'" onmouseout="this.style.backgroundColor='#e5e7eb'">
|
||||
class="{{ $adminListSecondaryButtonClass }} inline-flex items-center justify-center">
|
||||
历史记录
|
||||
</a>
|
||||
<button @click="openAppoint()"
|
||||
style="background-color:#f97316;color:#fff;padding:0.5rem 1.25rem;border-radius:0.5rem;font-weight:700;border:none;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);"
|
||||
onmouseover="this.style.backgroundColor='#ea580c'" onmouseout="this.style.backgroundColor='#f97316'">
|
||||
class="inline-flex items-center justify-center rounded-lg bg-orange-500 px-4 py-2 text-sm font-semibold text-white shadow-sm transition hover:bg-orange-600">
|
||||
+ 新增任命
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 在职人员列表 --}}
|
||||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">用户</th>
|
||||
<th class="px-4 py-3 text-left">部门·职务</th>
|
||||
<th class="px-4 py-3 text-center">等级</th>
|
||||
<th class="px-4 py-3 text-left">任命人</th>
|
||||
<th class="px-4 py-3 text-center">任命时间</th>
|
||||
<th class="px-4 py-3 text-center">在职天数</th>
|
||||
<th class="px-4 py-3 text-right">操作</th>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<h3 class="{{ $adminListSectionTitleClass }}">在职人员列表</h3>
|
||||
<p class="{{ $adminListSectionDescClass }}">展示当前所有已任命且仍在职的人员,可直接查看履职日志或执行撤销。</p>
|
||||
</div>
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} whitespace-nowrap">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">用户</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">部门·职务</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">等级</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">任命人</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">任命时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">在职天数</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-right">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($activePositions as $up)
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3">
|
||||
<div class="font-bold text-gray-800">{{ $up->user->username }}</div>
|
||||
<div class="text-xs text-gray-400">Lv.{{ $up->user->user_level }}</div>
|
||||
<div class="{{ $adminListPrimaryTextClass }}">{{ $up->user->username }}</div>
|
||||
<div class="{{ $adminListSecondaryTextClass }}">Lv.{{ $up->user->user_level }}</div>
|
||||
</td>
|
||||
<td class="px-4 py-3">
|
||||
<div class="flex items-center space-x-1">
|
||||
<span class="text-lg">{{ $up->position->icon }}</span>
|
||||
<div>
|
||||
<div class="text-xs text-gray-400">{{ $up->position->department->name }}</div>
|
||||
<div class="font-bold" style="color: {{ $up->position->department->color }}">
|
||||
<div class="{{ $adminListSecondaryTextClass }}">{{ $up->position->department->name }}</div>
|
||||
<div class="text-sm font-semibold" style="color: {{ $up->position->department->color }}">
|
||||
{{ $up->position->name }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="text-xs bg-orange-100 text-orange-700 px-2 py-0.5 rounded font-mono">
|
||||
<span class="inline-flex items-center rounded-full bg-orange-100 px-2 py-0.5 text-xs font-mono font-semibold text-orange-700">
|
||||
Lv.{{ $up->position->level }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-600">{{ $up->appointedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center text-gray-500">
|
||||
<td class="px-4 py-3 {{ $adminListBodyTextClass }}">{{ $up->appointedBy?->username ?? '系统' }}</td>
|
||||
<td class="px-4 py-3 text-center {{ $adminListSecondaryTextClass }}">
|
||||
{{ $up->appointed_at->format('Y-m-d') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="text-xs bg-blue-100 text-blue-700 px-2 py-0.5 rounded">
|
||||
<span class="inline-flex items-center rounded-full bg-blue-100 px-2 py-0.5 text-xs font-semibold text-blue-700">
|
||||
{{ $up->duration_days }} 天
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-right space-x-1">
|
||||
<td class="px-4 py-3 text-right">
|
||||
<div class="flex flex-wrap items-center justify-end gap-2">
|
||||
<a href="{{ route('admin.appointments.duty-logs', $up->id) }}"
|
||||
class="text-xs bg-blue-50 text-blue-600 font-bold px-2 py-1 rounded hover:bg-blue-600 hover:text-white transition">
|
||||
class="{{ $adminListActionButtonClass }} bg-blue-50 text-blue-600 hover:bg-blue-600 hover:text-white">
|
||||
登录日志
|
||||
</a>
|
||||
<a href="{{ route('admin.appointments.authority-logs', $up->id) }}"
|
||||
class="text-xs bg-purple-50 text-purple-600 font-bold px-2 py-1 rounded hover:bg-purple-600 hover:text-white transition">
|
||||
class="{{ $adminListActionButtonClass }} bg-purple-50 text-purple-600 hover:bg-purple-600 hover:text-white">
|
||||
操作日志
|
||||
</a>
|
||||
<form action="{{ route('admin.appointments.revoke', $up->id) }}" method="POST"
|
||||
@@ -132,53 +141,53 @@
|
||||
data-admin-confirm="确定撤销【{{ $up->user->username }}】的【{{ $up->position->name }}】职务?撤销后其等级将归 1。">
|
||||
@csrf @method('DELETE')
|
||||
<button type="submit"
|
||||
class="text-xs bg-red-50 text-red-600 font-bold px-2 py-1 rounded hover:bg-red-600 hover:text-white transition">
|
||||
class="{{ $adminListActionButtonClass }} bg-red-50 text-red-600 hover:bg-red-600 hover:text-white">
|
||||
撤销职务
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="7" class="px-4 py-12 text-center text-gray-400">暂无在职人员</td>
|
||||
<td colspan="7" class="{{ $adminListEmptyClass }}">暂无在职人员</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- 新增任命弹窗 --}}
|
||||
<div x-show="showForm" style="display: none;"
|
||||
class="fixed inset-0 z-50 bg-black/60 flex items-center justify-center p-4">
|
||||
<div @click.away="showForm = false" class="bg-white rounded-xl shadow-2xl w-full max-w-md" x-transition>
|
||||
<div
|
||||
style="background-color:#c2410c;padding:1rem 1.5rem;display:flex;justify-content:space-between;align-items:center;border-radius:0.75rem 0.75rem 0 0;">
|
||||
<h3 style="font-weight:700;font-size:1.125rem;color:#fff;margin:0;">新增任命</h3>
|
||||
<div class="flex items-center justify-between rounded-t-xl border-b border-orange-800 bg-orange-700 px-6 py-4">
|
||||
<h3 class="text-lg font-bold text-white">新增任命</h3>
|
||||
<button @click="showForm = false"
|
||||
style="color:#fed7aa;background:none;border:none;font-size:1.5rem;cursor:pointer;line-height:1;"
|
||||
onmouseover="this.style.color='#fff'" onmouseout="this.style.color='#fed7aa'">×</button>
|
||||
class="text-2xl leading-none text-orange-200 transition hover:text-white">×</button>
|
||||
</div>
|
||||
<div class="p-6">
|
||||
<form action="{{ route('admin.appointments.store') }}" method="POST">
|
||||
@csrf
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">用户名</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">用户名</label>
|
||||
<div class="relative">
|
||||
<input type="text" name="username" x-model="username" required
|
||||
placeholder="输入关键字搜索用户..." @input="doSearch($event.target.value)"
|
||||
@blur="setTimeout(() => showDropdown = false, 200)"
|
||||
@focus="if(username.length > 0) doSearch(username)"
|
||||
class="w-full border rounded-md p-2 text-sm" autocomplete="off">
|
||||
class="w-full {{ $adminListFilterInputClass }}" autocomplete="off">
|
||||
{{-- 搜索中指示 --}}
|
||||
<span x-show="searching"
|
||||
class="absolute right-2 top-2.5 text-gray-400 text-xs">搜索中…</span>
|
||||
{{-- 下拉结果 --}}
|
||||
<div x-show="showDropdown" style="display:none;"
|
||||
class="absolute z-50 w-full bg-white border rounded-md shadow-lg mt-1 max-h-48 overflow-y-auto">
|
||||
class="absolute z-50 mt-1 max-h-48 w-full overflow-y-auto rounded-lg border border-orange-100 bg-white shadow-lg">
|
||||
<template x-for="u in searchResults" :key="u.id">
|
||||
<div @mousedown="selectUser(u)"
|
||||
class="px-3 py-2 hover:bg-orange-50 cursor-pointer flex justify-between items-center">
|
||||
class="flex cursor-pointer items-center justify-between px-3 py-2 hover:bg-orange-50">
|
||||
<span class="font-bold text-sm" x-text="u.username"></span>
|
||||
<span class="text-xs text-gray-400" x-text="'Lv.' + u.user_level"></span>
|
||||
</div>
|
||||
@@ -189,9 +198,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">目标职务</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">目标职务</label>
|
||||
<select name="position_id" x-model="position_id" required
|
||||
class="w-full border rounded-md p-2 text-sm">
|
||||
class="w-full {{ $adminListFilterInputClass }}">
|
||||
<option value="">-- 请选择职务 --</option>
|
||||
@foreach ($departments as $dept)
|
||||
<optgroup label="{{ $dept->name }}">
|
||||
@@ -215,21 +224,16 @@
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs font-bold text-gray-600 mb-1">任命备注(可选)</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">任命备注(可选)</label>
|
||||
<input type="text" name="remark" x-model="remark" maxlength="255"
|
||||
placeholder="例:表现优秀,特此提拔" class="w-full border rounded-md p-2 text-sm">
|
||||
placeholder="例:表现优秀,特此提拔" class="w-full {{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
style="display:flex;justify-content:flex-end;gap:0.75rem;padding-top:1rem;margin-top:1rem;border-top:1px solid #e5e7eb;">
|
||||
<div class="mt-4 flex justify-end gap-3 border-t border-gray-100 pt-4">
|
||||
<button type="button" @click="showForm = false"
|
||||
style="padding:0.5rem 1rem;border:1px solid #d1d5db;border-radius:0.375rem;font-weight:500;color:#4b5563;background:#fff;cursor:pointer;"
|
||||
onmouseover="this.style.background='#f9fafb'"
|
||||
onmouseout="this.style.background='#fff'">取消</button>
|
||||
class="{{ $adminListSecondaryButtonClass }}">取消</button>
|
||||
<button type="submit"
|
||||
style="padding:0.5rem 1rem;background-color:#f97316;color:#fff;border-radius:0.375rem;font-weight:700;border:none;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.1);"
|
||||
onmouseover="this.style.backgroundColor='#ea580c'"
|
||||
onmouseout="this.style.backgroundColor='#f97316'">
|
||||
class="rounded-lg bg-orange-500 px-4 py-2 text-sm font-semibold text-white shadow-sm transition hover:bg-orange-600">
|
||||
确认任命
|
||||
</button>
|
||||
</div>
|
||||
@@ -237,5 +241,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -12,13 +12,16 @@
|
||||
@section('title', '我的履职记录')
|
||||
|
||||
@section('content')
|
||||
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
|
||||
|
||||
<div class="{{ $adminListPageClass }}">
|
||||
|
||||
{{-- ── 页面标题 ── --}}
|
||||
<div class="mb-6">
|
||||
<h2 class="text-xl font-bold text-gray-800">📝 我的履职记录</h2>
|
||||
<p class="text-sm text-gray-500 mt-1">
|
||||
<div class="{{ $adminListHeaderCardClass }}">
|
||||
<h2 class="{{ $adminListHeaderTitleClass }}">📝 我的履职记录</h2>
|
||||
<p class="{{ $adminListHeaderSubtitleClass }}">
|
||||
{{ $user->username }} 的全部职务操作历史,共
|
||||
<span class="font-bold text-gray-700">{{ $logs->total() }}</span> 条记录
|
||||
<span class="font-semibold text-gray-700">{{ $logs->total() }}</span> 条记录
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -72,14 +75,14 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div style="display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:24px;">
|
||||
<div class="grid gap-3 md:grid-cols-3 xl:grid-cols-6">
|
||||
@foreach ($statCards as $type => $card)
|
||||
@php
|
||||
$stat = $summary->get($type);
|
||||
$c = $colorMap[$card['color']];
|
||||
@endphp
|
||||
<a href="{{ request()->fullUrlWithQuery(['type' => $type, 'page' => 1]) }}"
|
||||
class="rounded-xl border {{ $c['bg'] }} {{ $c['border'] }} px-3 py-3 text-center hover:shadow-md transition
|
||||
class="rounded-xl border shadow-sm {{ $c['bg'] }} {{ $c['border'] }} px-3 py-3 text-center hover:shadow-md transition
|
||||
{{ request('type') === $type ? 'ring-2 ring-offset-1 ring-indigo-400 shadow-md' : '' }}">
|
||||
<div class="text-xl mb-0.5">{{ $card['icon'] }}</div>
|
||||
<div class="text-xs text-gray-500 mb-0.5 whitespace-nowrap">{{ $card['label'] }}</div>
|
||||
@@ -92,11 +95,13 @@
|
||||
</div>
|
||||
|
||||
{{-- ── 筛选栏 ── --}}
|
||||
<form method="GET" class="bg-white rounded-xl shadow-sm border p-4 mb-4 flex flex-wrap gap-3 items-end">
|
||||
<div class="{{ $adminListFilterCardClass }}">
|
||||
<div class="{{ $adminListFilterInnerClass }}">
|
||||
<form method="GET" class="{{ $adminListFilterFormClass }}">
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">操作类型</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">操作类型</label>
|
||||
<select name="type"
|
||||
class="border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-indigo-300 outline-none">
|
||||
class="{{ $adminListFilterInputClass }}">
|
||||
<option value="">全部类型</option>
|
||||
@foreach ($statCards as $type => $card)
|
||||
<option value="{{ $type }}" {{ request('type') === $type ? 'selected' : '' }}>
|
||||
@@ -106,26 +111,28 @@
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">开始日期</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">开始日期</label>
|
||||
<input type="date" name="date_from" value="{{ request('date_from') }}"
|
||||
class="border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-indigo-300 outline-none">
|
||||
class="{{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
<div>
|
||||
<label class="block text-xs text-gray-500 mb-1">结束日期</label>
|
||||
<label class="{{ $adminListFilterLabelClass }}">结束日期</label>
|
||||
<input type="date" name="date_to" value="{{ request('date_to') }}"
|
||||
class="border rounded-lg px-3 py-2 text-sm focus:ring-2 focus:ring-indigo-300 outline-none">
|
||||
class="{{ $adminListFilterInputClass }}">
|
||||
</div>
|
||||
<button type="submit"
|
||||
class="px-5 py-2 bg-indigo-600 text-white text-sm font-bold rounded-lg hover:bg-indigo-700 transition">
|
||||
class="{{ $adminListPrimaryButtonClass }}">
|
||||
🔍 查询
|
||||
</button>
|
||||
@if (request()->hasAny(['type', 'date_from', 'date_to']))
|
||||
<a href="{{ route('admin.appointments.my-duty-logs') }}"
|
||||
class="px-5 py-2 bg-gray-100 text-gray-600 text-sm rounded-lg hover:bg-gray-200 transition">
|
||||
class="{{ $adminListSecondaryButtonClass }}">
|
||||
✖ 清除筛选
|
||||
</a>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- ── 记录表格 ── --}}
|
||||
@php
|
||||
@@ -141,66 +148,74 @@
|
||||
];
|
||||
@endphp
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||||
<table class="w-full text-sm">
|
||||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left">操作时间</th>
|
||||
<th class="px-4 py-3 text-center">操作类型</th>
|
||||
<th class="px-4 py-3 text-left">操作对象</th>
|
||||
<th class="px-4 py-3 text-left">所属职务</th>
|
||||
<th class="px-4 py-3 text-center">金币金额</th>
|
||||
<th class="px-4 py-3 text-left">备注说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="divide-y divide-gray-100">
|
||||
@forelse ($logs as $log)
|
||||
@php $colorClass = $actionColors[$log->action_type] ?? 'bg-gray-100 text-gray-600'; @endphp
|
||||
<tr class="hover:bg-gray-50 transition">
|
||||
<td class="px-4 py-3 text-gray-400 text-xs whitespace-nowrap">
|
||||
{{ $log->created_at->format('Y-m-d H:i') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="text-xs px-2 py-0.5 rounded-full font-bold {{ $colorClass }}">
|
||||
{{ $log->action_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 font-bold text-gray-700">
|
||||
{{ $log->targetUser?->username ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-500 text-xs">
|
||||
@if ($log->userPosition?->position)
|
||||
<span class="text-gray-400">{{ $log->userPosition->position->department?->name }}</span>
|
||||
@if ($log->userPosition->position->department)
|
||||
<span class="text-gray-300 mx-1">·</span>
|
||||
<div class="{{ $adminListCardClass }}">
|
||||
<div class="{{ $adminListSectionHeadClass }}">
|
||||
<h3 class="{{ $adminListSectionTitleClass }}">履职操作记录</h3>
|
||||
<p class="{{ $adminListSectionDescClass }}">可按操作类型和日期范围筛选当前登录者的历史履职行为。</p>
|
||||
</div>
|
||||
<div class="{{ $adminListTableWrapClass }}">
|
||||
<table class="{{ $adminListTableClass }} whitespace-nowrap">
|
||||
<thead>
|
||||
<tr class="{{ $adminListTableHeadRowClass }}">
|
||||
<th class="{{ $adminListTableHeadCellClass }}">操作时间</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">操作类型</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">操作对象</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">所属职务</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }} text-center">金币金额</th>
|
||||
<th class="{{ $adminListTableHeadCellClass }}">备注说明</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="{{ $adminListTableBodyClass }}">
|
||||
@forelse ($logs as $log)
|
||||
@php $colorClass = $actionColors[$log->action_type] ?? 'bg-gray-100 text-gray-600'; @endphp
|
||||
<tr class="{{ $adminListTableRowClass }}">
|
||||
<td class="px-4 py-3 whitespace-nowrap {{ $adminListSecondaryTextClass }}">
|
||||
{{ $log->created_at->format('Y-m-d H:i') }}
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
<span class="inline-flex items-center rounded-full px-2 py-0.5 text-xs font-semibold {{ $colorClass }}">
|
||||
{{ $log->action_label }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">
|
||||
{{ $log->targetUser?->username ?? '—' }}
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">
|
||||
@if ($log->userPosition?->position)
|
||||
<span>{{ $log->userPosition->position->department?->name }}</span>
|
||||
@if ($log->userPosition->position->department)
|
||||
<span class="mx-1 text-gray-300">·</span>
|
||||
@endif
|
||||
<span class="text-gray-600">{{ $log->userPosition->position->name }}</span>
|
||||
@else
|
||||
<span class="text-gray-300">超级管理员</span>
|
||||
@endif
|
||||
{{ $log->userPosition->position->name }}
|
||||
@else
|
||||
<span class="text-gray-300">超级管理员</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($log->amount)
|
||||
<span class="text-yellow-600 font-bold">+{{ number_format($log->amount) }}</span>
|
||||
<span class="text-gray-400 text-xs">金币</span>
|
||||
@else
|
||||
<span class="text-gray-300">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 text-gray-400 text-xs">{{ $log->remark ?: '—' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="px-4 py-16 text-center text-gray-400">
|
||||
<div class="text-4xl mb-3">📋</div>
|
||||
<div>暂无履职操作记录</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-center">
|
||||
@if ($log->amount)
|
||||
<span class="text-sm font-semibold text-yellow-600">+{{ number_format($log->amount) }}</span>
|
||||
<span class="{{ $adminListSecondaryTextClass }}">金币</span>
|
||||
@else
|
||||
<span class="text-gray-300">—</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">{{ $log->remark ?: '—' }}</td>
|
||||
</tr>
|
||||
@empty
|
||||
<tr>
|
||||
<td colspan="6" class="{{ $adminListEmptyClass }}">
|
||||
<div class="mb-3 text-4xl">📋</div>
|
||||
<div>暂无履职操作记录</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforelse
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@if ($logs->hasPages())
|
||||
<div class="{{ $adminListPaginationClass }}">{{ $logs->links() }}</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="mt-4">{{ $logs->links() }}</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user