71 lines
2.7 KiB
PHP
71 lines
2.7 KiB
PHP
@extends('admin.layouts.base')
|
|
@section('add_css')
|
|
|
|
@endsection
|
|
@section('content')
|
|
|
|
|
|
<div class="layui-card">
|
|
|
|
<div class="layui-card-body">
|
|
<div style="padding-bottom: 10px;">
|
|
<button class="layui-btn layuiadmin-btn-tophandel" data-type="batchdel">删除</button>
|
|
<button class="layui-btn layuiadmin-btn-tophandel" data-type="add">添加</button>
|
|
</div>
|
|
<table id="LAY-list-table" lay-filter="LAY-list-table"></table>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
@endsection
|
|
@section('add_js')
|
|
@include('admin.layouts.layui_tpl')
|
|
<script>
|
|
var listConfig={
|
|
table_name:'{{ $table_name }}',
|
|
page_name:'{{ $page['name'] }}',
|
|
del_url:"{{ admin_url('Handle','handle',['group_type'=>$group_type,'type'=>'del']) }}",
|
|
edit_field_url:"{{ admin_url('Handle','handle',['group_type'=>$group_type,'type'=>'edit']) }}",
|
|
create_url:'{{ action($controller.'@create',['group_type'=>$group_type]) }}',
|
|
stroe_url:"{{ action($controller.'@store',['group_type'=>$group_type]) }}",
|
|
open_height:'340px',
|
|
open_width:'450px'
|
|
};
|
|
|
|
layui.use(['index', 'table', 'listable'], function () {
|
|
var $ = layui.$
|
|
, form = layui.form
|
|
, listable = layui.listable
|
|
, table = layui.table;
|
|
var element = layui.element;
|
|
|
|
cols= [[
|
|
{type: 'checkbox', width: 80,}
|
|
, {field: 'id', width: 80, title: 'ID', sort: true}
|
|
, {field: 'sort', title: '排序',width:80,edit:1}
|
|
, {field: 'name', title: '名称', minWidth: 150},
|
|
{
|
|
field:'is_checked',title:'状态',templet:'#true-false-table-switchTpl', width: 150
|
|
}
|
|
, {
|
|
title: '操作',
|
|
width: 180,
|
|
align: 'center',
|
|
|
|
toolbar: '#table-useradmin-admin'
|
|
}
|
|
]];
|
|
listable_url="{{ action($controller.'@apiJson',['group_type'=>$group_type]) }}";
|
|
listable.list(listable_url,cols);
|
|
//监听表操作
|
|
listable.handle();
|
|
listable.top_handle();
|
|
|
|
|
|
|
|
|
|
});
|
|
</script>
|
|
@endsection |