150 lines
6.6 KiB
Plaintext
150 lines
6.6 KiB
Plaintext
<%@ page language="java" pageEncoding="UTF-8" %>
|
||
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
|
||
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
|
||
<%@ page import="com.sipai.entity.base.ServerObject" %>
|
||
<%@ taglib uri="http://www.springsecurity.org/jsp" prefix="security" %>
|
||
<!DOCTYPE html>
|
||
<!-- <html lang="zh-CN"> -->
|
||
<!-- BEGIN HEAD -->
|
||
|
||
<head>
|
||
<title>
|
||
<%= ServerObject.atttable.get("TOPTITLE")%>
|
||
</title>
|
||
<!-- 引用页头及CSS页-->
|
||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||
<script type="text/javascript">
|
||
var initFun = function () {
|
||
$table = $("#table").bootstrapTable({ // 对应table标签的id
|
||
url: ext.contextPath + '/user/getList4UserOutsiders.do', // 获取表格数据的url
|
||
cache: false, // 设置为 false 禁用 AJAX 数据缓存, 默认为true
|
||
striped: true, //表格显示条纹,默认为false
|
||
pagination: true, // 在表格底部显示分页组件,默认false
|
||
pageList: [10, 20, 50], // 设置页面可以显示的数据条数
|
||
pageSize: 50, // 页面数据条数
|
||
pageNumber: 1, // 首页页码
|
||
sidePagination: 'server', // 设置为服务器端分页
|
||
queryParams: function (params) { // 请求服务器数据时发送的参数,可以在这里添加额外的查询参数,返回false则终止请求
|
||
return {
|
||
rows: params.limit, // 每页要显示的数据条数
|
||
page: params.offset / params.limit + 1, // 每页显示数据的开始页码
|
||
sort: params.sort, // 要排序的字段
|
||
order: params.order,
|
||
search_name: $('#search_name').val(),
|
||
type: $('#type').val(),
|
||
}
|
||
},
|
||
columns: [
|
||
{
|
||
field: 'name', // 返回json数据中的name
|
||
title: '姓名', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle' // 上下居中
|
||
}, {
|
||
field: 'cardid', // 返回json数据中的name
|
||
title: '定位卡号', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle'
|
||
}, {
|
||
field: 'pid', // 返回json数据中的name
|
||
title: '类型', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
formatter: function (value, row, index) {
|
||
if (value == '1') {
|
||
return '访客';
|
||
} else {
|
||
if (value == '2') {
|
||
return '承包商';
|
||
} else {
|
||
return '其他';
|
||
}
|
||
}
|
||
}
|
||
}, {
|
||
field: 'insdt', // 返回json数据中的name
|
||
title: '更新时间', // 表格表头显示文字
|
||
align: 'center', // 左右居中
|
||
valign: 'middle',
|
||
formatter: function (value, row, index) {
|
||
return value.substring(0, 19);
|
||
}
|
||
}
|
||
],
|
||
onLoadSuccess: function () { //加载成功时执行
|
||
adjustBootstrapTableView("table");
|
||
},
|
||
onLoadError: function () { //加载失败时执行
|
||
console.info("加载数据失败");
|
||
}
|
||
});
|
||
|
||
};
|
||
var $table;
|
||
var companyId;
|
||
var dosearch = function () {
|
||
$("#table").bootstrapTable('refresh');
|
||
};
|
||
$(function () {
|
||
companyId = unitId;
|
||
initFun();
|
||
$('#removea').click(function () {
|
||
$('#search_name').val("");
|
||
dosearch();
|
||
})
|
||
});
|
||
|
||
var activeChange = function () {
|
||
dosearch();
|
||
}
|
||
</script>
|
||
|
||
</head>
|
||
|
||
<body class="hold-transition ${cu.themeclass} sidebar-mini">
|
||
<div class="wrapper">
|
||
<div class="content-wrapper">
|
||
<!-- Content Header (Page header) -->
|
||
<!-- Main content -->
|
||
<section class="content container-fluid">
|
||
<div id="mainAlertdiv"></div>
|
||
<div id="subDiv"></div>
|
||
<div id="unit4SelectDiv"></div>
|
||
<div>
|
||
<div class="form-group form-inline">
|
||
<div class="btn-group" style="width: 400px;padding-bottom:10px;">
|
||
</div>
|
||
<div class="form-group pull-right form-inline ">
|
||
<div class="form-group">
|
||
<label class="form-label text-center">类型:</label>
|
||
<select class="form-control select2 " onchange="activeChange()" id="type" name="type"
|
||
style="width: 120px; height: 30px; border-radius: 5px">
|
||
<option value="">全部</option>
|
||
<option value="1">访客</option>
|
||
<option value="2">承包商</option>
|
||
</select>
|
||
</div>
|
||
<div class="input-group input-group-sm" style="width: 250px;">
|
||
<input type="text" id="search_name" name="search_name" class="form-control pull-right"
|
||
placeholder="姓名">
|
||
<a class="glyphicon glyphicon-remove form-control-feedback btn-sm" id="removea"
|
||
style="padding-top:6px;pointer-events: auto"></a>
|
||
</input>
|
||
<div class="input-group-btn">
|
||
<button type="button" class="btn btn-default"
|
||
onclick="dosearch();"><i
|
||
class="fa fa-search"></i></button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<table id="table"></table>
|
||
</div>
|
||
</section>
|
||
<!-- /.content -->
|
||
</div>
|
||
</div>
|
||
</body>
|
||
|
||
</html> |