支持bootstrap-table

This commit is contained in:
RuoYi 2018-02-28 15:48:05 +08:00
parent f5e3b2cd22
commit 5c7ff87433
20 changed files with 558 additions and 307 deletions

View File

@ -109,30 +109,31 @@ insert into sys_menu values('2', '系统监控', '0', '2', '#', 'M', '0', '#', '
insert into sys_menu values('3', '用户管理', '1', '1', '/system/user/userList', 'C', '0', 'system:user:list', '#', '2018-01-01', '', 'admin', '用户管理菜单'); insert into sys_menu values('3', '用户管理', '1', '1', '/system/user/userList', 'C', '0', 'system:user:list', '#', '2018-01-01', '', 'admin', '用户管理菜单');
insert into sys_menu values('4', '角色管理', '1', '2', '/system/role/roleList', 'C', '0', 'system:role:list', '#', '2018-01-01', '', 'admin', '角色管理菜单'); insert into sys_menu values('4', '角色管理', '1', '2', '/system/role/roleList', 'C', '0', 'system:role:list', '#', '2018-01-01', '', 'admin', '角色管理菜单');
insert into sys_menu values('5', '菜单管理', '1', '3', '/system/menu/menuList', 'C', '0', 'system:menu:list', '#', '2018-01-01', '', 'admin', '菜单管理菜单'); insert into sys_menu values('5', '菜单管理', '1', '3', '/system/menu/menuList', 'C', '0', 'system:menu:list', '#', '2018-01-01', '', 'admin', '菜单管理菜单');
insert into sys_menu values('6', '操作日志', '1', '4', '/system/operlog/operlogList', 'C', '0', 'system:operlog:list', '#', '2018-01-01', '', 'admin', '操作日志菜单'); insert into sys_menu values('6', '部门管理', '1', '3', '/system/dept/deptList', 'C', '0', 'system:dept:list', '#', '2018-01-01', '', 'admin', '部门管理菜单');
insert into sys_menu values('7', '登录日志', '1', '5', '/system/userlog/userlogList', 'C', '0', 'system:userlog:list', '#', '2018-01-01', '', 'admin', '登录日志菜单'); insert into sys_menu values('7', '操作日志', '2', '1', '/system/operlog/operlogList', 'C', '0', 'system:operlog:list', '#', '2018-01-01', '', 'admin', '操作日志菜单');
insert into sys_menu values('8', '在线用户', '2', '1', '/monitor/online', 'C', '0', 'monitor:online', '#', '2018-01-01', '', 'admin', '在线用户菜单'); insert into sys_menu values('8', '登录日志', '2', '2', '/system/userlog/userlogList', 'C', '0', 'system:userlog:list', '#', '2018-01-01', '', 'admin', '登录日志菜单');
insert into sys_menu values('9', '数据监控', '2', '2', '/monitor/druid/index.html', 'C', '0', 'monitor:druid:list', '#', '2018-01-01', '', 'admin', '数据监控菜单'); insert into sys_menu values('9', '在线用户', '2', '3', '/monitor/online', 'C', '0', 'monitor:online', '#', '2018-01-01', '', 'admin', '在线用户菜单');
insert into sys_menu values('10', '数据监控', '2', '4', '/monitor/druid/index.html', 'C', '0', 'monitor:druid:list', '#', '2018-01-01', '', 'admin', '数据监控菜单');
--- 三级用户按钮 --- 三级用户按钮
insert into sys_menu values('10', '用户新增', '3', '1', '/system/user/add', 'F', '0', 'sys:user:add', '#', '2018-01-01', '', 'admin', '用户管理新增按钮'); insert into sys_menu values('11', '用户新增', '3', '1', '/system/user/add', 'F', '0', 'sys:user:add', '#', '2018-01-01', '', 'admin', '用户管理新增按钮');
insert into sys_menu values('11', '用户修改', '3', '2', '/system/user/update', 'F', '0', 'sys:user:update', '#', '2018-01-01', '', 'admin', '用户管理修改按钮'); insert into sys_menu values('12', '用户修改', '3', '2', '/system/user/update', 'F', '0', 'sys:user:update', '#', '2018-01-01', '', 'admin', '用户管理修改按钮');
insert into sys_menu values('12', '用户删除', '3', '3', '/system/user/delete', 'F', '0', 'sys:user:delete', '#', '2018-01-01', '', 'admin', '用户管理删除按钮'); insert into sys_menu values('13', '用户删除', '3', '3', '/system/user/delete', 'F', '0', 'sys:user:delete', '#', '2018-01-01', '', 'admin', '用户管理删除按钮');
insert into sys_menu values('13', '用户查询', '3', '4', '/system/user/select', 'F', '0', 'sys:user:select', '#', '2018-01-01', '', 'admin', '用户管理查询按钮'); insert into sys_menu values('14', '用户查询', '3', '4', '/system/user/select', 'F', '0', 'sys:user:select', '#', '2018-01-01', '', 'admin', '用户管理查询按钮');
insert into sys_menu values('14', '密码修改', '3', '5', '/system/user/pwdUpdate', 'F', '0', 'sys:user:pwdUpdate', '#', '2018-01-01', '', 'admin', '用户密码修改按钮'); insert into sys_menu values('15', '密码修改', '3', '5', '/system/user/pwdUpdate', 'F', '0', 'sys:user:pwdUpdate', '#', '2018-01-01', '', 'admin', '用户密码修改按钮');
--- 三级角色按钮 --- 三级角色按钮
insert into sys_menu values('15', '角色新增', '4', '1', '/system/role/add', 'F', '0', 'sys:role:add', '#', '2018-01-01', '', 'admin', '角色管理新增按钮'); insert into sys_menu values('16', '角色新增', '4', '1', '/system/role/add', 'F', '0', 'sys:role:add', '#', '2018-01-01', '', 'admin', '角色管理新增按钮');
insert into sys_menu values('16', '角色修改', '4', '2', '/system/role/update', 'F', '0', 'sys:role:update', '#', '2018-01-01', '', 'admin', '角色管理修改按钮'); insert into sys_menu values('17', '角色修改', '4', '2', '/system/role/update', 'F', '0', 'sys:role:update', '#', '2018-01-01', '', 'admin', '角色管理修改按钮');
insert into sys_menu values('17', '角色删除', '4', '3', '/system/role/delete', 'F', '0', 'sys:role:delete', '#', '2018-01-01', '', 'admin', '角色管理删除按钮'); insert into sys_menu values('18', '角色删除', '4', '3', '/system/role/delete', 'F', '0', 'sys:role:delete', '#', '2018-01-01', '', 'admin', '角色管理删除按钮');
insert into sys_menu values('18', '角色查询', '4', '4', '/system/role/select', 'F', '0', 'sys:role:select', '#', '2018-01-01', '', 'admin', '角色管理查询按钮'); insert into sys_menu values('19', '角色查询', '4', '4', '/system/role/select', 'F', '0', 'sys:role:select', '#', '2018-01-01', '', 'admin', '角色管理查询按钮');
insert into sys_menu values('19', '角色授权', '4', '5', '/system/role/auth', 'F', '0', 'sys:role:auth', '#', '2018-01-01', '', 'admin', '角色管理授权按钮'); insert into sys_menu values('20', '角色授权', '4', '5', '/system/role/auth', 'F', '0', 'sys:role:auth', '#', '2018-01-01', '', 'admin', '角色管理授权按钮');
--- 三级菜单按钮 --- 三级菜单按钮
insert into sys_menu values('20', '菜单新增', '5', '1', '/system/menu/add', 'F', '0', 'sys:menu:add', '#', '2018-01-01', '', 'admin', '菜单管理新增按钮'); insert into sys_menu values('21', '菜单新增', '5', '1', '/system/menu/add', 'F', '0', 'sys:menu:add', '#', '2018-01-01', '', 'admin', '菜单管理新增按钮');
insert into sys_menu values('21', '菜单修改', '5', '2', '/system/menu/update', 'F', '0', 'sys:menu:update', '#', '2018-01-01', '', 'admin', '菜单管理修改按钮'); insert into sys_menu values('22', '菜单修改', '5', '2', '/system/menu/update', 'F', '0', 'sys:menu:update', '#', '2018-01-01', '', 'admin', '菜单管理修改按钮');
insert into sys_menu values('22', '菜单删除', '5', '3', '/system/menu/delete', 'F', '0', 'sys:menu:delete', '#', '2018-01-01', '', 'admin', '菜单管理删除按钮'); insert into sys_menu values('23', '菜单删除', '5', '3', '/system/menu/delete', 'F', '0', 'sys:menu:delete', '#', '2018-01-01', '', 'admin', '菜单管理删除按钮');
insert into sys_menu values('23', '菜单查询', '5', '4', '/system/menu/select', 'F', '0', 'sys:menu:select', '#', '2018-01-01', '', 'system', '菜单管理查询按钮'); insert into sys_menu values('24', '菜单查询', '5', '4', '/system/menu/select', 'F', '0', 'sys:menu:select', '#', '2018-01-01', '', 'system', '菜单管理查询按钮');
--- 三级日志按钮 --- 三级日志按钮
insert into sys_menu values('24', '操作日志查询', '4', '5', '/system/operlog/auth', 'F', '0', 'sys:operlog:select', '#', '2018-01-01', '', 'admin', '操作日志查询按钮'); insert into sys_menu values('25', '操作日志查询', '4', '5', '/system/operlog/auth', 'F', '0', 'sys:operlog:select', '#', '2018-01-01', '', 'admin', '操作日志查询按钮');
insert into sys_menu values('25', '登录日志查询', '4', '5', '/system/userlog/auth', 'F', '0', 'sys:userlog:select', '#', '2018-01-01', '', 'admin', '登录日志查询按钮'); insert into sys_menu values('26', '登录日志查询', '4', '5', '/system/userlog/auth', 'F', '0', 'sys:userlog:select', '#', '2018-01-01', '', 'admin', '登录日志查询按钮');
-- ---------------------------- -- ----------------------------
@ -175,7 +176,7 @@ insert into sys_role_menu values ('1', '6');
insert into sys_role_menu values ('1', '7'); insert into sys_role_menu values ('1', '7');
insert into sys_role_menu values ('1', '8'); insert into sys_role_menu values ('1', '8');
insert into sys_role_menu values ('1', '9'); insert into sys_role_menu values ('1', '9');
insert into sys_role_menu values ('1', '10');
-- ---------------------------- -- ----------------------------
-- 7、操作日志记录 -- 7、操作日志记录
@ -273,7 +274,7 @@ create table sys_user_online (
) engine=innodb default charset=utf8; ) engine=innodb default charset=utf8;
insert into sys_user_online(sessionId, login_name, dept_name, ipaddr, browser, os, status) insert into sys_user_online(sessionId, login_name, dept_name, ipaddr, browser, os, status)
values('c3b252c3-2229-4be4-a5f7-7aba4b0c314c', 'admin', '开发部', '127.0.0.1', 'Chrome 45', 'Windows 7', 'on_line'); values('c3b252c3-2229-4be4-a5f7-7aba4b0c314c', 'admin', '开发部', '127.0.0.1', 'Chrome 45', 'Windows 7', 'on_line');
-- 用户部门表 -- 用户部门表
SELECT * FROM sys_dept; SELECT * FROM sys_dept;

