123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>用户选择信息列表</title>
- <!--框架必需start-->
- <script type="text/javascript" src="${ctx}/qui/libs/js/jquery.js"></script>
- <script type="text/javascript" src="${ctx}/qui/libs/js/framework.js"></script>
- <link href="${ctx}/qui/libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
- <link rel="stylesheet" type="text/css" id="skin" prePath="${ctx}/qui/"/>
- <link rel="stylesheet" type="text/css" id="customSkin"/>
- <!--框架必需end-->
- <!--数据表格start-->
- <script src="${ctx}/qui/libs/js/table/quiGrid.js" type="text/javascript"></script>
- <!--数据表格end-->
- <!--箭头分页start-->
- <script type="text/javascript" src="${ctx}/qui/libs/js/nav/pageArrow.js"></script>
- <!--箭头分页end-->
- <!--表单异步提交start-->
- <script src="${ctx}/qui/libs/js/form/form.js" type="text/javascript"></script>
- <!--表单异步提交end-->
- <script type="text/javascript">
- var g_pageNo = 1;
- var g_pageSize = 10;
- //数据表格使用
- var g;
- var gridData;
- function initComplete(){
- g = $("#maingrid").quiGrid({
- columns: [
- { display: '姓名', name: 'fullName', align: 'center', width: "15%"},
- { display: '登陆名', name: 'userName', align: 'center', width: "15%"},
- { display: '联系电话', name: 'phone', align: 'center', width: "15%"},
- { display: '所属部门', name: 'orgNames', align: 'center', width: "20%"},
- { display: '所属角色', name: 'roleNames', align: 'center', width: "25%"}
- ],
-
- data:[], sortName: 'userId',rownumbers:true,dataAction:'local',checkbox:true,usePager: false,
- height: '100%', width:"100%",heightDiff:-40
- });
-
- //点击分页触发
- }
- $(function(){
- getData(g_pageNo,g_pageSize);
- })
-
- /**初始时通过向后台传递排序id、排序顺序、初始页码、每页条数**/
- function getData(pageNo,pageSize){
- jQuery.post("${ctx}/user/listPage.do",
- getFormParams(pageNo,pageSize),
- function(result){
- gridData = result;
- //刷新表格
- g.loadData(gridData);
- //设置左边内容页
- var content ="共有" + gridData["pager.totalRows"] + "条记录";
- $("#letfContent").html("");
- $("#letfContent").html(content);
- //取得分页组件
- var pager=$("#pager");
- //设置总页页数
- pager.attr("total",gridData["pager.totalRows"]);
- pager.render();
- //绑定翻页事件
- pager.bind("pageChange",function(e,index){
- g_pageNo = index + 1;
- getData(g_pageNo,g_pageSize);
- });
- //绑定选择每页显示记录数事件
- pager.bind("sizeChange",function(e,num){
- g_pageSize = num;
- getData(g_pageNo,g_pageSize);
- });
- },"json");
- }
-
-
- //查询
- function searchHandler(){
- //重新加载数据,设置当前页面为1
- getData(1,g_pageSize);
- }
-
- /**获得查询表单的提交查询的值**/
- function getFormParams(pageNo,pageSize){
- $("#pageNo").val(pageNo);
- $("#pageSize").val(pageSize);
- return $("#searchForm").formToArray();
- }
-
- /**重置于查询表单,然后重新加载表格数据**/
- function resetSearch(){
- $("#searchForm")[0].reset();
- //重新加载数据,设置当前页面为1
- getData(1,g_pageSize);
- }
-
- function selectUser(){
- var selectedRows = g.getSelectedRows();
- var selectedRowsLength = selectedRows.length;
- //用户ID
- var ids = "";
- //用户名称
- var names="";
- for(var i = 0;i<selectedRowsLength;i++) {
- if(ids.length<1){
- ids=selectedRows[i].userId;
- names=selectedRows[i].fullName;
- }else{
- ids +=","+ selectedRows[i].userId;
- names +=","+selectedRows[i].fullName;
- }
- }
- return [ids,names];
- }
- </script>
- </head>
- <body>
- <div class="box2" panelTitle="查询用户">
- <form action="" id="searchForm" method="post">
- <input type="hidden" id="pageNo" name="pageNo" value="1"/>
- <input type="hidden" id="pageSize" name="pageSize" value="10"/>
- <input type="hidden" id="state" name="Q_state_N_EQ" value="1"/>
- <table>
- <tr>
- <td>姓名:</td>
- <td>
- <input type="text" id="Q_fullName_S_LK" name="Q_fullName_S_LK" />
- </td>
- <td>登陆名:</td>
- <td>
- <input type="text" id="Q_userName_S_LK" name="Q_userName_S_LK" />
- </td>
- <td><button type="button" onclick="searchHandler()"><span class="icon_find">查询</span></button></td>
- <td><button type="button" onclick="resetSearch()"><span class="icon_reload">重置</span></button></td>
- </tr>
- </table>
- </form>
- </div>
- <div class="padding_right5">
- <div id="maingrid"></div>
- </div>
- <!-- 分页组件 -->
- <div style="height:35px;">
- <div id="letfContent" class="float_left padding5"></div>
- <div class="float_right padding5">
- <div id="pager" total="0" class="pageArrow" showSelect="true" inputPosition="right"></div>
- </div>
- <div class="clear"></div>
- </div>
- </body>
- </html>
|