123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- @extends('layouts.admin.app_iframe')
- @section('plug-css')
- <link href="{{ asset('js/bootstrap-table/dist/bootstrap-table.css') }}" rel="stylesheet">
- @endsection
- @section('content')
- <form id="searchForm" class="form-inline">
- {{-- <div class="">--}}
- {{-- <div class="form-group">--}}
- {{-- <label for="name" class="label-css"> ID:</label>--}}
- {{-- <input class="form-control" type="text" name="id">--}}
- {{-- </div>--}}
- {{--   --}}
- {{-- <button type="button" class="btn btn-primary">查询</button>--}}
- {{-- </div>--}}
- </form>
- <span>角色名称:<span style="color: orangered;">{{$role->name}}</span></span>
- <hr class="hr-css">
- <div>
- <div id="toolbar">
- <div class="columns columns-left btn-group pull-left">
- <a class="createForm" data-url="{{ route('admin.permission.store', array('id' => $id)) }}" data-title="create" data-area-width="100%" data-area-height="100%">
- <button class="btn btn-default" type="button">
- <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 添加权限
- </button>
- </a>
- </div>
- </div>
- <table id="ContentTable"></table>
- </div>
- @endsection
- @section('plug-js')
- <script src="{{ asset('js/bootstrap-table/dist/bootstrap-table.js') }}"></script>
- <script src="{{ asset('js/bootstrap-table/dist/locale/bootstrap-table-zh-CN.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/dist/jquery.validate.min.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/dist/additional-methods.min.js') }}"></script>
- <script src="{{ asset('js/jquery-validation1.16/src/localization/messages_zh.js') }}"></script>
- @endsection
- @section('scripts')
- <script>
- $(function(){
- BootStrapInit.init('tablePermission','ContentTable',{
- searchForm: 'searchForm', // 表单搜索id 省略默认 'searchForm'
- url: "{{ route('admin.permission.ajax.index', array('id' => $id)) }}",
- method: 'post',
- toolbar: '#toolbar',
- idField: '', // 指定主键列
- uniqueId: "id", // 这里需要指定当前查询表唯一主键字段
- columns: [
- {
- checkbox: true,
- align: 'center',
- valign: 'middle'
- },
- {
- field: 'name',
- title: '权限名称',
- align: 'center',
- valign: 'middle'
- },
- // {
- // field: 'routes',
- // title: '路由路径',
- // align: 'center',
- // valign: 'middle'
- // },
- // {
- // field: 'created_at',
- // title: '创建时间',
- // align: 'center',
- // valign: 'middle'
- // },
- // {
- // field: 'updated_at',
- // title: '更新时间',
- // align: 'center',
- // valign: 'middle'
- // },
- {
- pkId: 'id', // 当前主键id 兼容排序 field='id' 默认值id
- title: '操作',
- align: 'center',
- valign: 'middle',
- width: '185px',
- formatter:operateFormatter,
- btn_group:[
- {
- 'name' : '取消权限',
- 'class' : 'btn-danger deleteBtn', // class标签 deleteBtn删除 layer弹出框
- 'url' : 'javascript:;',
- 'confirm_url': '{{ route('admin.permission.destroy', ['id'=>'-val-'])}}' // 选择按钮
- }
- ]
- }
- ]
- });
- });
- </script>
- @endsection
|