From 8d08626aff3a4166161a04ecf47b116a9c50aeb7 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Mon, 1 Oct 2018 21:32:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=A8=E6=A0=BC=E6=A3=80?= =?UTF-8?q?=E7=B4=A2=E6=8A=98=E5=8F=A0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/{ry_20180903.sql => ry_20181001.sql} | 1234 ++++++++--------- .../bootstrap-table/bootstrap-table.min.js | 4 +- src/main/resources/static/ruoyi/css/ry-ui.css | 8 +- src/main/resources/static/ruoyi/js/ry-ui.js | 1 + .../resources/templates/monitor/job/job.html | 2 +- .../templates/monitor/job/jobLog.html | 2 +- .../monitor/logininfor/logininfor.html | 2 +- .../templates/monitor/online/online.html | 2 +- .../templates/monitor/operlog/operlog.html | 2 +- .../templates/system/config/config.html | 2 +- .../resources/templates/system/dept/dept.html | 2 +- .../templates/system/dict/data/data.html | 2 +- .../templates/system/dict/type/type.html | 2 +- .../resources/templates/system/menu/menu.html | 2 +- .../templates/system/notice/notice.html | 2 +- .../resources/templates/system/post/post.html | 2 +- .../resources/templates/system/role/role.html | 2 +- .../resources/templates/system/user/user.html | 2 +- .../resources/templates/tool/gen/gen.html | 2 +- 19 files changed, 639 insertions(+), 638 deletions(-) rename sql/{ry_20180903.sql => ry_20181001.sql} (98%) diff --git a/sql/ry_20180903.sql b/sql/ry_20181001.sql similarity index 98% rename from sql/ry_20180903.sql rename to sql/ry_20181001.sql index a2b856d6..81d0db12 100644 --- a/sql/ry_20180903.sql +++ b/sql/ry_20181001.sql @@ -1,618 +1,618 @@ --- ---------------------------- --- 1、部门表 --- ---------------------------- -drop table if exists sys_dept; -create table sys_dept ( - dept_id int(11) not null auto_increment comment '部门id', - parent_id int(11) default 0 comment '父部门id', - ancestors varchar(50) default '' comment '祖级列表', - dept_name varchar(30) default '' comment '部门名称', - order_num int(4) default 0 comment '显示顺序', - leader varchar(20) default '' comment '负责人', - phone varchar(11) default '' comment '联系电话', - email varchar(50) default '' comment '邮箱', - status char(1) default '0' comment '部门状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - primary key (dept_id) -) engine=innodb auto_increment=200 default charset=utf8 comment = '部门表'; - --- ---------------------------- --- 初始化-部门表数据 --- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); - --- ---------------------------- --- 2、用户信息表 --- ---------------------------- -drop table if exists sys_user; -create table sys_user ( - user_id int(11) not null auto_increment comment '用户ID', - dept_id int(11) default null comment '部门ID', - login_name varchar(30) not null comment '登录账号', - user_name varchar(30) not null comment '用户昵称', - user_type varchar(2) default '00' comment '用户类型(00系统用户)', - email varchar(50) default '' comment '用户邮箱', - phonenumber varchar(11) default '' comment '手机号码', - sex char(1) default '0' comment '用户性别(0男 1女 2未知)', - avatar varchar(100) default '' comment '头像路径', - password varchar(50) default '' comment '密码', - salt varchar(20) default '' comment '盐加密', - status char(1) default '0' comment '帐号状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - login_ip varchar(20) default '' comment '最后登陆IP', - login_date datetime comment '最后登陆时间', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (user_id) -) engine=innodb auto_increment=100 default charset=utf8 comment = '用户信息表'; - --- ---------------------------- --- 初始化-用户信息表数据 --- ---------------------------- -insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); -insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '测试员'); - - --- ---------------------------- --- 3、岗位信息表 --- ---------------------------- -drop table if exists sys_post; -create table sys_post -( - post_id int(11) not null auto_increment comment '岗位ID', - post_code varchar(64) not null comment '岗位编码', - post_name varchar(50) not null comment '岗位名称', - post_sort int(4) not null comment '显示顺序', - status char(1) not null comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (post_id) -) engine=innodb default charset=utf8 comment = '岗位信息表'; - --- ---------------------------- --- 初始化-岗位信息表数据 --- ---------------------------- -insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); - - --- ---------------------------- --- 4、角色信息表 --- ---------------------------- -drop table if exists sys_role; -create table sys_role ( - role_id int(11) not null auto_increment comment '角色ID', - role_name varchar(30) not null comment '角色名称', - role_key varchar(100) not null comment '角色权限字符串', - role_sort int(4) not null comment '显示顺序', - data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限)', - status char(1) not null comment '角色状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (role_id) -) engine=innodb auto_increment=100 default charset=utf8 comment = '角色信息表'; - --- ---------------------------- --- 初始化-角色信息表数据 --- ---------------------------- -insert into sys_role values('1', '管理员', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); -insert into sys_role values('2', '普通角色', 'common', 2, 2, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '普通角色'); - - --- ---------------------------- --- 5、菜单权限表 --- ---------------------------- -drop table if exists sys_menu; -create table sys_menu ( - menu_id int(11) not null auto_increment comment '菜单ID', - menu_name varchar(50) not null comment '菜单名称', - parent_id int(11) default 0 comment '父菜单ID', - order_num int(4) default 0 comment '显示顺序', - url varchar(200) default '#' comment '请求地址', - menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)', - visible char(1) default 0 comment '菜单状态(0显示 1隐藏)', - perms varchar(100) default '' comment '权限标识', - icon varchar(100) default '#' comment '菜单图标', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (menu_id) -) engine=innodb auto_increment=2000 default charset=utf8 comment = '菜单权限表'; - --- ---------------------------- --- 初始化-菜单信息表数据 --- ---------------------------- --- 一级菜单 -insert into sys_menu values('1', '系统管理', '0', '1', '#', 'M', '0', '', 'fa fa-gear', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统管理目录'); -insert into sys_menu values('2', '系统监控', '0', '2', '#', 'M', '0', '', 'fa fa-video-camera', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统监控目录'); -insert into sys_menu values('3', '系统工具', '0', '3', '#', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录'); --- 二级菜单 -insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单'); -insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单'); -insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单'); -insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单'); -insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单'); -insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单'); -insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单'); -insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单'); -insert into sys_menu values('108', '日志管理', '1', '9', '#', 'M', '0', '', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单'); -insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单'); -insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单'); -insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单'); -insert into sys_menu values('112', '表单构建', '3', '1', '/tool/build', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单'); -insert into sys_menu values('113', '代码生成', '3', '2', '/tool/gen', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单'); -insert into sys_menu values('114', '系统接口', '3', '3', '/tool/swagger', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单'); --- 三级菜单 -insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单'); -insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单'); --- 用户管理按钮 -insert into sys_menu values('1000', '用户查询', '100', '1', '#', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1001', '用户新增', '100', '2', '#', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1002', '用户修改', '100', '3', '#', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1003', '用户删除', '100', '4', '#', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1004', '用户导出', '100', '5', '#', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1005', '重置密码', '100', '5', '#', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 角色管理按钮 -insert into sys_menu values('1006', '角色查询', '101', '1', '#', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1007', '角色新增', '101', '2', '#', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1008', '角色修改', '101', '3', '#', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1009', '角色删除', '101', '4', '#', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1010', '角色导出', '101', '4', '#', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 菜单管理按钮 -insert into sys_menu values('1011', '菜单查询', '102', '1', '#', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1012', '菜单新增', '102', '2', '#', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1013', '菜单修改', '102', '3', '#', 'F', '0', 'system:menu:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1014', '菜单删除', '102', '4', '#', 'F', '0', 'system:menu:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 部门管理按钮 -insert into sys_menu values('1015', '部门查询', '103', '1', '#', 'F', '0', 'system:dept:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1016', '部门新增', '103', '2', '#', 'F', '0', 'system:dept:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1017', '部门修改', '103', '3', '#', 'F', '0', 'system:dept:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1018', '部门删除', '103', '4', '#', 'F', '0', 'system:dept:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 岗位管理按钮 -insert into sys_menu values('1019', '岗位查询', '104', '1', '#', 'F', '0', 'system:post:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1020', '岗位新增', '104', '2', '#', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1021', '岗位修改', '104', '3', '#', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1022', '岗位删除', '104', '4', '#', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1023', '岗位导出', '104', '4', '#', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 字典管理按钮 -insert into sys_menu values('1024', '字典查询', '105', '1', '#', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1025', '字典新增', '105', '2', '#', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1026', '字典修改', '105', '3', '#', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1027', '字典删除', '105', '4', '#', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1028', '字典导出', '105', '4', '#', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 参数设置按钮 -insert into sys_menu values('1029', '参数查询', '106', '1', '#', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1030', '参数新增', '106', '2', '#', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1031', '参数修改', '106', '3', '#', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1032', '参数删除', '106', '4', '#', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1033', '参数导出', '106', '4', '#', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 通知公告按钮 -insert into sys_menu values('1034', '公告查询', '107', '1', '#', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1035', '公告新增', '107', '2', '#', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1036', '公告修改', '107', '3', '#', 'F', '0', 'system:notice:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1037', '公告删除', '107', '4', '#', 'F', '0', 'system:notice:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 操作日志按钮 -insert into sys_menu values('1038', '操作查询', '500', '1', '#', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1039', '操作删除', '500', '2', '#', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1040', '详细信息', '500', '3', '#', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1041', '日志导出', '500', '3', '#', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 登录日志按钮 -insert into sys_menu values('1042', '登录查询', '501', '1', '#', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1043', '登录删除', '501', '2', '#', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1044', '日志导出', '501', '2', '#', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 在线用户按钮 -insert into sys_menu values('1045', '在线查询', '109', '1', '#', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1046', '批量强退', '109', '2', '#', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1047', '单条强退', '109', '3', '#', 'F', '0', 'monitor:online:forceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 定时任务按钮 -insert into sys_menu values('1048', '任务查询', '110', '1', '#', 'F', '0', 'monitor:job:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1049', '任务新增', '110', '2', '#', 'F', '0', 'monitor:job:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1050', '任务修改', '110', '3', '#', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1051', '任务删除', '110', '4', '#', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1052', '状态修改', '110', '5', '#', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1053', '任务导出', '110', '5', '#', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); --- 代码生成按钮 -insert into sys_menu values('1054', '生成查询', '113', '1', '#', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_menu values('1055', '生成代码', '113', '2', '#', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); - - --- ---------------------------- --- 6、用户和角色关联表 用户N-1角色 --- ---------------------------- -drop table if exists sys_user_role; -create table sys_user_role ( - user_id int(11) not null comment '用户ID', - role_id int(11) not null comment '角色ID', - primary key(user_id, role_id) -) engine=innodb default charset=utf8 comment = '用户和角色关联表'; - --- ---------------------------- --- 初始化-用户和角色关联表数据 --- ---------------------------- -insert into sys_user_role values ('1', '1'); -insert into sys_user_role values ('2', '2'); - - --- ---------------------------- --- 7、角色和菜单关联表 角色1-N菜单 --- ---------------------------- -drop table if exists sys_role_menu; -create table sys_role_menu ( - role_id int(11) not null comment '角色ID', - menu_id int(11) not null comment '菜单ID', - primary key(role_id, menu_id) -) engine=innodb default charset=utf8 comment = '角色和菜单关联表'; - --- ---------------------------- --- 初始化-角色和菜单关联表数据 --- ---------------------------- -insert into sys_role_menu values ('2', '1'); -insert into sys_role_menu values ('2', '2'); -insert into sys_role_menu values ('2', '3'); -insert into sys_role_menu values ('2', '100'); -insert into sys_role_menu values ('2', '101'); -insert into sys_role_menu values ('2', '102'); -insert into sys_role_menu values ('2', '103'); -insert into sys_role_menu values ('2', '104'); -insert into sys_role_menu values ('2', '105'); -insert into sys_role_menu values ('2', '106'); -insert into sys_role_menu values ('2', '107'); -insert into sys_role_menu values ('2', '108'); -insert into sys_role_menu values ('2', '109'); -insert into sys_role_menu values ('2', '110'); -insert into sys_role_menu values ('2', '111'); -insert into sys_role_menu values ('2', '112'); -insert into sys_role_menu values ('2', '113'); -insert into sys_role_menu values ('2', '114'); -insert into sys_role_menu values ('2', '500'); -insert into sys_role_menu values ('2', '501'); -insert into sys_role_menu values ('2', '1000'); -insert into sys_role_menu values ('2', '1001'); -insert into sys_role_menu values ('2', '1002'); -insert into sys_role_menu values ('2', '1003'); -insert into sys_role_menu values ('2', '1004'); -insert into sys_role_menu values ('2', '1005'); -insert into sys_role_menu values ('2', '1006'); -insert into sys_role_menu values ('2', '1007'); -insert into sys_role_menu values ('2', '1008'); -insert into sys_role_menu values ('2', '1009'); -insert into sys_role_menu values ('2', '1010'); -insert into sys_role_menu values ('2', '1011'); -insert into sys_role_menu values ('2', '1012'); -insert into sys_role_menu values ('2', '1013'); -insert into sys_role_menu values ('2', '1014'); -insert into sys_role_menu values ('2', '1015'); -insert into sys_role_menu values ('2', '1016'); -insert into sys_role_menu values ('2', '1017'); -insert into sys_role_menu values ('2', '1018'); -insert into sys_role_menu values ('2', '1019'); -insert into sys_role_menu values ('2', '1020'); -insert into sys_role_menu values ('2', '1021'); -insert into sys_role_menu values ('2', '1022'); -insert into sys_role_menu values ('2', '1023'); -insert into sys_role_menu values ('2', '1024'); -insert into sys_role_menu values ('2', '1025'); -insert into sys_role_menu values ('2', '1026'); -insert into sys_role_menu values ('2', '1027'); -insert into sys_role_menu values ('2', '1028'); -insert into sys_role_menu values ('2', '1029'); -insert into sys_role_menu values ('2', '1030'); -insert into sys_role_menu values ('2', '1031'); -insert into sys_role_menu values ('2', '1032'); -insert into sys_role_menu values ('2', '1033'); -insert into sys_role_menu values ('2', '1034'); -insert into sys_role_menu values ('2', '1035'); -insert into sys_role_menu values ('2', '1036'); -insert into sys_role_menu values ('2', '1037'); -insert into sys_role_menu values ('2', '1038'); -insert into sys_role_menu values ('2', '1039'); -insert into sys_role_menu values ('2', '1040'); -insert into sys_role_menu values ('2', '1041'); -insert into sys_role_menu values ('2', '1042'); -insert into sys_role_menu values ('2', '1043'); -insert into sys_role_menu values ('2', '1044'); -insert into sys_role_menu values ('2', '1045'); -insert into sys_role_menu values ('2', '1046'); -insert into sys_role_menu values ('2', '1047'); -insert into sys_role_menu values ('2', '1048'); -insert into sys_role_menu values ('2', '1049'); -insert into sys_role_menu values ('2', '1050'); -insert into sys_role_menu values ('2', '1051'); -insert into sys_role_menu values ('2', '1052'); -insert into sys_role_menu values ('2', '1053'); -insert into sys_role_menu values ('2', '1054'); -insert into sys_role_menu values ('2', '1055'); - - --- ---------------------------- --- 8、角色和部门关联表 角色1-N部门 --- ---------------------------- -drop table if exists sys_role_dept; -create table sys_role_dept ( - role_id int(11) not null comment '角色ID', - dept_id int(11) not null comment '部门ID', - primary key(role_id, dept_id) -) engine=innodb default charset=utf8 comment = '角色和部门关联表'; - --- ---------------------------- --- 初始化-角色和部门关联表数据 --- ---------------------------- -insert into sys_role_dept values ('2', '100'); -insert into sys_role_dept values ('2', '101'); -insert into sys_role_dept values ('2', '105'); - --- ---------------------------- --- 9、用户与岗位关联表 用户1-N岗位 --- ---------------------------- -drop table if exists sys_user_post; -create table sys_user_post -( - user_id int(11) not null comment '用户ID', - post_id int(11) not null comment '岗位ID', - primary key (user_id, post_id) -) engine=innodb default charset=utf8 comment = '用户与岗位关联表'; - --- ---------------------------- --- 初始化-用户与岗位关联表数据 --- ---------------------------- -insert into sys_user_post values ('1', '1'); -insert into sys_user_post values ('2', '2'); - - --- ---------------------------- --- 10、操作日志记录 --- ---------------------------- -drop table if exists sys_oper_log; -create table sys_oper_log ( - oper_id int(11) not null auto_increment comment '日志主键', - title varchar(50) default '' comment '模块标题', - business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)', - method varchar(100) default '' comment '方法名称', - operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)', - oper_name varchar(50) default '' comment '操作人员', - dept_name varchar(50) default '' comment '部门名称', - oper_url varchar(255) default '' comment '请求URL', - oper_ip varchar(30) default '' comment '主机地址', - oper_location varchar(255) default '' comment '操作地点', - oper_param varchar(255) default '' comment '请求参数', - status int(1) default 0 comment '操作状态(0正常 1异常)', - error_msg varchar(2000) default '' comment '错误消息', - oper_time datetime comment '操作时间', - primary key (oper_id) -) engine=innodb auto_increment=100 default charset=utf8 comment = '操作日志记录'; - - --- ---------------------------- --- 11、字典类型表 --- ---------------------------- -drop table if exists sys_dict_type; -create table sys_dict_type -( - dict_id int(11) not null auto_increment comment '字典主键', - dict_name varchar(100) default '' comment '字典名称', - dict_type varchar(100) default '' comment '字典类型', - status char(1) default '0' comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (dict_id), - unique (dict_type) -) engine=innodb auto_increment=100 default charset=utf8 comment = '字典类型表'; - -insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户性别列表'); -insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单状态列表'); -insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统开关列表'); -insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '任务状态列表'); -insert into sys_dict_type values(5, '系统是否', 'sys_yes_no', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统是否列表'); -insert into sys_dict_type values(6, '通知类型', 'sys_notice_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知类型列表'); -insert into sys_dict_type values(7, '通知状态', 'sys_notice_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知状态列表'); -insert into sys_dict_type values(8, '操作类型', 'sys_oper_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作类型列表'); -insert into sys_dict_type values(9, '系统状态', 'sys_common_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录状态列表'); - - --- ---------------------------- --- 12、字典数据表 --- ---------------------------- -drop table if exists sys_dict_data; -create table sys_dict_data -( - dict_code int(11) not null auto_increment comment '字典编码', - dict_sort int(4) default 0 comment '字典排序', - dict_label varchar(100) default '' comment '字典标签', - dict_value varchar(100) default '' comment '字典键值', - dict_type varchar(100) default '' comment '字典类型', - css_class varchar(100) default '' comment '样式属性(其他样式扩展)', - list_class varchar(100) default '' comment '表格回显样式', - is_default char(1) default 'N' comment '是否默认(Y是 N否)', - status char(1) default '0' comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (dict_code) -) engine=innodb auto_increment=100 default charset=utf8 comment = '字典数据表'; - - -insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别男'); -insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别女'); -insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别未知'); -insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '显示菜单'); -insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '隐藏菜单'); -insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); -insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); -insert into sys_dict_data values(10, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认是'); -insert into sys_dict_data values(11, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认否'); -insert into sys_dict_data values(12, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知'); -insert into sys_dict_data values(13, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '公告'); -insert into sys_dict_data values(14, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(15, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '关闭状态'); -insert into sys_dict_data values(16, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(17, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(18, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(19, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(20, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(21, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(22, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(23, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); -insert into sys_dict_data values(24, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); -insert into sys_dict_data values(25, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); - - --- ---------------------------- --- 13、参数配置表 --- ---------------------------- -drop table if exists sys_config; -create table sys_config ( - config_id int(5) not null auto_increment comment '参数主键', - config_name varchar(100) default '' comment '参数名称', - config_key varchar(100) default '' comment '参数键名', - config_value varchar(100) default '' comment '参数键值', - config_type char(1) default 'N' comment '系统内置(Y是 N否)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (config_id) -) engine=innodb auto_increment=100 default charset=utf8 comment = '参数配置表'; - -insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-default', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认 skin-default、蓝色 skin-blue、黄色 skin-yellow' ); -insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456' ); - - --- ---------------------------- --- 14、系统访问记录 --- ---------------------------- -drop table if exists sys_logininfor; -create table sys_logininfor ( - info_id int(11) not null auto_increment comment '访问ID', - login_name varchar(50) default '' comment '登录账号', - ipaddr varchar(50) default '' comment '登录IP地址', - login_location varchar(255) default '' comment '登录地点', - browser varchar(50) default '' comment '浏览器类型', - os varchar(50) default '' comment '操作系统', - status char(1) default '0' comment '登录状态(0成功 1失败)', - msg varchar(255) default '' comment '提示消息', - login_time datetime comment '访问时间', - primary key (info_id) -) engine=innodb auto_increment=100 default charset=utf8 comment = '系统访问记录'; - - --- ---------------------------- --- 15、在线用户记录 --- ---------------------------- -drop table if exists sys_user_online; -create table sys_user_online ( - sessionId varchar(50) default '' comment '用户会话id', - login_name varchar(50) default '' comment '登录账号', - dept_name varchar(50) default '' comment '部门名称', - ipaddr varchar(50) default '' comment '登录IP地址', - login_location varchar(255) default '' comment '登录地点', - browser varchar(50) default '' comment '浏览器类型', - os varchar(50) default '' comment '操作系统', - status varchar(10) default '' comment '在线状态on_line在线off_line离线', - start_timestamp datetime comment 'session创建时间', - last_access_time datetime comment 'session最后访问时间', - expire_time int(5) default 0 comment '超时时间,单位为分钟', - primary key (sessionId) -) engine=innodb default charset=utf8 comment = '在线用户记录'; - - --- ---------------------------- --- 16、定时任务调度表 --- ---------------------------- -drop table if exists sys_job; -create table sys_job ( - job_id int(11) not null auto_increment comment '任务ID', - job_name varchar(64) default '' comment '任务名称', - job_group varchar(64) default '' comment '任务组名', - method_name varchar(500) default '' comment '任务方法', - method_params varchar(200) default '' comment '方法参数', - cron_expression varchar(255) default '' comment 'cron执行表达式', - misfire_policy varchar(20) default '0' comment '计划执行错误策略(0默认 1继续 2等待 3放弃)', - status char(1) default '0' comment '状态(0正常 1暂停)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注信息', - primary key (job_id, job_name, job_group) -) engine=innodb auto_increment=100 default charset=utf8 comment = '定时任务调度表'; - -insert into sys_job values(1, 'ryTask', '系统默认(无参)', 'ryNoParams', '', '0/10 * * * * ?', '0', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); -insert into sys_job values(2, 'ryTask', '系统默认(有参)', 'ryParams', 'ry', '0/20 * * * * ?', '0', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); - - --- ---------------------------- --- 17、定时任务调度日志表 --- ---------------------------- -drop table if exists sys_job_log; -create table sys_job_log ( - job_log_id int(11) not null auto_increment comment '任务日志ID', - job_name varchar(64) not null comment '任务名称', - job_group varchar(64) not null comment '任务组名', - method_name varchar(500) comment '任务方法', - method_params varchar(200) default '' comment '方法参数', - job_message varchar(500) comment '日志信息', - status char(1) default '0' comment '执行状态(0正常 1失败)', - exception_info text comment '异常信息', - create_time datetime comment '创建时间', - primary key (job_log_id) -) engine=innodb default charset=utf8 comment = '定时任务调度日志表'; - - --- ---------------------------- --- 18、通知公告表 --- ---------------------------- -drop table if exists sys_notice; -create table sys_notice ( - notice_id int(4) not null auto_increment comment '公告ID', - notice_title varchar(50) not null comment '公告标题', - notice_type char(2) not null comment '公告类型(1通知 2公告)', - notice_content varchar(500) not null comment '公告内容', - status char(1) default '0' comment '公告状态(0正常 1关闭)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(255) default '' comment '备注', - primary key (notice_id) -) engine=innodb auto_increment=10 default charset=utf8 comment = '通知公告表'; - --- ---------------------------- --- 初始化-公告信息表数据 --- ---------------------------- -insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); +-- ---------------------------- +-- 1、部门表 +-- ---------------------------- +drop table if exists sys_dept; +create table sys_dept ( + dept_id int(11) not null auto_increment comment '部门id', + parent_id int(11) default 0 comment '父部门id', + ancestors varchar(50) default '' comment '祖级列表', + dept_name varchar(30) default '' comment '部门名称', + order_num int(4) default 0 comment '显示顺序', + leader varchar(20) default '' comment '负责人', + phone varchar(11) default '' comment '联系电话', + email varchar(50) default '' comment '邮箱', + status char(1) default '0' comment '部门状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + primary key (dept_id) +) engine=innodb auto_increment=200 default charset=utf8 comment = '部门表'; + +-- ---------------------------- +-- 初始化-部门表数据 +-- ---------------------------- +insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); +insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00'); + +-- ---------------------------- +-- 2、用户信息表 +-- ---------------------------- +drop table if exists sys_user; +create table sys_user ( + user_id int(11) not null auto_increment comment '用户ID', + dept_id int(11) default null comment '部门ID', + login_name varchar(30) not null comment '登录账号', + user_name varchar(30) not null comment '用户昵称', + user_type varchar(2) default '00' comment '用户类型(00系统用户)', + email varchar(50) default '' comment '用户邮箱', + phonenumber varchar(11) default '' comment '手机号码', + sex char(1) default '0' comment '用户性别(0男 1女 2未知)', + avatar varchar(100) default '' comment '头像路径', + password varchar(50) default '' comment '密码', + salt varchar(20) default '' comment '盐加密', + status char(1) default '0' comment '帐号状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + login_ip varchar(20) default '' comment '最后登陆IP', + login_date datetime comment '最后登陆时间', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (user_id) +) engine=innodb auto_increment=100 default charset=utf8 comment = '用户信息表'; + +-- ---------------------------- +-- 初始化-用户信息表数据 +-- ---------------------------- +insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '29c67a30398638269fe600f73a054934', '111111', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); +insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '8e6d98b90472783cc73c17047ddccf36', '222222', '0', '0', '127.0.0.1', '2018-03-16 11-33-00', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '测试员'); + + +-- ---------------------------- +-- 3、岗位信息表 +-- ---------------------------- +drop table if exists sys_post; +create table sys_post +( + post_id int(11) not null auto_increment comment '岗位ID', + post_code varchar(64) not null comment '岗位编码', + post_name varchar(50) not null comment '岗位名称', + post_sort int(4) not null comment '显示顺序', + status char(1) not null comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (post_id) +) engine=innodb default charset=utf8 comment = '岗位信息表'; + +-- ---------------------------- +-- 初始化-岗位信息表数据 +-- ---------------------------- +insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); + + +-- ---------------------------- +-- 4、角色信息表 +-- ---------------------------- +drop table if exists sys_role; +create table sys_role ( + role_id int(11) not null auto_increment comment '角色ID', + role_name varchar(30) not null comment '角色名称', + role_key varchar(100) not null comment '角色权限字符串', + role_sort int(4) not null comment '显示顺序', + data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限)', + status char(1) not null comment '角色状态(0正常 1停用)', + del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (role_id) +) engine=innodb auto_increment=100 default charset=utf8 comment = '角色信息表'; + +-- ---------------------------- +-- 初始化-角色信息表数据 +-- ---------------------------- +insert into sys_role values('1', '管理员', 'admin', 1, 1, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); +insert into sys_role values('2', '普通角色', 'common', 2, 2, '0', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '普通角色'); + + +-- ---------------------------- +-- 5、菜单权限表 +-- ---------------------------- +drop table if exists sys_menu; +create table sys_menu ( + menu_id int(11) not null auto_increment comment '菜单ID', + menu_name varchar(50) not null comment '菜单名称', + parent_id int(11) default 0 comment '父菜单ID', + order_num int(4) default 0 comment '显示顺序', + url varchar(200) default '#' comment '请求地址', + menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)', + visible char(1) default 0 comment '菜单状态(0显示 1隐藏)', + perms varchar(100) default '' comment '权限标识', + icon varchar(100) default '#' comment '菜单图标', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (menu_id) +) engine=innodb auto_increment=2000 default charset=utf8 comment = '菜单权限表'; + +-- ---------------------------- +-- 初始化-菜单信息表数据 +-- ---------------------------- +-- 一级菜单 +insert into sys_menu values('1', '系统管理', '0', '1', '#', 'M', '0', '', 'fa fa-gear', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统管理目录'); +insert into sys_menu values('2', '系统监控', '0', '2', '#', 'M', '0', '', 'fa fa-video-camera', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统监控目录'); +insert into sys_menu values('3', '系统工具', '0', '3', '#', 'M', '0', '', 'fa fa-bars', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统工具目录'); +-- 二级菜单 +insert into sys_menu values('100', '用户管理', '1', '1', '/system/user', 'C', '0', 'system:user:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户管理菜单'); +insert into sys_menu values('101', '角色管理', '1', '2', '/system/role', 'C', '0', 'system:role:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '角色管理菜单'); +insert into sys_menu values('102', '菜单管理', '1', '3', '/system/menu', 'C', '0', 'system:menu:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单管理菜单'); +insert into sys_menu values('103', '部门管理', '1', '4', '/system/dept', 'C', '0', 'system:dept:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '部门管理菜单'); +insert into sys_menu values('104', '岗位管理', '1', '5', '/system/post', 'C', '0', 'system:post:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '岗位管理菜单'); +insert into sys_menu values('105', '字典管理', '1', '6', '/system/dict', 'C', '0', 'system:dict:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '字典管理菜单'); +insert into sys_menu values('106', '参数设置', '1', '7', '/system/config', 'C', '0', 'system:config:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '参数设置菜单'); +insert into sys_menu values('107', '通知公告', '1', '8', '/system/notice', 'C', '0', 'system:notice:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知公告菜单'); +insert into sys_menu values('108', '日志管理', '1', '9', '#', 'M', '0', '', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '日志管理菜单'); +insert into sys_menu values('109', '在线用户', '2', '1', '/monitor/online', 'C', '0', 'monitor:online:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '在线用户菜单'); +insert into sys_menu values('110', '定时任务', '2', '2', '/monitor/job', 'C', '0', 'monitor:job:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '定时任务菜单'); +insert into sys_menu values('111', '数据监控', '2', '3', '/monitor/data', 'C', '0', 'monitor:data:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '数据监控菜单'); +insert into sys_menu values('112', '表单构建', '3', '1', '/tool/build', 'C', '0', 'tool:build:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '表单构建菜单'); +insert into sys_menu values('113', '代码生成', '3', '2', '/tool/gen', 'C', '0', 'tool:gen:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '代码生成菜单'); +insert into sys_menu values('114', '系统接口', '3', '3', '/tool/swagger', 'C', '0', 'tool:swagger:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统接口菜单'); +-- 三级菜单 +insert into sys_menu values('500', '操作日志', '108', '1', '/monitor/operlog', 'C', '0', 'monitor:operlog:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作日志菜单'); +insert into sys_menu values('501', '登录日志', '108', '2', '/monitor/logininfor', 'C', '0', 'monitor:logininfor:view', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录日志菜单'); +-- 用户管理按钮 +insert into sys_menu values('1000', '用户查询', '100', '1', '#', 'F', '0', 'system:user:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1001', '用户新增', '100', '2', '#', 'F', '0', 'system:user:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1002', '用户修改', '100', '3', '#', 'F', '0', 'system:user:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1003', '用户删除', '100', '4', '#', 'F', '0', 'system:user:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1004', '用户导出', '100', '5', '#', 'F', '0', 'system:user:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1005', '重置密码', '100', '5', '#', 'F', '0', 'system:user:resetPwd', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 角色管理按钮 +insert into sys_menu values('1006', '角色查询', '101', '1', '#', 'F', '0', 'system:role:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1007', '角色新增', '101', '2', '#', 'F', '0', 'system:role:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1008', '角色修改', '101', '3', '#', 'F', '0', 'system:role:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1009', '角色删除', '101', '4', '#', 'F', '0', 'system:role:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1010', '角色导出', '101', '4', '#', 'F', '0', 'system:role:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 菜单管理按钮 +insert into sys_menu values('1011', '菜单查询', '102', '1', '#', 'F', '0', 'system:menu:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1012', '菜单新增', '102', '2', '#', 'F', '0', 'system:menu:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1013', '菜单修改', '102', '3', '#', 'F', '0', 'system:menu:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1014', '菜单删除', '102', '4', '#', 'F', '0', 'system:menu:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 部门管理按钮 +insert into sys_menu values('1015', '部门查询', '103', '1', '#', 'F', '0', 'system:dept:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1016', '部门新增', '103', '2', '#', 'F', '0', 'system:dept:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1017', '部门修改', '103', '3', '#', 'F', '0', 'system:dept:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1018', '部门删除', '103', '4', '#', 'F', '0', 'system:dept:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 岗位管理按钮 +insert into sys_menu values('1019', '岗位查询', '104', '1', '#', 'F', '0', 'system:post:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1020', '岗位新增', '104', '2', '#', 'F', '0', 'system:post:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1021', '岗位修改', '104', '3', '#', 'F', '0', 'system:post:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1022', '岗位删除', '104', '4', '#', 'F', '0', 'system:post:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1023', '岗位导出', '104', '4', '#', 'F', '0', 'system:post:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 字典管理按钮 +insert into sys_menu values('1024', '字典查询', '105', '1', '#', 'F', '0', 'system:dict:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1025', '字典新增', '105', '2', '#', 'F', '0', 'system:dict:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1026', '字典修改', '105', '3', '#', 'F', '0', 'system:dict:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1027', '字典删除', '105', '4', '#', 'F', '0', 'system:dict:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1028', '字典导出', '105', '4', '#', 'F', '0', 'system:dict:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 参数设置按钮 +insert into sys_menu values('1029', '参数查询', '106', '1', '#', 'F', '0', 'system:config:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1030', '参数新增', '106', '2', '#', 'F', '0', 'system:config:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1031', '参数修改', '106', '3', '#', 'F', '0', 'system:config:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1032', '参数删除', '106', '4', '#', 'F', '0', 'system:config:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1033', '参数导出', '106', '4', '#', 'F', '0', 'system:config:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 通知公告按钮 +insert into sys_menu values('1034', '公告查询', '107', '1', '#', 'F', '0', 'system:notice:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1035', '公告新增', '107', '2', '#', 'F', '0', 'system:notice:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1036', '公告修改', '107', '3', '#', 'F', '0', 'system:notice:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1037', '公告删除', '107', '4', '#', 'F', '0', 'system:notice:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 操作日志按钮 +insert into sys_menu values('1038', '操作查询', '500', '1', '#', 'F', '0', 'monitor:operlog:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1039', '操作删除', '500', '2', '#', 'F', '0', 'monitor:operlog:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1040', '详细信息', '500', '3', '#', 'F', '0', 'monitor:operlog:detail', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1041', '日志导出', '500', '3', '#', 'F', '0', 'monitor:operlog:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 登录日志按钮 +insert into sys_menu values('1042', '登录查询', '501', '1', '#', 'F', '0', 'monitor:logininfor:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1043', '登录删除', '501', '2', '#', 'F', '0', 'monitor:logininfor:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1044', '日志导出', '501', '2', '#', 'F', '0', 'monitor:logininfor:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 在线用户按钮 +insert into sys_menu values('1045', '在线查询', '109', '1', '#', 'F', '0', 'monitor:online:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1046', '批量强退', '109', '2', '#', 'F', '0', 'monitor:online:batchForceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1047', '单条强退', '109', '3', '#', 'F', '0', 'monitor:online:forceLogout', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 定时任务按钮 +insert into sys_menu values('1048', '任务查询', '110', '1', '#', 'F', '0', 'monitor:job:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1049', '任务新增', '110', '2', '#', 'F', '0', 'monitor:job:add', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1050', '任务修改', '110', '3', '#', 'F', '0', 'monitor:job:edit', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1051', '任务删除', '110', '4', '#', 'F', '0', 'monitor:job:remove', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1052', '状态修改', '110', '5', '#', 'F', '0', 'monitor:job:changeStatus', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1053', '任务导出', '110', '5', '#', 'F', '0', 'monitor:job:export', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +-- 代码生成按钮 +insert into sys_menu values('1054', '生成查询', '113', '1', '#', 'F', '0', 'tool:gen:list', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_menu values('1055', '生成代码', '113', '2', '#', 'F', '0', 'tool:gen:code', '#', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); + + +-- ---------------------------- +-- 6、用户和角色关联表 用户N-1角色 +-- ---------------------------- +drop table if exists sys_user_role; +create table sys_user_role ( + user_id int(11) not null comment '用户ID', + role_id int(11) not null comment '角色ID', + primary key(user_id, role_id) +) engine=innodb default charset=utf8 comment = '用户和角色关联表'; + +-- ---------------------------- +-- 初始化-用户和角色关联表数据 +-- ---------------------------- +insert into sys_user_role values ('1', '1'); +insert into sys_user_role values ('2', '2'); + + +-- ---------------------------- +-- 7、角色和菜单关联表 角色1-N菜单 +-- ---------------------------- +drop table if exists sys_role_menu; +create table sys_role_menu ( + role_id int(11) not null comment '角色ID', + menu_id int(11) not null comment '菜单ID', + primary key(role_id, menu_id) +) engine=innodb default charset=utf8 comment = '角色和菜单关联表'; + +-- ---------------------------- +-- 初始化-角色和菜单关联表数据 +-- ---------------------------- +insert into sys_role_menu values ('2', '1'); +insert into sys_role_menu values ('2', '2'); +insert into sys_role_menu values ('2', '3'); +insert into sys_role_menu values ('2', '100'); +insert into sys_role_menu values ('2', '101'); +insert into sys_role_menu values ('2', '102'); +insert into sys_role_menu values ('2', '103'); +insert into sys_role_menu values ('2', '104'); +insert into sys_role_menu values ('2', '105'); +insert into sys_role_menu values ('2', '106'); +insert into sys_role_menu values ('2', '107'); +insert into sys_role_menu values ('2', '108'); +insert into sys_role_menu values ('2', '109'); +insert into sys_role_menu values ('2', '110'); +insert into sys_role_menu values ('2', '111'); +insert into sys_role_menu values ('2', '112'); +insert into sys_role_menu values ('2', '113'); +insert into sys_role_menu values ('2', '114'); +insert into sys_role_menu values ('2', '500'); +insert into sys_role_menu values ('2', '501'); +insert into sys_role_menu values ('2', '1000'); +insert into sys_role_menu values ('2', '1001'); +insert into sys_role_menu values ('2', '1002'); +insert into sys_role_menu values ('2', '1003'); +insert into sys_role_menu values ('2', '1004'); +insert into sys_role_menu values ('2', '1005'); +insert into sys_role_menu values ('2', '1006'); +insert into sys_role_menu values ('2', '1007'); +insert into sys_role_menu values ('2', '1008'); +insert into sys_role_menu values ('2', '1009'); +insert into sys_role_menu values ('2', '1010'); +insert into sys_role_menu values ('2', '1011'); +insert into sys_role_menu values ('2', '1012'); +insert into sys_role_menu values ('2', '1013'); +insert into sys_role_menu values ('2', '1014'); +insert into sys_role_menu values ('2', '1015'); +insert into sys_role_menu values ('2', '1016'); +insert into sys_role_menu values ('2', '1017'); +insert into sys_role_menu values ('2', '1018'); +insert into sys_role_menu values ('2', '1019'); +insert into sys_role_menu values ('2', '1020'); +insert into sys_role_menu values ('2', '1021'); +insert into sys_role_menu values ('2', '1022'); +insert into sys_role_menu values ('2', '1023'); +insert into sys_role_menu values ('2', '1024'); +insert into sys_role_menu values ('2', '1025'); +insert into sys_role_menu values ('2', '1026'); +insert into sys_role_menu values ('2', '1027'); +insert into sys_role_menu values ('2', '1028'); +insert into sys_role_menu values ('2', '1029'); +insert into sys_role_menu values ('2', '1030'); +insert into sys_role_menu values ('2', '1031'); +insert into sys_role_menu values ('2', '1032'); +insert into sys_role_menu values ('2', '1033'); +insert into sys_role_menu values ('2', '1034'); +insert into sys_role_menu values ('2', '1035'); +insert into sys_role_menu values ('2', '1036'); +insert into sys_role_menu values ('2', '1037'); +insert into sys_role_menu values ('2', '1038'); +insert into sys_role_menu values ('2', '1039'); +insert into sys_role_menu values ('2', '1040'); +insert into sys_role_menu values ('2', '1041'); +insert into sys_role_menu values ('2', '1042'); +insert into sys_role_menu values ('2', '1043'); +insert into sys_role_menu values ('2', '1044'); +insert into sys_role_menu values ('2', '1045'); +insert into sys_role_menu values ('2', '1046'); +insert into sys_role_menu values ('2', '1047'); +insert into sys_role_menu values ('2', '1048'); +insert into sys_role_menu values ('2', '1049'); +insert into sys_role_menu values ('2', '1050'); +insert into sys_role_menu values ('2', '1051'); +insert into sys_role_menu values ('2', '1052'); +insert into sys_role_menu values ('2', '1053'); +insert into sys_role_menu values ('2', '1054'); +insert into sys_role_menu values ('2', '1055'); + + +-- ---------------------------- +-- 8、角色和部门关联表 角色1-N部门 +-- ---------------------------- +drop table if exists sys_role_dept; +create table sys_role_dept ( + role_id int(11) not null comment '角色ID', + dept_id int(11) not null comment '部门ID', + primary key(role_id, dept_id) +) engine=innodb default charset=utf8 comment = '角色和部门关联表'; + +-- ---------------------------- +-- 初始化-角色和部门关联表数据 +-- ---------------------------- +insert into sys_role_dept values ('2', '100'); +insert into sys_role_dept values ('2', '101'); +insert into sys_role_dept values ('2', '105'); + +-- ---------------------------- +-- 9、用户与岗位关联表 用户1-N岗位 +-- ---------------------------- +drop table if exists sys_user_post; +create table sys_user_post +( + user_id int(11) not null comment '用户ID', + post_id int(11) not null comment '岗位ID', + primary key (user_id, post_id) +) engine=innodb default charset=utf8 comment = '用户与岗位关联表'; + +-- ---------------------------- +-- 初始化-用户与岗位关联表数据 +-- ---------------------------- +insert into sys_user_post values ('1', '1'); +insert into sys_user_post values ('2', '2'); + + +-- ---------------------------- +-- 10、操作日志记录 +-- ---------------------------- +drop table if exists sys_oper_log; +create table sys_oper_log ( + oper_id int(11) not null auto_increment comment '日志主键', + title varchar(50) default '' comment '模块标题', + business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)', + method varchar(100) default '' comment '方法名称', + operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)', + oper_name varchar(50) default '' comment '操作人员', + dept_name varchar(50) default '' comment '部门名称', + oper_url varchar(255) default '' comment '请求URL', + oper_ip varchar(30) default '' comment '主机地址', + oper_location varchar(255) default '' comment '操作地点', + oper_param varchar(255) default '' comment '请求参数', + status int(1) default 0 comment '操作状态(0正常 1异常)', + error_msg varchar(2000) default '' comment '错误消息', + oper_time datetime comment '操作时间', + primary key (oper_id) +) engine=innodb auto_increment=100 default charset=utf8 comment = '操作日志记录'; + + +-- ---------------------------- +-- 11、字典类型表 +-- ---------------------------- +drop table if exists sys_dict_type; +create table sys_dict_type +( + dict_id int(11) not null auto_increment comment '字典主键', + dict_name varchar(100) default '' comment '字典名称', + dict_type varchar(100) default '' comment '字典类型', + status char(1) default '0' comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (dict_id), + unique (dict_type) +) engine=innodb auto_increment=100 default charset=utf8 comment = '字典类型表'; + +insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '用户性别列表'); +insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '菜单状态列表'); +insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统开关列表'); +insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '任务状态列表'); +insert into sys_dict_type values(5, '系统是否', 'sys_yes_no', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统是否列表'); +insert into sys_dict_type values(6, '通知类型', 'sys_notice_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知类型列表'); +insert into sys_dict_type values(7, '通知状态', 'sys_notice_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知状态列表'); +insert into sys_dict_type values(8, '操作类型', 'sys_oper_type', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '操作类型列表'); +insert into sys_dict_type values(9, '系统状态', 'sys_common_status', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '登录状态列表'); + + +-- ---------------------------- +-- 12、字典数据表 +-- ---------------------------- +drop table if exists sys_dict_data; +create table sys_dict_data +( + dict_code int(11) not null auto_increment comment '字典编码', + dict_sort int(4) default 0 comment '字典排序', + dict_label varchar(100) default '' comment '字典标签', + dict_value varchar(100) default '' comment '字典键值', + dict_type varchar(100) default '' comment '字典类型', + css_class varchar(100) default '' comment '样式属性(其他样式扩展)', + list_class varchar(100) default '' comment '表格回显样式', + is_default char(1) default 'N' comment '是否默认(Y是 N否)', + status char(1) default '0' comment '状态(0正常 1停用)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (dict_code) +) engine=innodb auto_increment=100 default charset=utf8 comment = '字典数据表'; + + +insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别男'); +insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别女'); +insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '性别未知'); +insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '显示菜单'); +insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '隐藏菜单'); +insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); +insert into sys_dict_data values(10, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认是'); +insert into sys_dict_data values(11, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '系统默认否'); +insert into sys_dict_data values(12, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '通知'); +insert into sys_dict_data values(13, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '公告'); +insert into sys_dict_data values(14, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(15, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '关闭状态'); +insert into sys_dict_data values(16, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(17, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(18, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(19, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(20, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(21, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(22, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(23, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '新增操作'); +insert into sys_dict_data values(24, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '正常状态'); +insert into sys_dict_data values(25, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '停用状态'); + + +-- ---------------------------- +-- 13、参数配置表 +-- ---------------------------- +drop table if exists sys_config; +create table sys_config ( + config_id int(5) not null auto_increment comment '参数主键', + config_name varchar(100) default '' comment '参数名称', + config_key varchar(100) default '' comment '参数键名', + config_value varchar(100) default '' comment '参数键值', + config_type char(1) default 'N' comment '系统内置(Y是 N否)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注', + primary key (config_id) +) engine=innodb auto_increment=100 default charset=utf8 comment = '参数配置表'; + +insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-default', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '默认 skin-default、蓝色 skin-blue、黄色 skin-yellow' ); +insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '初始化密码 123456' ); + + +-- ---------------------------- +-- 14、系统访问记录 +-- ---------------------------- +drop table if exists sys_logininfor; +create table sys_logininfor ( + info_id int(11) not null auto_increment comment '访问ID', + login_name varchar(50) default '' comment '登录账号', + ipaddr varchar(50) default '' comment '登录IP地址', + login_location varchar(255) default '' comment '登录地点', + browser varchar(50) default '' comment '浏览器类型', + os varchar(50) default '' comment '操作系统', + status char(1) default '0' comment '登录状态(0成功 1失败)', + msg varchar(255) default '' comment '提示消息', + login_time datetime comment '访问时间', + primary key (info_id) +) engine=innodb auto_increment=100 default charset=utf8 comment = '系统访问记录'; + + +-- ---------------------------- +-- 15、在线用户记录 +-- ---------------------------- +drop table if exists sys_user_online; +create table sys_user_online ( + sessionId varchar(50) default '' comment '用户会话id', + login_name varchar(50) default '' comment '登录账号', + dept_name varchar(50) default '' comment '部门名称', + ipaddr varchar(50) default '' comment '登录IP地址', + login_location varchar(255) default '' comment '登录地点', + browser varchar(50) default '' comment '浏览器类型', + os varchar(50) default '' comment '操作系统', + status varchar(10) default '' comment '在线状态on_line在线off_line离线', + start_timestamp datetime comment 'session创建时间', + last_access_time datetime comment 'session最后访问时间', + expire_time int(5) default 0 comment '超时时间,单位为分钟', + primary key (sessionId) +) engine=innodb default charset=utf8 comment = '在线用户记录'; + + +-- ---------------------------- +-- 16、定时任务调度表 +-- ---------------------------- +drop table if exists sys_job; +create table sys_job ( + job_id int(11) not null auto_increment comment '任务ID', + job_name varchar(64) default '' comment '任务名称', + job_group varchar(64) default '' comment '任务组名', + method_name varchar(500) default '' comment '任务方法', + method_params varchar(200) default '' comment '方法参数', + cron_expression varchar(255) default '' comment 'cron执行表达式', + misfire_policy varchar(20) default '0' comment '计划执行错误策略(0默认 1继续 2等待 3放弃)', + status char(1) default '0' comment '状态(0正常 1暂停)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(500) default '' comment '备注信息', + primary key (job_id, job_name, job_group) +) engine=innodb auto_increment=100 default charset=utf8 comment = '定时任务调度表'; + +insert into sys_job values(1, 'ryTask', '系统默认(无参)', 'ryNoParams', '', '0/10 * * * * ?', '0', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); +insert into sys_job values(2, 'ryTask', '系统默认(有参)', 'ryParams', 'ry', '0/20 * * * * ?', '0', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', ''); + + +-- ---------------------------- +-- 17、定时任务调度日志表 +-- ---------------------------- +drop table if exists sys_job_log; +create table sys_job_log ( + job_log_id int(11) not null auto_increment comment '任务日志ID', + job_name varchar(64) not null comment '任务名称', + job_group varchar(64) not null comment '任务组名', + method_name varchar(500) comment '任务方法', + method_params varchar(200) default '' comment '方法参数', + job_message varchar(500) comment '日志信息', + status char(1) default '0' comment '执行状态(0正常 1失败)', + exception_info text comment '异常信息', + create_time datetime comment '创建时间', + primary key (job_log_id) +) engine=innodb default charset=utf8 comment = '定时任务调度日志表'; + + +-- ---------------------------- +-- 18、通知公告表 +-- ---------------------------- +drop table if exists sys_notice; +create table sys_notice ( + notice_id int(4) not null auto_increment comment '公告ID', + notice_title varchar(50) not null comment '公告标题', + notice_type char(2) not null comment '公告类型(1通知 2公告)', + notice_content varchar(500) not null comment '公告内容', + status char(1) default '0' comment '公告状态(0正常 1关闭)', + create_by varchar(64) default '' comment '创建者', + create_time datetime comment '创建时间', + update_by varchar(64) default '' comment '更新者', + update_time datetime comment '更新时间', + remark varchar(255) default '' comment '备注', + primary key (notice_id) +) engine=innodb auto_increment=10 default charset=utf8 comment = '通知公告表'; + +-- ---------------------------- +-- 初始化-公告信息表数据 +-- ---------------------------- +insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员'); \ No newline at end of file diff --git a/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js index 3e7d43ac..6e6fa372 100644 --- a/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js +++ b/src/main/resources/static/ajax/libs/bootstrap-table/bootstrap-table.min.js @@ -4,5 +4,5 @@ * Copyright (c) 2016 zhixin wen * Licensed MIT License */ -!function(a){"use strict";var b=null,c=function(a){var b=arguments,c=!0,d=1;return a=a.replace(/%s/g,function(){var a=b[d++];return"undefined"==typeof a?(c=!1,""):a}),c?a:""},d=function(b,c,d,e){var f="";return a.each(b,function(a,b){return b[c]===e?(f=b[d],!1):!0}),f},e=function(b,c){var d=-1;return a.each(b,function(a,b){return b.field===c?(d=a,!1):!0}),d},f=function(b){var c,d,e,f=0,g=[];for(c=0;cd;d++)g[c][d]=!1;for(c=0;ce;e++)g[c+e][k]=!0;for(e=0;j>e;e++)g[c][k+e]=!0}},g=function(){if(null===b){var c,d,e=a("