View File

@ -16,6 +16,7 @@ import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.shiro.session.OnlineSessionDAO; import com.ruoyi.framework.shiro.session.OnlineSessionDAO;
import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.JSON; import com.ruoyi.framework.web.domain.JSON;
import com.ruoyi.framework.web.page.TableDataInfo;
import com.ruoyi.project.monitor.online.domain.OnlineSession; import com.ruoyi.project.monitor.online.domain.OnlineSession;
import com.ruoyi.project.monitor.online.domain.UserOnline; import com.ruoyi.project.monitor.online.domain.UserOnline;
import com.ruoyi.project.monitor.online.service.IUserOnlineService; import com.ruoyi.project.monitor.online.service.IUserOnlineService;
@ -45,10 +46,11 @@ public class UserOnlineController extends BaseController
@GetMapping("/list") @GetMapping("/list")
@ResponseBody @ResponseBody
public List<UserOnline> list(Model model) public TableDataInfo list(Model model)
{ {
List<UserOnline> list = userOnlineService.selectUserOnlines(); List<UserOnline> list = userOnlineService.selectUserOnlines();
return list; TableDataInfo tableDataInfo = new TableDataInfo(list, 111);
return tableDataInfo;
} }
@GetMapping("/forceLogout") @GetMapping("/forceLogout")

View File

