| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169 |
- @extends('base.base')
- @section('base')
- <!-- {{ __('messages.内容区域') }} -->
- <div class="main-panel">
- <div class="content-wrapper">
- <div class="page-header">
- <h3 class="page-title">
- <span class="page-title-icon bg-gradient-primary text-white mr-2">
- <i class="mdi mdi-wrench"></i>
- </span>
- {{ __('messages.管理员') }}
- </h3>
- <nav aria-label="breadcrumb">
- <ol class="breadcrumb">
- <li class="breadcrumb-item"><a href="#">{{ __('messages.系统设置') }}</a></li>
- <li class="breadcrumb-item active" aria-current="page">{{ __('messages.管理员管理') }}</li>
- </ol>
- </nav>
- </div>
- <div class="row">
- <div class="col-lg-12 grid-margin stretch-card">
- <div class="card">
- <div class="card-body">
- <h4 class="card-title">{{ __('messages.管理员列表') }}</h4>
- <p class="card-description">
- <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
- <i class="mdi mdi-plus btn-icon-prepend"></i>
- {{ __('messages.添加管理员') }}
- </button>
- </p>
- <table class="table table-bordered">
- <thead>
- <tr>
- <th>ID</th>
- <th>{{ __('messages.头像') }}</th>
- <th>{{ __('messages.昵称') }}</th>
- {{-- <th>{{ __('messages.创建时间') }}</th>--}}
- {{-- <th>{{ __('messages.更新时间') }}</th>--}}
- <th>{{ __('messages.账号') }}</th>
- <th>{{ __('messages.角色') }}</th>
- <th>{{ __('messages.语言') }}</th>
- <th>{{ __('messages.当前彩金额度') }}</th>
- <th>{{ __('messages.历史已消耗彩金额度') }}</th>
- <th>{{ __('messages.当前单控送金额度') }}</th>
- <th>{{ __('messages.历史单控送金额度') }}</th>
- <th>{{ __('messages.渠道号') }}</th>
- <th>{{ __('messages.状态') }}</th>
- <th width="15%">{{ __('messages.操作') }}</th>
- </tr>
- </thead>
- <tbody>
- @foreach($admins as $admin)
- <tr>
- <td>{{ $admin->id }}</td>
- <td>
- @if($admin->avatar)
- <img class="avatar" src="{{ $admin->avatar ?? "" }}" alt="image">
- @endif
- </td>
- <td>{{ $admin->nickname }}</td>
- {{-- <td>{{ $admin->created_at }}</td>--}}
- {{-- <td>{{$admin->updated_at}}</td>--}}
- <td>{{ $admin->account }}</td>
- <td>
- @foreach($admin->roles as $role)
- {{ $role->name }}
- @endforeach
- </td>
- <td>{{$admin->locale}}</td>
- <td>{{$admin->lottery_amount}}</td>
- <td>{{$admin->history_lottery_amount}}</td>
- <td>{{$admin->recharge_amount}}</td>
- <td>{{$admin->history_recharge_amount}}</td>
- <td style=" word-wrap: break-word;
- word-break: break-all; /* 任何字符间换行 */
- white-space: normal; /* 允许自动换行 */
- max-width: 30%; /* 设置一个最大宽度,根据需要调整 */">{{implode(",",json_decode($admin->channel,true))}}</td>
- <td>
- @if ($admin->status == 1)
- {{ __('messages.正常') }}
- @else
- {{ __('messages.禁用') }}
- @endif
- </td>
- <td>
- <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $admin->id }})">
- {{ __('messages.修改') }}
- <i class="mdi mdi-file-check btn-icon-append"></i>
- </button>
- <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $admin->id }})">
- <i class="mdi mdi-delete btn-icon-prepend"></i>
- {{ __('messages.删除') }}
- </button>
- <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="block({{ $admin->id }})">
- @if ($admin->status == 1)
- {{ __('messages.禁用') }}
- @else
- {{ __('messages.启用') }}
- @endif
- <i class="mdi mdi-file-check btn-icon-append"></i>
- </button>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- <div class="box-footer clearfix" id = "pages">
- {{ __('messages.总共') }} <b>{{ $admins->appends([
- ])->total() }}</b> {{ __('messages.条,分为') }}<b>{{ $admins->lastPage() }}</b> {{ __('messages.页') }}
- {!! $admins->links() !!}
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- function add(){
- layer.open({
- type: 2,
- title: '{{ __('messages.添加管理员') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['100%', '100%'],
- content: '/admin/administrator/add'
- });
- }
- function update(id){
- var page = layer.open({
- type: 2,
- title: '{{ __('messages.修改管理员') }}',
- shadeClose: true,
- shade: 0.8,
- area: ['70%', '90%'],
- content: '/admin/administrator/update/'+id
- });
- }
- function del(id){
- myConfirm("{{ __('messages.删除操作不可逆,是否继续?') }}",function(){
- myRequest("/admin/administrator/del/"+id,"post",{},function(res){
- layer.msg(res.msg)
- setTimeout(function(){
- window.location.reload();
- },1500)
- });
- });
- }
- function block(id){
- myConfirm("{{ __('messages.是否继续?') }}",function(){
- myRequest("/admin/administrator/block/"+id,"post",{},function(res){
- layer.msg(res.msg)
- setTimeout(function(){
- window.location.reload();
- },1500)
- });
- });
- }
- </script>
- @endsection
|