").addClass("fixed-table-scroll-inner"),f=a("

").addClass("fixed-table-scroll-outer");f.append(e),a("body").append(f),c=e[0].offsetWidth,f.css("overflow","scroll"),d=e[0].offsetWidth,c===d&&(d=f[0].clientWidth),f.remove(),b=c-d}return b},h=function(b,d,e,f){var g=d;if("string"==typeof d){var h=d.split(".");h.length>1?(g=window,a.each(h,function(a,b){g=g[b]})):g=window[d]}return"object"==typeof g?g:"function"==typeof g?g.apply(b,e):!g&&"string"==typeof d&&c.apply(this,[d].concat(e))?c.apply(this,[d].concat(e)):f},i=function(b,c,d){var e=Object.getOwnPropertyNames(b),f=Object.getOwnPropertyNames(c),g="";if(d&&e.length!==f.length)return!1;for(var h=0;h-1&&b[g]!==c[g])return!1;return!0},j=function(a){return"string"==typeof a?a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`"):a},k=function(b){var c=0;return b.children().each(function(){c0||navigator.userAgent.match(/Trident.*rv\:11\./))},o=function(){Object.keys||(Object.keys=function(){var a=Object.prototype.hasOwnProperty,b=!{toString:null}.propertyIsEnumerable("toString"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=c.length;return function(e){if("object"!=typeof e&&("function"!=typeof e||null===e))throw new TypeError("Object.keys called on non-object");var f,g,h=[];for(f in e)a.call(e,f)&&h.push(f);if(b)for(g=0;d>g;g++)a.call(e,c[g])&&h.push(c[g]);return h}}())},p=function(b,c){this.options=c,this.$el=a(b),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};p.DEFAULTS={classes:"table table-hover",locale:void 0,height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",sortStable:!1,striped:!1,columns:[[]],data:[],dataField:"rows",method:"get",url:void 0,ajax:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(a){return a},queryParamsType:"limit",responseHandler:function(a){return a},pagination:!1,onlyInfoPagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",paginationPreText:"‹",paginationNextText:"›",search:!1,searchOnEnterKey:!1,strictSearch:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,escape:!1,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,detailView:!1,detailFormatter:function(){return""},trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,silentSort:!0,maintainSelected:!1,searchTimeOut:500,searchText:"",iconSize:void 0,buttonsClass:"default",iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th",detailOpen:"glyphicon-plus icon-plus",detailClose:"glyphicon-minus icon-minus"},customSearch:a.noop,customSort:a.noop,rowStyle:function(){return{}},rowAttributes:function(){return{}},footerStyle:function(){return{}},onAll:function(){return!1},onClickCell:function(){return!1},onDblClickCell:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onCheckSome:function(){return!1},onUncheckSome:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onToggle:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1},onExpandRow:function(){return!1},onCollapseRow:function(){return!1},onRefreshOptions:function(){return!1},onRefresh:function(){return!1},onResetView:function(){return!1}},p.LOCALES={},p.LOCALES["en-US"]=p.LOCALES.en={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(a){return c("%s rows per page",a)},formatShowingRows:function(a,b,d){return c("Showing %s to %s of %s rows",a,b,d)},formatDetailPagination:function(a){return c("Showing %s rows",a)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},a.extend(p.DEFAULTS,p.LOCALES["en-US"]),p.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,titleTooltip:void 0,"class":void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,sortName:void 0,cellStyle:void 0,searchable:!0,searchFormatter:!0,cardVisible:!0},p.EVENTS={"all.bs.table":"onAll","click-cell.bs.table":"onClickCell","dbl-click-cell.bs.table":"onDblClickCell","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","check-some.bs.table":"onCheckSome","uncheck-some.bs.table":"onUncheckSome","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","toggle.bs.table":"onToggle","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader","expand-row.bs.table":"onExpandRow","collapse-row.bs.table":"onCollapseRow","refresh-options.bs.table":"onRefreshOptions","reset-view.bs.table":"onResetView","refresh.bs.table":"onRefresh"},p.prototype.init=function(){this.initLocale(),this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initSearchText(),this.initServer()},p.prototype.initLocale=function(){if(this.options.locale){var b=this.options.locale.split(/-|_/);b[0].toLowerCase(),b[1]&&b[1].toUpperCase(),a.fn.bootstrapTable.locales[this.options.locale]?a.extend(this.options,a.fn.bootstrapTable.locales[this.options.locale]):a.fn.bootstrapTable.locales[b.join("-")]?a.extend(this.options,a.fn.bootstrapTable.locales[b.join("-")]):a.fn.bootstrapTable.locales[b[0]]&&a.extend(this.options,a.fn.bootstrapTable.locales[b[0]])}},p.prototype.initContainer=function(){this.$container=a(['
','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"",'
','
','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"","
","
"].join("")),this.$container.insertAfter(this.$el),this.$tableContainer=this.$container.find(".fixed-table-container"),this.$tableHeader=this.$container.find(".fixed-table-header"),this.$tableBody=this.$container.find(".fixed-table-body"),this.$tableLoading=this.$container.find(".fixed-table-loading"),this.$tableFooter=this.$container.find(".fixed-table-footer"),this.$toolbar=this.$container.find(".fixed-table-toolbar"),this.$pagination=this.$container.find(".fixed-table-pagination"),this.$tableBody.append(this.$el),this.$container.after('
'),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped"),-1!==a.inArray("table-no-bordered",this.options.classes.split(" "))&&this.$tableContainer.addClass("table-no-bordered")},p.prototype.initTable=function(){var b=this,c=[],d=[];if(this.$header=this.$el.find(">thead"),this.$header.length||(this.$header=a("").appendTo(this.$el)),this.$header.find("tr").each(function(){var b=[];a(this).find("th").each(function(){"undefined"!=typeof a(this).data("field")&&a(this).data("field",a(this).data("field")+""),b.push(a.extend({},{title:a(this).html(),"class":a(this).attr("class"),titleTooltip:a(this).attr("title"),rowspan:a(this).attr("rowspan")?+a(this).attr("rowspan"):void 0,colspan:a(this).attr("colspan")?+a(this).attr("colspan"):void 0},a(this).data()))}),c.push(b)}),a.isArray(this.options.columns[0])||(this.options.columns=[this.options.columns]),this.options.columns=a.extend(!0,[],c,this.options.columns),this.columns=[],f(this.options.columns),a.each(this.options.columns,function(c,d){a.each(d,function(d,e){e=a.extend({},p.COLUMN_DEFAULTS,e),"undefined"!=typeof e.fieldIndex&&(b.columns[e.fieldIndex]=e),b.options.columns[c][d]=e})}),!this.options.data.length){var e=[];this.$el.find(">tbody>tr").each(function(c){var f={};f._id=a(this).attr("id"),f._class=a(this).attr("class"),f._data=l(a(this).data()),a(this).find(">td").each(function(d){for(var g,h,i=a(this),j=+i.attr("colspan")||1,k=+i.attr("rowspan")||1;e[c]&&e[c][d];d++);for(g=d;d+j>g;g++)for(h=c;c+k>h;h++)e[h]||(e[h]=[]),e[h][g]=!0;var m=b.columns[d].field;f[m]=a(this).html(),f["_"+m+"_id"]=a(this).attr("id"),f["_"+m+"_class"]=a(this).attr("class"),f["_"+m+"_rowspan"]=a(this).attr("rowspan"),f["_"+m+"_colspan"]=a(this).attr("colspan"),f["_"+m+"_title"]=a(this).attr("title"),f["_"+m+"_data"]=l(a(this).data())}),d.push(f)}),this.options.data=d,d.length&&(this.fromHtml=!0)}},p.prototype.initHeader=function(){var b=this,d={},e=[];this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],sortNames:[],cellStyles:[],searchables:[]},a.each(this.options.columns,function(f,g){e.push(""),0===f&&!b.options.cardView&&b.options.detailView&&e.push(c('
',b.options.columns.length)),a.each(g,function(a,f){var g="",h="",i="",j="",k=c(' class="%s"',f["class"]),l=(b.options.sortOrder||f.order,"px"),m=f.width;if(void 0===f.width||b.options.cardView||"string"==typeof f.width&&-1!==f.width.indexOf("%")&&(l="%"),f.width&&"string"==typeof f.width&&(m=f.width.replace("%","").replace("px","")),h=c("text-align: %s; ",f.halign?f.halign:f.align),i=c("text-align: %s; ",f.align),j=c("vertical-align: %s; ",f.valign),j+=c("width: %s; ",!f.checkbox&&!f.radio||m?m?m+l:void 0:"36px"),"undefined"!=typeof f.fieldIndex){if(b.header.fields[f.fieldIndex]=f.field,b.header.styles[f.fieldIndex]=i+j,b.header.classes[f.fieldIndex]=k,b.header.formatters[f.fieldIndex]=f.formatter,b.header.events[f.fieldIndex]=f.events,b.header.sorters[f.fieldIndex]=f.sorter,b.header.sortNames[f.fieldIndex]=f.sortName,b.header.cellStyles[f.fieldIndex]=f.cellStyle,b.header.searchables[f.fieldIndex]=f.searchable,!f.visible)return;if(b.options.cardView&&!f.cardVisible)return;d[f.field]=f}e.push(""),e.push(c('
',b.options.sortable&&f.sortable?"sortable both":"")),g=f.title,f.checkbox&&(!b.options.singleSelect&&b.options.checkboxHeader&&(g=''),b.header.stateField=f.field),f.radio&&(g="",b.header.stateField=f.field,b.options.singleSelect=!0),e.push(g),e.push("
"),e.push('
'),e.push("
"),e.push("")}),e.push("")}),this.$header.html(e.join("")),this.$header.find("th[data-field]").each(function(){a(this).data(d[a(this).data("field")])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(c){var d=a(this);return b.options.detailView&&d.closest(".bootstrap-table")[0]!==b.$container[0]?!1:void(b.options.sortable&&d.parent().data().sortable&&b.onSort(c))}),this.$header.children().children().off("keypress").on("keypress",function(c){if(b.options.sortable&&a(this).data().sortable){var d=c.keyCode||c.which;13==d&&b.onSort(c)}}),a(window).off("resize.bootstrap-table"),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$tableHeader.hide(),this.$tableLoading.css("top",0)):(this.$header.show(),this.$tableHeader.show(),this.$tableLoading.css("top",this.$header.outerHeight()+1),this.getCaret(),a(window).on("resize.bootstrap-table",a.proxy(this.resetWidth,this))),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$selectAll.off("click").on("click",function(){var c=a(this).prop("checked");b[c?"checkAll":"uncheckAll"](),b.updateSelected()})},p.prototype.initFooter=function(){!this.options.showFooter||this.options.cardView?this.$tableFooter.hide():this.$tableFooter.show()},p.prototype.initData=function(a,b){this.data="append"===b?this.data.concat(a):"prepend"===b?[].concat(a).concat(this.data):a||this.options.data,this.options.data="append"===b?this.options.data.concat(a):"prepend"===b?[].concat(a).concat(this.options.data):this.data,"server"!==this.options.sidePagination&&this.initSort()},p.prototype.initSort=function(){var b=this,c=this.options.sortName,d="desc"===this.options.sortOrder?-1:1,e=a.inArray(this.options.sortName,this.header.fields);return this.options.customSort!==a.noop?void this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]):void(-1!==e&&(this.options.sortStable&&a.each(this.data,function(a,b){b.hasOwnProperty("_position")||(b._position=a)}),this.data.sort(function(f,g){b.header.sortNames[e]&&(c=b.header.sortNames[e]);var i=m(f,c,b.options.escape),j=m(g,c,b.options.escape),k=h(b.header,b.header.sorters[e],[i,j]);return void 0!==k?d*k:((void 0===i||null===i)&&(i=""),(void 0===j||null===j)&&(j=""),b.options.sortStable&&i===j&&(i=f._position,j=g._position),a.isNumeric(i)&&a.isNumeric(j)?(i=parseFloat(i),j=parseFloat(j),j>i?-1*d:d):i===j?0:("string"!=typeof i&&(i=i.toString()),-1===i.localeCompare(j)?-1*d:d))})))},p.prototype.onSort=function(b){var c="keypress"===b.type?a(b.currentTarget):a(b.currentTarget).parent(),d=this.$header.find("th").eq(c.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===c.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=c.data("field"),this.options.sortOrder="asc"===c.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),c.add(d).data("order",this.options.sortOrder),this.getCaret(),"server"===this.options.sidePagination?void this.initServer(this.options.silentSort):(this.initSort(),void this.initBody())},p.prototype.initToolbar=function(){var b,d,e=this,f=[],g=0,i=0;this.$toolbar.find(".bs-bars").children().length&&a("body").append(a(this.options.toolbar)),this.$toolbar.html(""),("string"==typeof this.options.toolbar||"object"==typeof this.options.toolbar)&&a(c('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(a(this.options.toolbar)),f=[c('
',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=h(null,this.options.icons)),this.options.showPaginationSwitch&&f.push(c('"),this.options.showRefresh&&f.push(c('"),this.options.showToggle&&f.push(c('"),this.options.showColumns&&(f.push(c('
',this.options.formatColumns()),'",'","
")),f.push("
"),(this.showToolbar||f.length>2)&&this.$toolbar.append(f.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",a.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",a.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){e.toggleView()}),this.options.showColumns&&(b=this.$toolbar.find(".keep-open"),i<=this.options.minimumCountColumns&&b.find("input").prop("disabled",!0),b.find("li").off("click").on("click",function(a){a.stopImmediatePropagation()}),b.find("input").off("click").on("click",function(){var b=a(this);e.toggleColumn(a(this).val(),b.prop("checked"),!1),e.trigger("column-switch",a(this).data("field"),b.prop("checked"))})),this.options.search&&(f=[],f.push('"),this.$toolbar.append(f.join("")),d=this.$toolbar.find(".search input"),d.off("keyup drop").on("keyup drop",function(b){e.options.searchOnEnterKey&&13!==b.keyCode||a.inArray(b.keyCode,[37,38,39,40])>-1||(clearTimeout(g),g=setTimeout(function(){e.onSearch(b)},e.options.searchTimeOut))}),n()&&d.off("mouseup").on("mouseup",function(a){clearTimeout(g),g=setTimeout(function(){e.onSearch(a)},e.options.searchTimeOut)}))},p.prototype.onSearch=function(b){var c=a.trim(a(b.currentTarget).val());this.options.trimOnSearch&&a(b.currentTarget).val()!==c&&a(b.currentTarget).val(c),c!==this.searchText&&(this.searchText=c,this.options.searchText=c,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",c))},p.prototype.initSearch=function(){var b=this;if("server"!==this.options.sidePagination){if(this.options.customSearch!==a.noop)return void this.options.customSearch.apply(this,[this.searchText]);var c=this.searchText&&(this.options.escape?j(this.searchText):this.searchText).toLowerCase(),d=a.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=d?a.grep(this.options.data,function(b){for(var c in d)if(a.isArray(d[c])&&-1===a.inArray(b[c],d[c])||b[c]!==d[c])return!1;return!0}):this.options.data,this.data=c?a.grep(this.data,function(d,f){for(var g=0;g-1&&(n=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),m.push('
','',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),!this.options.onlyInfoPagination){m.push('');var r=[c('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",'"),m.push(this.options.formatRecordsPerPage(r.join(""))),m.push(""),m.push("
",'")}this.$pagination.html(m.join("")),this.options.onlyInfoPagination||(f=this.$pagination.find(".page-list a"),g=this.$pagination.find(".page-first"),h=this.$pagination.find(".page-pre"),i=this.$pagination.find(".page-next"),j=this.$pagination.find(".page-last"),k=this.$pagination.find(".page-number"),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(p.length<2||this.options.totalRows<=p[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),n&&(this.options.pageSize=this.options.formatAllRows()),f.off("click").on("click",a.proxy(this.onPageListChange,this)),g.off("click").on("click",a.proxy(this.onPageFirst,this)),h.off("click").on("click",a.proxy(this.onPagePre,this)),i.off("click").on("click",a.proxy(this.onPageNext,this)),j.off("click").on("click",a.proxy(this.onPageLast,this)),k.off("click").on("click",a.proxy(this.onPageNumber,this)))},p.prototype.updatePagination=function(b){b&&a(b.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},p.prototype.onPageListChange=function(b){var c=a(b.currentTarget);c.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=c.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+c.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(b)},p.prototype.onPageFirst=function(a){this.options.pageNumber=1,this.updatePagination(a)},p.prototype.onPagePre=function(a){this.options.pageNumber-1===0?this.options.pageNumber=this.options.totalPages:this.options.pageNumber--,this.updatePagination(a)},p.prototype.onPageNext=function(a){this.options.pageNumber+1>this.options.totalPages?this.options.pageNumber=1:this.options.pageNumber++,this.updatePagination(a)},p.prototype.onPageLast=function(a){this.options.pageNumber=this.totalPages,this.updatePagination(a)},p.prototype.onPageNumber=function(b){this.options.pageNumber!==+a(b.currentTarget).text()&&(this.options.pageNumber=+a(b.currentTarget).text(),this.updatePagination(b))},p.prototype.initBody=function(b){var f=this,g=[],i=this.getData();this.trigger("pre-body",i),this.$body=this.$el.find(">tbody"),this.$body.length||(this.$body=a("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=i.length);for(var k=this.pageFrom-1;k"),this.options.cardView&&g.push(c('
',this.header.fields.length)),!this.options.cardView&&this.options.detailView&&g.push("",'',c('',this.options.iconsPrefix,this.options.icons.detailOpen),"",""),a.each(this.header.fields,function(b,e){var i="",j=m(n,e,f.options.escape),l="",q={},r="",s=f.header.classes[b],t="",u="",v="",w="",x=f.columns[b];if(!(f.fromHtml&&"undefined"==typeof j||!x.visible||f.options.cardView&&!x.cardVisible)){if(o=c('style="%s"',p.concat(f.header.styles[b]).join("; ")),n["_"+e+"_id"]&&(r=c(' id="%s"',n["_"+e+"_id"])),n["_"+e+"_class"]&&(s=c(' class="%s"',n["_"+e+"_class"])),n["_"+e+"_rowspan"]&&(u=c(' rowspan="%s"',n["_"+e+"_rowspan"])),n["_"+e+"_colspan"]&&(v=c(' colspan="%s"',n["_"+e+"_colspan"])),n["_"+e+"_title"]&&(w=c(' title="%s"',n["_"+e+"_title"])),q=h(f.header,f.header.cellStyles[b],[j,n,k,e],q),q.classes&&(s=c(' class="%s"',q.classes)),q.css){var y=[];for(var z in q.css)y.push(z+": "+q.css[z]);o=c('style="%s"',y.concat(f.header.styles[b]).join("; "))}j=h(x,f.header.formatters[b],[j,n,k],j),n["_"+e+"_data"]&&!a.isEmptyObject(n["_"+e+"_data"])&&a.each(n["_"+e+"_data"],function(a,b){"index"!==a&&(t+=c(' data-%s="%s"',a,b))}),x.checkbox||x.radio?(l=x.checkbox?"checkbox":l,l=x.radio?"radio":l,i=[c(f.options.cardView?'
':'',x["class"]||""),"",f.header.formatters[b]&&"string"==typeof j?j:"",f.options.cardView?"
":""].join(""),n[f.header.stateField]=j===!0||j&&j.checked):(j="undefined"==typeof j||null===j?f.options.undefinedText:j,i=f.options.cardView?['
',f.options.showHeader?c('%s',o,d(f.columns,"field","title",e)):"",c('%s',j),"
"].join(""):[c("",r,s,o,t,u,v,w),j,""].join(""),f.options.cardView&&f.options.smartDisplay&&""===j&&(i='
')),g.push(i)}}),this.options.cardView&&g.push("
"),g.push("")}g.length||g.push('',c('%s',this.$header.find("th").length,this.options.formatNoMatches()),""),this.$body.html(g.join("")),b||this.scrollTo(0),this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(b){var d=a(this),g=d.parent(),h=f.data[g.data("index")],i=d[0].cellIndex,j=f.getVisibleFields(),k=j[f.options.detailView&&!f.options.cardView?i-1:i],l=f.columns[e(f.columns,k)],n=m(h,k,f.options.escape);if(!d.find(".detail-icon").length&&(f.trigger("click"===b.type?"click-cell":"dbl-click-cell",k,n,h,d),f.trigger("click"===b.type?"click-row":"dbl-click-row",h,g,k), -"click"===b.type&&f.options.clickToSelect&&l.clickToSelect)){var o=g.find(c('[name="%s"]',f.options.selectItemName));o.length&&o[0].click()}}),this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var b=a(this),d=b.parent().parent(),e=d.data("index"),g=i[e];if(d.next().is("tr.detail-view"))b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailOpen)),d.next().remove(),f.trigger("collapse-row",e,g);else{b.find("i").attr("class",c("%s %s",f.options.iconsPrefix,f.options.icons.detailClose)),d.after(c('',d.find("td").length));var j=d.next().find("td"),k=h(f.options,f.options.detailFormatter,[e,g,j],"");1===j.length&&j.append(k),f.trigger("expand-row",e,g,j)}f.resetView()}),this.$selectItem=this.$body.find(c('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(b){b.stopImmediatePropagation();var c=a(this),d=c.prop("checked"),e=f.data[c.data("index")];f.options.maintainSelected&&a(this).is(":radio")&&a.each(f.options.data,function(a,b){b[f.header.stateField]=!1}),e[f.header.stateField]=d,f.options.singleSelect&&(f.$selectItem.not(this).each(function(){f.data[a(this).data("index")][f.header.stateField]=!1}),f.$selectItem.filter(":checked").not(this).prop("checked",!1)),f.updateSelected(),f.trigger(d?"check":"uncheck",e,c)}),a.each(this.header.events,function(b,c){if(c){"string"==typeof c&&(c=h(null,c));var d=f.header.fields[b],e=a.inArray(d,f.getVisibleFields());f.options.detailView&&!f.options.cardView&&(e+=1);for(var g in c)f.$body.find(">tr:not(.no-records-found)").each(function(){var b=a(this),h=b.find(f.options.cardView?".card-view":"td").eq(e),i=g.indexOf(" "),j=g.substring(0,i),k=g.substring(i+1),l=c[g];h.find(k).off(j).on(j,function(a){var c=b.data("index"),e=f.data[c],g=e[d];l.apply(this,[a,g,e,c])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body",i)},p.prototype.initServer=function(b,c,d){var e,f=this,g={},i={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.pagination&&(i.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,i.pageNumber=this.options.pageNumber),(d||this.options.url||this.options.ajax)&&("limit"===this.options.queryParamsType&&(i={search:i.searchText,sort:i.sortName,order:i.sortOrder},this.options.pagination&&(i.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1),i.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize)),a.isEmptyObject(this.filterColumnsPartial)||(i.filter=JSON.stringify(this.filterColumnsPartial,null)),g=h(this.options,this.options.queryParams,[i],g),a.extend(g,c||{}),g!==!1&&(b||this.$tableLoading.show(),e=a.extend({},h(null,this.options.ajaxOptions),{type:this.options.method,url:d||this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(g):g,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(a){a=h(f.options,f.options.responseHandler,[a],a),f.load(a),f.trigger("load-success",a),b||f.$tableLoading.hide()},error:function(a){f.trigger("load-error",a.status,a),b||f.$tableLoading.hide()}}),this.options.ajax?h(this,this.options.ajax,[e],null):(this._xhr&&4!==this._xhr.readyState&&this._xhr.abort(),this._xhr=a.ajax(e))))},p.prototype.initSearchText=function(){if(this.options.search&&""!==this.options.searchText){var a=this.$toolbar.find(".search input");a.val(this.options.searchText),this.onSearch({currentTarget:a})}},p.prototype.getCaret=function(){var b=this;a.each(this.$header.find("th"),function(c,d){a(d).find(".sortable").removeClass("desc asc").addClass(a(d).data("field")===b.options.sortName?b.options.sortOrder:"both")})},p.prototype.updateSelected=function(){var b=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",b),this.$selectItem.each(function(){a(this).closest("tr")[a(this).prop("checked")?"addClass":"removeClass"]("selected")})},p.prototype.updateRows=function(){var b=this;this.$selectItem.each(function(){b.data[a(this).data("index")][b.header.stateField]=a(this).prop("checked")})},p.prototype.resetRows=function(){var b=this;a.each(this.data,function(a,c){b.$selectAll.prop("checked",!1),b.$selectItem.prop("checked",!1),b.header.stateField&&(c[b.header.stateField]=!1)})},p.prototype.trigger=function(b){var c=Array.prototype.slice.call(arguments,1);b+=".bs.table",this.options[p.EVENTS[b]].apply(this.options,c),this.$el.trigger(a.Event(b),c),this.options.onAll(b,c),this.$el.trigger(a.Event("all.bs.table"),[b,c])},p.prototype.resetHeader=function(){clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(a.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},p.prototype.fitHeader=function(){var b,d,e,f,h=this;if(h.$el.is(":hidden"))return void(h.timeoutId_=setTimeout(a.proxy(h.fitHeader,h),100));if(b=this.$tableBody.get(0),d=b.scrollWidth>b.clientWidth&&b.scrollHeight>b.clientHeight+this.$header.outerHeight()?g():0,this.$el.css("margin-top",-this.$header.outerHeight()),e=a(":focus"),e.length>0){var i=e.parents("th");if(i.length>0){var j=i.attr("data-field");if(void 0!==j){var k=this.$header.find("[data-field='"+j+"']");k.length>0&&k.find(":input").addClass("focus-temp")}}}this.$header_=this.$header.clone(!0,!0),this.$selectAll_=this.$header_.find('[name="btSelectAll"]'),this.$tableHeader.css({"margin-right":d}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_),f=a(".focus-temp:visible:eq(0)"),f.length>0&&(f.focus(),this.$header.find(".focus-temp").removeClass("focus-temp")),this.$header.find("th[data-field]").each(function(){h.$header_.find(c('th[data-field="%s"]',a(this).data("field"))).data(a(this).data())});var l=this.getVisibleFields(),m=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(b){var d=a(this),e=b;h.options.detailView&&!h.options.cardView&&(0===b&&h.$header_.find("th.detail").find(".fht-cell").width(d.innerWidth()),e=b-1);var f=h.$header_.find(c('th[data-field="%s"]',l[e]));f.length>1&&(f=a(m[d[0].cellIndex])),f.find(".fht-cell").width(d.innerWidth())}),this.$tableBody.off("scroll").on("scroll",function(){h.$tableHeader.scrollLeft(a(this).scrollLeft()),h.options.showFooter&&!h.options.cardView&&h.$tableFooter.scrollLeft(a(this).scrollLeft())}),h.trigger("post-header")},p.prototype.resetFooter=function(){var b=this,d=b.getData(),e=[];this.options.showFooter&&!this.options.cardView&&(!this.options.cardView&&this.options.detailView&&e.push('
 
'),a.each(this.columns,function(a,f){var g,i="",j="",k=[],l={},m=c(' class="%s"',f["class"]);if(f.visible&&(!b.options.cardView||f.cardVisible)){if(i=c("text-align: %s; ",f.falign?f.falign:f.align),j=c("vertical-align: %s; ",f.valign),l=h(null,b.options.footerStyle),l&&l.css)for(g in l.css)k.push(g+": "+l.css[g]);e.push(""),e.push('
'),e.push(h(f,f.footerFormatter,[d]," ")||" "),e.push("
"),e.push('
'),e.push(""),e.push("")}}),this.$tableFooter.find("tr").html(e.join("")),this.$tableFooter.show(),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},p.prototype.fitFooter=function(){var b,c,d;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(a.proxy(this.fitFooter,this),100)):(c=this.$el.css("width"),d=c>this.$tableBody.width()?g():0,this.$tableFooter.css({"margin-right":d}).find("table").css("width",c).attr("class",this.$el.attr("class")),b=this.$tableFooter.find("td"),void this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(c){var d=a(this);b.eq(c).find(".fht-cell").width(d.innerWidth())}))},p.prototype.toggleColumn=function(a,b,d){if(-1!==a&&(this.columns[a].visible=b,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var e=this.$toolbar.find(".keep-open input").prop("disabled",!1);d&&e.filter(c('[value="%s"]',a)).prop("checked",b),e.filter(":checked").length<=this.options.minimumCountColumns&&e.filter(":checked").prop("disabled",!0)}},p.prototype.toggleRow=function(a,b,d){-1!==a&&this.$body.find("undefined"!=typeof a?c('tr[data-index="%s"]',a):c('tr[data-uniqueid="%s"]',b))[d?"show":"hide"]()},p.prototype.getVisibleFields=function(){var b=this,c=[];return a.each(this.header.fields,function(a,d){var f=b.columns[e(b.columns,d)];f.visible&&c.push(d)}),c},p.prototype.resetView=function(a){var b=0;if(a&&a.height&&(this.options.height=a.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var c=k(this.$toolbar),d=k(this.$pagination),e=this.options.height-c-d;this.$tableContainer.css("height",e+"px")}return this.options.cardView?(this.$el.css("margin-top","0"),this.$tableContainer.css("padding-bottom","0"),void this.$tableFooter.hide()):(this.options.showHeader&&this.options.height?(this.$tableHeader.show(),this.resetHeader(),b+=this.$header.outerHeight()):(this.$tableHeader.hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(b+=this.$tableFooter.outerHeight()+1)),this.getCaret(),this.$tableContainer.css("padding-bottom",b+"px"),void this.trigger("reset-view"))},p.prototype.getData=function(b){return!this.searchText&&a.isEmptyObject(this.filterColumns)&&a.isEmptyObject(this.filterColumnsPartial)?b?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data:b?this.data.slice(this.pageFrom-1,this.pageTo):this.data},p.prototype.load=function(b){var c=!1;"server"===this.options.sidePagination?(this.options.totalRows=b.total,c=b.fixedScroll,b=b[this.options.dataField]):a.isArray(b)||(c=b.fixedScroll,b=b.data),this.initData(b),this.initSearch(),this.initPagination(),this.initBody(c)},p.prototype.append=function(a){this.initData(a,"append"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.prepend=function(a){this.initData(a,"prepend"),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0)},p.prototype.remove=function(b){var c,d,e=this.options.data.length;if(b.hasOwnProperty("field")&&b.hasOwnProperty("values")){for(c=e-1;c>=0;c--)d=this.options.data[c],d.hasOwnProperty(b.field)&&-1!==a.inArray(d[b.field],b.values)&&this.options.data.splice(c,1);e!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))}},p.prototype.removeAll=function(){this.options.data.length>0&&(this.options.data.splice(0,this.options.data.length),this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.getRowByUniqueId=function(a){var b,c,d,e=this.options.uniqueId,f=this.options.data.length,g=null;for(b=f-1;b>=0;b--){if(c=this.options.data[b],c.hasOwnProperty(e))d=c[e];else{if(!c._data.hasOwnProperty(e))continue;d=c._data[e]}if("string"==typeof d?a=a.toString():"number"==typeof d&&(Number(d)===d&&d%1===0?a=parseInt(a):d===Number(d)&&0!==d&&(a=parseFloat(a))),d===a){g=c;break}}return g},p.prototype.removeByUniqueId=function(a){var b=this.options.data.length,c=this.getRowByUniqueId(a);c&&this.options.data.splice(this.options.data.indexOf(c),1),b!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))},p.prototype.updateByUniqueId=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){var e;d.hasOwnProperty("id")&&d.hasOwnProperty("row")&&(e=a.inArray(c.getRowByUniqueId(d.id),c.options.data),-1!==e&&a.extend(c.options.data[e],d.row))}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.insertRow=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("row")&&(this.data.splice(a.index,0,a.row),this.initSearch(),this.initPagination(),this.initSort(),this.initBody(!0))},p.prototype.updateRow=function(b){var c=this,d=a.isArray(b)?b:[b];a.each(d,function(b,d){d.hasOwnProperty("index")&&d.hasOwnProperty("row")&&a.extend(c.options.data[d.index],d.row)}),this.initSearch(),this.initSort(),this.initBody(!0)},p.prototype.showRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!0)},p.prototype.hideRow=function(a){(a.hasOwnProperty("index")||a.hasOwnProperty("uniqueId"))&&this.toggleRow(a.index,a.uniqueId,!1)},p.prototype.getRowsHidden=function(b){var c=a(this.$body[0]).children().filter(":hidden"),d=0;if(b)for(;dtr");if(this.options.detailView&&!this.options.cardView&&(g+=1),e=j.eq(f).find(">td").eq(g),!(0>f||0>g||f>=this.data.length)){for(c=f;f+h>c;c++)for(d=g;g+i>d;d++)j.eq(c).find(">td").eq(d).hide();e.attr("rowspan",h).attr("colspan",i).show()}},p.prototype.updateCell=function(a){a.hasOwnProperty("index")&&a.hasOwnProperty("field")&&a.hasOwnProperty("value")&&(this.data[a.index][a.field]=a.value,a.reinit!==!1&&(this.initSort(),this.initBody(!0)))},p.prototype.getOptions=function(){return this.options},p.prototype.getSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.getAllSelections=function(){var b=this;return a.grep(this.options.data,function(a){return a[b.header.stateField]})},p.prototype.checkAll=function(){this.checkAll_(!0)},p.prototype.uncheckAll=function(){this.checkAll_(!1)},p.prototype.checkInvert=function(){var b=this,c=b.$selectItem.filter(":enabled"),d=c.filter(":checked");c.each(function(){a(this).prop("checked",!a(this).prop("checked"))}),b.updateRows(),b.updateSelected(),b.trigger("uncheck-some",d),d=b.getSelections(),b.trigger("check-some",d)},p.prototype.checkAll_=function(a){var b;a||(b=this.getSelections()),this.$selectAll.add(this.$selectAll_).prop("checked",a),this.$selectItem.filter(":enabled").prop("checked",a),this.updateRows(),a&&(b=this.getSelections()),this.trigger(a?"check-all":"uncheck-all",b)},p.prototype.check=function(a){this.check_(!0,a)},p.prototype.uncheck=function(a){this.check_(!1,a)},p.prototype.check_=function(a,b){var d=this.$selectItem.filter(c('[data-index="%s"]',b)).prop("checked",a);this.data[b][this.header.stateField]=a,this.updateSelected(),this.trigger(a?"check":"uncheck",this.data[b],d)},p.prototype.checkBy=function(a){this.checkBy_(!0,a)},p.prototype.uncheckBy=function(a){this.checkBy_(!1,a)},p.prototype.checkBy_=function(b,d){if(d.hasOwnProperty("field")&&d.hasOwnProperty("values")){var e=this,f=[];a.each(this.options.data,function(g,h){if(!h.hasOwnProperty(d.field))return!1;if(-1!==a.inArray(h[d.field],d.values)){var i=e.$selectItem.filter(":enabled").filter(c('[data-index="%s"]',g)).prop("checked",b);h[e.header.stateField]=b,f.push(h),e.trigger(b?"check":"uncheck",h,i)}}),this.updateSelected(),this.trigger(b?"check-some":"uncheck-some",f)}},p.prototype.destroy=function(){this.$el.insertBefore(this.$container),a(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},p.prototype.showLoading=function(){this.$tableLoading.show()},p.prototype.hideLoading=function(){this.$tableLoading.hide()},p.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var a=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):a.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},p.prototype.refresh=function(a){a&&a.url&&(this.options.pageNumber=1),this.initServer(a&&a.silent,a&&a.query,a&&a.url),this.trigger("refresh",a)},p.prototype.resetWidth=function(){this.options.showHeader&&this.options.height&&this.fitHeader(),this.options.showFooter&&this.fitFooter()},p.prototype.showColumn=function(a){this.toggleColumn(e(this.columns,a),!0,!0)},p.prototype.hideColumn=function(a){this.toggleColumn(e(this.columns,a),!1,!0)},p.prototype.getHiddenColumns=function(){return a.grep(this.columns,function(a){return!a.visible})},p.prototype.getVisibleColumns=function(){return a.grep(this.columns,function(a){return a.visible})},p.prototype.toggleAllColumns=function(b){if(a.each(this.columns,function(a){this.columns[a].visible=b}),this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns){var c=this.$toolbar.find(".keep-open input").prop("disabled",!1);c.filter(":checked").length<=this.options.minimumCountColumns&&c.filter(":checked").prop("disabled",!0)}},p.prototype.showAllColumns=function(){this.toggleAllColumns(!0)},p.prototype.hideAllColumns=function(){this.toggleAllColumns(!1)},p.prototype.filterBy=function(b){this.filterColumns=a.isEmptyObject(b)?{}:b,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},p.prototype.scrollTo=function(a){return"string"==typeof a&&(a="bottom"===a?this.$tableBody[0].scrollHeight:0),"number"==typeof a&&this.$tableBody.scrollTop(a),"undefined"==typeof a?this.$tableBody.scrollTop():void 0},p.prototype.getScrollPosition=function(){return this.scrollTo()},p.prototype.selectPage=function(a){a>0&&a<=this.options.totalPages&&(this.options.pageNumber=a,this.updatePagination())},p.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},p.prototype.nextPage=function(){this.options.pageNumber tr[data-index="%s"]',b));d.next().is("tr.detail-view")===(a?!1:!0)&&d.find("> td > .detail-icon").click()},p.prototype.expandRow=function(a){this.expandRow_(!0,a)},p.prototype.collapseRow=function(a){this.expandRow_(!1,a)},p.prototype.expandAllRows=function(b){if(b){var d=this.$body.find(c('> tr[data-index="%s"]',0)),e=this,f=null,g=!1,h=-1;if(d.next().is("tr.detail-view")?d.next().next().is("tr.detail-view")||(d.next().find(".detail-icon").click(),g=!0):(d.find("> td > .detail-icon").click(),g=!0),g)try{h=setInterval(function(){f=e.$body.find("tr.detail-view").last().find(".detail-icon"),f.length>0?f.click():clearInterval(h)},1)}catch(i){clearInterval(h)}}else for(var j=this.$body.children(),k=0;k").addClass("fixed-table-scroll-inner"),u=j("
").addClass("fixed-table-scroll-outer"),s,r;u.append(t);j("body").append(u);s=t[0].offsetWidth;u.css("overflow","scroll");r=t[0].offsetWidth;if(s===r){r=u[0].clientWidth}u.remove();k=s-r}return k};var q=function(s,u,t,r){var v=u;if(typeof u==="string"){var w=u.split(".");if(w.length>1){v=window;j.each(w,function(x,y){v=v[y]})}else{v=window[u]}}if(typeof v==="object"){return v}if(typeof v==="function"){return v.apply(s,t)}if(!v&&typeof u==="string"&&m.apply(this,[u].concat(t))){return m.apply(this,[u].concat(t))}return r};var f=function(s,r,w){var x=Object.getOwnPropertyNames(s),u=Object.getOwnPropertyNames(r),v="";if(w){if(x.length!==u.length){return false}}for(var t=0;t-1){if(s[v]!==r[v]){return false}}}return true};var p=function(r){if(typeof r==="string"){return r.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")}return r};var d=function(s){var r=0;s.children().each(function(){if(r0||!!navigator.userAgent.match(/Trident.*rv\:11\./))};var h=function(){if(!Object.keys){Object.keys=(function(){var t=Object.prototype.hasOwnProperty,u=!({toString:null}).propertyIsEnumerable("toString"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=s.length;return function(x){if(typeof x!=="object"&&(typeof x!=="function"||x===null)){throw new TypeError("Object.keys called on non-object")}var v=[],y,w;for(y in x){if(t.call(x,y)){v.push(y)}}if(u){for(w=0;w','
',this.options.paginationVAlign==="top"||this.options.paginationVAlign==="both"?'
':"",'
','
','
','
',this.options.formatLoadingMessage(),"
","
",'',this.options.paginationVAlign==="bottom"||this.options.paginationVAlign==="both"?'
':"","
","
"].join(""));this.$container.insertAfter(this.$el);this.$tableContainer=this.$container.find(".fixed-table-container");this.$tableHeader=this.$container.find(".fixed-table-header");this.$tableBody=this.$container.find(".fixed-table-body");this.$tableLoading=this.$container.find(".fixed-table-loading");this.$tableFooter=this.$container.find(".fixed-table-footer");this.$toolbar=this.$container.find(".fixed-table-toolbar");this.$pagination=this.$container.find(".fixed-table-pagination");this.$tableBody.append(this.$el);this.$container.after('
');this.$el.addClass(this.options.classes);if(this.options.striped){this.$el.addClass("table-striped")}if(j.inArray("table-no-bordered",this.options.classes.split(" "))!==-1){this.$tableContainer.addClass("table-no-bordered")}};e.prototype.initTable=function(){var t=this,s=[],u=[];this.$header=this.$el.find(">thead");if(!this.$header.length){this.$header=j("").appendTo(this.$el)}this.$header.find("tr").each(function(){var v=[];j(this).find("th").each(function(){if(typeof j(this).data("field")!=="undefined"){j(this).data("field",j(this).data("field")+"")}v.push(j.extend({},{title:j(this).html(),"class":j(this).attr("class"),titleTooltip:j(this).attr("title"),rowspan:j(this).attr("rowspan")?+j(this).attr("rowspan"):undefined,colspan:j(this).attr("colspan")?+j(this).attr("colspan"):undefined},j(this).data()))});s.push(v)});if(!j.isArray(this.options.columns[0])){this.options.columns=[this.options.columns]}this.options.columns=j.extend(true,[],s,this.options.columns);this.columns=[];l(this.options.columns);j.each(this.options.columns,function(w,v){j.each(v,function(x,y){y=j.extend({},e.COLUMN_DEFAULTS,y);if(typeof y.fieldIndex!=="undefined"){t.columns[y.fieldIndex]=y}t.options.columns[w][x]=y})});if(this.options.data.length){return}var r=[];this.$el.find(">tbody>tr").each(function(w){var v={};v._id=j(this).attr("id");v._class=j(this).attr("class");v._data=g(j(this).data());j(this).find(">td").each(function(z){var E=j(this),B=+E.attr("colspan")||1,C=+E.attr("rowspan")||1,A,y;for(;r[w]&&r[w][z];z++){}for(A=z;A");if(v===0&&!t.options.cardView&&t.options.detailView){s.push(m('
',t.options.columns.length))}j.each(u,function(B,A){var F="",C="",E="",w="",D=m(' class="%s"',A["class"]),z=t.options.sortOrder||A.order,y="px",x=A.width;if(A.width!==undefined&&(!t.options.cardView)){if(typeof A.width==="string"){if(A.width.indexOf("%")!==-1){y="%"}}}if(A.width&&typeof A.width==="string"){x=A.width.replace("%","").replace("px","")}C=m("text-align: %s; ",A.halign?A.halign:A.align);E=m("text-align: %s; ",A.align);w=m("vertical-align: %s; ",A.valign);w+=m("width: %s; ",(A.checkbox||A.radio)&&!x?"36px":(x?x+y:undefined));if(typeof A.fieldIndex!=="undefined"){t.header.fields[A.fieldIndex]=A.field;t.header.styles[A.fieldIndex]=E+w;t.header.classes[A.fieldIndex]=D;t.header.formatters[A.fieldIndex]=A.formatter;t.header.events[A.fieldIndex]=A.events;t.header.sorters[A.fieldIndex]=A.sorter;t.header.sortNames[A.fieldIndex]=A.sortName;t.header.cellStyles[A.fieldIndex]=A.cellStyle;t.header.searchables[A.fieldIndex]=A.searchable;if(!A.visible){return}if(t.options.cardView&&(!A.cardVisible)){return}r[A.field]=A}s.push("");s.push(m('
',t.options.sortable&&A.sortable?"sortable both":""));F=A.title;if(A.checkbox){if(!t.options.singleSelect&&t.options.checkboxHeader){F=''}t.header.stateField=A.field}if(A.radio){F="";t.header.stateField=A.field;t.options.singleSelect=true}s.push(F);s.push("
");s.push('
');s.push("");s.push("")});s.push("")});this.$header.html(s.join(""));this.$header.find("th[data-field]").each(function(u){j(this).data(r[j(this).data("field")])});this.$container.off("click",".th-inner").on("click",".th-inner",function(u){var v=j(this);if(t.options.detailView){if(v.closest(".bootstrap-table")[0]!==t.$container[0]){return false}}if(t.options.sortable&&v.parent().data().sortable){t.onSort(u)}});this.$header.children().children().off("keypress").on("keypress",function(v){if(t.options.sortable&&j(this).data().sortable){var u=v.keyCode||v.which;if(u==13){t.onSort(v)}}});j(window).off("resize.bootstrap-table");if(!this.options.showHeader||this.options.cardView){this.$header.hide();this.$tableHeader.hide();this.$tableLoading.css("top",0)}else{this.$header.show();this.$tableHeader.show();this.$tableLoading.css("top",this.$header.outerHeight()+1);this.getCaret();j(window).on("resize.bootstrap-table",j.proxy(this.resetWidth,this))}this.$selectAll=this.$header.find('[name="btSelectAll"]');this.$selectAll.off("click").on("click",function(){var u=j(this).prop("checked");t[u?"checkAll":"uncheckAll"]();t.updateSelected()})};e.prototype.initFooter=function(){if(!this.options.showFooter||this.options.cardView){this.$tableFooter.hide()}else{this.$tableFooter.show()}};e.prototype.initData=function(s,r){if(r==="append"){this.data=this.data.concat(s)}else{if(r==="prepend"){this.data=[].concat(s).concat(this.data)}else{this.data=s||this.options.data}}if(r==="append"){this.options.data=this.options.data.concat(s)}else{if(r==="prepend"){this.options.data=[].concat(s).concat(this.options.data)}else{this.options.data=this.data}}if(this.options.sidePagination==="server"){return}this.initSort()};e.prototype.initSort=function(){var u=this,t=this.options.sortName,r=this.options.sortOrder==="desc"?-1:1,s=j.inArray(this.options.sortName,this.header.fields);if(this.options.customSort!==j.noop){this.options.customSort.apply(this,[this.options.sortName,this.options.sortOrder]);return}if(s!==-1){if(this.options.sortStable){j.each(this.data,function(v,w){if(!w.hasOwnProperty("_position")){w._position=v}})}this.data.sort(function(w,v){if(u.header.sortNames[s]){t=u.header.sortNames[s]}var y=o(w,t,u.options.escape),z=o(v,t,u.options.escape),x=q(u.header,u.header.sorters[s],[y,z]);if(x!==undefined){return r*x}if(y===undefined||y===null){y=""}if(z===undefined||z===null){z=""}if(u.options.sortStable&&y===z){y=w._position;z=v._position}if(j.isNumeric(y)&&j.isNumeric(z)){y=parseFloat(y);z=parseFloat(z);if(y',this.options.toolbarAlign)).appendTo(this.$toolbar).append(j(this.options.toolbar))}t=[m('
',this.options.buttonsAlign,this.options.buttonsAlign)];if(typeof this.options.icons==="string"){this.options.icons=q(null,this.options.icons)}if(this.options.showSearch){t.push(m('")}if(this.options.showPaginationSwitch){t.push(m('")}if(this.options.showRefresh){t.push(m('")}if(this.options.showToggle){t.push(m('")}if(this.options.showColumns){t.push(m('
',this.options.formatColumns()),'",'","
")}t.push("
");if(this.showToolbar||t.length>2){this.$toolbar.append(t.join(""))}if(this.options.showPaginationSwitch){this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",j.proxy(this.togglePagination,this))}if(this.options.showRefresh){this.$toolbar.find('button[name="refresh"]').off("click").on("click",j.proxy(this.refresh,this))}if(this.options.showToggle){this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){u.toggleView()})}if(this.options.showSearch){this.$toolbar.find('button[name="showSearch"]').off("click").on("click",function(){j(".search-collapse").slideToggle()})}if(this.options.showColumns){s=this.$toolbar.find(".keep-open");if(r<=this.options.minimumCountColumns){s.find("input").prop("disabled",true)}s.find("li").off("click").on("click",function(x){x.stopImmediatePropagation()});s.find("input").off("click").on("click",function(){var x=j(this);u.toggleColumn(j(this).val(),x.prop("checked"),false);u.trigger("column-switch",j(this).data("field"),x.prop("checked"))})}if(this.options.search){t=[];t.push('");this.$toolbar.append(t.join(""));v=this.$toolbar.find(".search input");v.off("keyup drop").on("keyup drop",function(x){if(u.options.searchOnEnterKey&&x.keyCode!==13){return}if(j.inArray(x.keyCode,[37,38,39,40])>-1){return}clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)});if(b()){v.off("mouseup").on("mouseup",function(x){clearTimeout(w);w=setTimeout(function(){u.onSearch(x)},u.options.searchTimeOut)})}}};e.prototype.onSearch=function(r){var s=j.trim(j(r.currentTarget).val());if(this.options.trimOnSearch&&j(r.currentTarget).val()!==s){j(r.currentTarget).val(s)}if(s===this.searchText){return}this.searchText=s;this.options.searchText=s;this.options.pageNumber=1;this.initSearch();this.updatePagination();this.trigger("search",s)};e.prototype.initSearch=function(){var t=this;if(this.options.sidePagination!=="server"){if(this.options.customSearch!==j.noop){this.options.customSearch.apply(this,[this.searchText]);return}var r=this.searchText&&(this.options.escape?p(this.searchText):this.searchText).toLowerCase();var u=j.isEmptyObject(this.filterColumns)?null:this.filterColumns;this.data=u?j.grep(this.options.data,function(w,v){for(var s in u){if(j.isArray(u[s])&&j.inArray(w[s],u[s])===-1||w[s]!==u[s]){return false}}return true}):this.options.data;this.data=r?j.grep(this.data,function(A,x){for(var v=0;v-1){A=true}}}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1;this.options.totalPages=this.totalPages}if(this.totalPages>0&&this.options.pageNumber>this.totalPages){this.options.pageNumber=this.totalPages}this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1;this.pageTo=this.options.pageNumber*this.options.pageSize;if(this.pageTo>this.options.totalRows){this.pageTo=this.options.totalRows}w.push('
','',this.options.onlyInfoPagination?this.options.formatDetailPagination(this.options.totalRows):this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),"");if(!this.options.onlyInfoPagination){w.push('');var C=[m('',this.options.paginationVAlign==="top"||this.options.paginationVAlign==="both"?"dropdown":"dropup"),'",'");w.push(this.options.formatRecordsPerPage(C.join("")));w.push("");w.push("
",'")}this.$pagination.html(w.join(""));if(!this.options.onlyInfoPagination){H=this.$pagination.find(".page-list a");u=this.$pagination.find(".page-first");G=this.$pagination.find(".page-pre");s=this.$pagination.find(".page-next");B=this.$pagination.find(".page-last");F=this.$pagination.find(".page-number");if(this.options.smartDisplay){if(this.totalPages<=1){this.$pagination.find("div.pagination").hide()}if(r.length<2||this.options.totalRows<=r[0]){this.$pagination.find("span.page-list").hide()}this.$pagination[this.getData().length?"show":"hide"]()}if(A){this.options.pageSize=this.options.formatAllRows()}H.off("click").on("click",j.proxy(this.onPageListChange,this));u.off("click").on("click",j.proxy(this.onPageFirst,this));G.off("click").on("click",j.proxy(this.onPagePre,this));s.off("click").on("click",j.proxy(this.onPageNext,this));B.off("click").on("click",j.proxy(this.onPageLast,this));F.off("click").on("click",j.proxy(this.onPageNumber,this))}};e.prototype.updatePagination=function(r){if(r&&j(r.currentTarget).hasClass("disabled")){return}if(!this.options.maintainSelected){this.resetRows()}this.initPagination();if(this.options.sidePagination==="server"){this.initServer()}else{this.initBody()}this.trigger("page-change",this.options.pageNumber,this.options.pageSize)};e.prototype.onPageListChange=function(r){var s=j(r.currentTarget);s.parent().addClass("active").siblings().removeClass("active");this.options.pageSize=s.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+s.text();this.$toolbar.find(".page-size").text(this.options.pageSize);this.updatePagination(r)};e.prototype.onPageFirst=function(r){this.options.pageNumber=1;this.updatePagination(r)};e.prototype.onPagePre=function(r){if((this.options.pageNumber-1)===0){this.options.pageNumber=this.options.totalPages}else{this.options.pageNumber--}this.updatePagination(r)};e.prototype.onPageNext=function(r){if((this.options.pageNumber+1)>this.options.totalPages){this.options.pageNumber=1}else{this.options.pageNumber++}this.updatePagination(r)};e.prototype.onPageLast=function(r){this.options.pageNumber=this.totalPages;this.updatePagination(r)};e.prototype.onPageNumber=function(r){if(this.options.pageNumber===+j(r.currentTarget).text()){return}this.options.pageNumber=+j(r.currentTarget).text();this.updatePagination(r)};e.prototype.initBody=function(x){var z=this,y=[],v=this.getData();this.trigger("pre-body",v);this.$body=this.$el.find(">tbody");if(!this.$body.length){this.$body=j("").appendTo(this.$el)}if(!this.options.pagination||this.options.sidePagination==="server"){this.pageFrom=1;this.pageTo=v.length}for(var w=this.pageFrom-1;w");if(this.options.cardView){y.push(m('
',this.header.fields.length))}if(!this.options.cardView&&this.options.detailView){y.push("",'',m('',this.options.iconsPrefix,this.options.icons.detailOpen),"","")}j.each(this.header.fields,function(I,L){var P="",M=o(C,L,z.options.escape),K="",E={},Q="",J=z.header.classes[I],G="",O="",R="",H="",F=z.columns[I];if(z.fromHtml&&typeof M==="undefined"){return}if(!F.visible){return}if(z.options.cardView&&!F.cardVisible){return}r=m('style="%s"',s.concat(z.header.styles[I]).join("; "));if(C["_"+L+"_id"]){Q=m(' id="%s"',C["_"+L+"_id"])}if(C["_"+L+"_class"]){J=m(' class="%s"',C["_"+L+"_class"])}if(C["_"+L+"_rowspan"]){O=m(' rowspan="%s"',C["_"+L+"_rowspan"])}if(C["_"+L+"_colspan"]){R=m(' colspan="%s"',C["_"+L+"_colspan"])}if(C["_"+L+"_title"]){H=m(' title="%s"',C["_"+L+"_title"])}E=q(z.header,z.header.cellStyles[I],[M,C,w,L],E);if(E.classes){J=m(' class="%s"',E.classes)}if(E.css){var D=[];for(var N in E.css){D.push(N+": "+E.css[N])}r=m('style="%s"',D.concat(z.header.styles[I]).join("; "))}M=q(F,z.header.formatters[I],[M,C,w],M);if(C["_"+L+"_data"]&&!j.isEmptyObject(C["_"+L+"_data"])){j.each(C["_"+L+"_data"],function(T,S){if(T==="index"){return}G+=m(' data-%s="%s"',T,S)})}if(F.checkbox||F.radio){K=F.checkbox?"checkbox":K;K=F.radio?"radio":K;P=[m(z.options.cardView?'
':'',F["class"]||""),"",z.header.formatters[I]&&typeof M==="string"?M:"",z.options.cardView?"
":""].join("");C[z.header.stateField]=M===true||(M&&M.checked)}else{M=typeof M==="undefined"||M===null?z.options.undefinedText:M;P=z.options.cardView?['
',z.options.showHeader?m('%s',r,c(z.columns,"field","title",L)):"",m('%s',M),"
"].join(""):[m("",Q,J,r,G,O,R,H),M,""].join("");if(z.options.cardView&&z.options.smartDisplay&&M===""){P='
'}}y.push(P)});if(this.options.cardView){y.push("
")}y.push("")}if(!y.length){y.push('',m('%s',this.$header.find("th").length,this.options.formatNoMatches()),"")}this.$body.html(y.join(""));if(!x){this.scrollTo(0)}this.$body.find("> tr[data-index] > td").off("click dblclick").on("click dblclick",function(J){var D=j(this),F=D.parent(),M=z.data[F.data("index")],H=D[0].cellIndex,G=z.getVisibleFields(),K=G[z.options.detailView&&!z.options.cardView?H-1:H],E=z.columns[i(z.columns,K)],L=o(M,K,z.options.escape);if(D.find(".detail-icon").length){return}z.trigger(J.type==="click"?"click-cell":"dbl-click-cell",K,L,M,D);z.trigger(J.type==="click"?"click-row":"dbl-click-row",M,F,K);if(J.type==="click"&&z.options.clickToSelect&&E.clickToSelect){var I=F.find(m('[name="%s"]',z.options.selectItemName));if(I.length){I[0].click()}}});this.$body.find("> tr[data-index] > td > .detail-icon").off("click").on("click",function(){var H=j(this),G=H.parent().parent(),E=G.data("index"),I=v[E];if(G.next().is("tr.detail-view")){H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailOpen));G.next().remove();z.trigger("collapse-row",E,I)}else{H.find("i").attr("class",m("%s %s",z.options.iconsPrefix,z.options.icons.detailClose));G.after(m('',G.find("td").length));var D=G.next().find("td");var F=q(z.options,z.options.detailFormatter,[E,I,D],"");if(D.length===1){D.append(F)}z.trigger("expand-row",E,I,D)}z.resetView()});this.$selectItem=this.$body.find(m('[name="%s"]',this.options.selectItemName));this.$selectItem.off("click").on("click",function(E){E.stopImmediatePropagation();var F=j(this),D=F.prop("checked"),G=z.data[F.data("index")];if(z.options.maintainSelected&&j(this).is(":radio")){j.each(z.options.data,function(H,I){I[z.header.stateField]=false})}G[z.header.stateField]=D;if(z.options.singleSelect){z.$selectItem.not(this).each(function(){z.data[j(this).data("index")][z.header.stateField]=false});z.$selectItem.filter(":checked").not(this).prop("checked",false)}z.updateSelected();z.trigger(D?"check":"uncheck",G,F)});j.each(this.header.events,function(G,F){if(!F){return}if(typeof F==="string"){F=q(null,F)}var H=z.header.fields[G],D=j.inArray(H,z.getVisibleFields());if(z.options.detailView&&!z.options.cardView){D+=1}for(var E in F){z.$body.find(">tr:not(.no-records-found)").each(function(){var M=j(this),N=M.find(z.options.cardView?".card-view":"td").eq(D),J=E.indexOf(" "),I=E.substring(0,J),K=E.substring(J+1),L=F[E];N.find(K).off(I).on(I,function(Q){var O=M.data("index"),R=z.data[O],P=R[H];L.apply(this,[Q,P,R,O])})})}});this.updateSelected();this.resetView();this.trigger("post-body",v)};e.prototype.initServer=function(r,w,s){var u=this,v={},x={searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder},t;if(this.options.pagination){x.pageSize=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize;x.pageNumber=this.options.pageNumber}if(!(s||this.options.url)&&!this.options.ajax){return}if(this.options.queryParamsType==="limit"){x={search:x.searchText,sort:x.sortName,order:x.sortOrder};if(this.options.pagination){x.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1);x.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize}}if(!(j.isEmptyObject(this.filterColumnsPartial))){x.filter=JSON.stringify(this.filterColumnsPartial,null)}v=q(this.options,this.options.queryParams,[x],v);j.extend(v,w||{});if(v===false){return}if(!r){this.$tableLoading.show()}t=j.extend({},q(null,this.options.ajaxOptions),{type:this.options.method,url:s||this.options.url,data:this.options.contentType==="application/json"&&this.options.method==="post"?JSON.stringify(v):v,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(y){y=q(u.options,u.options.responseHandler,[y],y);u.load(y);u.trigger("load-success",y);if(!r){u.$tableLoading.hide()}},error:function(y){u.trigger("load-error",y.status,y);if(!r){u.$tableLoading.hide()}}});if(this.options.ajax){q(this,this.options.ajax,[t],null)}else{if(this._xhr&&this._xhr.readyState!==4){this._xhr.abort()}this._xhr=j.ajax(t)}};e.prototype.initSearchText=function(){if(this.options.search){if(this.options.searchText!==""){var r=this.$toolbar.find(".search input");r.val(this.options.searchText);this.onSearch({currentTarget:r})}}};e.prototype.getCaret=function(){var r=this;j.each(this.$header.find("th"),function(s,t){j(t).find(".sortable").removeClass("desc asc").addClass(j(t).data("field")===r.options.sortName?r.options.sortOrder:"both")})};e.prototype.updateSelected=function(){var r=this.$selectItem.filter(":enabled").length&&this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.each(function(){j(this).closest("tr")[j(this).prop("checked")?"addClass":"removeClass"]("selected")})};e.prototype.updateRows=function(){var r=this;this.$selectItem.each(function(){r.data[j(this).data("index")][r.header.stateField]=j(this).prop("checked")})};e.prototype.resetRows=function(){var r=this;j.each(this.data,function(s,t){r.$selectAll.prop("checked",false);r.$selectItem.prop("checked",false);if(r.header.stateField){t[r.header.stateField]=false}})};e.prototype.trigger=function(s){var r=Array.prototype.slice.call(arguments,1);s+=".bs.table";this.options[e.EVENTS[s]].apply(this.options,r);this.$el.trigger(j.Event(s),r);this.options.onAll(s,r);this.$el.trigger(j.Event("all.bs.table"),[s,r])};e.prototype.resetHeader=function(){clearTimeout(this.timeoutId_);this.timeoutId_=setTimeout(j.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)};e.prototype.fitHeader=function(){var t=this,u,r,x,y;if(t.$el.is(":hidden")){t.timeoutId_=setTimeout(j.proxy(t.fitHeader,t),100);return}u=this.$tableBody.get(0);r=u.scrollWidth>u.clientWidth&&u.scrollHeight>u.clientHeight+this.$header.outerHeight()?a():0;this.$el.css("margin-top",-this.$header.outerHeight());x=j(":focus");if(x.length>0){var z=x.parents("th");if(z.length>0){var A=z.attr("data-field");if(A!==undefined){var s=this.$header.find("[data-field='"+A+"']");if(s.length>0){s.find(":input").addClass("focus-temp")}}}}this.$header_=this.$header.clone(true,true);this.$selectAll_=this.$header_.find('[name="btSelectAll"]');this.$tableHeader.css({"margin-right":r}).find("table").css("width",this.$el.outerWidth()).html("").attr("class",this.$el.attr("class")).append(this.$header_);y=j(".focus-temp:visible:eq(0)");if(y.length>0){y.focus();this.$header.find(".focus-temp").removeClass("focus-temp")}this.$header.find("th[data-field]").each(function(B){t.$header_.find(m('th[data-field="%s"]',j(this).data("field"))).data(j(this).data())});var w=this.getVisibleFields(),v=this.$header_.find("th");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(C){var E=j(this),B=C;if(t.options.detailView&&!t.options.cardView){if(C===0){t.$header_.find("th.detail").find(".fht-cell").width(E.innerWidth())}B=C-1}var D=t.$header_.find(m('th[data-field="%s"]',w[B]));if(D.length>1){D=j(v[E[0].cellIndex])}D.find(".fht-cell").width(E.innerWidth())});this.$tableBody.off("scroll").on("scroll",function(){t.$tableHeader.scrollLeft(j(this).scrollLeft());if(t.options.showFooter&&!t.options.cardView){t.$tableFooter.scrollLeft(j(this).scrollLeft())}});t.trigger("post-header")};e.prototype.resetFooter=function(){var s=this,t=s.getData(),r=[];if(!this.options.showFooter||this.options.cardView){return}if(!this.options.cardView&&this.options.detailView){r.push('
 
')}j.each(this.columns,function(x,z){var w,B="",v="",A=[],y={},u=m(' class="%s"',z["class"]);if(!z.visible){return}if(s.options.cardView&&(!z.cardVisible)){return}B=m("text-align: %s; ",z.falign?z.falign:z.align);v=m("vertical-align: %s; ",z.valign);y=q(null,s.options.footerStyle);if(y&&y.css){for(w in y.css){A.push(w+": "+y.css[w])}}r.push("");r.push('
');r.push(q(z,z.footerFormatter,[t]," ")||" ");r.push("
");r.push('
');r.push("");r.push("")});this.$tableFooter.find("tr").html(r.join(""));this.$tableFooter.show();clearTimeout(this.timeoutFooter_);this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0)};e.prototype.fitFooter=function(){var u=this,r,t,s;clearTimeout(this.timeoutFooter_);if(this.$el.is(":hidden")){this.timeoutFooter_=setTimeout(j.proxy(this.fitFooter,this),100);return}t=this.$el.css("width");s=t>this.$tableBody.width()?a():0;this.$tableFooter.css({"margin-right":s}).find("table").css("width",t).attr("class",this.$el.attr("class"));r=this.$tableFooter.find("td");this.$body.find(">tr:first-child:not(.no-records-found) > *").each(function(v){var w=j(this);r.eq(v).find(".fht-cell").width(w.innerWidth())})};e.prototype.toggleColumn=function(r,s,u){if(r===-1){return}this.columns[r].visible=s;this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var t=this.$toolbar.find(".keep-open input").prop("disabled",false);if(u){t.filter(m('[value="%s"]',r)).prop("checked",s)}if(t.filter(":checked").length<=this.options.minimumCountColumns){t.filter(":checked").prop("disabled",true)}}};e.prototype.toggleRow=function(r,t,s){if(r===-1){return}this.$body.find(typeof r!=="undefined"?m('tr[data-index="%s"]',r):m('tr[data-uniqueid="%s"]',t))[s?"show":"hide"]()};e.prototype.getVisibleFields=function(){var s=this,r=[];j.each(this.header.fields,function(t,v){var u=s.columns[i(s.columns,v)];if(!u.visible){return}r.push(v)});return r};e.prototype.resetView=function(u){var s=0;if(u&&u.height){this.options.height=u.height}this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length);if(this.options.height){var t=d(this.$toolbar),v=d(this.$pagination),r=this.options.height-t-v;this.$tableContainer.css("height",r+"px")}if(this.options.cardView){this.$el.css("margin-top","0");this.$tableContainer.css("padding-bottom","0");this.$tableFooter.hide();return}if(this.options.showHeader&&this.options.height){this.$tableHeader.show();this.resetHeader();s+=this.$header.outerHeight()}else{this.$tableHeader.hide();this.trigger("post-header")}if(this.options.showFooter){this.resetFooter();if(this.options.height){s+=this.$tableFooter.outerHeight()+1}}this.getCaret();this.$tableContainer.css("padding-bottom",s+"px");this.trigger("reset-view")};e.prototype.getData=function(r){return(this.searchText||!j.isEmptyObject(this.filterColumns)||!j.isEmptyObject(this.filterColumnsPartial))?(r?this.data.slice(this.pageFrom-1,this.pageTo):this.data):(r?this.options.data.slice(this.pageFrom-1,this.pageTo):this.options.data)};e.prototype.load=function(s){var r=false;if(this.options.sidePagination==="server"){this.options.totalRows=s.total;r=s.fixedScroll;s=s[this.options.dataField]}else{if(!j.isArray(s)){r=s.fixedScroll;s=s.data}}this.initData(s);this.initSearch();this.initPagination();this.initBody(r)};e.prototype.append=function(r){this.initData(r,"append");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.prepend=function(r){this.initData(r,"prepend");this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.remove=function(u){var r=this.options.data.length,s,t;if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}for(s=r-1;s>=0;s--){t=this.options.data[s];if(!t.hasOwnProperty(u.field)){continue}if(j.inArray(t[u.field],u.values)!==-1){this.options.data.splice(s,1)}}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.removeAll=function(){if(this.options.data.length>0){this.options.data.splice(0,this.options.data.length);this.initSearch();this.initPagination();this.initBody(true)}};e.prototype.getRowByUniqueId=function(x){var w=this.options.uniqueId,r=this.options.data.length,s=null,t,v,u;for(t=r-1;t>=0;t--){v=this.options.data[t];if(v.hasOwnProperty(w)){u=v[w]}else{if(v._data.hasOwnProperty(w)){u=v._data[w]}else{continue}}if(typeof u==="string"){x=x.toString()}else{if(typeof u==="number"){if((Number(u)===u)&&(u%1===0)){x=parseInt(x)}else{if((u===Number(u))&&(u!==0)){x=parseFloat(x)}}}}if(u===x){s=v;break}}return s};e.prototype.removeByUniqueId=function(t){var r=this.options.data.length,s=this.getRowByUniqueId(t);if(s){this.options.data.splice(this.options.data.indexOf(s),1)}if(r===this.options.data.length){return}this.initSearch();this.initPagination();this.initBody(true)};e.prototype.updateByUniqueId=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,w){var v;if(!w.hasOwnProperty("id")||!w.hasOwnProperty("row")){return}v=j.inArray(r.getRowByUniqueId(w.id),r.options.data);if(v===-1){return}j.extend(r.options.data[v],w.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.insertRow=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("row")){return}this.data.splice(r.index,0,r.row);this.initSearch();this.initPagination();this.initSort();this.initBody(true)};e.prototype.updateRow=function(t){var r=this;var s=j.isArray(t)?t:[t];j.each(s,function(u,v){if(!v.hasOwnProperty("index")||!v.hasOwnProperty("row")){return}j.extend(r.options.data[v.index],v.row)});this.initSearch();this.initSort();this.initBody(true)};e.prototype.showRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,true)};e.prototype.hideRow=function(r){if(!r.hasOwnProperty("index")&&!r.hasOwnProperty("uniqueId")){return}this.toggleRow(r.index,r.uniqueId,false)};e.prototype.getRowsHidden=function(r){var t=j(this.$body[0]).children().filter(":hidden"),s=0;if(r){for(;str"),r;if(this.options.detailView&&!this.options.cardView){t+=1}r=x.eq(y).find(">td").eq(t);if(y<0||t<0||y>=this.data.length){return}for(w=y;wtd").eq(v).hide()}}r.attr("rowspan",u).attr("colspan",s).show()};e.prototype.updateCell=function(r){if(!r.hasOwnProperty("index")||!r.hasOwnProperty("field")||!r.hasOwnProperty("value")){return}this.data[r.index][r.field]=r.value;if(r.reinit===false){return}this.initSort();this.initBody(true)};e.prototype.getOptions=function(){return this.options};e.prototype.getSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.getAllSelections=function(){var r=this;return j.grep(this.options.data,function(s){return s[r.header.stateField]})};e.prototype.checkAll=function(){this.checkAll_(true)};e.prototype.uncheckAll=function(){this.checkAll_(false)};e.prototype.checkInvert=function(){var s=this;var t=s.$selectItem.filter(":enabled");var r=t.filter(":checked");t.each(function(){j(this).prop("checked",!j(this).prop("checked"))});s.updateRows();s.updateSelected();s.trigger("uncheck-some",r);r=s.getSelections();s.trigger("check-some",r)};e.prototype.checkAll_=function(r){var s;if(!r){s=this.getSelections()}this.$selectAll.add(this.$selectAll_).prop("checked",r);this.$selectItem.filter(":enabled").prop("checked",r);this.updateRows();if(r){s=this.getSelections()}this.trigger(r?"check-all":"uncheck-all",s)};e.prototype.check=function(r){this.check_(true,r)};e.prototype.uncheck=function(r){this.check_(false,r)};e.prototype.check_=function(t,r){var s=this.$selectItem.filter(m('[data-index="%s"]',r)).prop("checked",t);this.data[r][this.header.stateField]=t;this.updateSelected();this.trigger(t?"check":"uncheck",this.data[r],s)};e.prototype.checkBy=function(r){this.checkBy_(true,r)};e.prototype.uncheckBy=function(r){this.checkBy_(false,r)};e.prototype.checkBy_=function(s,u){if(!u.hasOwnProperty("field")||!u.hasOwnProperty("values")){return}var r=this,t=[];j.each(this.options.data,function(v,x){if(!x.hasOwnProperty(u.field)){return false}if(j.inArray(x[u.field],u.values)!==-1){var w=r.$selectItem.filter(":enabled").filter(m('[data-index="%s"]',v)).prop("checked",s);x[r.header.stateField]=s;t.push(x);r.trigger(s?"check":"uncheck",x,w)}});this.updateSelected();this.trigger(s?"check-some":"uncheck-some",t)};e.prototype.destroy=function(){this.$el.insertBefore(this.$container);j(this.options.toolbar).insertBefore(this.$el);this.$container.next().remove();this.$container.remove();this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"") +};e.prototype.showLoading=function(){this.$tableLoading.show()};e.prototype.hideLoading=function(){this.$tableLoading.hide()};e.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var r=this.$toolbar.find('button[name="paginationSwitch"] i');if(this.options.pagination){r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown)}else{r.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp)}this.updatePagination()};e.prototype.refresh=function(r){if(r&&r.url){this.options.pageNumber=1}this.initServer(r&&r.silent,r&&r.query,r&&r.url);this.trigger("refresh",r)};e.prototype.resetWidth=function(){if(this.options.showHeader&&this.options.height){this.fitHeader()}if(this.options.showFooter){this.fitFooter()}};e.prototype.showColumn=function(r){this.toggleColumn(i(this.columns,r),true,true)};e.prototype.hideColumn=function(r){this.toggleColumn(i(this.columns,r),false,true)};e.prototype.getHiddenColumns=function(){return j.grep(this.columns,function(r){return !r.visible})};e.prototype.getVisibleColumns=function(){return j.grep(this.columns,function(r){return r.visible})};e.prototype.toggleAllColumns=function(r){j.each(this.columns,function(t,u){this.columns[t].visible=r});this.initHeader();this.initSearch();this.initPagination();this.initBody();if(this.options.showColumns){var s=this.$toolbar.find(".keep-open input").prop("disabled",false);if(s.filter(":checked").length<=this.options.minimumCountColumns){s.filter(":checked").prop("disabled",true)}}};e.prototype.showAllColumns=function(){this.toggleAllColumns(true)};e.prototype.hideAllColumns=function(){this.toggleAllColumns(false)};e.prototype.filterBy=function(r){this.filterColumns=j.isEmptyObject(r)?{}:r;this.options.pageNumber=1;this.initSearch();this.updatePagination()};e.prototype.scrollTo=function(r){if(typeof r==="string"){r=r==="bottom"?this.$tableBody[0].scrollHeight:0}if(typeof r==="number"){this.$tableBody.scrollTop(r)}if(typeof r==="undefined"){return this.$tableBody.scrollTop()}};e.prototype.getScrollPosition=function(){return this.scrollTo()};e.prototype.selectPage=function(r){if(r>0&&r<=this.options.totalPages){this.options.pageNumber=r;this.updatePagination()}};e.prototype.prevPage=function(){if(this.options.pageNumber>1){this.options.pageNumber--;this.updatePagination()}};e.prototype.nextPage=function(){if(this.options.pageNumber tr[data-index="%s"]',r));if(t.next().is("tr.detail-view")===(s?false:true)){t.find("> td > .detail-icon").click()}};e.prototype.expandRow=function(r){this.expandRow_(true,r)};e.prototype.collapseRow=function(r){this.expandRow_(false,r)};e.prototype.expandAllRows=function(r){if(r){var w=this.$body.find(m('> tr[data-index="%s"]',0)),x=this,u=null,v=false,s=-1;if(!w.next().is("tr.detail-view")){w.find("> td > .detail-icon").click();v=true}else{if(!w.next().next().is("tr.detail-view")){w.next().find(".detail-icon").click();v=true}}if(v){try{s=setInterval(function(){u=x.$body.find("tr.detail-view").last().find(".detail-icon");if(u.length>0){u.click()}else{clearInterval(s)}},1)}catch(z){clearInterval(s)}}}else{var y=this.$body.children();for(var t=0;t
-
+
    diff --git a/src/main/resources/templates/monitor/job/jobLog.html b/src/main/resources/templates/monitor/job/jobLog.html index ea5c7d13..7d6e68b2 100644 --- a/src/main/resources/templates/monitor/job/jobLog.html +++ b/src/main/resources/templates/monitor/job/jobLog.html @@ -7,7 +7,7 @@
    -
    +
      diff --git a/src/main/resources/templates/monitor/logininfor/logininfor.html b/src/main/resources/templates/monitor/logininfor/logininfor.html index 97057769..d721c19d 100644 --- a/src/main/resources/templates/monitor/logininfor/logininfor.html +++ b/src/main/resources/templates/monitor/logininfor/logininfor.html @@ -7,7 +7,7 @@
      -
      +
        diff --git a/src/main/resources/templates/monitor/online/online.html b/src/main/resources/templates/monitor/online/online.html index cb3ddadc..a2d4ce97 100644 --- a/src/main/resources/templates/monitor/online/online.html +++ b/src/main/resources/templates/monitor/online/online.html @@ -7,7 +7,7 @@
        -
        +
          diff --git a/src/main/resources/templates/monitor/operlog/operlog.html b/src/main/resources/templates/monitor/operlog/operlog.html index 67b053f6..711d5a06 100644 --- a/src/main/resources/templates/monitor/operlog/operlog.html +++ b/src/main/resources/templates/monitor/operlog/operlog.html @@ -7,7 +7,7 @@
          -
          +
            diff --git a/src/main/resources/templates/system/config/config.html b/src/main/resources/templates/system/config/config.html index 2bf1a6c9..9d0c8f85 100644 --- a/src/main/resources/templates/system/config/config.html +++ b/src/main/resources/templates/system/config/config.html @@ -6,7 +6,7 @@
            -
            +
              diff --git a/src/main/resources/templates/system/dept/dept.html b/src/main/resources/templates/system/dept/dept.html index a6b8f7ea..cc71b87e 100644 --- a/src/main/resources/templates/system/dept/dept.html +++ b/src/main/resources/templates/system/dept/dept.html @@ -6,7 +6,7 @@
              -
              +
                diff --git a/src/main/resources/templates/system/dict/data/data.html b/src/main/resources/templates/system/dict/data/data.html index fbff8af8..21bdf9ac 100644 --- a/src/main/resources/templates/system/dict/data/data.html +++ b/src/main/resources/templates/system/dict/data/data.html @@ -7,7 +7,7 @@
                -
                +
                  diff --git a/src/main/resources/templates/system/dict/type/type.html b/src/main/resources/templates/system/dict/type/type.html index 1df47bd3..75a24628 100644 --- a/src/main/resources/templates/system/dict/type/type.html +++ b/src/main/resources/templates/system/dict/type/type.html @@ -7,7 +7,7 @@
                  -
                  +
                    diff --git a/src/main/resources/templates/system/menu/menu.html b/src/main/resources/templates/system/menu/menu.html index 206153f9..4ec7abbf 100644 --- a/src/main/resources/templates/system/menu/menu.html +++ b/src/main/resources/templates/system/menu/menu.html @@ -6,7 +6,7 @@
                    -
                    +
                      diff --git a/src/main/resources/templates/system/notice/notice.html b/src/main/resources/templates/system/notice/notice.html index 1a9c27ec..16204b0c 100644 --- a/src/main/resources/templates/system/notice/notice.html +++ b/src/main/resources/templates/system/notice/notice.html @@ -6,7 +6,7 @@
                      -
                      +
                        diff --git a/src/main/resources/templates/system/post/post.html b/src/main/resources/templates/system/post/post.html index 0e9d5fb5..dcca590e 100644 --- a/src/main/resources/templates/system/post/post.html +++ b/src/main/resources/templates/system/post/post.html @@ -7,7 +7,7 @@
                        -
                        +
                          diff --git a/src/main/resources/templates/system/role/role.html b/src/main/resources/templates/system/role/role.html index 4258f02e..6b78928d 100644 --- a/src/main/resources/templates/system/role/role.html +++ b/src/main/resources/templates/system/role/role.html @@ -7,7 +7,7 @@
                          -
                          +
                            diff --git a/src/main/resources/templates/system/user/user.html b/src/main/resources/templates/system/user/user.html index 23b793e9..79a234d5 100644 --- a/src/main/resources/templates/system/user/user.html +++ b/src/main/resources/templates/system/user/user.html @@ -30,7 +30,7 @@
                            -
                            +
                            diff --git a/src/main/resources/templates/tool/gen/gen.html b/src/main/resources/templates/tool/gen/gen.html index 0495646c..bedcb725 100644 --- a/src/main/resources/templates/tool/gen/gen.html +++ b/src/main/resources/templates/tool/gen/gen.html @@ -6,7 +6,7 @@
                            -
                            +