@ -7,8 +7,8 @@ spring:
datasource: datasource:
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
driverClassName: com.mysql.jdbc.Driver driverClassName: com.mysql.jdbc.Driver
#url: jdbc:mysql://10.213.24.45:3306/ry?useUnicode=true&characterEncoding=utf8 url: jdbc:mysql://10.213.24.45:3306/ry?useUnicode=true&characterEncoding=utf8
url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8 #url: jdbc:mysql://localhost:3306/ry?useUnicode=true&characterEncoding=utf8
username: root username: root
password: password password: password
# 初始化大小,最小,最大 # 初始化大小,最小,最大

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,136 @@
/**
* @author: Dennis Hernández
* @webSite: http://djhvscf.github.io/Blog
* @version: v1.1.0
*/
!function ($) {
'use strict';
var showHideColumns = function (that, checked) {
if (that.options.columnsHidden.length > 0 ) {
$.each(that.columns, function (i, column) {
if (that.options.columnsHidden.indexOf(column.field) !== -1) {
if (column.visible !== checked) {
that.toggleColumn($.fn.bootstrapTable.utils.getFieldIndex(that.columns, column.field), checked, true);
}
}
});
}
};
var resetView = function (that) {
if (that.options.height || that.options.showFooter) {
setTimeout(function(){
that.resetView.call(that);
}, 1);
}
};
var changeView = function (that, width, height) {
if (that.options.minHeight) {
if ((width <= that.options.minWidth) && (height <= that.options.minHeight)) {
conditionCardView(that);
} else if ((width > that.options.minWidth) && (height > that.options.minHeight)) {
conditionFullView(that);
}
} else {
if (width <= that.options.minWidth) {
conditionCardView(that);
} else if (width > that.options.minWidth) {
conditionFullView(that);
}
}
resetView(that);
};
var conditionCardView = function (that) {
changeTableView(that, false);
showHideColumns(that, false);
};
var conditionFullView = function (that) {
changeTableView(that, true);
showHideColumns(that, true);
};
var changeTableView = function (that, cardViewState) {
that.options.cardView = cardViewState;
that.toggleView();
};
var debounce = function(func,wait) {
var timeout;
return function() {
var context = this,
args = arguments;
var later = function() {
timeout = null;
func.apply(context,args);
};
clearTimeout(timeout);
timeout = setTimeout(later, wait);
};
};
$.extend($.fn.bootstrapTable.defaults, {
mobileResponsive: false,
minWidth: 562,
minHeight: undefined,
heightThreshold: 100, // just slightly larger than mobile chrome's auto-hiding toolbar
checkOnInit: true,
columnsHidden: []
});
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_init = BootstrapTable.prototype.init;
BootstrapTable.prototype.init = function () {
_init.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.mobileResponsive) {
return;
}
if (!this.options.minWidth) {
return;
}
if (this.options.minWidth < 100 && this.options.resizable) {
console.log("The minWidth when the resizable extension is active should be greater or equal than 100");
this.options.minWidth = 100;
}
var that = this,
old = {
width: $(window).width(),
height: $(window).height()
};
$(window).on('resize orientationchange',debounce(function (evt) {
// reset view if height has only changed by at least the threshold.
var height = $(this).height(),
width = $(this).width();
if (Math.abs(old.height - height) > that.options.heightThreshold || old.width != width) {
changeView(that, width, height);
old = {
width: width,
height: height
};
}
},200));
if (this.options.checkOnInit) {
var height = $(window).height(),
width = $(window).width();
changeView(this, width, height);
old = {
width: width,
height: height
};
}
};
}(jQuery);

View File

@ -0,0 +1,7 @@
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";var b=function(b,c){b.options.columnsHidden.length>0&&a.each(b.columns,function(d,e){-1!==b.options.columnsHidden.indexOf(e.field)&&e.visible!==c&&b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e.field),c,!0)})},c=function(a){(a.options.height||a.options.showFooter)&&setTimeout(function(){a.resetView.call(a)},1)},d=function(a,b,d){a.options.minHeight?b<=a.options.minWidth&&d<=a.options.minHeight?e(a):b>a.options.minWidth&&d>a.options.minHeight&&f(a):b<=a.options.minWidth?e(a):b>a.options.minWidth&&f(a),c(a)},e=function(a){g(a,!1),b(a,!1)},f=function(a){g(a,!0),b(a,!0)},g=function(a,b){a.options.cardView=b,a.toggleView()},h=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}};a.extend(a.fn.bootstrapTable.defaults,{mobileResponsive:!1,minWidth:562,minHeight:void 0,heightThreshold:100,checkOnInit:!0,columnsHidden:[]});var i=a.fn.bootstrapTable.Constructor,j=i.prototype.init;i.prototype.init=function(){if(j.apply(this,Array.prototype.slice.apply(arguments)),this.options.mobileResponsive&&this.options.minWidth){this.options.minWidth<100&&this.options.resizable&&(console.log("The minWidth when the resizable extension is active should be greater or equal than 100"),this.options.minWidth=100);var b=this,c={width:a(window).width(),height:a(window).height()};if(a(window).on("resize orientationchange",h(function(){var e=a(this).height(),f=a(this).width();(Math.abs(c.height-e)>b.options.heightThreshold||c.width!=f)&&(d(b,f,e),c={width:f,height:e})},200)),this.options.checkOnInit){var e=a(window).height(),f=a(window).width();d(this,f,e),c={width:f,height:e}}}}}(jQuery);

View File

