核心提示:buserlist.jsp代码实例%@ page language=java contentType=text/html; charset=utf-8 pageEncoding=utf-8%%@ in...
buserlist.jsp代码实例
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@ include file="../../include/common.jsp"%> <%@ include file="../../include/thirdPage/common/tableNormal.jsp"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "https://www.w3.org/TR/html4/loose.dtd"> <html> <head> <%@include file="/webpage/include/treetable.jsp"%> <style> #tableCss { overflow: hidden; overflow-x: scroll; } #contentTable { width: 2000px; } .form-group>p>span { width: 100%; } /* .input-group .form-control:first-child{ margin-top:-4px; } .input-group-btn{ z-index:2; } .form-inline .input-group{ margin-top:-15px; } */ .input-group .form-control:first-child{ margin-top:15px; height:30px; } .input-group-btn{ z-index:2; } .form-inline .input-group{ margin-top:-13px; } .input-group-btn:last-child>.btn{ margin-top:19px; } .table th { text-align: center; } #searchForm #deprtName{ width:100% !important;} #searchForm select{ width:80%;} .pris{ width:34px; height:30px;} .fa-search{margin-top: -3px; margin-left: -3px;} </style> </head> <body id="" class="gray-bg pace-done" style=""> <p id="menuContent"></p> <p class="pace pace-inactive"> <p class="pace-progress" data-progress-text="99%" data-progress="99" style="width: 100%;"> <p class="pace-progress-inner"></p> </p> <p class="pace-activity"></p> </p> <p class="wrapper wrapper-content"> <sys:message content="${message}"/> <p class="ibox"> <p class="ibox-title"> <h5>用户管理</h5> <p class="ibox-tools"> <a class="collapse-link"> <i class="fa fa-chevron-up"></i> </a> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <i class="fa fa-wrench"></i> </a> <ul class="dropdown-menu dropdown-user"> <li><a href="#">选项1</a></li> <li><a href="#">选项2</a></li> </ul> <a class="close-link"> <i class="fa fa-times"></i> </a> </p> </p> <p class="ibox-content"> <!-- 查询条件 --> <p class="row"> <p class="col-sm-12"> <form id="searchForm" class="form-inline" action="${ctx}/sys/buser/list" method="post"> <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" /> <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}" /> <%-- <table:sortColumn id="orderBy" name="orderBy" value="${page.orderBy}" callback="sortOrRefresh();"/> --%> <p class="form-group"> <p class="col-md-2 col-sm-3"> <span>用户姓名:</span> <input id="name" name="name" class=" form-control input-sm" type="text" value="${name}"> </p> <p class="col-md-2 col-sm-3"> <span>入职日期:</span> <input id="jobDate" name="jobDate" class=" form-control input-sm" type="Date" value="${jobDate }"> </p> <p class="col-md-2 col-sm-3"> <span>员工工号:</span> <input id="workCode" name="workCode" class=" form-control input-sm" type="text" value="${workCode }"> </p> <p class="col-md-2 col-sm-3"> <span>归属公司:</span> <p style="width:100%;"> <!-- <input id="hi" name="coid" type="hidden"/> --> <input id="hi" name="coid" value="${buser.bcompany.coId }" type="hidden"/> <sys:modalqurey id="company" name="bcompany.coId" value="${buser.bcompany.coId}" labelName="bcompany.name" labelValue="${buser.bcompany.name}" title="公司" url="${ctx }/sys/co/listCompanyToDept" cssClass="form-control input-sm" notAllowSelectParent="true" allowInput="true" /> </p> </p> <p class="col-md-2 col-sm-3"> <span>所属部门:</span> <p style="width:100%;"> <sys:modalqurey id="deprt" name="bdept.deptId" value="${buser.bdept.deptId}" labelName="bdept.dName" labelValue="${buser.bdept.dName}" title="部门" url="${ctx}/sys/buser/getDeptTree" cssClass="form-control required" notAllowSelectParent="true" isLinkQuery="true" allowInput="true" /> </p> </p> <p class="col-md-2 col-sm-3"> <span>角色名称:</span> <p> <select id="roleId" name="brole.roleId" class="form-control required"> <c:if test="${broleFlg==true}"> <c:if test="${role.roleId eq null }"> <option value="">请选择角色</option> </c:if> <c:if test="${role.roleId!=null }"> <option value="${role.roleId }">${role.rName }</option> </c:if> <c:forEach items="${allRoles}" var="brole" > <c:if test="${role.roleId eq brole.roleId==false}"> <option value="${brole.roleId}">${brole.rName}</option> </c:if> </c:forEach> </c:if> <c:if test="${broleFlg==false}"> <option value="">请选择角色</option> <c:forEach items="${allRoles}" var="brole" > <option value="${brole.roleId}">${brole.rName}</option> </c:forEach> </c:if> </select> </p> </p> </p> </form> </p> </p> <!-- 工具栏 --> <p class="row"> <p class="col-sm-12"> <p class="pull-left"> <!-- <button id="addModal" class="btn btn-white btn-sm" > <i class="fa fa-plus"></i> 添加 </button> --> <table:addRow url="${ctx}/sys/buser/form" title="用户" width="800px" height="500px" target="officeContent"></table:addRow> <!-- 增加按钮 --> <table:editRow url="${ctx}/sys/buser/form" id="contentTable" title="用户" width="800px" height="500px" target="officeContent"></table:editRow> <!-- 编辑按钮 --> <table:delRows_common url="${ctx}/sys/buser/deleteById" id="contentTable"></table:delRows_common> <!-- 删除按钮 --> <button class="btn btn-white btn-sm " title="刷新" onclick="reset()"> <i class="glyphicon glyphicon-repeat"></i> 刷新 </button> </p> <p class="pull-right"> <button class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="search()"> <i class="fa fa-search"></i> 查询 </button> <button class="btn btn-primary btn-rounded btn-outline btn-sm " onclick="reset()"> <i class="fa fa-refresh"></i> 重置 </button> </p> </p> </p> <p id="tableCss"> <table id="contentTable" class="table table-striped table-bordered table-hover table-condensed dataTables-example dataTable no-footer"> <thead> <tr> <th><input type="checkbox" class="i-checks"></th> <th class="sort-column value">用户名</th> <th class="sort-column value">归属公司</th> <th class="sort-column value">所属部门</th> <th class="sort-column value">员工工号</th> <th class="sort-column value">入职日期</th> <th class="sort-column value">具有角色</th> <th class="sort-column value">性别</th> <th class="sort-column value">电话</th> <th class="sort-column value">电子邮箱</th> <th class="sort-column value">备注</th> <th class="sort-column value">操作</th> </tr> </thead> <tbody> <c:forEach items="${page.list}" var="buser"> <tr> <td><input type="checkbox" id="${buser.userId}" class="i-checks"></td> <td>${buser.name}</td> <td>${buser.bcompany.name}</td> <td>${buser.bdept.dName }</td> <td>${buser.workCode}</td> <td><fmt:formatDate value="${buser.jobDate}" type="date"/></td> <td> <c:forEach items="${buser.broles }" var="brole"> ${brole.rName}</c:forEach></td> <td> <c:if test="${buser.sex==0}">女</c:if> <c:if test="${buser.sex==1}">男</c:if> </td> <td>${buser.tel}</td> <td>${buser.email}</td> <td>${buser.remarks}</td> <td> <a href="#" onclick="openDialogView('查看用户', '${ctx}/sys/buser/form?id=${buser.userId}','800px', '500px')" class="btn btn-info btn-xs" ><i class="fa fa-search-plus"></i> 查看</a> <a href="#" onclick="openDialog('修改用户', '${ctx}/sys/buser/form?id=${buser.userId}','800px', '500px', 'officeContent')" class="btn btn-success btn-xs" ><i class="fa fa-edit"></i> 修改</a> <a href="${ctx}/sys/buser/deleteById?ids=${buser.userId}" onclick="return confirmx('确认要删除该用户吗?', this.href)" class="btn btn-danger btn-xs"><i class="fa fa-trash"></i> 删除</a> <%-- <a href="${ctx}/sys/brole/deleteById?ids=${brole.roleId}" class="btn btn-danger btn-xs"> --%> <!-- --> </td> </tr> </c:forEach> </tbody> </table> </p> <table:page page="${page}"></table:page> <br> <br> </p> </p> </p> </body> <script> $(function() { $('#addModal').on('click', function() { layer.open({ type : 2, title : '新增用户', maxmin : true, shadeClose : false, //点击遮罩关闭层 area : [ '800px', '520px' ], content : 'userModal.jsp' }); }); }) </script> </html>