123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- {extend name="public/container"}
- {block name="head_top"}
- <script src="{__PLUG_PATH}city.js"></script>
- <style>
- .layui-btn-xs {
- margin-left: 0px !important;
- }
- legend {
- width: auto;
- border: none;
- font-weight: 700 !important;
- }
- .site-demo-button {
- padding-bottom: 20px;
- padding-left: 10px;
- }
- .layui-form-label {
- width: auto;
- }
- .layui-input-block input {
- width: 50%;
- height: 34px;
- }
- .layui-form-item {
- margin-bottom: 0;
- }
- .layui-input-block .time-w {
- width: 200px;
- }
- .layui-table-body {
- overflow-x: hidden;
- }
- .layui-btn-group button i {
- line-height: 30px;
- margin-right: 3px;
- vertical-align: bottom;
- }
- .back-f8 {
- background-color: #F8F8F8;
- }
- .layui-input-block button {
- border: 1px solid #e5e5e5;
- }
- .avatar {
- width: 50px;
- height: 50px;
- }
- .layui-table-body {
- overflow-x: unset;
- }
- </style>
- {/block}
- {block name="content"}
- <div class="row">
- <div class="col-sm-12">
- <div class="ibox">
- <div class="ibox-content">
- <div class="table-responsive">
- <div class="layui-btn-container">
- <button class="layui-btn layui-btn-sm"
- onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}')">新增活动
- </button>
- </div>
- <table class="layui-hide" id="List" lay-filter="List"></table>
- <script type="text/html" id="barDemo">
- <button type="button" class="layui-btn layui-btn-xs " lay-event='detail'>
- 详情
- </button>
- <button type="button" class="layui-btn layui-btn-xs" lay-event="edit">
- 编辑
- </button>
- <button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span
- class="caret"></span></button>
- <ul class="layui-nav-child layui-anim layui-anim-upbit">
- <li>
- <a href="javascript:void(0);" lay-event="see">
- <i class="layui-icon layui-icon-edit"></i> 参与详情</a>
- </li>
- </ul>
- </script>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="{__ADMIN_PATH}js/layuiList.js"></script>
- <script src="{__FRAME_PATH}js/content.min.js?v=1.0.0"></script>
- {/block}
- {block name="script"}
- <script>
- layList.form.render();
- layList.tableList('List', "{:Url('get_list')}", function () {
- return [
- {field: 'id', title: '编号', event: 'id', width: '4%', align: 'center'},
- {field: 'name', title: '活动标题', align: 'center'},
- {field: 'l1', title: '一级缴纳', align: 'center', width: '10%'},
- {field: 'l2', title: '二级缴纳', align: 'center', width: '10%'},
- {field: 'l3', title: '三级缴纳', width: '10%', align: 'center'},
- {field: 'explode_num', title: '分裂人数', width: '6%', align: 'center'},
- {field: 'type', title: '类型', align: 'center', width: '6%'},
- {field: 'operate', title: '操作', width: '10%', align: 'center', toolbar: '#barDemo'}
- ];
- });
- //监听并执行 uid 的排序
- layList.tool(function (event, data, obj) {
- var layEvent = event;
- switch (layEvent) {
- case 'edit':
- $eb.createModalFrame('编辑', layList.Url({a: 'create', p: {id: data.id}}));
- break;
- case 'see':
- $eb.createModalFrame(data.name + '-参与详情', layList.Url({a: 'see', p: {id: data.id}}), {w: 1800});
- break;
- case 'detail':
- $eb.createModalFrame(data.name + '-编辑', layList.U({a: 'detail', q: {id: data.id}}));
- break;
- }
- });
- layList.search('search', function (where) {
- layList.reload(where, true);
- });
- $('.conrelTable').find('button').each(function () {
- var type = $(this).data('type');
- $(this).on('click', function () {
- action[type] && action[type]();
- })
- })
- //下拉框
- $(document).click(function (e) {
- $('.layui-nav-child').hide();
- })
- function dropdown(that) {
- var oEvent = arguments.callee.caller.arguments[0] || event;
- oEvent.stopPropagation();
- var offset = $(that).offset();
- var top = offset.top - $(window).scrollTop();
- var index = $(that).parents('tr').data('index');
- $('.layui-nav-child').each(function (key) {
- if (key != index) {
- $(this).hide();
- }
- })
- if ($(document).height() < top + $(that).next('ul').height()) {
- $(that).next('ul').css({
- 'padding': 10,
- 'top': -($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height() / 2),
- 'left': offset.left - $(that).parents('td').offset().left - 20,
- 'min-width': 'inherit',
- 'position': 'absolute'
- }).toggle();
- } else {
- $(that).next('ul').css({
- 'padding': 10,
- 'top': $(that).parent('td').height() / 2 + $(that).height(),
- 'left': offset.left - $(that).parents('td').offset().left - 20,
- 'min-width': 'inherit',
- 'position': 'absolute'
- }).toggle();
- }
- }
- </script>
- {/block}
|