@ -0,0 +1,211 @@
/**
* @author: aperez <aperez@datadec.es>
* @version: v2.0.0
*
* @update Dennis Hernández <http://djhvscf.github.io/Blog>
*/
!function($) {
'use strict';
var firstLoad = false;
var sprintf = $.fn.bootstrapTable.utils.sprintf;
var showAvdSearch = function(pColumns, searchTitle, searchText, that) {
if (!$("#avdSearchModal" + "_" + that.options.idTable).hasClass("modal")) {
var vModal = sprintf("<div id=\"avdSearchModal%s\" class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"mySmallModalLabel\" aria-hidden=\"true\">", "_" + that.options.idTable);
vModal += "<div class=\"modal-dialog modal-xs\">";
vModal += " <div class=\"modal-content\">";
vModal += " <div class=\"modal-header\">";
vModal += " <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\" >&times;</button>";
vModal += sprintf(" <h4 class=\"modal-title\">%s</h4>", searchTitle);
vModal += " </div>";
vModal += " <div class=\"modal-body modal-body-custom\">";
vModal += sprintf(" <div class=\"container-fluid\" id=\"avdSearchModalContent%s\" style=\"padding-right: 0px;padding-left: 0px;\" >", "_" + that.options.idTable);
vModal += " </div>";
vModal += " </div>";
vModal += " </div>";
vModal += " </div>";
vModal += "</div>";
$("body").append($(vModal));
var vFormAvd = createFormAvd(pColumns, searchText, that),
timeoutId = 0;;
$('#avdSearchModalContent' + "_" + that.options.idTable).append(vFormAvd.join(''));
$('#' + that.options.idForm).off('keyup blur', 'input').on('keyup blur', 'input', function (event) {
clearTimeout(timeoutId);
timeoutId = setTimeout(function () {
that.onColumnAdvancedSearch(event);
}, that.options.searchTimeOut);
});
$("#btnCloseAvd" + "_" + that.options.idTable).click(function() {
$("#avdSearchModal" + "_" + that.options.idTable).modal('hide');
});
$("#avdSearchModal" + "_" + that.options.idTable).modal();
} else {
$("#avdSearchModal" + "_" + that.options.idTable).modal();
}
};
var createFormAvd = function(pColumns, searchText, that) {
var htmlForm = [];
htmlForm.push(sprintf('<form class="form-horizontal" id="%s" action="%s" >', that.options.idForm, that.options.actionForm));
for (var i in pColumns) {
var vObjCol = pColumns[i];
if (!vObjCol.checkbox && vObjCol.visible && vObjCol.searchable) {
htmlForm.push('<div class="form-group">');
htmlForm.push(sprintf('<label class="col-sm-4 control-label">%s</label>', vObjCol.title));
htmlForm.push('<div class="col-sm-6">');
htmlForm.push(sprintf('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">', vObjCol.field, vObjCol.title, vObjCol.field));
htmlForm.push('</div>');
htmlForm.push('</div>');
}
}
htmlForm.push('<div class="form-group">');
htmlForm.push('<div class="col-sm-offset-9 col-sm-3">');
htmlForm.push(sprintf('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>', "_" + that.options.idTable, searchText));
htmlForm.push('</div>');
htmlForm.push('</div>');
htmlForm.push('</form>');
return htmlForm;
};
$.extend($.fn.bootstrapTable.defaults, {
advancedSearch: false,
idForm: 'advancedSearch',
actionForm: '',
idTable: undefined,
onColumnAdvancedSearch: function (field, text) {
return false;
}
});
$.extend($.fn.bootstrapTable.defaults.icons, {
advancedSearchIcon: 'glyphicon-chevron-down'
});
$.extend($.fn.bootstrapTable.Constructor.EVENTS, {
'column-advanced-search.bs.table': 'onColumnAdvancedSearch'
});
$.extend($.fn.bootstrapTable.locales, {
formatAdvancedSearch: function() {
return 'Advanced search';
},
formatAdvancedCloseButton: function() {
return "Close";
}
});
$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
var BootstrapTable = $.fn.bootstrapTable.Constructor,
_initToolbar = BootstrapTable.prototype.initToolbar,
_load = BootstrapTable.prototype.load,
_initSearch = BootstrapTable.prototype.initSearch;
BootstrapTable.prototype.initToolbar = function() {
_initToolbar.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.search) {
return;
}
if (!this.options.advancedSearch) {
return;
}
if (!this.options.idTable) {
return;
}
var that = this,
html = [];
html.push(sprintf('<div class="columns columns-%s btn-group pull-%s" role="group">', this.options.buttonsAlign, this.options.buttonsAlign));
html.push(sprintf('<button class="btn btn-default%s' + '" type="button" name="advancedSearch" title="%s">', that.options.iconSize === undefined ? '' : ' btn-' + that.options.iconSize, that.options.formatAdvancedSearch()));
html.push(sprintf('<i class="%s %s"></i>', that.options.iconsPrefix, that.options.icons.advancedSearchIcon))
html.push('</button></div>');
that.$toolbar.prepend(html.join(''));
that.$toolbar.find('button[name="advancedSearch"]')
.off('click').on('click', function() {
showAvdSearch(that.columns, that.options.formatAdvancedSearch(), that.options.formatAdvancedCloseButton(), that);
});
};
BootstrapTable.prototype.load = function(data) {
_load.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.advancedSearch) {
return;
}
if (typeof this.options.idTable === 'undefined') {
return;
} else {
if (!firstLoad) {
var height = parseInt($(".bootstrap-table").height());
height += 10;
$("#" + this.options.idTable).bootstrapTable("resetView", {height: height});
firstLoad = true;
}
}
};
BootstrapTable.prototype.initSearch = function () {
_initSearch.apply(this, Array.prototype.slice.apply(arguments));
if (!this.options.advancedSearch) {
return;
}
var that = this;
var fp = $.isEmptyObject(this.filterColumnsPartial) ? null : this.filterColumnsPartial;
this.data = fp ? $.grep(this.data, function (item, i) {
for (var key in fp) {
var fval = fp[key].toLowerCase();
var value = item[key];
value = $.fn.bootstrapTable.utils.calculateObjectValue(that.header,
that.header.formatters[$.inArray(key, that.header.fields)],
[value, item, i], value);
if (!($.inArray(key, that.header.fields) !== -1 &&
(typeof value === 'string' || typeof value === 'number') &&
(value + '').toLowerCase().indexOf(fval) !== -1)) {
return false;
}
}
return true;
}) : this.data;
};
BootstrapTable.prototype.onColumnAdvancedSearch = function (event) {
var text = $.trim($(event.currentTarget).val());
var $field = $(event.currentTarget)[0].id;
if ($.isEmptyObject(this.filterColumnsPartial)) {
this.filterColumnsPartial = {};
}
if (text) {
this.filterColumnsPartial[$field] = text;
} else {
delete this.filterColumnsPartial[$field];
}
this.options.pageNumber = 1;
this.onSearch(event);
this.updatePagination();
this.trigger('column-advanced-search', $field, text);
};
}(jQuery);

View File

