123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@taglib prefix="p" uri="http://www.test.com/jsp/permission" %>
- <!doctype html>
- <html>
- <head>
- <%@ include file="../../common/head.jsp"%>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <link href="../res/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
- <script src="../res/js/plugins/bootstrap-table/bootstrap-table.js"></script>
- <script src="../res/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
- <script src="../res/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
- <script>
-
- function test(value,row,index){
- // return '<a href="#">' + row['id'] + '</a>';
- return '<a href="#">编辑 </a>|<a href="#">删除</a>';
- }
-
- function init_pwd(){
- var data = getSelectedRow("tab_user");
- if(null == data){
- return;
- }
-
- $.confirm("确定初始化密码吗? ", function(){
- $.post('initPwd.cs?id=' + data.id,
- function(result){
- window.location.reload();
- }
- );
- });
- }
- function format_type(value,row,index){
- if(value == 0){
- return '平台管理员';
- }
- }
-
- // 分配角色
- function setRole(){
- var data = getSelectedRow("tab_user");
- if(null == data){
- return;
- }
- $.openDlg({
- url:'transfer.cs?action=setRole&id=' + data.id,
- title:'分配角色',
- width:'100%',
- height:'100%',
- });
- }
-
- $(function(){
- $('#btnSearch').click(function () {
- $('#tab_user').bootstrapTable('refresh');
- });
-
- $('#clearHref').click(function () {
- $('#myform')[0].reset();
- });
- });
-
- function queryParams(params){
- var page = params.offset / params.limit + 1;
- var dataObj = new Object();
- dataObj.name=$("#account").val();
- return { page:page,
- pageSize:params.limit,
- search:JSON.stringify(dataObj),
- sort:params.sort,
- order:params.order,
- };
- }
- </script>
- </head>
- <body class="gray-bg">
- <div class="wrapper wrapper-content animated fadeInUp">
- <!-- <div class="ibox " style=""> -->
- <!-- <div class="ibox-content"> -->
- <div class="row row-lg">
- <div class="col-sm-12">
- <div class="ibox-content m-b-sm border-bottom">
- <div class="ibox-title">
- <h5>查询条件</h5>
- </div>
- <form class="form-inline" id="myform">
- <div class="form-group"><label> 登录账户:</label><input id="account" name="account" class="form-control" type="text" value=""></div>
- <!-- <div class="form-group">
- <label> 用户类型:</label>
- <select class="form-control" id="orderState">
- <option value="">--全部--</option>
- <option value="0">未付款</option>
- <option value="1">已付款</option>
- <option value="2">已投保</option>
- </select>
- </div> -->
- <%-- <div class="form-group">
- <label> 所在机场:</label>
- <select class="form-control" id="airportId" onchange="doItem(this.value);">
- <option value="">--全部--</option>
- <c:forEach items="${airportList}" var="airport">
- <option value="${airport.id}">${airport.name}</option>
- </c:forEach>
- </select>
- </div>
- <div class="form-group">
- <label> 所在航空公司:</label>
- <select class="form-control" id="airwaysId">
- <option value="">全部</option>
- </select>
- </div> --%>
-
- <label><a href="#" id="btnSearch" class="btn btn-primary"><i class="icon-search"></i> 搜索</a></label>
- <label><a href="#" id="clearHref" class="btn btn-primary"><i class="icon-search"></i> 清除搜索条件</a></label>
- </form>
- </div>
- <cs:toolbar title="用户" tableId="tab_user" width="70%" height="90%" menuCode="${menuCode }">
- <p:permission menuCode="${menuCode }" action="16">
- <button class="btn btn-sm btn-info" type="button" onclick="init_pwd()"><i class="fa fa-info"></i> 初始化密码</button>
- </p:permission>
-
- <p:permission menuCode="${menuCode }" action="32">
- <button class="btn btn-sm btn-info" type="button" onclick="setRole()"><i class="fa fa-info"></i> 分配角色</button>
- </p:permission>
- </cs:toolbar>
- <table id="tab_user"
- data-toggle="table"
- data-url="list2.cs"
- data-method="get"
- data-click-to-select="true"
- data-pagination="true"
- data-data-type="json"
- data-show-refresh="true"
- data-show-columns="true"
- data-show-toggle="true"
- data-search-on-enter-key="true"
- data-toolbar="#def_toolbar"
- data-side-pagination="server"
- data-query-params="queryParams"
- data-mobile-responsive="true"
- >
- <thead>
- <tr>
- <th data-checkbox="true" data-click-to-select="true"></th>
- <th data-field="id" data-visible="false">id</th>
- <th data-field="code">代码</th>
- <th data-field="name">姓名</th>
- <th data-field="account">账户</th>
- <%-- <th data-field="pwd">密码</th>--%>
- <!-- <th data-field="type" data-formatter="format_type">用户类型</th> -->
- <!-- <th data-field="status">状态</th> -->
- <th data-field="createDate" data-formatter="format_time">创建时间</th>
- </tr>
- </thead>
- </table>
-
- </div>
-
- </div>
-
- <!-- </div> -->
- <!-- </div> -->
- </div>
-
- </body>
- </html>
|