You've already forked think-plugs-notice
[notice]通知公告
This commit is contained in:
50
src/view/broadcast/index.html
Normal file
50
src/view/broadcast/index.html
Normal file
@@ -0,0 +1,50 @@
|
||||
{extend name='table'}
|
||||
|
||||
{block name="button"}
|
||||
<!--{if auth("add")}-->
|
||||
<a class="layui-btn layui-btn-sm" data-modal="{:url('add')}" data-title="新增通知公告" data-height="100%">{:lang('新 增')}</a>
|
||||
<!--{/if}-->
|
||||
<!--{if auth("remove")}-->
|
||||
<a data-confirm="{:lang('确定删除这些记录吗?')}" data-table-id="FileTable" data-action='{:url("remove")}' data-rule="id#{id}" class='layui-btn layui-btn-sm layui-btn-primary'>{:lang('批量删除')}</a>
|
||||
<!--{/if}-->
|
||||
{/block}
|
||||
|
||||
{block name="content"}
|
||||
<div class="think-box-shadow" style="flex: 4">
|
||||
{include file="broadcast/index_search"}
|
||||
<table class="layui-hide" id="BroadcastTable" data-url="{:request()->url()}" data-target-search="form.form-search" lay-filter="BroadcastTable"></table>
|
||||
</div>
|
||||
<script type="text/html" id="ToolbarTpl">
|
||||
<div class="layui-btn-container">
|
||||
<!--{if auth("edit")}-->
|
||||
<a class="layui-btn layui-btn-xs" data-modal="{:url('edit')}?id={{d.id}}" data-title="编辑通知公告">{:lang('编 辑')}</a>
|
||||
<!--{/if}-->
|
||||
<!--{if auth("remove")}-->
|
||||
<a class="layui-btn layui-btn-danger layui-btn-xs" data-confirm="{:lang('确定删除该记录吗?')}" data-action="{:url('remove')}" data-value="id#{{d.id}}">{:lang('删 除')}</a>
|
||||
<!--{/if}-->
|
||||
</div>
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
$('#BroadcastTable').layTable({
|
||||
height: 'full',
|
||||
sort: ['create_at', 'desc'],
|
||||
cols: [[
|
||||
{checkbox: true, fixed: true},
|
||||
{ field: 'id', title: '序号', width: 80 },
|
||||
{ field: 'title', title: '标题', width: 200 },
|
||||
{ field: 'type', title: '类型', width: 120 },
|
||||
{ field: 'content', title: '内容' },
|
||||
{ field: 'to', title: '通知用户' },
|
||||
{ field: 'create_at', title: '创建时间', width: 200, sort: true },
|
||||
{ fixed: "right", title: "操作", width: 200, align: "center", toolbar: "#ToolbarTpl"}
|
||||
]],
|
||||
page: true
|
||||
})
|
||||
layui.use(['form', 'table'], function () {
|
||||
const Table = layui.table;
|
||||
const Form = layui.form;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
{/block}
|
||||
Reference in New Issue
Block a user