@ -0,0 +1,7 @@
/*
* bootstrap-table - v1.11.0 - 2016-07-02
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2016 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";var b=!1,c=a.fn.bootstrapTable.utils.sprintf,d=function(b,d,f,g){if(a("#avdSearchModal_"+g.options.idTable).hasClass("modal"))a("#avdSearchModal_"+g.options.idTable).modal();else{var h=c('<div id="avdSearchModal%s" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">',"_"+g.options.idTable);h+='<div class="modal-dialog modal-xs">',h+=' <div class="modal-content">',h+=' <div class="modal-header">',h+=' <button type="button" class="close" data-dismiss="modal" aria-hidden="true" >&times;</button>',h+=c(' <h4 class="modal-title">%s</h4>',d),h+=" </div>",h+=' <div class="modal-body modal-body-custom">',h+=c(' <div class="container-fluid" id="avdSearchModalContent%s" style="padding-right: 0px;padding-left: 0px;" >',"_"+g.options.idTable),h+=" </div>",h+=" </div>",h+=" </div>",h+=" </div>",h+="</div>",a("body").append(a(h));var i=e(b,f,g),j=0;a("#avdSearchModalContent_"+g.options.idTable).append(i.join("")),a("#"+g.options.idForm).off("keyup blur","input").on("keyup blur","input",function(a){clearTimeout(j),j=setTimeout(function(){g.onColumnAdvancedSearch(a)},g.options.searchTimeOut)}),a("#btnCloseAvd_"+g.options.idTable).click(function(){a("#avdSearchModal_"+g.options.idTable).modal("hide")}),a("#avdSearchModal_"+g.options.idTable).modal()}},e=function(a,b,d){var e=[];e.push(c('<form class="form-horizontal" id="%s" action="%s" >',d.options.idForm,d.options.actionForm));for(var f in a){var g=a[f];!g.checkbox&&g.visible&&g.searchable&&(e.push('<div class="form-group">'),e.push(c('<label class="col-sm-4 control-label">%s</label>',g.title)),e.push('<div class="col-sm-6">'),e.push(c('<input type="text" class="form-control input-md" name="%s" placeholder="%s" id="%s">',g.field,g.title,g.field)),e.push("</div>"),e.push("</div>"))}return e.push('<div class="form-group">'),e.push('<div class="col-sm-offset-9 col-sm-3">'),e.push(c('<button type="button" id="btnCloseAvd%s" class="btn btn-default" >%s</button>',"_"+d.options.idTable,b)),e.push("</div>"),e.push("</div>"),e.push("</form>"),e};a.extend(a.fn.bootstrapTable.defaults,{advancedSearch:!1,idForm:"advancedSearch",actionForm:"",idTable:void 0,onColumnAdvancedSearch:function(){return!1}}),a.extend(a.fn.bootstrapTable.defaults.icons,{advancedSearchIcon:"glyphicon-chevron-down"}),a.extend(a.fn.bootstrapTable.Constructor.EVENTS,{"column-advanced-search.bs.table":"onColumnAdvancedSearch"}),a.extend(a.fn.bootstrapTable.locales,{formatAdvancedSearch:function(){return"Advanced search"},formatAdvancedCloseButton:function(){return"Close"}}),a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales);var f=a.fn.bootstrapTable.Constructor,g=f.prototype.initToolbar,h=f.prototype.load,i=f.prototype.initSearch;f.prototype.initToolbar=function(){if(g.apply(this,Array.prototype.slice.apply(arguments)),this.options.search&&this.options.advancedSearch&&this.options.idTable){var a=this,b=[];b.push(c('<div class="columns columns-%s btn-group pull-%s" role="group">',this.options.buttonsAlign,this.options.buttonsAlign)),b.push(c('<button class="btn btn-default%s" type="button" name="advancedSearch" title="%s">',void 0===a.options.iconSize?"":" btn-"+a.options.iconSize,a.options.formatAdvancedSearch())),b.push(c('<i class="%s %s"></i>',a.options.iconsPrefix,a.options.icons.advancedSearchIcon)),b.push("</button></div>"),a.$toolbar.prepend(b.join("")),a.$toolbar.find('button[name="advancedSearch"]').off("click").on("click",function(){d(a.columns,a.options.formatAdvancedSearch(),a.options.formatAdvancedCloseButton(),a)})}},f.prototype.load=function(){if(h.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch&&"undefined"!=typeof this.options.idTable&&!b){var c=parseInt(a(".bootstrap-table").height());c+=10,a("#"+this.options.idTable).bootstrapTable("resetView",{height:c}),b=!0}},f.prototype.initSearch=function(){if(i.apply(this,Array.prototype.slice.apply(arguments)),this.options.advancedSearch){var b=this,c=a.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=c?a.grep(this.data,function(d,e){for(var f in c){var g=c[f].toLowerCase(),h=d[f];if(h=a.fn.bootstrapTable.utils.calculateObjectValue(b.header,b.header.formatters[a.inArray(f,b.header.fields)],[h,d,e],h),-1===a.inArray(f,b.header.fields)||"string"!=typeof h&&"number"!=typeof h||-1===(h+"").toLowerCase().indexOf(g))return!1}return!0}):this.data}},f.prototype.onColumnAdvancedSearch=function(b){var c=a.trim(a(b.currentTarget).val()),d=a(b.currentTarget)[0].id;a.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),c?this.filterColumnsPartial[d]=c:delete this.filterColumnsPartial[d],this.options.pageNumber=1,this.onSearch(b),this.updatePagination(),this.trigger("column-advanced-search",d,c)}}(jQuery);

View File

@ -1,7 +1,3 @@
/**
* Bootstrap Table Chinese translation
* Author: Zhixin Wen<wenzhixin2010@gmail.com>
*/
(function ($) { (function ($) {
'use strict'; 'use strict';
@ -10,10 +6,10 @@
return '正在努力地加载数据中,请稍候……'; return '正在努力地加载数据中,请稍候……';
}, },
formatRecordsPerPage: function (pageNumber) { formatRecordsPerPage: function (pageNumber) {
return '每页显示 ' + pageNumber + ' 条记录'; return pageNumber + ' 条记录每页';
}, },
formatShowingRows: function (pageFrom, pageTo, totalRows) { formatShowingRows: function (pageFrom, pageTo, totalRows) {
return '显示第 ' + pageFrom + ' 到 ' + pageTo + ' 条记录共 ' + totalRows + ' 条记录'; return '第 ' + pageFrom + ' 到 ' + pageTo + ' 条,共 ' + totalRows + ' 条记录';
}, },
formatSearch: function () { formatSearch: function () {
return '搜索'; return '搜索';
@ -32,6 +28,12 @@
}, },
formatColumns: function () { formatColumns: function () {
return '列'; return '列';
},
formatExport: function () {
return '导出数据';
},
formatClearFilters: function () {
return '清空过滤';
} }
}; };

View File

