| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- {include file="public/header"}
- <form action="group" method="GET" class="form-inline">
- <button type="button" class="btn btn-primary" id="addgroup">添加小组</button>
- </form>
- <div class="table-responsive" style="padding-top: 10px;">
- <table class="table table-striped" border='1'>
- <thead>
- <tr>
- <th style="text-align: center;">分组编号</th>
- <th style="text-align: center;">分组名</th>
- <th style="text-align: center;">管理区域</th>
- <th style="text-align: center;">操作</th>
- </tr>
- </thead>
- <tbody style="text-align: center;">
- {volist name="group_info" id="vo"}
- <tr>
- <td><b>{$vo.id}</b></td>
- <td>
- {if condition = "$vo.name eq null"}
- 暂无
- {else/}
- {$vo.name}
- {/if}
- </td>
- <td>
- {if condition = "$vo.regionName eq null"}
- 暂无
- {else/}
- {foreach $vo.regionName as $v}
- {$v['username']}
- {/foreach}
- {/if}
- </td>
- <td>
-
- <button data-groupid="{$vo['id']}" class="btn btn-xs btn-danger buttoneidt">编辑</button>
- <button data-groupid="{$vo['id']}" class="btn btn-xs btn-warning del" >删除</button>
- </td>
- </tr>
- {/volist}
- </tbody>
- <thead>
- <tr>
- <th style="text-align: center;">分组编号</th>
- <th style="text-align: center;">分组名</th>
- <th style="text-align: center;">管理区域</th>
- <th style="text-align: center;">操作</th>
- </tr>
- </thead>
- </table>
- </div>
- <!-- 分页的渲染函数 -->
- <div style="text-align:center;">
- {$group_info->render()}
- </div>
- <script src="__LOGIN__/js/jquery.min.js"></script>
- <script>
- $(function () {
-
- $('.buttoneidt').click(function () {
-
- let groupid = $(this).attr('data-groupid');
- window.location.href = "__URL__/edit_group?group_id=" + groupid; //编辑分组信息
- });
- $('#addgroup').click(function(){
- window.location.href = "__URL__/add_group"; //添加分组
- });
- $('.del').click(function () {
- let groupid = $(this).attr('data-groupid');
- window.location.href = "/admin/index/del_group?group_id=" + groupid;
- })
- });
- </script>
|