12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- {extend name="index_layout"/}
- {block name="main"}
- <div class="layui-card">
- <div class="layui-card-header">{%tableComment%}</div>
- <div class="layui-card-body">
- <div class="layui-form">
- <table class="layui-hide" id="currentTable" lay-filter="currentTable"
- data-auth-restore="{:$auth->check('{%controllerUrl%}/restore')}"
- data-auth-destroy="{:$auth->check('{%controllerUrl%}/destroy')}"
- ></table>
- </div>
- </div>
- </div>
- {/block}
- {block name="script"}
- <script type="text/javascript">
- layui.use('yznTable', function() {
- var table = layui.yznTable;
-
- var init = {
- table_elem: '#currentTable',
- table_render_id: 'currentTable',
- restore_url: '{:url("{%controllerUrl%}/restore")}',
- destroy_url: '{:url("{%controllerUrl%}/destroy")}',
- modify_url: "{:url('{%controllerUrl%}/multi')}",
- };
-
- table.render({
- init: init,
- toolbar: ['refresh', 'restore', 'destroy'],
- url: '{:url("{%controllerUrl%}/recyclebin")}',
- cols: [
- [
- { type: 'checkbox', fixed: 'left' },
- { field: 'id', width: 70, title: 'ID' },{%recyclebinTitleJs%}
- { field: '{%deleteTimeField%}', width: 160, title: '删除时间', search: 'range', templet: yznTable.formatter.datetime},
- { fixed: 'right', width: 140, title: '操作', templet: yznTable.formatter.tool,operat: ['restore','destroy']}
- ]
- ],
- page: {}
- });
-
- yznTable.bindevent();
- });
- </script>
- {/block}
|