@ -0,0 +1 @@
(function($){$.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(pageNumber){return pageNumber+" 条记录每页"},formatShowingRows:function(pageFrom,pageTo,totalRows){return"第 "+pageFrom+" 到 "+pageTo+" 条,共 "+totalRows+" 条记录。"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"},formatExport:function(){return"导出数据"},formatClearFilters:function(){return"清空过滤"}};$.extend($.fn.bootstrapTable.defaults,$.fn.bootstrapTable.locales["zh-CN"])})(jQuery);

View File

@ -0,0 +1,35 @@
function initTable(_columns, _url) {
$('.bootstrap-table').bootstrapTable({
method: 'GET',
dataType: "json",
contentType: 'application/x-www-form-urlencoded',
url: _url,
// search: true, // 是否显示搜索框功能
striped: true, // 是否显示行间隔色
pagination: true, // 是否分页
showColumns: false, // 是否显示隐藏某列下拉框
singleSelect: false, // 是否单选复选框
iconSize: 'outline', // 图标大小undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮
toolbar: '#tableToolbar', // 指定工作栏
pageSize: 10, // 每页显示10条记录
pageNumber: 1, // 默认第1页
pageList: [10, 25, 50], // 可供选择的每页的行数
sidePagination: "server", // 启用服务端分页
cache: false, // 是否使用缓存
queryParams: function(params) {
return {
// 查询参数
limit: params.limit,
offset: params.offset,
search: params.search,
sort: params.sort,
order: params.order
};
},
columns: _columns
});
}
function refresh() {
$('.bootstrap-table').bootstrapTable('refresh');
}

View File

@ -1 +0,0 @@
.bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #e4eaec;border-collapse:collapse!important}.bootstrap-table .table,.bootstrap-table .table>tbody>tr>td,.bootstrap-table .table>tbody>tr>th,.bootstrap-table .table>tfoot>tr>td,.bootstrap-table .table>tfoot>tr>th,.bootstrap-table .table>thead>tr>td{padding:8px!important}.bootstrap-table .table.table-no-bordered>tbody>tr>td,.bootstrap-table .table.table-no-bordered>thead>tr>th{border-right:2px solid transparent}.fixed-table-container{position:relative;clear:both;border:1px solid #e4eaec}.fixed-table-container.table-no-bordered{border:1px solid transparent}.fixed-table-footer,.fixed-table-header{height:37px;overflow:hidden}.fixed-table-header{border-bottom:1px solid #e4eaec}.fixed-table-footer{border-top:1px solid #e4eaec}.fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.fixed-table-container table{width:100%}.fixed-table-container thead th{height:0;padding:0;margin:0;border-left:1px solid #e4eaec}.fixed-table-container thead th:first-child{border-left:none}.fixed-table-container tbody td .th-inner,.fixed-table-container thead th .th-inner{padding:8px;line-height:20px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-table-container thead th .sortable{cursor:pointer;background-position:right;background-repeat:no-repeat;padding-right:30px}.fixed-table-container th.detail{width:30px}.fixed-table-container tbody td{border-left:1px solid #e4eaec}.fixed-table-container tbody tr:first-child td{border-top:none}.fixed-table-container tbody td:first-child{border-left:none}.fixed-table-container .table .icon,.fixed-table-container table .icon{top:auto;margin:0 5px}.fixed-table-container tbody .selected td{background-color:#f3f7f9}.fixed-table-container .bs-checkbox{text-align:center}.fixed-table-container .bs-checkbox .th-inner{padding:8px 0}.fixed-table-container input[type=radio],.fixed-table-container input[type=checkbox]{margin:0 auto!important}.fixed-table-container .no-records-found{text-align:center}.fixed-table-pagination .pagination-detail,.fixed-table-pagination div.pagination{margin-top:10px;margin-bottom:10px}.fixed-table-pagination div.pagination .pagination{margin:0}.fixed-table-pagination .pagination a{padding:6px 12px;line-height:1.428571429}.fixed-table-pagination .pagination-info{line-height:34px;margin-right:5px}.fixed-table-pagination .btn-group{position:relative;display:inline-block;vertical-align:middle}.fixed-table-pagination .dropup .dropdown-menu{margin-bottom:0}.fixed-table-pagination .page-list{display:inline-block}.fixed-table-toolbar .columns-left{margin-right:5px}.fixed-table-toolbar .columns-right{margin-left:5px}.fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:300;line-height:1.428571429}.fixed-table-toolbar .bars,.fixed-table-toolbar .columns,.fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px;line-height:34px}.fixed-table-pagination li.disabled a{pointer-events:none;cursor:default}.fixed-table-loading{display:none;position:absolute;top:42px;right:0;bottom:0;left:0;z-index:6;background-color:#fff;text-align:center}.fixed-table-body .card-view .title{font-weight:400;display:inline-block;min-width:30%;text-align:left!important}.fixed-table-body thead th .th-inner{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.table td,.table th{vertical-align:middle;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.fixed-table-toolbar .dropdown-menu{text-align:left;max-height:300px;overflow:auto}.fixed-table-toolbar .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.fixed-table-toolbar .btn-group>.btn-group>.btn{border-radius:0}.fixed-table-toolbar .btn-group>.btn-group:first-child>.btn{border-top-left-radius:3px;border-bottom-left-radius:3px}.fixed-table-toolbar .btn-group>.btn-group:last-child>.btn{border-top-right-radius:3px;border-bottom-right-radius:3px}.bootstrap-table .table>thead>tr>th{vertical-align:bottom;border-bottom:1px solid #e4eaec}.bootstrap-table .table thead>tr>th{padding:0;margin:0}.bootstrap-table .fixed-table-footer tbody>tr>td{padding:0!important}.bootstrap-table .fixed-table-footer .table{border-bottom:none;border-radius:0}.pull-right .dropdown-menu{right:0;left:auto}p.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}

View File

@ -1,229 +1,96 @@
var prefix = "/monitor/online" var prefix = "/monitor/online"
$(function() { $(function() {
load(); var columns = [{
checkbox: true
},
{
field: 'sessionId',
// 列字段名
title: '会话编号' // 列标题
},
{
field: 'loginName',
title: '登录名称'
},
{
field: 'deptName',
title: '部门名称'
},
{
field: 'ipaddr',
title: '主机'
},
{
field: 'browser',
title: '浏览器'
},
{
field: 'os',
title: '操作系统'
},
{
field: 'status',
title: '状态',
align: 'center',
formatter: function(value, row, index) {
if (value == 'on_line') {
return '<span class="label label-success">在线</span>';
} else if (value == 'off_line') {
return '<span class="label label-primary">离线</span>';
}
}
},
{
field: 'startTimestamp',
title: '登录时间'
},
{
field: 'lastAccessTime',
title: '最后访问时间'
},
{
title: '操作',
field: 'id',
align: 'center',
formatter: function(value, row, index) {
var d = '<a class="btn btn-warning btn-sm" href="#" title="删除" onclick="forceLogout(\'' + row.sessionId + '\')"><i class="fa fa-remove"></i></a> ';
return d;
}
}];
var url = prefix + "/list";
initTable(columns, url);
}); });
function load() {
$('#exampleTable')
.bootstrapTable(
{
method : 'get', // 服务器数据的请求方式 get or post
url : prefix + "/list", // 服务器数据的加载地址
// showRefresh : true,
// showToggle : true,
// showColumns : true,
iconSize : 'outline',
toolbar : '#exampleToolbar',
striped : true, // 设置为true会有隔行变色效果
dataType : "json", // 服务器返回的数据类型
pagination : true, // 设置为true会在底部显示分页条
// queryParamsType : "limit",
// //设置为limit则会发送符合RESTFull格式的参数
singleSelect : false, // 设置为true将禁止多选
// contentType : "application/x-www-form-urlencoded",
// //发送到服务器的数据编码类型
pageSize : 10, // 如果设置了分页,每页数据条数
pageNumber : 1, // 如果设置了分布,首页页码
// search : true, // 是否显示搜索框
showColumns : false, // 是否显示内容下拉框(选择显示的列)
sidePagination : "client", // 设置在哪里进行分页,可选值为"client" 或者 "server"
cache : false,
queryParams : function(params) {
return {
// 说明传入后台的参数包括offset开始索引limit步长sort排序列orderdesc或者,以及所有列的键值对
limit : params.limit,
offset : params.offset,
name : $('#searchName').val()
};
},
// //请求服务器数据时,你可以通过重写参数的方式添加一些额外的参数,例如 toolbar 中的参数 如果
// queryParamsType = 'limit' ,返回参数必须包含
// limit, offset, search, sort, order 否则, 需要包含:
// pageSize, pageNumber, searchText, sortName,
// sortOrder.
// 返回false将会终止请求
columns : [
{
checkbox : true
},
{
field : 'sessionId', // 列字段名
title : '会话编号' // 列标题
},
{
field : 'loginName',
title : '登录名称'
},
{
field : 'deptName',
title : '部门名称'
},
{
field : 'ipaddr',
title : '主机'
},
{
field : 'browser',
title : '浏览器'
},
{
field : 'os',
title : '操作系统'
},
{
field : 'status',
title : '状态',
align : 'center',
formatter : function(value, row, index) {
if (value == 'on_line') {
return '<span class="label label-success">在线</span>';
} else if (value == 'off_line') {
return '<span class="label label-primary">离线</span>';
}
}
},
{
field : 'startTimestamp',
title : '登录时间'
},
{
field : 'lastAccessTime',
title : '最后访问时间'
},
{
title : '操作',
field : 'id',
align : 'center',
formatter : function(value, row, index) {
var d = '<a class="btn btn-warning btn-sm" href="#" title="删除" onclick="forceLogout(\''
+ row.sessionId
+ '\')"><i class="fa fa-remove"></i></a> ';
return d;
}
} ]
});
}
function reLoad() {
$('#exampleTable').bootstrapTable('refresh');
}
function add() {
// iframe层
layer.open({
type : 2,
title : '增加用户',
maxmin : true,
shadeClose : false, // 点击遮罩关闭层
area : [ '800px', '520px' ],
content : prefix + '/add'
});
}
function forceLogout(id) { function forceLogout(id) {
layer.confirm('确定要强制选中用户下线吗?', { layer.confirm('确定要强制选中用户下线吗?', {
btn : [ '确定', '取消' ] btn: ['确定', '取消']
}, function() { },
$.ajax({ function() {
url : prefix+"/forceLogout/" + id, $.ajax({
type : "post", url: prefix + "/forceLogout/" + id,
data : { type: "post",
'id' : id data: {
}, 'id': id
success : function(r) { },
if (r.code == 0) { success: function(r) {
layer.msg(r.msg); if (r.code == 0) {
reLoad(); layer.msg(r.msg);
} else { refresh();
layer.msg(r.msg); } else {
} layer.msg(r.msg);
} }
}); }
}) });
})
} }
function edit(id) {
layer.open({
type : 2,
title : '用户修改',
maxmin : true,
shadeClose : true, // 点击遮罩关闭层
area : [ '800px', '520px' ],
content : prefix + '/edit/' + id // iframe的url
});
}
function resetPwd(id) {
layer.open({
type : 2,
title : '重置密码',
maxmin : true,
shadeClose : false, // 点击遮罩关闭层
area : [ '400px', '260px' ],
content : prefix + '/resetPwd/' + id // iframe的url
});
}
function batchRemove() {
var rows = $('#exampleTable').bootstrapTable('getSelections'); // 返回所有选择的行,当没有选择的记录时,返回一个空数组
if (rows.length == 0) {
layer.msg("请选择要删除的数据");
return;
}
layer.confirm("确认要删除选中的'" + rows.length + "'条数据吗?", {
btn : [ '确定', '取消' ]
// 按钮
}, function() {
var ids = new Array();
// 遍历所有选择的行数据取每条数据对应的ID
$.each(rows, function(i, row) {
ids[i] = row['userId'];
});
$.ajax({
type : 'POST',
data : {
"ids" : ids
},
url : prefix + '/batchRemove',
success : function(r) {
if (r.code == 0) {
layer.msg(r.msg);
reLoad();
} else {
layer.msg(r.msg);
}
}
});
}, function() {
});
}
function getTreeData() {
$.ajax({
type : "GET",
url : "/system/sysDept/tree",
success : function(tree) {
loadTree(tree);
}
});
}
function loadTree(tree) {
$('#jstree').jstree({
'core' : {
'data' : tree
},
"plugins" : [ "search" ]
});
$('#jstree').jstree().open_all();
}
$('#jstree').on("changed.jstree", function(e, data) {
if (data.selected == -1) {
var opt = {
query : {
deptId : '',
}
}
$('#exampleTable').bootstrapTable('refresh', opt);
} else {
var opt = {
query : {
deptId : data.selected[0],
}
}
$('#exampleTable').bootstrapTable('refresh', opt);
}
}); function addTest()
{
alert("addTest");
}
function batDelTest()
{
alert("batDelTest");
}

View File

@ -1,7 +0,0 @@
/*
* bootstrap-table - v1.9.0 - 2015-09-30
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2015 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";var b=function(b,c){b.options.columnsHidden.length>0&&a.each(b.columns,function(d,e){-1!==b.options.columnsHidden.indexOf(e.field)&&e.visible!==c&&b.toggleColumn(a.fn.bootstrapTable.utils.getFieldIndex(b.columns,e.field),c,!0)})},c=function(a){(a.options.height||a.options.showFooter)&&setTimeout(a.resetView,1)},d=function(a,b,d){a.options.minHeight?b<=a.options.minWidth&&d<=a.options.minHeight?e(a):b>a.options.minWidth&&d>a.options.minHeight&&f(a):b<=a.options.minWidth?e(a):b>a.options.minWidth&&f(a),c(a)},e=function(a){g(a,!1),b(a,!1)},f=function(a){g(a,!0),b(a,!0)},g=function(a,b){a.options.cardView=b,a.toggleView()},h=function(a,b){var c;return function(){var d=this,e=arguments,f=function(){c=null,a.apply(d,e)};clearTimeout(c),c=setTimeout(f,b)}};a.extend(a.fn.bootstrapTable.defaults,{mobileResponsive:!1,minWidth:562,minHeight:void 0,heightThreshold:100,checkOnInit:!0,columnsHidden:[]});var i=a.fn.bootstrapTable.Constructor,j=i.prototype.init;i.prototype.init=function(){if(j.apply(this,Array.prototype.slice.apply(arguments)),this.options.mobileResponsive&&this.options.minWidth){var b=this,c={width:a(window).width(),height:a(window).height()};if(a(window).on("resize orientationchange",h(function(){var e=a(this).height(),f=a(this).width();(Math.abs(c.height-e)>b.options.heightThreshold||c.width!=f)&&(d(b,f,e),c={width:f,height:e})},200)),this.options.checkOnInit){var e=a(window).height(),f=a(window).width();d(this,f,e),c={width:f,height:e}}}}}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1,7 +0,0 @@
/*
* bootstrap-table - v1.9.0 - 2015-09-30
* https://github.com/wenzhixin/bootstrap-table
* Copyright (c) 2015 zhixin wen
* Licensed MIT License
*/
!function(a){"use strict";a.fn.bootstrapTable.locales["zh-CN"]={formatLoadingMessage:function(){return"正在努力地加载数据中,请稍候……"},formatRecordsPerPage:function(a){return"每页显示 "+a+" 条记录"},formatShowingRows:function(a,b,c){return"显示第 "+a+" 到第 "+b+" 条记录,总共 "+c+" 条记录"},formatSearch:function(){return"搜索"},formatNoMatches:function(){return"没有找到匹配的记录"},formatPaginationSwitch:function(){return"隐藏/显示分页"},formatRefresh:function(){return"刷新"},formatToggle:function(){return"切换"},formatColumns:function(){return"列"}},a.extend(a.fn.bootstrapTable.defaults,a.fn.bootstrapTable.locales["zh-CN"])}(jQuery);

View File

@ -7,7 +7,8 @@
<link rel="shortcut icon" href="favicon.ico"> <link rel="shortcut icon" href="favicon.ico">
<link href="css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet"> <link href="css/bootstrap.min.css?v=3.3.6" th:href="@{/css/bootstrap.min.css?v=3.3.6}" rel="stylesheet">
<link href="/css/font-awesome.css?v=4.4.0" th:href="@{/css/font-awesome.css?v=4.4.0}" rel="stylesheet"> <link href="/css/font-awesome.css?v=4.4.0" th:href="@{/css/font-awesome.css?v=4.4.0}" rel="stylesheet">
<link href="/css/plugins/bootstrap-table/bootstrap-table.min.css" th:href="@{/css/plugins/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"> <!-- bootstrap-table 表格插件样式 -->
<link href="/ajax/libs/bootstrap-table/bootstrap-table.min.css" th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
<link href="/css/plugins/jsTree/style.min.css" rel="stylesheet"> <link href="/css/plugins/jsTree/style.min.css" rel="stylesheet">
<link href="/css/plugins/jqTreeGrid/jquery.treegrid.css" rel="stylesheet"> <link href="/css/plugins/jqTreeGrid/jquery.treegrid.css" rel="stylesheet">
<!--summernote css --> <!--summernote css -->
@ -19,10 +20,14 @@
<div th:fragment="footer"> <div th:fragment="footer">
<script src="/js/jquery.min.js?v=2.1.4"></script> <script src="/js/jquery.min.js?v=2.1.4"></script>
<script src="/js/bootstrap.min.js?v=3.3.6"></script> <script src="/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script> <!-- bootstrap-table 表格插件 -->
<script <script src="/ajax/libs/bootstrap-table/bootstrap-table.min.js"></script>
src="/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script> <script src="/ajax/libs/bootstrap-table/page/bootstrap-page.js"></script>
<script src="/ajax/libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/ajax/libs/bootstrap-table/extensions/mobile/bootstrap-table-mobile.min.js"></script>
<script src="/ajax/libs/bootstrap-table/extensions/toolbar/bootstrap-table-toolbar.min.js"></script>
<script src="/js/plugins/validate/jquery.validate.min.js"></script> <script src="/js/plugins/validate/jquery.validate.min.js"></script>
<script src="/js/plugins/validate/messages_zh.min.js"></script> <script src="/js/plugins/validate/messages_zh.min.js"></script>
<script src="/js/plugins/jsTree/jstree.min.js"></script> <script src="/js/plugins/jsTree/jstree.min.js"></script>

View File

@ -4,31 +4,22 @@
<meta charset="utf-8"> <meta charset="utf-8">
<head th:include="include :: header"></head> <head th:include="include :: header"></head>
<body class="gray-bg"> <body class="gray-bg">
<div class="wrapper wrapper-content "> <div class="wrapper wrapper-content">
<div class="row">
<div class="btn-group hidden-xs" id="tableToolbar" role="group">
<div class="col-sm-11"> <button type="button" class="btn btn-outline btn-default">
<div class="ibox"> <i class="glyphicon glyphicon-plus" onclick="addTest();"></i>
<div class="ibox-body"> </button>
<div class="fixed-table-toolbar"> <button type="button" class="btn btn-outline btn-default">
<div class="columns pull-left"> <i class="glyphicon glyphicon-trash" onclick="batDelTest();"></i>
</button>
</div> </div>
<div class="columns pull-right">
<button class="btn btn-success" onclick="reLoad()">查询</button> <table class="bootstrap-table" data-mobile-responsive="true"
</div> data-search="true" data-show-refresh="true"
data-sort-name="last_access_time" data-order="desc">
<div class="columns pull-right col-md-2 nopadding"> </table>
<input id="searchName" type="text" class="form-control" </div>
placeholder="">
</div>
</div>
<table id="exampleTable" data-mobile-responsive="true">
</table>
</div>
</div>
</div>
</div>
<!-- <a shiro:hasPermission="system:user:list" href="#">测试菜单</a> --> <!-- <a shiro:hasPermission="system:user:list" href="#">测试菜单</a> -->
<!-- <a shiro:hasRole="admin" href="#">测试角色</a> --> <!-- <a shiro:hasRole="admin" href="#">测试角色</a> -->
<div th:include="include :: footer"></div> <div th:include="include :: footer"></div>