Browse Source

若依 2.4

RuoYi 6 years ago
parent
commit
4fe158fa94
100 changed files with 1434 additions and 2989 deletions
  1. 14 14
      README.md
  2. 2 2
      pom.xml
  3. 123 104
      sql/ry_20180903.sql
  4. 17 0
      src/main/java/com/ruoyi/common/exception/user/UserDeleteException.java
  5. 0 4
      src/main/java/com/ruoyi/framework/aspectj/LogAspect.java
  6. 72 0
      src/main/java/com/ruoyi/framework/datascope/DataScopeUtils.java
  7. 24 5
      src/main/java/com/ruoyi/framework/shiro/realm/UserRealm.java
  8. 12 4
      src/main/java/com/ruoyi/framework/shiro/service/LoginService.java
  9. 1 1
      src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java
  10. 1 0
      src/main/java/com/ruoyi/project/system/config/domain/Config.java
  11. 14 0
      src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java
  12. 22 0
      src/main/java/com/ruoyi/project/system/dept/domain/Dept.java
  13. 10 8
      src/main/java/com/ruoyi/project/system/dept/mapper/DeptMapper.java
  14. 49 10
      src/main/java/com/ruoyi/project/system/dept/service/DeptServiceImpl.java
  15. 10 7
      src/main/java/com/ruoyi/project/system/dept/service/IDeptService.java
  16. 17 8
      src/main/java/com/ruoyi/project/system/menu/mapper/MenuMapper.java
  17. 3 2
      src/main/java/com/ruoyi/project/system/menu/service/IMenuService.java
  18. 16 5
      src/main/java/com/ruoyi/project/system/menu/service/MenuServiceImpl.java
  19. 24 1
      src/main/java/com/ruoyi/project/system/role/controller/RoleController.java
  20. 43 1
      src/main/java/com/ruoyi/project/system/role/domain/Role.java
  21. 40 0
      src/main/java/com/ruoyi/project/system/role/domain/RoleDept.java
  22. 46 0
      src/main/java/com/ruoyi/project/system/role/mapper/RoleDeptMapper.java
  23. 0 7
      src/main/java/com/ruoyi/project/system/role/mapper/RoleMapper.java
  24. 8 0
      src/main/java/com/ruoyi/project/system/role/service/IRoleService.java
  25. 53 4
      src/main/java/com/ruoyi/project/system/role/service/RoleServiceImpl.java
  26. 1 1
      src/main/java/com/ruoyi/project/system/user/controller/IndexController.java
  27. 17 1
      src/main/java/com/ruoyi/project/system/user/domain/User.java
  28. 3 0
      src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java
  29. 1 1
      src/main/resources/application.yml
  30. 1 0
      src/main/resources/i18n/messages.properties
  31. 1 1
      src/main/resources/logback.xml
  32. 2 1
      src/main/resources/mybatis/monitor/JobLogMapper.xml
  33. 2 1
      src/main/resources/mybatis/monitor/JobMapper.xml
  34. 2 2
      src/main/resources/mybatis/monitor/OnlineMapper.xml
  35. 2 4
      src/main/resources/mybatis/monitor/OperLogMapper.xml
  36. 2 1
      src/main/resources/mybatis/system/ConfigMapper.xml
  37. 32 26
      src/main/resources/mybatis/system/DeptMapper.xml
  38. 2 1
      src/main/resources/mybatis/system/DictDataMapper.xml
  39. 2 1
      src/main/resources/mybatis/system/DictTypeMapper.xml
  40. 17 9
      src/main/resources/mybatis/system/MenuMapper.xml
  41. 2 1
      src/main/resources/mybatis/system/NoticeMapper.xml
  42. 2 1
      src/main/resources/mybatis/system/PostMapper.xml
  43. 34 0
      src/main/resources/mybatis/system/RoleDeptMapper.xml
  44. 45 33
      src/main/resources/mybatis/system/RoleMapper.xml
  45. 16 2
      src/main/resources/mybatis/system/UserMapper.xml
  46. BIN
      src/main/resources/static/ajax/libs/bootstrap-table/.DS_Store
  47. 0 1
      src/main/resources/static/ajax/libs/layer/extend/layer.ext.js
  48. 0 10
      src/main/resources/static/ajax/libs/layer/laydate/laydate.js
  49. 0 75
      src/main/resources/static/ajax/libs/layer/laydate/need/laydate.css
  50. BIN
      src/main/resources/static/ajax/libs/layer/laydate/skins/default/icon.png
  51. 0 59
      src/main/resources/static/ajax/libs/layer/laydate/skins/default/laydate.css
  52. 0 1
      src/main/resources/static/ajax/libs/layer/layer.js
  53. 0 1
      src/main/resources/static/ajax/libs/layer/mobile/layer.js
  54. 0 0
      src/main/resources/static/ajax/libs/layer/mobile/need/layer.css
  55. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/icon-ext.png
  56. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/icon.png
  57. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/icon_ext.png
  58. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/loading-0.gif
  59. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/loading-1.gif
  60. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/loading-2.gif
  61. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/textbg.png
  62. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_ico0.png
  63. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading0.gif
  64. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading1.gif
  65. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading2.gif
  66. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading3.gif
  67. BIN
      src/main/resources/static/ajax/libs/layer/skin/default/xubox_title0.png
  68. 0 6
      src/main/resources/static/ajax/libs/layer/skin/layer.css
  69. 0 7
      src/main/resources/static/ajax/libs/layer/skin/layer.ext.css
  70. BIN
      src/main/resources/static/ajax/libs/layer/skin/moon/default.png
  71. 0 141
      src/main/resources/static/ajax/libs/layer/skin/moon/style.css
  72. 0 0
      src/main/resources/static/ajax/libs/layer/theme/default/layer.css
  73. BIN
      src/main/resources/static/css/.DS_Store
  74. 0 2031
      src/main/resources/static/css/font-awesome.css
  75. BIN
      src/main/resources/static/img/.DS_Store
  76. BIN
      src/main/resources/static/img/bg.png
  77. BIN
      src/main/resources/static/img/blue.png
  78. BIN
      src/main/resources/static/img/icons.png
  79. BIN
      src/main/resources/static/img/sprite-skin-flat.png
  80. BIN
      src/main/resources/static/img/success.png
  81. BIN
      src/main/resources/static/img/webuploader.png
  82. BIN
      src/main/resources/static/js/.DS_Store
  83. BIN
      src/main/resources/static/js/plugins/.DS_Store
  84. 209 135
      src/main/resources/static/ruoyi/css/ry-ui.css
  85. 3 3
      src/main/resources/static/ruoyi/css/ry-ui.min.css
  86. 24 8
      src/main/resources/static/ruoyi/js/common.js
  87. 202 10
      src/main/resources/static/ruoyi/js/ry-ui.js
  88. 3 3
      src/main/resources/static/ruoyi/js/ry-ui.min.js
  89. 3 4
      src/main/resources/templates/include.html
  90. 3 3
      src/main/resources/templates/index.html
  91. 3 3
      src/main/resources/templates/login.html
  92. 52 21
      src/main/resources/templates/main.html
  93. 3 5
      src/main/resources/templates/monitor/job/add.html
  94. 3 5
      src/main/resources/templates/monitor/job/edit.html
  95. 19 4
      src/main/resources/templates/system/dept/add.html
  96. 20 5
      src/main/resources/templates/system/dept/edit.html
  97. 17 152
      src/main/resources/templates/system/dept/tree.html
  98. 6 1
      src/main/resources/templates/system/dict/data/data.html
  99. 25 15
      src/main/resources/templates/system/menu/add.html
  100. 32 6
      src/main/resources/templates/system/menu/edit.html

+ 14 - 14
README.md

@@ -8,16 +8,16 @@
 
 http://www.zi-han.net/theme/hplus
 
-http://webapplayers.com/inspinia_admin-v2.7.1 
+http://webapplayers.com/inspinia_admin-v2.7.1
 
 阿里云优惠活动(2CPU 4GRAM 1M带宽 40G高效云盘):https://promotion.aliyun.com/ntms/act/vm/aliyun-group/buy.html?group=BphATfDhsQ
 
-云产品通用代金券,可叠加官网常规优惠使用:https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof
+云产品通用1000元代金券,可叠加官网常规优惠使用 :https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=brki8iof
 
 ## 内置功能
 
 1.  用户管理:用户是系统操作者,该功能主要完成系统用户配置。
-2.  部门管理:配置系统组织机构(公司、部门、小组),树结构展现。
+2.  部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限
 3.  岗位管理:配置系统用户所属担任职务。
 4.  菜单管理:配置系统菜单,操作权限,按钮权限标识等。
 5.  角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
@@ -42,27 +42,27 @@ http://webapplayers.com/inspinia_admin-v2.7.1
 <table>
     <tr>
         <td><img src="https://oscimg.oschina.net/oscnet/25b5e333768d013d45a990c152dbe4d9d6e.jpg"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/114553_jBTY_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132411_4c5I_1438828.png"/></td>
     </tr>
     <tr>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/114830_eIHp_1438828.png"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/114854_Y5a2_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132436_rRBh_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132442_umjM_1438828.png"/></td>
     </tr>
     <tr>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/114920_P8qv_1438828.png"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/114946_O3jx_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132449_OtY8_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132454_4Evz_1438828.png"/></td>
     </tr>
     <tr>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115022_1Tnm_1438828.png"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115051_XvMW_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132520_Zzkj_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132539_5bJe_1438828.png"/></td>
     </tr>
 	<tr>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115117_9TZ3_1438828.png"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115130_a5xO_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132548_ne4U_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132557_Fab4_1438828.png"/></td>
     </tr>
 	<tr>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115151_EuYC_1438828.png"/></td>
-        <td><img src="https://static.oschina.net/uploads/space/2018/0728/115212_QybT_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132617_MLmV_1438828.png"/></td>
+        <td><img src="https://static.oschina.net/uploads/space/2018/0902/132626_3iBs_1438828.png"/></td>
     </tr>
 </table>
 

+ 2 - 2
pom.xml

@@ -5,7 +5,7 @@
 
 	<groupId>com.ruoyi</groupId>
 	<artifactId>RuoYi</artifactId>
-	<version>2.3.0</version>
+	<version>2.4.0</version>
 	<packaging>jar</packaging>
 
 	<name>RuoYi</name>
@@ -14,7 +14,7 @@
 	<parent>
 		<groupId>org.springframework.boot</groupId>
 		<artifactId>spring-boot-starter-parent</artifactId>
-		<version>2.0.3.RELEASE</version>
+		<version>2.0.4.RELEASE</version>
 		<relativePath />
 	</parent>
 

+ 123 - 104
sql/ry_20180823.sql → sql/ry_20180903.sql

@@ -12,6 +12,7 @@ create table sys_dept (
   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 '更新者',
@@ -22,17 +23,16 @@ create table sys_dept (
 -- ----------------------------
 -- 初始化-部门表数据
 -- ----------------------------
-insert into sys_dept values(100,  0,   '0',         '若依集团', 0, '若依', '15888888888', 'ry@qq.com', '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', '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', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
-insert into sys_dept values(103,  100, '0,100',     '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
-insert into sys_dept values(104,  100, '0,100',     '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
-insert into sys_dept values(105,  100, '0,100',     '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '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', '研发一部', 1, '若依', '15888888888', 'ry@qq.com', '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', '研发二部', 2, '若依', '15888888888', 'ry@qq.com', '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', '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', '1', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00');
-
+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、用户信息表
@@ -65,8 +65,8 @@ create table sys_user (
 -- ----------------------------
 -- 初始化-用户信息表数据
 -- ----------------------------
-insert into sys_user values(1,  106, '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,  108, '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', '测试员');
+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', '测试员');
 
 
 -- ----------------------------
@@ -106,7 +106,9 @@ create table sys_role (
   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 '更新者',
@@ -118,8 +120,8 @@ create table sys_role (
 -- ----------------------------
 -- 初始化-角色信息表数据
 -- ----------------------------
-insert into sys_role values('1', '管理员',   'admin',  1,  '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '管理员');
-insert into sys_role values('2', '普通角色', 'common', 2,  '0', 'admin', '2018-03-16 11-33-00', 'ry', '2018-03-16 11-33-00', '普通角色');
+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', '普通角色');
 
 
 -- ----------------------------
@@ -271,86 +273,103 @@ create table sys_role_menu (
 -- ----------------------------
 -- 初始化-角色和菜单关联表数据
 -- ----------------------------
-insert into sys_role_menu values ('1', '1');
-insert into sys_role_menu values ('1', '2');
-insert into sys_role_menu values ('1', '3');
-insert into sys_role_menu values ('1', '100');
-insert into sys_role_menu values ('1', '101');
-insert into sys_role_menu values ('1', '102');
-insert into sys_role_menu values ('1', '103');
-insert into sys_role_menu values ('1', '104');
-insert into sys_role_menu values ('1', '105');
-insert into sys_role_menu values ('1', '106');
-insert into sys_role_menu values ('1', '107');
-insert into sys_role_menu values ('1', '108');
-insert into sys_role_menu values ('1', '109');
-insert into sys_role_menu values ('1', '110');
-insert into sys_role_menu values ('1', '111');
-insert into sys_role_menu values ('1', '112');
-insert into sys_role_menu values ('1', '113');
-insert into sys_role_menu values ('1', '114');
-insert into sys_role_menu values ('1', '500');
-insert into sys_role_menu values ('1', '501');
-insert into sys_role_menu values ('1', '1000');
-insert into sys_role_menu values ('1', '1001');
-insert into sys_role_menu values ('1', '1002');
-insert into sys_role_menu values ('1', '1003');
-insert into sys_role_menu values ('1', '1004');
-insert into sys_role_menu values ('1', '1005');
-insert into sys_role_menu values ('1', '1006');
-insert into sys_role_menu values ('1', '1007');
-insert into sys_role_menu values ('1', '1008');
-insert into sys_role_menu values ('1', '1009');
-insert into sys_role_menu values ('1', '1010');
-insert into sys_role_menu values ('1', '1011');
-insert into sys_role_menu values ('1', '1012');
-insert into sys_role_menu values ('1', '1013');
-insert into sys_role_menu values ('1', '1014');
-insert into sys_role_menu values ('1', '1015');
-insert into sys_role_menu values ('1', '1016');
-insert into sys_role_menu values ('1', '1017');
-insert into sys_role_menu values ('1', '1018');
-insert into sys_role_menu values ('1', '1019');
-insert into sys_role_menu values ('1', '1020');
-insert into sys_role_menu values ('1', '1021');
-insert into sys_role_menu values ('1', '1022');
-insert into sys_role_menu values ('1', '1023');
-insert into sys_role_menu values ('1', '1024');
-insert into sys_role_menu values ('1', '1025');
-insert into sys_role_menu values ('1', '1026');
-insert into sys_role_menu values ('1', '1027');
-insert into sys_role_menu values ('1', '1028');
-insert into sys_role_menu values ('1', '1029');
-insert into sys_role_menu values ('1', '1030');
-insert into sys_role_menu values ('1', '1031');
-insert into sys_role_menu values ('1', '1032');
-insert into sys_role_menu values ('1', '1033');
-insert into sys_role_menu values ('1', '1034');
-insert into sys_role_menu values ('1', '1035');
-insert into sys_role_menu values ('1', '1036');
-insert into sys_role_menu values ('1', '1037');
-insert into sys_role_menu values ('1', '1038');
-insert into sys_role_menu values ('1', '1039');
-insert into sys_role_menu values ('1', '1040');
-insert into sys_role_menu values ('1', '1041');
-insert into sys_role_menu values ('1', '1042');
-insert into sys_role_menu values ('1', '1043');
-insert into sys_role_menu values ('1', '1044');
-insert into sys_role_menu values ('1', '1045');
-insert into sys_role_menu values ('1', '1046');
-insert into sys_role_menu values ('1', '1047');
-insert into sys_role_menu values ('1', '1048');
-insert into sys_role_menu values ('1', '1049');
-insert into sys_role_menu values ('1', '1050');
-insert into sys_role_menu values ('1', '1051');
-insert into sys_role_menu values ('1', '1052');
-insert into sys_role_menu values ('1', '1053');
-insert into sys_role_menu values ('1', '1054');
-insert into sys_role_menu values ('1', '1055');
-
-
--- ----------------------------
--- 8、用户与岗位关联表  用户1-N岗位
+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
@@ -368,7 +387,7 @@ insert into sys_user_post values ('2', '2');
 
 
 -- ----------------------------
--- 9、操作日志记录
+-- 10、操作日志记录
 -- ----------------------------
 drop table if exists sys_oper_log;
 create table sys_oper_log (
@@ -391,7 +410,7 @@ create table sys_oper_log (
 
 
 -- ----------------------------
--- 10、字典类型表
+-- 11、字典类型表
 -- ----------------------------
 drop table if exists sys_dict_type;
 create table sys_dict_type
@@ -421,7 +440,7 @@ insert into sys_dict_type values(9,  '系统状态', 'sys_common_status',   '0',
 
 
 -- ----------------------------
--- 11、字典数据表
+-- 12、字典数据表
 -- ----------------------------
 drop table if exists sys_dict_data;
 create table sys_dict_data
@@ -472,7 +491,7 @@ insert into sys_dict_data values(25, 2,  '失败',     '1',  'sys_common_status'
 
 
 -- ----------------------------
--- 12、参数配置表
+-- 13、参数配置表
 -- ----------------------------
 drop table if exists sys_config;
 create table sys_config (
@@ -494,7 +513,7 @@ insert into sys_config values(2, '用户管理-账号初始密码',     'sys.use
 
 
 -- ----------------------------
--- 13、系统访问记录
+-- 14、系统访问记录
 -- ----------------------------
 drop table if exists sys_logininfor;
 create table sys_logininfor (
@@ -512,7 +531,7 @@ create table sys_logininfor (
 
 
 -- ----------------------------
--- 14、在线用户记录
+-- 15、在线用户记录
 -- ----------------------------
 drop table if exists sys_user_online;
 create table sys_user_online (
@@ -532,7 +551,7 @@ create table sys_user_online (
 
 
 -- ----------------------------
--- 15、定时任务调度表
+-- 16、定时任务调度表
 -- ----------------------------
 drop table if exists sys_job;
 create table sys_job (
@@ -557,7 +576,7 @@ insert into sys_job values(2, 'ryTask', '系统默认(有参)', 'ryParams',
 
 
 -- ----------------------------
--- 16、定时任务调度日志表
+-- 17、定时任务调度日志表
 -- ----------------------------
 drop table if exists sys_job_log;
 create table sys_job_log (
@@ -575,7 +594,7 @@ create table sys_job_log (
 
 
 -- ----------------------------
--- 17、通知公告表
+-- 18、通知公告表
 -- ----------------------------
 drop table if exists sys_notice;
 create table sys_notice (

+ 17 - 0
src/main/java/com/ruoyi/common/exception/user/UserDeleteException.java

@@ -0,0 +1,17 @@
+package com.ruoyi.common.exception.user;
+
+/**
+ * 用户账号已被删除
+ * 
+ * @author ruoyi
+ */
+public class UserDeleteException extends UserException
+{
+
+    private static final long serialVersionUID = 1L;
+
+    public UserDeleteException()
+    {
+        super("user.password.delete", null);
+    }
+}

+ 0 - 4
src/main/java/com/ruoyi/framework/aspectj/LogAspect.java

@@ -11,8 +11,6 @@ import org.aspectj.lang.annotation.Pointcut;
 import org.aspectj.lang.reflect.MethodSignature;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.stereotype.Component;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.utils.ServletUtils;
@@ -32,7 +30,6 @@ import com.ruoyi.project.system.user.domain.User;
  */
 @Aspect
 @Component
-@EnableAsync
 public class LogAspect
 {
     private static final Logger log = LoggerFactory.getLogger(LogAspect.class);
@@ -66,7 +63,6 @@ public class LogAspect
         handleLog(joinPoint, e);
     }
 
-    @Async
     protected void handleLog(final JoinPoint joinPoint, final Exception e)
     {
         try

+ 72 - 0
src/main/java/com/ruoyi/framework/datascope/DataScopeUtils.java

@@ -0,0 +1,72 @@
+package com.ruoyi.framework.datascope;
+
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.project.system.role.domain.Role;
+import com.ruoyi.project.system.user.domain.User;
+
+/**
+ * 数据范围处理
+ * 
+ * @author ruoyi
+ */
+public class DataScopeUtils
+{
+    /**
+     * 全部数据权限
+     */
+    public static final String DATA_SCOPE_ALL = "1";
+
+    /**
+     * 自定数据权限
+     */
+    public static final String DATA_SCOPE_CUSTOM = "2";
+
+    /**
+     * 数据范围过滤
+     * 
+     * @return 标准连接条件对象
+     */
+    public static String dataScopeFilter()
+    {
+        return dataScopeFilter("u");
+    }
+
+    /**
+     * 数据范围过滤
+     * 
+     * @param da 部门表别名
+     * @return 标准连接条件对象
+     */
+    public static String dataScopeFilter(String da)
+    {
+        User user = ShiroUtils.getUser();
+        // 如果是超级管理员,则不过滤数据
+        if (user.isAdmin())
+        {
+            return StringUtils.EMPTY;
+        }
+
+        StringBuilder sqlString = new StringBuilder();
+
+        for (Role role : user.getRoles())
+        {
+            String dataScope = role.getDataScope();
+            if (DATA_SCOPE_ALL.equals(dataScope))
+            {
+                sqlString = new StringBuilder();
+                break;
+            }
+            else if (DATA_SCOPE_CUSTOM.equals(dataScope))
+            {
+                sqlString.append(StringUtils.format(" OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", da, role.getRoleId()));
+            }
+        }
+
+        if (StringUtils.isNotBlank(sqlString.toString()))
+        {
+            return " AND (" + sqlString.substring(4) + ")";
+        }
+        return StringUtils.EMPTY;
+    }
+}

+ 24 - 5
src/main/java/com/ruoyi/framework/shiro/realm/UserRealm.java

@@ -1,5 +1,8 @@
 package com.ruoyi.framework.shiro.realm;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.apache.shiro.SecurityUtils;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.AuthenticationInfo;
@@ -17,6 +20,7 @@ import org.apache.shiro.subject.PrincipalCollection;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+
 import com.ruoyi.common.exception.user.CaptchaException;
 import com.ruoyi.common.exception.user.RoleBlockedException;
 import com.ruoyi.common.exception.user.UserBlockedException;
@@ -53,12 +57,27 @@ public class UserRealm extends AuthorizingRealm
     @Override
     protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection arg0)
     {
-        Long userId = ShiroUtils.getUserId();
+        User user = ShiroUtils.getUser();
+        // 角色列表
+        Set<String> roles = new HashSet<String>();
+        // 功能列表
+        Set<String> menus = new HashSet<String>();
         SimpleAuthorizationInfo info = new SimpleAuthorizationInfo();
-        // 角色加入AuthorizationInfo认证对象
-        info.setRoles(roleService.selectRoleKeys(userId));
-        // 权限加入AuthorizationInfo认证对象
-        info.setStringPermissions(menuService.selectPermsByUserId(userId));
+        // 管理员拥有所有权限
+        if (user.isAdmin())
+        {
+            info.addRole("admin");
+            info.addStringPermission("*:*:*");
+        }
+        else
+        {
+            roles = roleService.selectRoleKeys(user.getUserId());
+            menus = menuService.selectPermsByUserId(user.getUserId());
+            // 角色加入AuthorizationInfo认证对象
+            info.setRoles(roles);
+            // 权限加入AuthorizationInfo认证对象
+            info.setStringPermissions(menus);
+        }
         return info;
     }
 

+ 12 - 4
src/main/java/com/ruoyi/framework/shiro/service/LoginService.java

@@ -8,6 +8,7 @@ import com.ruoyi.common.constant.ShiroConstants;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.exception.user.CaptchaException;
 import com.ruoyi.common.exception.user.UserBlockedException;
+import com.ruoyi.common.exception.user.UserDeleteException;
 import com.ruoyi.common.exception.user.UserNotExistsException;
 import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
 import com.ruoyi.common.utils.DateUtils;
@@ -80,19 +81,26 @@ public class LoginService
             user = userService.selectUserByEmail(username);
         }
 
-        if (user == null || UserStatus.DELETED.getCode().equals(user.getDelFlag()))
+        if (user == null)
         {
             AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.not.exists")));
             throw new UserNotExistsException();
         }
-
-        passwordService.validate(user, password);
-
+        
+        if (UserStatus.DELETED.getCode().equals(user.getDelFlag()))
+        {
+            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.delete")));
+            throw new UserDeleteException();
+        }
+        
         if (UserStatus.DISABLE.getCode().equals(user.getStatus()))
         {
             AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.blocked", user.getRemark())));
             throw new UserBlockedException(user.getRemark());
         }
+
+        passwordService.validate(user, password);
+
         AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
         recordLoginInfo(user);
         return user;

+ 1 - 1
src/main/java/com/ruoyi/framework/web/domain/BaseEntity.java

@@ -111,4 +111,4 @@ public class BaseEntity implements Serializable
     {
         this.params = params;
     }
-}
+}

+ 1 - 0
src/main/java/com/ruoyi/project/system/config/domain/Config.java

@@ -82,6 +82,7 @@ public class Config extends BaseEntity
         this.configType = configType;
     }
 
+    @Override
     public String toString()
     {
         return "Config [configId=" + configId + ", configName=" + configName + ", configKey=" + configKey

+ 14 - 0
src/main/java/com/ruoyi/project/system/dept/controller/DeptController.java

@@ -2,6 +2,7 @@ package com.ruoyi.project.system.dept.controller;
 
 import java.util.List;
 import java.util.Map;
+
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -11,12 +12,14 @@ import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
+
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
 import com.ruoyi.project.system.dept.domain.Dept;
 import com.ruoyi.project.system.dept.service.IDeptService;
+import com.ruoyi.project.system.role.domain.Role;
 
 /**
  * 部门信息
@@ -142,4 +145,15 @@ public class DeptController extends BaseController
         List<Map<String, Object>> tree = deptService.selectDeptTree();
         return tree;
     }
+
+    /**
+     * 加载角色部门(数据权限)列表树
+     */
+    @GetMapping("/roleDeptTreeData")
+    @ResponseBody
+    public List<Map<String, Object>> deptTreeData(Role role)
+    {
+        List<Map<String, Object>> tree = deptService.roleDeptTreeData(role);
+        return tree;
+    }
 }

+ 22 - 0
src/main/java/com/ruoyi/project/system/dept/domain/Dept.java

@@ -10,24 +10,36 @@ import com.ruoyi.framework.web.domain.BaseEntity;
 public class Dept extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
+
     /** 部门ID */
     private Long deptId;
+
     /** 父部门ID */
     private Long parentId;
+
     /** 祖级列表 */
     private String ancestors;
+
     /** 部门名称 */
     private String deptName;
+
     /** 显示顺序 */
     private String orderNum;
+
     /** 负责人 */
     private String leader;
+
     /** 联系电话 */
     private String phone;
     /** 邮箱 */
     private String email;
+
     /** 部门状态:0正常,1停用 */
     private String status;
+
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
     /** 父部门名称 */
     private String parentName;
 
@@ -121,6 +133,16 @@ public class Dept extends BaseEntity
         this.status = status;
     }
 
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
     public String getParentName()
     {
         return parentName;

+ 10 - 8
src/main/java/com/ruoyi/project/system/dept/mapper/DeptMapper.java

@@ -35,13 +35,6 @@ public interface DeptMapper
      */
     public List<Dept> selectDeptList(Dept dept);
 
-    /**
-     * 查询部门所有数据
-     * 
-     * @return 部门信息集合
-     */
-    public List<Dept> selectDeptAll();
-
     /**
      * 删除部门管理信息
      * 
@@ -86,7 +79,16 @@ public interface DeptMapper
      * 校验部门名称是否唯一
      * 
      * @param deptName 部门名称
+     * @param parentId 父部门ID
      * @return 结果
      */
-    public Dept checkDeptNameUnique(String deptName);
+    public Dept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
+
+    /**
+     * 根据角色ID查询部门
+     *
+     * @param roleId 角色ID
+     * @return 部门列表
+     */
+    public List<String> selectRoleDeptTree(Long roleId);
 }

+ 49 - 10
src/main/java/com/ruoyi/project/system/dept/service/DeptServiceImpl.java

@@ -9,8 +9,10 @@ import org.springframework.stereotype.Service;
 import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.framework.datascope.DataScopeUtils;
 import com.ruoyi.project.system.dept.domain.Dept;
 import com.ruoyi.project.system.dept.mapper.DeptMapper;
+import com.ruoyi.project.system.role.domain.Role;
 
 /**
  * 部门管理 服务实现
@@ -31,31 +33,60 @@ public class DeptServiceImpl implements IDeptService
     @Override
     public List<Dept> selectDeptList(Dept dept)
     {
+        dept.getParams().put("dataScope", DataScopeUtils.dataScopeFilter("d"));
         return deptMapper.selectDeptList(dept);
     }
 
     /**
-     * 查询部门所有数据
+     * 查询部门管理树
      * 
-     * @return 部门信息集合
+     * @return 所有部门信息
      */
     @Override
-    public List<Dept> selectDeptAll()
+    public List<Map<String, Object>> selectDeptTree()
     {
-        return deptMapper.selectDeptAll();
+        List<Map<String, Object>> trees = new ArrayList<Map<String, Object>>();
+        List<Dept> deptList = selectDeptList(new Dept());
+        trees = getTrees(deptList, false, null);
+        return trees;
     }
 
     /**
-     * 查询部门管理树
-     * 
-     * @return 所有部门信息
+     * 根据角色ID查询部门(数据权限)
+     *
+     * @param role 角色对象
+     * @return 部门列表(数据权限)
      */
     @Override
-    public List<Map<String, Object>> selectDeptTree()
+    public List<Map<String, Object>> roleDeptTreeData(Role role)
     {
+        Long roleId = role.getRoleId();
         List<Map<String, Object>> trees = new ArrayList<Map<String, Object>>();
-        List<Dept> deptList = deptMapper.selectDeptAll();
+        List<Dept> deptList = selectDeptList(new Dept());
+        if (StringUtils.isNotNull(roleId))
+        {
+            List<String> roleDeptList = deptMapper.selectRoleDeptTree(roleId);
+            trees = getTrees(deptList, true, roleDeptList);
+        }
+        else
+        {
+            trees = getTrees(deptList, false, null);
+        }
+        return trees;
+    }
 
+    /**
+     * 对象转部门树
+     *
+     * @param menuList 部门列表
+     * @param isCheck 是否需要选中
+     * @param roleDeptList 角色已存在菜单列表
+     * @return
+     */
+    public List<Map<String, Object>> getTrees(List<Dept> deptList, boolean isCheck, List<String> roleDeptList)
+    {
+
+        List<Map<String, Object>> trees = new ArrayList<Map<String, Object>>();
         for (Dept dept : deptList)
         {
             if (UserConstants.DEPT_NORMAL.equals(dept.getStatus()))
@@ -65,6 +96,14 @@ public class DeptServiceImpl implements IDeptService
                 deptMap.put("pId", dept.getParentId());
                 deptMap.put("name", dept.getDeptName());
                 deptMap.put("title", dept.getDeptName());
+                if (isCheck)
+                {
+                    deptMap.put("checked", roleDeptList.contains(dept.getDeptId() + dept.getDeptName()));
+                }
+                else
+                {
+                    deptMap.put("checked", false);
+                }
                 trees.add(deptMap);
             }
         }
@@ -185,7 +224,7 @@ public class DeptServiceImpl implements IDeptService
     public String checkDeptNameUnique(Dept dept)
     {
         Long deptId = StringUtils.isNull(dept.getDeptId()) ? -1L : dept.getDeptId();
-        Dept info = deptMapper.checkDeptNameUnique(dept.getDeptName());
+        Dept info = deptMapper.checkDeptNameUnique(dept.getDeptName(), dept.getParentId());
         if (StringUtils.isNotNull(info) && info.getDeptId().longValue() != deptId.longValue())
         {
             return UserConstants.DEPT_NAME_NOT_UNIQUE;

+ 10 - 7
src/main/java/com/ruoyi/project/system/dept/service/IDeptService.java

@@ -2,7 +2,9 @@ package com.ruoyi.project.system.dept.service;
 
 import java.util.List;
 import java.util.Map;
+
 import com.ruoyi.project.system.dept.domain.Dept;
+import com.ruoyi.project.system.role.domain.Role;
 
 /**
  * 部门管理 服务层
@@ -19,13 +21,6 @@ public interface IDeptService
      */
     public List<Dept> selectDeptList(Dept dept);
 
-    /**
-     * 查询部门所有数据
-     * 
-     * @return 部门信息集合
-     */
-    public List<Dept> selectDeptAll();
-
     /**
      * 查询部门管理树
      * 
@@ -33,6 +28,14 @@ public interface IDeptService
      */
     public List<Map<String, Object>> selectDeptTree();
 
+    /**
+     * 根据角色ID查询菜单
+     *
+     * @param role 角色对象
+     * @return 菜单列表
+     */
+    public List<Map<String, Object>> roleDeptTreeData(Role role);
+
     /**
      * 查询部门人数
      * 

+ 17 - 8
src/main/java/com/ruoyi/project/system/menu/mapper/MenuMapper.java

@@ -1,6 +1,7 @@
 package com.ruoyi.project.system.menu.mapper;
 
 import java.util.List;
+import org.apache.ibatis.annotations.Param;
 import com.ruoyi.project.system.menu.domain.Menu;
 
 /**
@@ -11,6 +12,20 @@ import com.ruoyi.project.system.menu.domain.Menu;
 public interface MenuMapper
 {
 
+    /**
+     * 查询系统所有菜单(含按钮)
+     * 
+     * @return 菜单列表
+     */
+    public List<Menu> selectMenuAll();
+    
+    /**
+     * 查询系统正常显示菜单(不含按钮)
+     * 
+     * @return 菜单列表
+     */
+    public List<Menu> selectMenuNormalAll();
+    
     /**
      * 根据用户ID查询菜单
      * 
@@ -43,13 +58,6 @@ public interface MenuMapper
      */
     public List<Menu> selectMenuList(Menu menu);
 
-    /**
-     * 查询系统所有菜单
-     * 
-     * @return 菜单列表
-     */
-    public List<Menu> selectMenuAll();
-
     /**
      * 删除菜单管理信息
      * 
@@ -94,8 +102,9 @@ public interface MenuMapper
      * 校验菜单名称是否唯一
      * 
      * @param menuName 菜单名称
+     * @param parentId 父菜单ID
      * @return 结果
      */
-    public Menu checkMenuNameUnique(String menuName);
+    public Menu checkMenuNameUnique(@Param("menuName") String menuName, @Param("parentId") Long parentId);
 
 }

+ 3 - 2
src/main/java/com/ruoyi/project/system/menu/service/IMenuService.java

@@ -5,6 +5,7 @@ import java.util.Map;
 import java.util.Set;
 import com.ruoyi.project.system.menu.domain.Menu;
 import com.ruoyi.project.system.role.domain.Role;
+import com.ruoyi.project.system.user.domain.User;
 
 /**
  * 菜单 业务层
@@ -17,10 +18,10 @@ public interface IMenuService
     /**
      * 根据用户ID查询菜单
      * 
-     * @param userId 用户ID
+     * @param user 用户信息
      * @return 菜单列表
      */
-    public List<Menu> selectMenusByUserId(Long userId);
+    public List<Menu> selectMenusByUser(User user);
 
     /**
      * 查询系统菜单列表

+ 16 - 5
src/main/java/com/ruoyi/project/system/menu/service/MenuServiceImpl.java

@@ -6,6 +6,7 @@ import java.util.Arrays;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
+import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -19,6 +20,7 @@ import com.ruoyi.project.system.menu.domain.Menu;
 import com.ruoyi.project.system.menu.mapper.MenuMapper;
 import com.ruoyi.project.system.role.domain.Role;
 import com.ruoyi.project.system.role.mapper.RoleMenuMapper;
+import com.ruoyi.project.system.user.domain.User;
 
 /**
  * 菜单 业务层处理
@@ -37,15 +39,24 @@ public class MenuServiceImpl implements IMenuService
     private RoleMenuMapper roleMenuMapper;
 
     /**
-     * 根据用户ID查询菜单
+     * 根据用户查询菜单
      * 
-     * @param userId 用户ID
+     * @param userId 用户信息
      * @return 菜单列表
      */
     @Override
-    public List<Menu> selectMenusByUserId(Long userId)
+    public List<Menu> selectMenusByUser(User user)
     {
-        List<Menu> menus = menuMapper.selectMenusByUserId(userId);
+        List<Menu> menus = new LinkedList<Menu>();
+        // 管理员显示所有菜单信息
+        if (user.isAdmin())
+        {
+            menus = menuMapper.selectMenuNormalAll();
+        }
+        else
+        {
+            menus = menuMapper.selectMenusByUserId(user.getUserId());
+        }
         return TreeUtils.getChildPerms(menus, 0);
     }
 
@@ -281,7 +292,7 @@ public class MenuServiceImpl implements IMenuService
     public String checkMenuNameUnique(Menu menu)
     {
         Long menuId = StringUtils.isNull(menu.getMenuId()) ? -1L : menu.getMenuId();
-        Menu info = menuMapper.checkMenuNameUnique(menu.getMenuName());
+        Menu info = menuMapper.checkMenuNameUnique(menu.getMenuName(), menu.getParentId());
         if (StringUtils.isNotNull(info) && info.getMenuId().longValue() != menuId.longValue())
         {
             return UserConstants.MENU_NAME_NOT_UNIQUE;

+ 24 - 1
src/main/java/com/ruoyi/project/system/role/controller/RoleController.java

@@ -116,6 +116,29 @@ public class RoleController extends BaseController
         return toAjax(roleService.updateRole(role));
     }
 
+    /**
+     * 新增数据权限
+     */
+    @GetMapping("/rule/{roleId}")
+    public String rule(@PathVariable("roleId") Long roleId, ModelMap mmap)
+    {
+        mmap.put("role", roleService.selectRoleById(roleId));
+        return prefix + "/rule";
+    }
+
+    /**
+     * 修改保存数据权限
+     */
+    @RequiresPermissions("system:role:edit")
+    @Log(title = "角色管理", businessType = BusinessType.UPDATE)
+    @PostMapping("/rule")
+    @Transactional(rollbackFor = Exception.class)
+    @ResponseBody
+    public AjaxResult ruleSave(Role role)
+    {
+        return toAjax(roleService.updateRule(role));
+    }
+
     @RequiresPermissions("system:role:remove")
     @Log(title = "角色管理", businessType = BusinessType.DELETE)
     @PostMapping("/remove")
@@ -141,7 +164,7 @@ public class RoleController extends BaseController
     {
         return roleService.checkRoleNameUnique(role);
     }
-    
+
     /**
      * 校验角色权限
      */

+ 43 - 1
src/main/java/com/ruoyi/project/system/role/domain/Role.java

@@ -29,15 +29,26 @@ public class Role extends BaseEntity
     @Excel(name = "角色排序")
     private String roleSort;
 
+    /** 数据范围(1:所有数据权限;2:自定数据权限) */
+    @Excel(name = "数据范围")
+    private String dataScope;
+
     /** 角色状态(0正常 1停用) */
     @Excel(name = "角色状态")
     private String status;
 
+    /** 删除标志(0代表存在 2代表删除) */
+    private String delFlag;
+
     /** 用户是否存在此角色标识 默认不存在 */
     private boolean flag = false;
+
     /** 菜单组 */
     private Long[] menuIds;
 
+    /** 部门组(数据权限) */
+    private Long[] deptIds;
+
     public Long getRoleId()
     {
         return roleId;
@@ -48,6 +59,16 @@ public class Role extends BaseEntity
         this.roleId = roleId;
     }
 
+    public String getDataScope()
+    {
+        return dataScope;
+    }
+
+    public void setDataScope(String dataScope)
+    {
+        this.dataScope = dataScope;
+    }
+
     public String getRoleName()
     {
         return roleName;
@@ -83,6 +104,16 @@ public class Role extends BaseEntity
         return status;
     }
 
+    public String getDelFlag()
+    {
+        return delFlag;
+    }
+
+    public void setDelFlag(String delFlag)
+    {
+        this.delFlag = delFlag;
+    }
+
     public void setStatus(String status)
     {
         this.status = status;
@@ -108,11 +139,22 @@ public class Role extends BaseEntity
         this.menuIds = menuIds;
     }
 
+    public Long[] getDeptIds()
+    {
+        return deptIds;
+    }
+
+    public void setDeptIds(Long[] deptIds)
+    {
+        this.deptIds = deptIds;
+    }
+
     @Override
     public String toString()
     {
         return "Role [roleId=" + roleId + ", roleName=" + roleName + ", roleKey=" + roleKey + ", roleSort=" + roleSort
-                + ", status=" + status + ", flag=" + flag + ", menuIds=" + Arrays.toString(menuIds) + "]";
+                + ", dataScope=" + dataScope + ", status=" + status + ", flag=" + flag + ", menuIds="
+                + Arrays.toString(menuIds) + ", deptIds=" + Arrays.toString(deptIds) + "]";
     }
 
 }

+ 40 - 0
src/main/java/com/ruoyi/project/system/role/domain/RoleDept.java

@@ -0,0 +1,40 @@
+package com.ruoyi.project.system.role.domain;
+
+/**
+ * 角色和部门关联 sys_role_dept
+ * 
+ * @author ruoyi
+ */
+public class RoleDept
+{
+    /** 角色ID */
+    private Long roleId;
+    /** 部门ID */
+    private Long deptId;
+
+    public Long getRoleId()
+    {
+        return roleId;
+    }
+
+    public void setRoleId(Long roleId)
+    {
+        this.roleId = roleId;
+    }
+
+    public Long getDeptId()
+    {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId)
+    {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public String toString()
+    {
+        return "RoleDept [roleId=" + roleId + ", deptId=" + deptId + "]";
+    }
+}

+ 46 - 0
src/main/java/com/ruoyi/project/system/role/mapper/RoleDeptMapper.java

@@ -0,0 +1,46 @@
+package com.ruoyi.project.system.role.mapper;
+
+import java.util.List;
+import com.ruoyi.project.system.role.domain.RoleDept;
+
+/**
+ * 角色与部门关联表 数据层
+ * 
+ * @author ruoyi
+ */
+public interface RoleDeptMapper
+{
+
+    /**
+     * 通过角色ID删除角色和部门关联
+     * 
+     * @param roleId 角色ID
+     * @return 结果
+     */
+    public int deleteRoleDeptByRoleId(Long roleId);
+
+    /**
+     * 批量删除角色部门关联信息
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteRoleDept(Long[] ids);
+
+    /**
+     * 查询部门使用数量
+     * 
+     * @param deptId 部门ID
+     * @return 结果
+     */
+    public int selectCountRoleDeptByDeptId(Long deptId);
+
+    /**
+     * 批量新增角色部门信息
+     * 
+     * @param roleDeptList 角色部门列表
+     * @return 结果
+     */
+    public int batchRoleDept(List<RoleDept> roleDeptList);
+
+}

+ 0 - 7
src/main/java/com/ruoyi/project/system/role/mapper/RoleMapper.java

@@ -27,13 +27,6 @@ public interface RoleMapper
      */
     public List<Role> selectRolesByUserId(Long userId);
 
-    /**
-     * 查询角色列表
-     * 
-     * @return 角色列表
-     */
-    public List<Role> selectRolesAll();
-
     /**
      * 通过角色ID查询角色
      * 

+ 8 - 0
src/main/java/com/ruoyi/project/system/role/service/IRoleService.java

@@ -83,6 +83,14 @@ public interface IRoleService
      * @return 结果
      */
     public int updateRole(Role role);
+    
+    /**
+     * 修改数据权限信息
+     * 
+     * @param role 角色信息
+     * @return 结果
+     */
+    public int updateRule(Role role);
 
     /**
      * 校验角色名称是否唯一

+ 53 - 4
src/main/java/com/ruoyi/project/system/role/service/RoleServiceImpl.java

@@ -11,8 +11,11 @@ import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.support.Convert;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.framework.datascope.DataScopeUtils;
 import com.ruoyi.project.system.role.domain.Role;
+import com.ruoyi.project.system.role.domain.RoleDept;
 import com.ruoyi.project.system.role.domain.RoleMenu;
+import com.ruoyi.project.system.role.mapper.RoleDeptMapper;
 import com.ruoyi.project.system.role.mapper.RoleMapper;
 import com.ruoyi.project.system.role.mapper.RoleMenuMapper;
 import com.ruoyi.project.system.user.mapper.UserRoleMapper;
@@ -35,6 +38,9 @@ public class RoleServiceImpl implements IRoleService
     @Autowired
     private UserRoleMapper userRoleMapper;
 
+    @Autowired
+    private RoleDeptMapper roleDeptMapper;
+
     /**
      * 根据条件分页查询角色数据
      * 
@@ -44,6 +50,7 @@ public class RoleServiceImpl implements IRoleService
     @Override
     public List<Role> selectRoleList(Role role)
     {
+        role.getParams().put("dataScope", DataScopeUtils.dataScopeFilter());
         return roleMapper.selectRoleList(role);
     }
 
@@ -78,7 +85,7 @@ public class RoleServiceImpl implements IRoleService
     public List<Role> selectRolesByUserId(Long userId)
     {
         List<Role> userRoles = roleMapper.selectRolesByUserId(userId);
-        List<Role> roles = roleMapper.selectRolesAll();
+        List<Role> roles = selectRoleAll();
         for (Role role : roles)
         {
             for (Role userRole : userRoles)
@@ -101,7 +108,7 @@ public class RoleServiceImpl implements IRoleService
     @Override
     public List<Role> selectRoleAll()
     {
-        return roleMapper.selectRolesAll();
+        return selectRoleList(new Role());
     }
 
     /**
@@ -177,12 +184,30 @@ public class RoleServiceImpl implements IRoleService
         role.setUpdateBy(ShiroUtils.getLoginName());
         // 修改角色信息
         roleMapper.updateRole(role);
+        ShiroUtils.clearCachedAuthorizationInfo();
         // 删除角色与菜单关联
         roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
-        ShiroUtils.clearCachedAuthorizationInfo();
         return insertRoleMenu(role);
     }
 
+    /**
+     * 修改数据权限信息
+     * 
+     * @param role 角色信息
+     * @return 结果
+     */
+    @Override
+    public int updateRule(Role role)
+    {
+        role.setUpdateBy(ShiroUtils.getLoginName());
+        // 修改角色信息
+        roleMapper.updateRole(role);
+        // 删除角色与部门关联
+        roleDeptMapper.deleteRoleDeptByRoleId(role.getRoleId());
+        // 新增角色和部门信息(数据权限)
+        return insertRoleDept(role);
+    }
+
     /**
      * 新增角色菜单信息
      * 
@@ -207,6 +232,30 @@ public class RoleServiceImpl implements IRoleService
         return rows;
     }
 
+    /**
+     * 新增角色部门信息(数据权限)
+     *
+     * @param role 角色对象
+     */
+    public int insertRoleDept(Role role)
+    {
+        int rows = 1;
+        // 新增角色与部门(数据权限)管理
+        List<RoleDept> list = new ArrayList<RoleDept>();
+        for (Long deptId : role.getDeptIds())
+        {
+            RoleDept rd = new RoleDept();
+            rd.setRoleId(role.getRoleId());
+            rd.setDeptId(deptId);
+            list.add(rd);
+        }
+        if (list.size() > 0)
+        {
+            rows = roleDeptMapper.batchRoleDept(list);
+        }
+        return rows;
+    }
+
     /**
      * 校验角色名称是否唯一
      * 
@@ -224,7 +273,7 @@ public class RoleServiceImpl implements IRoleService
         }
         return UserConstants.ROLE_NAME_UNIQUE;
     }
-    
+
     /**
      * 校验角色权限是否唯一
      * 

+ 1 - 1
src/main/java/com/ruoyi/project/system/user/controller/IndexController.java

@@ -32,7 +32,7 @@ public class IndexController extends BaseController
         // 取身份信息
         User user = getUser();
         // 根据用户id取出菜单
-        List<Menu> menus = menuService.selectMenusByUserId(user.getUserId());
+        List<Menu> menus = menuService.selectMenusByUser(user);
         mmap.put("menus", menus);
         mmap.put("user", user);
         mmap.put("copyrightYear", ruoYiConfig.getCopyrightYear());

+ 17 - 1
src/main/java/com/ruoyi/project/system/user/domain/User.java

@@ -2,10 +2,12 @@ package com.ruoyi.project.system.user.domain;
 
 import java.util.Arrays;
 import java.util.Date;
+import java.util.List;
 import org.apache.shiro.crypto.SecureRandomNumberGenerator;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;
 import com.ruoyi.project.system.dept.domain.Dept;
+import com.ruoyi.project.system.role.domain.Role;
 
 /**
  * 用户对象 sys_user
@@ -73,6 +75,9 @@ public class User extends BaseEntity
     /** 部门对象 */
     private Dept dept;
 
+    /** 角色集合 */
+    private List<Role> roles;
+
     /** 角色组 */
     private Long[] roleIds;
 
@@ -260,6 +265,16 @@ public class User extends BaseEntity
         this.dept = dept;
     }
 
+    public List<Role> getRoles()
+    {
+        return roles;
+    }
+
+    public void setRoles(List<Role> roles)
+    {
+        this.roles = roles;
+    }
+
     public Long[] getRoleIds()
     {
         return roleIds;
@@ -287,7 +302,8 @@ public class User extends BaseEntity
                 + ", userName=" + userName + ", email=" + email + ", phonenumber=" + phonenumber + ", sex=" + sex
                 + ", avatar=" + avatar + ", password=" + password + ", salt=" + salt + ", status=" + status
                 + ", delFlag=" + delFlag + ", loginIp=" + loginIp + ", loginDate=" + loginDate + ", dept=" + dept
-                + ", roleIds=" + Arrays.toString(roleIds) + ", postIds=" + Arrays.toString(postIds) + "]";
+                + ", roles=" + roles + ", roleIds=" + Arrays.toString(roleIds) + ", postIds=" + Arrays.toString(postIds)
+                + "]";
     }
 
 }

+ 3 - 0
src/main/java/com/ruoyi/project/system/user/service/UserServiceImpl.java

@@ -8,6 +8,7 @@ import com.ruoyi.common.constant.UserConstants;
 import com.ruoyi.common.support.Convert;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.framework.datascope.DataScopeUtils;
 import com.ruoyi.framework.shiro.service.PasswordService;
 import com.ruoyi.project.system.post.domain.Post;
 import com.ruoyi.project.system.post.mapper.PostMapper;
@@ -56,6 +57,8 @@ public class UserServiceImpl implements IUserService
     @Override
     public List<User> selectUserList(User user)
     {
+        // 生成数据权限过滤条件
+        user.getParams().put("dataScope", DataScopeUtils.dataScopeFilter());
         return userMapper.selectUserList(user);
     }
 

+ 1 - 1
src/main/resources/application.yml

@@ -3,7 +3,7 @@ ruoyi:
   #名称
   name: RuoYi
   #版本
-  version: 2.3.0
+  version: 2.4.0
   #版权年份
   copyrightYear: 2018
   #头像上传路径

+ 1 - 0
src/main/resources/i18n/messages.properties

@@ -5,6 +5,7 @@ user.not.exists=用户不存在/密码错误
 user.password.not.match=用户不存在/密码错误
 user.password.retry.limit.count=密码输入错误{0}次,{1}
 user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
+user.password.delete=对不起,您的账号已被删除
 user.blocked=用户已封禁,原因:{0}
 role.blocked=角色已封禁,原因:{0}
 user.logout.success=退出成功

+ 1 - 1
src/main/resources/logback.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
 
-	<property name="log.path" value="/home/logs/ruoyi" />
+	<property name="log.path" value="/home/ruoyi/logs" />
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
 	<!-- 控制台输出 -->

+ 2 - 1
src/main/resources/mybatis/monitor/JobLogMapper.xml

@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectJobLogVo">
-        select job_log_id, job_name, job_group, method_name, method_params, job_message, status, exception_info, create_time  from sys_job_log
+        select job_log_id, job_name, job_group, method_name, method_params, job_message, status, exception_info, create_time 
+		from sys_job_log
     </sql>
 	
 	<select id="selectJobLogList" parameterType="JobLog" resultMap="JobLogResult">

+ 2 - 1
src/main/resources/mybatis/monitor/JobMapper.xml

@@ -21,7 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectJobVo">
-        select job_id, job_name, job_group, method_name, method_params, cron_expression, misfire_policy, status, create_by, create_time, remark from sys_job
+        select job_id, job_name, job_group, method_name, method_params, cron_expression, misfire_policy, status, create_by, create_time, remark 
+		from sys_job
     </sql>
 	
 	<select id="selectJobList" parameterType="Job" resultMap="JobResult">

+ 2 - 2
src/main/resources/mybatis/monitor/OnlineMapper.xml

@@ -27,8 +27,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectOnlineVo">
-       select  sessionId,login_name,dept_name,ipaddr,login_location,browser,os,status,status,start_timestamp,last_access_time,expire_time
-		from sys_user_online
+       select sessionId, login_name, dept_name, ipaddr, login_location, browser, os, status, status, start_timestamp, last_access_time, expire_time 
+	   from sys_user_online
     </sql>
     
 	<select id="selectOnlineById" parameterType="String" resultMap="UserOnlineResult">

+ 2 - 4
src/main/resources/mybatis/monitor/OperLogMapper.xml

@@ -22,10 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 
 	<sql id="selectOperLogVo">
-        select 
-        	oper_id, title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip,oper_location,oper_param,status,error_msg,oper_time
-        from 
-          	sys_oper_log
+        select oper_id, title, business_type, method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, status, error_msg, oper_time
+        from sys_oper_log
     </sql>
     
 	<insert id="insertOperlog" parameterType="OperLog">

+ 2 - 1
src/main/resources/mybatis/system/ConfigMapper.xml

@@ -17,7 +17,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     
     <sql id="selectConfigVo">
-        select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark from sys_config
+        select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark 
+		from sys_config
     </sql>
     
     <!-- 查询条件 -->

+ 32 - 26
src/main/resources/mybatis/system/DeptMapper.xml

@@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="phone"      column="phone"       />
 		<result property="email"      column="email"       />
 		<result property="status"     column="status"      />
+		<result property="delFlag"    column="del_flag"    />
 		<result property="parentName" column="parent_name" />
 		<result property="createBy"   column="create_by"   />
 		<result property="createTime" column="create_time" />
@@ -22,26 +23,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectDeptVo">
-        select t.dept_id, t.parent_id, t.ancestors, t.dept_name, t.order_num, t.leader, t.phone, t.email, t.status, t.create_by, t.create_time from sys_dept t
+        select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time 
+        from sys_dept d
     </sql>
-
-	<select id="selectDeptAll" resultMap="DeptResult">
-		<include refid="selectDeptVo"/>
+    
+	<select id="selectRoleDeptTree" parameterType="Long" resultType="String">
+		select concat(d.dept_id, d.dept_name) as dept_name
+		from sys_dept d
+			left join sys_role_dept rd on d.dept_id = rd.dept_id
+		where d.del_flag = '0' and rd.role_id = #{roleId}
+		order by d.parent_id, d.order_num
 	</select>
 	
 	<select id="selectDeptList" parameterType="Dept" resultMap="DeptResult">
         <include refid="selectDeptVo"/>
-        <where>
-            <if test="parentId != null and parentId != 0">
-				AND parent_id = #{parentId}
-			</if>
-			<if test="deptName != null and deptName != ''">
-				AND dept_name like concat('%', #{deptName}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-		</where>
+        where d.del_flag = '0'
+        <if test="parentId != null and parentId != 0">
+			AND parent_id = #{parentId}
+		</if>
+		<if test="deptName != null and deptName != ''">
+			AND dept_name like concat('%', #{deptName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND status = #{status}
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
     </select>
 	
 	<select id="checkDeptExistUser" parameterType="Long" resultType="int">
@@ -50,22 +57,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	
 	<select id="selectDeptCount" parameterType="Dept" resultType="int">
 		select count(1) from sys_dept
-		<where>
-			<if test="deptId != null and deptId != 0"> and dept_id = #{deptId} </if>
-			<if test="parentId != null and parentId != 0"> and parent_id = #{parentId} </if>
-		</where>
+		where del_flag = '0'
+		<if test="deptId != null and deptId != 0"> and dept_id = #{deptId} </if>
+		<if test="parentId != null and parentId != 0"> and parent_id = #{parentId} </if>
 	</select>
 	
-	<select id="checkDeptNameUnique" parameterType="String" resultMap="DeptResult">
+	<select id="checkDeptNameUnique" resultMap="DeptResult">
 	    <include refid="selectDeptVo"/>
-		where dept_name=#{deptName}
+		where dept_name=#{deptName} and parent_id = #{parentId}
 	</select>
 
 	<select id="selectDeptById" parameterType="Long" resultMap="DeptResult">
-		select t.dept_id, t.parent_id, t.ancestors, t.dept_name, t.order_num, t.leader, t.phone, t.email, t.status,
-			(select dept_name from sys_dept where dept_id = t.parent_id) parent_name
-		from sys_dept t
-		where dept_id = #{deptId}
+		select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status,
+			(select dept_name from sys_dept where dept_id = d.parent_id) parent_name
+		from sys_dept d
+		where d.dept_id = #{deptId}
 	</select>
 	
 	<insert id="insertDept" parameterType="Dept">
@@ -127,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	 </update>
 
 	<delete id="deleteDeptById" parameterType="Long">
-		delete from sys_dept where dept_id = #{deptId}
+		update sys_dept set del_flag = '2' where dept_id = #{deptId}
 	</delete>
 
 </mapper> 

+ 2 - 1
src/main/resources/mybatis/system/DictDataMapper.xml

@@ -21,7 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectDictDataVo">
-        select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark from sys_dict_data
+        select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark 
+		from sys_dict_data
     </sql>
 
 	<select id="selectDictDataList" parameterType="DictData" resultMap="DictDataResult">

+ 2 - 1
src/main/resources/mybatis/system/DictTypeMapper.xml

@@ -16,7 +16,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectDictTypeVo">
-        select dict_id, dict_name, dict_type, status, create_by, create_time, remark from sys_dict_type
+        select dict_id, dict_name, dict_type, status, create_by, create_time, remark 
+		from sys_dict_type
     </sql>
 
 	<select id="selectDictTypeList" parameterType="DictType" resultMap="DictTypeResult">

+ 17 - 9
src/main/resources/mybatis/system/MenuMapper.xml

@@ -23,10 +23,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time from sys_menu
+        select menu_id, menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time 
+		from sys_menu
     </sql>
-
-	<select id="selectMenusByUserId" parameterType="Long" resultMap="MenuResult">
+    
+    <select id="selectMenusByUserId" parameterType="Long" resultMap="MenuResult">
 		select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.perms , m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
@@ -35,6 +36,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		where ur.user_id = #{userId} and m.menu_type in ('M', 'C') and m.visible = 0  AND ro.status = 0
 		order by m.order_num
 	</select>
+
+	<select id="selectMenuNormalAll" resultMap="MenuResult">
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.url, m.perms , m.menu_type, m.icon, m.order_num, m.create_time
+		from sys_menu m
+		where m.menu_type in ('M', 'C') and m.visible = 0
+		order by m.order_num
+	</select>
+	
+	<select id="selectMenuAll" resultMap="MenuResult">
+		<include refid="selectMenuVo"/>
+	</select>
 	
 	<select id="selectPermsByUserId" parameterType="Long" resultType="String">
 		select distinct m.perms
@@ -64,10 +76,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		</where>
     </select>
 	
-	<select id="selectMenuAll" resultMap="MenuResult">
-		<include refid="selectMenuVo"/>
-	</select>
-	
 	<delete id="deleteMenuById" parameterType="Long">
 	    delete from sys_menu where menu_id = #{menuId} or parent_id = #{menuId}
 	</delete>
@@ -83,9 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	    select count(1) from sys_menu where parent_id=#{menuId}  
 	</select>
 	
-	<select id="checkMenuNameUnique" parameterType="String" resultMap="MenuResult">
+	<select id="checkMenuNameUnique" parameterType="Menu" resultMap="MenuResult">
 		<include refid="selectMenuVo"/>
-		where menu_name=#{menuName}
+		where menu_name=#{menuName} and parent_id = #{parentId}
 	</select>
 	
 	<update id="updateMenu" parameterType="Menu">

+ 2 - 1
src/main/resources/mybatis/system/NoticeMapper.xml

@@ -18,7 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
     
     <sql id="selectNoticeVo">
-        select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark from sys_notice
+        select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark 
+		from sys_notice
     </sql>
     
     <select id="selectNoticeById" parameterType="Long" resultMap="NoticeResult">

+ 2 - 1
src/main/resources/mybatis/system/PostMapper.xml

@@ -18,7 +18,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</resultMap>
 	
 	<sql id="selectPostVo">
-        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark from sys_post
+        select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark 
+		from sys_post
     </sql>
 	
 	<select id="selectPostList" parameterType="Post" resultMap="PostResult">

+ 34 - 0
src/main/resources/mybatis/system/RoleDeptMapper.xml

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.system.role.mapper.RoleDeptMapper">
+
+	<resultMap type="RoleDept" id="RoleDeptResult">
+		<result property="roleId"     column="role_id"      />
+		<result property="detpId"     column="dept_id"      />
+	</resultMap>
+
+	<delete id="deleteRoleDeptByRoleId" parameterType="Long">
+		delete from sys_role_dept where role_id=#{roleId}
+	</delete>
+	
+	<select id="selectCountRoleDeptByDeptId" resultType="Integer">
+	    select count(1) from sys_role_dept where dept_id=#{detpId}  
+	</select>
+	
+	<delete id="deleteRoleDept" parameterType="Long">
+ 		delete from sys_role_dept where role_id in
+ 		<foreach collection="array" item="roleId" open="(" separator="," close=")">
+ 			#{roleId}
+        </foreach> 
+ 	</delete>
+	
+	<insert id="batchRoleDept">
+		insert into sys_role_dept(role_id, dept_id) values
+		<foreach item="item" index="index" collection="list" separator=",">
+			(#{item.roleId},#{item.deptId})
+		</foreach>
+	</insert>
+	
+</mapper> 

+ 45 - 33
src/main/resources/mybatis/system/RoleMapper.xml

@@ -9,7 +9,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="roleName"     column="role_name"      />
 		<result property="roleKey"      column="role_key"       />
 		<result property="roleSort"     column="role_sort"      />
+		<result property="dataScope"    column="data_scope"     />
 		<result property="status"       column="status"         />
+		<result property="delFlag"      column="del_flag"       />
 		<result property="createBy"     column="create_by"      />
 		<result property="createTime"   column="create_time"    />
 		<result property="updateBy"     column="update_by"      />
@@ -17,56 +19,63 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="remark"       column="remark"         />
 	</resultMap>
 	
-	<sql id="selectRoleVo">
-        select role_id, role_name, role_key, role_sort, status, create_time, remark from sys_role
+	<sql id="selectRoleContactVo">
+        select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,
+            r.status, r.del_flag, r.create_time, r.remark 
+        from sys_role r
+	        left join sys_user_role ur on ur.role_id = r.role_id
+	        left join sys_user u on u.user_id = ur.user_id
+	        left join sys_dept d on u.dept_id = d.dept_id
     </sql>
+    
+    <sql id="selectRoleVo">
+		select r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status, r.del_flag, r.create_time, r.remark 
+        from sys_role r
+	</sql>
 	
 	<select id="selectRoleList" parameterType="Role" resultMap="RoleResult">
-		<include refid="selectRoleVo"/>
-		<where>
-			<if test="roleName != null and roleName != ''">
-				AND role_name like concat('%', #{roleName}, '%')
-			</if>
-			<if test="status != null and status != ''">
-				AND status = #{status}
-			</if>
-			<if test="roleKey != null and roleKey != ''">
-				AND role_key like concat('%', #{roleKey}, '%')
-			</if>
-			<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
-				and date_format(create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-			</if>
-			<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
-				and date_format(create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-			</if>
-		</where>
+		<include refid="selectRoleContactVo"/>
+		where r.del_flag = '0'
+		<if test="roleName != null and roleName != ''">
+			AND r.role_name like concat('%', #{roleName}, '%')
+		</if>
+		<if test="status != null and status != ''">
+			AND r.status = #{status}
+		</if>
+		<if test="roleKey != null and roleKey != ''">
+			AND r.role_key like concat('%', #{roleKey}, '%')
+		</if>
+		<if test="dataScope != null and dataScope != ''">
+			AND r.data_scope = #{dataScope}
+		</if>
+		<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
+			and date_format(r.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
+		</if>
+		<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
+			and date_format(r.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
+		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
 	</select>
 
 	<select id="selectRolesByUserId" parameterType="Long" resultMap="RoleResult">
-		SELECT r.role_id, r.role_name, r.role_key
-		FROM sys_user u
-			 LEFT JOIN sys_user_role ur ON u.user_id = ur.user_id
-			 LEFT JOIN sys_role r ON ur.role_id = r.role_id
-		WHERE ur.user_id = #{userId}
-	</select>
-	
-	<select id="selectRolesAll" resultMap="RoleResult">
-		<include refid="selectRoleVo"/>
+		<include refid="selectRoleContactVo"/>
+		WHERE r.del_flag = '0' and ur.user_id = #{userId}
 	</select>
 	
 	<select id="selectRoleById" parameterType="Long" resultMap="RoleResult">
 		<include refid="selectRoleVo"/>
-		where role_id = #{roleId}
+		where r.del_flag = '0' and r.role_id = #{roleId}
 	</select>
 	
 	<select id="checkRoleNameUnique" parameterType="String" resultMap="RoleResult">
 		<include refid="selectRoleVo"/>
-		 where role_name=#{roleName}
+		 where r.role_name=#{roleName}
 	</select>
 	
 	<select id="checkRoleKeyUnique" parameterType="String" resultMap="RoleResult">
 		<include refid="selectRoleVo"/>
-		 where role_key=#{roleKey}
+		 where r.role_key=#{roleKey}
 	</select>
 	
 	<delete id="deleteRoleById" parameterType="Long">
@@ -74,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  	</delete>
  	
  	<delete id="deleteRoleByIds" parameterType="Long">
- 		delete from sys_role where role_id in
+ 	    update sys_role set del_flag = '2' where role_id in
  		<foreach collection="array" item="roleId" open="(" separator="," close=")">
  			#{roleId}
         </foreach> 
@@ -86,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
  			<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
  			<if test="roleSort != null and roleSort != ''">role_sort = #{roleSort},</if>
+ 			<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="remark != null and remark != ''">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
@@ -100,6 +110,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="roleName != null and roleName != ''">role_name,</if>
  			<if test="roleKey != null and roleKey != ''">role_key,</if>
  			<if test="roleSort != null and roleSort != ''">role_sort,</if>
+ 			<if test="dataScope != null and dataScope != ''">data_scope,</if>
  			<if test="status != null and status != ''">status,</if>
  			<if test="remark != null and remark != ''">remark,</if>
  			<if test="createBy != null and createBy != ''">create_by,</if>
@@ -109,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="roleName != null and roleName != ''">#{roleName},</if>
  			<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
  			<if test="roleSort != null and roleSort != ''">#{roleSort},</if>
+ 			<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>

+ 16 - 2
src/main/resources/mybatis/system/UserMapper.xml

@@ -24,7 +24,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="updateBy"     column="update_by"    />
 		<result property="updateTime"   column="update_time"  />
 		<result property="remark"       column="remark"       />
-		<association property="dept"    column="dept_id" javaType="Dept" resultMap="deptResult"/>
+		<association property="dept"    column="dept_id" javaType="Dept" resultMap="deptResult" />
+		<collection  property="roles"   javaType="java.util.List"        resultMap="RoleResult" />
 	</resultMap>
 	
 	<resultMap id="deptResult" type="Dept">
@@ -35,12 +36,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="status"   column="dept_status" />
 	</resultMap>
 	
+	<resultMap id="RoleResult" type="Role">
+		<id     property="roleId"       column="role_id"        />
+		<result property="roleName"     column="role_name"      />
+		<result property="roleKey"      column="role_key"       />
+		<result property="roleSort"     column="role_sort"      />
+		<result property="dataScope"     column="data_scope"    />
+		<result property="status"       column="role_status"    />
+	</resultMap>
+	
 	<sql id="selectUserVo">
         select  u.user_id, u.dept_id, u.login_name, u.user_name, u.email, u.phonenumber, u.sex, u.avatar, u.password, u.salt, u.status, u.del_flag, u.login_ip, u.login_date, u.create_time, u.remark,
-       		    d.dept_id, d.parent_id, d.dept_name, d.order_num, d.status as dept_status
+       		    d.dept_id, d.parent_id, d.dept_name, d.order_num, d.status as dept_status,
+       		    r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
 		from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_user_role ur on u.user_id = ur.user_id
+			 left join sys_role r on r.role_id = ur.role_id
     </sql>
 	
 	<select id="selectUserList" parameterType="User" resultMap="UserResult">
@@ -65,6 +77,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<if test="deptId != null and deptId != 0">
 			AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE FIND_IN_SET (#{deptId},ancestors) ))
 		</if>
+		<!-- 数据范围过滤 -->
+		${params.dataScope}
 	</select>
 	
 	<select id="selectUserByLoginName" parameterType="String" resultMap="UserResult">

BIN
src/main/resources/static/ajax/libs/bootstrap-table/.DS_Store


File diff suppressed because it is too large
+ 0 - 1
src/main/resources/static/ajax/libs/layer/extend/layer.ext.js


File diff suppressed because it is too large
+ 0 - 10
src/main/resources/static/ajax/libs/layer/laydate/laydate.js


+ 0 - 75
src/main/resources/static/ajax/libs/layer/laydate/need/laydate.css

@@ -1,75 +0,0 @@
-/**
-
- @Name: laydate 核心样式
- @Author:贤心
- @Site:http://sentsin.com/layui/laydate
-
-**/
-
-html{_background-image:url(about:blank); _background-attachment:fixed;}
-.layer-date{display: inline-block!important;vertical-align:text-top;max-width:240px;}
-.laydate_body .laydate_box, .laydate_body .laydate_box *{margin:0; padding:0;}
-.laydate-icon,
-.laydate-icon-default,
-.laydate-icon-danlan,
-.laydate-icon-dahong,
-.laydate-icon-molv{height:34px; padding-right:20px;min-width:34px;vertical-align: text-top;border:1px solid #C6C6C6; background-repeat:no-repeat; background-position:right center;  background-color:#fff; outline:0;}
-.laydate-icon-default{ background-image:url(../skins/default/icon.png)}
-.laydate-icon-danlan{border:1px solid #B1D2EC; background-image:url(../skins/danlan/icon.png)}
-.laydate-icon-dahong{background-image:url(../skins/dahong/icon.png)}
-.laydate-icon-molv{background-image:url(../skins/molv/icon.png)}
-.laydate_body .laydate_box{width:240px; font:12px '\5B8B\4F53'; z-index:99999999; *margin:-2px 0 0 -2px; *overflow:hidden; _margin:0; _position:absolute!important; background-color:#fff;}
-.laydate_body .laydate_box li{list-style:none;}
-.laydate_body .laydate_box .laydate_void{cursor:text!important;}
-.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{text-decoration:none; blr:expression(this.onFocus=this.blur()); cursor:pointer;}
-.laydate_body .laydate_box a:hover{text-decoration:none;}
-.laydate_body .laydate_box cite, .laydate_body .laydate_box label{position:absolute; width:0; height:0; border-width:5px; border-style:dashed; border-color:transparent; overflow:hidden; cursor:pointer;}
-.laydate_body .laydate_box .laydate_yms, .laydate_body .laydate_box .laydate_time{display:none;}
-.laydate_body .laydate_box .laydate_show{display:block;}
-.laydate_body .laydate_box input{outline:0; font-size:14px; background-color:#fff;}
-.laydate_body .laydate_top{position:relative; height:26px; padding:5px; *width:100%; z-index:99;}
-.laydate_body .laydate_ym{position:relative; float:left; height:24px; cursor:pointer;}
-.laydate_body .laydate_ym input{float:left; height:24px; line-height:24px; text-align:center; border:none; cursor:pointer;}
-.laydate_body .laydate_ym .laydate_yms{position:absolute; left: -1px; top: 24px; height:181px;}
-.laydate_body .laydate_y{width:121px;}
-.laydate_body .laydate_y input{width:64px; margin-right:15px;}
-.laydate_body .laydate_y .laydate_yms{width:121px; text-align:center;}
-.laydate_body .laydate_y .laydate_yms a{position:relative; display:block; height:20px;}
-.laydate_body .laydate_y .laydate_yms ul{height:139px; padding:0; *overflow:hidden;}
-.laydate_body .laydate_y .laydate_yms ul li{float:left; width:60px; height:20px; line-height: 20px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
-.laydate_box *{box-sizing:content-box!important;}
-.laydate_body .laydate_m{width:99px;float: right;margin-right:-2px;}
-.laydate_body .laydate_m .laydate_yms{width:99px; padding:0;}
-.laydate_body .laydate_m input{width:42px; margin-right:15px;}
-.laydate_body .laydate_m .laydate_yms span{display:block; float:left; width:42px; margin: 5px 0 0 5px; line-height:24px; text-align:center; _display:inline;}
-.laydate_body .laydate_choose{display:block; float:left; position:relative; width:20px; height:24px;}
-.laydate_body .laydate_choose cite, .laydate_body .laydate_tab cite{left:50%; top:50%;}
-.laydate_body .laydate_chtop cite{margin:-7px 0 0 -5px; border-bottom-style:solid;}
-.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{top:50%; margin:-2px 0 0 -5px; border-top-style:solid;}
-.laydate_body .laydate_chprev cite{margin:-5px 0 0 -7px;}
-.laydate_body .laydate_chnext cite{margin:-5px 0 0 -2px;}
-.laydate_body .laydate_ym label{right:28px;}
-.laydate_body .laydate_table{ width:230px; margin:0 5px; border-collapse:collapse; border-spacing:0px; }
-.laydate_body .laydate_table td{width:31px; height:19px; line-height:19px; text-align: center; cursor:pointer; font-size: 12px;}
-.laydate_body .laydate_table thead{height:22px; line-height:22px;}
-.laydate_body .laydate_table thead th{font-weight:400; font-size:12px; text-align:center;}
-.laydate_body .laydate_bottom{position:relative; height:22px; line-height:20px; padding:5px; font-size:12px;}
-.laydate_body .laydate_bottom #laydate_hms{position: relative; z-index: 1; float:left; }
-.laydate_body .laydate_time{ position:absolute; left:5px; bottom: 26px; width:129px; height:125px; *overflow:hidden;}
-.laydate_body .laydate_time .laydate_hmsno{ padding:5px 0 0 5px;}
-.laydate_body .laydate_time .laydate_hmsno span{display:block; float:left; width:24px; height:19px; line-height:19px; text-align:center; cursor:pointer; *margin-bottom:-5px;}
-.laydate_body .laydate_time1{width:228px; height:154px;}
-.laydate_body .laydate_time1 .laydate_hmsno{padding: 6px 0 0 8px;}
-.laydate_body .laydate_time1 .laydate_hmsno span{width:21px; height:20px; line-height:20px;}
-.laydate_body .laydate_msg{left:49px; bottom:67px; width:141px; height:auto; overflow: hidden;}
-.laydate_body .laydate_msg p{padding:5px 10px;}
-.laydate_body .laydate_bottom li{float:left; height:20px; line-height:20px; border-right:none; font-weight:900;}
-.laydate_body .laydate_bottom .laydate_sj{width:33px; text-align:center; font-weight:400;}
-.laydate_body .laydate_bottom input{float:left; width:21px; height:20px; line-height:20px; border:none; text-align:center; cursor:pointer; font-size:12px;  font-weight:400;}
-.laydate_body .laydate_bottom .laydte_hsmtex{height:20px; line-height:20px; text-align:center;}
-.laydate_body .laydate_bottom .laydte_hsmtex span{position:absolute; width:20px; top:0; right:0px; cursor:pointer;}
-.laydate_body .laydate_bottom .laydte_hsmtex span:hover{font-size:14px;}
-.laydate_body .laydate_bottom .laydate_btn{position:absolute; right:5px; top:5px;}
-.laydate_body .laydate_bottom .laydate_btn a{float:left; height:20px; padding:0 6px; _padding:0 5px;}
-.laydate_body .laydate_bottom .laydate_v{position:absolute; left:10px; top:6px; font-family:Courier; z-index:0;}
-

BIN
src/main/resources/static/ajax/libs/layer/laydate/skins/default/icon.png


+ 0 - 59
src/main/resources/static/ajax/libs/layer/laydate/skins/default/laydate.css

@@ -1,59 +0,0 @@
-/**
-
- @Name: laydate皮肤:墨绿
- @Author:贤心
- @Site:http://sentsin.com/layui/laydate
-
-**/
-
-.laydate-icon{border:1px solid #ccc; background-image:url(icon.png)}
-
-.laydate_body .laydate_bottom #laydate_hms,
-.laydate_body .laydate_time{border:1px solid #ccc;}
-
-.laydate_body .laydate_box,
-.laydate_body .laydate_ym .laydate_yms,
-.laydate_body .laydate_time{box-shadow: 2px 2px 5px rgba(0,0,0,.1);}
-
-.laydate_body .laydate_box{border-top:none; border-bottom:none; background-color:#fff; color:#00625A;}
-.laydate_body .laydate_box input{background:none!important; color:#fff;}
-.laydate_body .laydate_box .laydate_void{color:#00E8D7!important;}
-.laydate_body .laydate_box a, .laydate_body .laydate_box a:hover{color:#00625A;}
-.laydate_body .laydate_box a:hover{color:#666;}
-.laydate_body .laydate_click{background-color:#009F95!important; color:#fff!important;}
-.laydate_body .laydate_top{border-top:1px solid #009F95; background-color:#009F95}
-.laydate_body .laydate_ym{border:1px solid #009F95; background-color:#009F95;}
-.laydate_body .laydate_ym .laydate_yms{border:1px solid #009F95; background-color:#009F95; color:#fff;}
-.laydate_body .laydate_y .laydate_yms a{border-bottom:1px solid #009F95;}
-.laydate_body .laydate_y .laydate_yms .laydate_chdown{border-top:1px solid #009F95; border-bottom:none;}
-.laydate_body .laydate_choose{border-left:1px solid #009F95;}
-.laydate_body .laydate_chprev{border-left:none; border-right:1px solid #009F95;}
-.laydate_body .laydate_choose:hover,
-.laydate_body .laydate_y .laydate_yms a:hover{background-color:#00C1B3;}
-.laydate_body .laydate_chtop cite{border-bottom-color:#fff;}
-.laydate_body .laydate_chdown cite, .laydate_body .laydate_ym label{border-top-color:#fff;}
-.laydate_body .laydate_chprev cite{border-right-style:solid; border-right-color:#fff;}
-.laydate_body .laydate_chnext cite{border-left-style:solid; border-left-color:#fff;}
-.laydate_body .laydate_table{width: 240px!important; margin: 0!important; border:1px solid #ccc; border-top:none; border-bottom:none;}
-.laydate_body .laydate_table td{border:none;  height:21px!important; line-height:21px!important; background-color:#fff; color:#00625A;}
-.laydate_body .laydate_table .laydate_nothis{color:#999;}
-.laydate_body .laydate_table thead{border-bottom:1px solid #ccc; height:21px!important; line-height:21px!important;}
-.laydate_body .laydate_table thead th{}
-.laydate_body .laydate_bottom{border:1px solid #ccc; border-top:none;}
-.laydate_body .laydate_bottom #laydate_hms{background-color:#fff;}
-.laydate_body .laydate_time{background-color:#fff;}
-.laydate_body .laydate_time1{width: 226px!important; height: 152px!important;}
-.laydate_body .laydate_bottom .laydate_sj{width:31px!important; border-right:1px solid #ccc; background-color:#fff;}
-.laydate_body .laydate_bottom input{background-color:#fff; color:#00625A;}
-.laydate_body .laydate_bottom .laydte_hsmtex{border-bottom:1px solid #ccc;}
-.laydate_body .laydate_bottom .laydate_btn{border-right:1px solid #ccc;}
-.laydate_body .laydate_bottom .laydate_v{color:#999}
-.laydate_body .laydate_bottom .laydate_btn a{border: 1px solid #ccc; border-right:none; background-color:#fff;}
-.laydate_body .laydate_bottom .laydate_btn a:hover{background-color:#F6F6F6; color:#00625A;}
-
-.laydate_body .laydate_m .laydate_yms span:hover,
-.laydate_body .laydate_time .laydate_hmsno span:hover,
-.laydate_body .laydate_y .laydate_yms ul li:hover,
-.laydate_body .laydate_table td:hover{background-color:#00C1B3; color:#fff;}
-
-

File diff suppressed because it is too large
+ 0 - 1
src/main/resources/static/ajax/libs/layer/layer.js


File diff suppressed because it is too large
+ 0 - 1
src/main/resources/static/ajax/libs/layer/mobile/layer.js


File diff suppressed because it is too large
+ 0 - 0
src/main/resources/static/ajax/libs/layer/mobile/need/layer.css


BIN
src/main/resources/static/ajax/libs/layer/skin/default/icon-ext.png


BIN
src/main/resources/static/ajax/libs/layer/skin/default/icon.png


BIN
src/main/resources/static/ajax/libs/layer/skin/default/icon_ext.png


BIN
src/main/resources/static/ajax/libs/layer/skin/default/loading-0.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/loading-1.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/loading-2.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/textbg.png


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_ico0.png


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading0.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading1.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading2.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_loading3.gif


BIN
src/main/resources/static/ajax/libs/layer/skin/default/xubox_title0.png


File diff suppressed because it is too large
+ 0 - 6
src/main/resources/static/ajax/libs/layer/skin/layer.css


File diff suppressed because it is too large
+ 0 - 7
src/main/resources/static/ajax/libs/layer/skin/layer.ext.css


BIN
src/main/resources/static/ajax/libs/layer/skin/moon/default.png


+ 0 - 141
src/main/resources/static/ajax/libs/layer/skin/moon/style.css

@@ -1,141 +0,0 @@
-/*
- * layer皮肤
- * 作者:一☆隐☆一
- * QQ:9073194
- * 请保留这里的信息 谢谢!虽然你不保留我也不能把你怎么样!
- */
-
-html #layui_layer_skinmoonstylecss {
-	display: none;
-	position: absolute;
-	width: 1989px;
-}
-body .layer-ext-moon[type="dialog"] {
-	min-width: 320px;
-}
-body .layer-ext-moon-msg[type="dialog"]{min-width:200px;}
-body .layer-ext-moon .layui-layer-title {
-	background: #f6f6f6;
-	color: #212a31;
-	font-size: 16px;
-	font-weight: bold;
-	height: 46px;
-	line-height: 46px;
-}
-
-
-
-body .layer-ext-moon .layui-layer-content .layui-layer-ico {
-	height: 32px;
-	width: 32px;
-	top:18.5px;
-}
-body .layer-ext-moon .layui-layer-ico0 {
-	background: url(default.png) no-repeat -96px 0;
-	;
-}
-body .layer-ext-moon .layui-layer-ico1 {
-	background: url(default.png) no-repeat -224px 0;
-	;
-}
-body .layer-ext-moon .layui-layer-ico2 {
-	background: url(default.png) no-repeat -192px 0;
-}
-body .layer-ext-moon .layui-layer-ico3 {
-	background: url(default.png) no-repeat -160px 0;
-}
-body .layer-ext-moon .layui-layer-ico4 {
-	background: url(default.png) no-repeat -320px 0;
-}
-body .layer-ext-moon .layui-layer-ico5 {
-	background: url(default.png) no-repeat -288px 0;
-}
-body .layer-ext-moon .layui-layer-ico6 {
-	background: url(default.png) -256px 0;
-}
-body .layer-ext-moon .layui-layer-ico7 {
-	background: url(default.png) no-repeat -128px 0;
-}
-body .layer-ext-moon .layui-layer-setwin {
-	top: 15px;
-	right: 15px;
-}
-body .layer-ext-moon .layui-layer-setwin a {
-	width: 16px;
-	height: 16px;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-min cite:hover {
-	background-color: #56abe4;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-max {
-	background: url(default.png) no-repeat -80px 0;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-max:hover {
-	background: url(default.png) no-repeat -64px 0;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin {
-	background: url(default.png) no-repeat -32px 0;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-maxmin:hover {
-	background: url(default.png) no-repeat -16px 0;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-close1,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2 {
-	background: url(default.png) 0 0;
-}
-body .layer-ext-moon .layui-layer-setwin .layui-layer-close1:hover,body .layer-ext-moon .layui-layer-setwin .layui-layer-close2:hover {
-	background: url(default.png) -48px 0;
-}
-body .layer-ext-moon .layui-layer-padding{padding-top: 24px;}
-body .layer-ext-moon .layui-layer-btn {
-	padding: 15px 0;
-	background: #f0f4f7;
-	border-top: 1px #c7c7c7 solid;
-}
-body .layer-ext-moon .layui-layer-btn a {
-	font-size: 12px;
-	font-weight: normal;
-	margin: 0 3px;
-	margin-right: 7px;
-	margin-left: 7px;
-	padding: 6px 20px;
-	color: #fff;
-	border: 1px solid #0064b6;
-	background: #0071ce;
-	border-radius: 3px;
-	display: inline-block;
-	height: 20px;
-	line-height: 20px;
-	text-align: center;
-	vertical-align: middle;
-	background-repeat: no-repeat;
-	text-decoration: none;
-	outline: none;
-	-moz-box-sizing: content-box;
-	-webkit-box-sizing: content-box;
-	box-sizing: content-box;
-}
-body .layer-ext-moon .layui-layer-btn .layui-layer-btn0 {
-	background: #0071ce;
-}
-body .layer-ext-moon .layui-layer-btn .layui-layer-btn1 {
-	background: #fff;
-	color: #404a58;
-	border: 1px solid #c0c4cd;
-	border-radius: 3px;
-}
-body .layer-ext-moon .layui-layer-btn .layui-layer-btn2 {
-	background: #f60;
-	color: #fff;
-	border: 1px solid #f60;
-	border-radius: 3px;
-}
-body .layer-ext-moon .layui-layer-btn .layui-layer-btn3 {
-	background: #f00;
-	color: #fff;
-	border: 1px solid #f00;
-	border-radius: 3px;
-}
-
-body .layer-ext-moon .layui-layer-title span.layui-layer-tabnow{
-	height:46px;
-}

File diff suppressed because it is too large
+ 0 - 0
src/main/resources/static/ajax/libs/layer/theme/default/layer.css


BIN
src/main/resources/static/css/.DS_Store


File diff suppressed because it is too large
+ 0 - 2031
src/main/resources/static/css/font-awesome.css


BIN
src/main/resources/static/img/.DS_Store


BIN
src/main/resources/static/img/bg.png


BIN
src/main/resources/static/img/blue.png


BIN
src/main/resources/static/img/icons.png


BIN
src/main/resources/static/img/sprite-skin-flat.png


BIN
src/main/resources/static/img/success.png


BIN
src/main/resources/static/img/webuploader.png


BIN
src/main/resources/static/js/.DS_Store


BIN
src/main/resources/static/js/plugins/.DS_Store


+ 209 - 135
src/main/resources/static/ruoyi/css/ry-ui.css

@@ -1,10 +1,9 @@
-/*!
- *   ruoyi.css
- *   Author: Ruoyi
+/**
+ * 通用css样式布局处理
+ * Copyright (c) 2018 ruoyi
  */
 
 /** 用户管理 样式布局 */
-
 .box {
 	position: relative;
 	border-radius: 3px;
@@ -25,15 +24,15 @@
 }
 
 .btn-box-tool {
-  padding: 5px;
-  font-size: 12px;
-  background: transparent;
-  color: #97a0b3;
+	padding: 5px;
+	font-size: 12px;
+	background: transparent;
+	color: #97a0b3;
 }
 
 .open .btn-box-tool,
 .btn-box-tool:hover {
-  color: #606c84;
+	color: #606c84;
 }
 
 .box-main {
@@ -50,10 +49,10 @@
 }
 
 .box-header .box-title {
-  display: inline-block;
-  font-size: 18px;
-  margin: 0;
-  line-height: 1;
+	display: inline-block;
+	font-size: 18px;
+	margin: 0;
+	line-height: 1;
 }
 
 .box-main>.box-header .box-title {
@@ -137,85 +136,149 @@ label.error {
 }
 
 .i-checks label.error, .check-box label.error, .radio-box label.error {
-    right:auto;
-    width:150px;
-    left:210px;
-    top:1px;
-    max-width: none;
+	right: auto;
+	width: 150px;
+	left: 210px;
+	top: 1px;
+	max-width: none;
 }
 
-/** 内联复选框&单选框  */
+/** 复选框&单选框  */
 .check-box,.radio-box {
-    display:inline-block;
-    box-sizing:border-box;
-    cursor:pointer;
-    position:relative;
-    padding-right:20px;
-    padding-top:7px;
+	display: inline-block;
+	box-sizing: border-box;
+	cursor: pointer;
+	position: relative;
+	padding-left: 25px;
+	padding-right: 15px;
+	padding-top: 8px;
+}
+
+.icheckbox, .icheckbox-blue, .iradio, .iradio-blue, .iradio-purple {
+	position: absolute;
+	top: 8px;
+	left: 0
+}
+
+/* iCheck */
+.icheckbox-blue,.iradio-blue {
+	display: block;
+	margin: 0;
+	padding: 0;
+	width: 18px;
+	height: 18px;
+	background: url(/img/blue.png) no-repeat;
+	border: none;
+	cursor: pointer
+}
+
+.icheckbox-blue,.icheckbox-blue.static:hover {
+	background-position: 0 0
+}
+
+.icheckbox-blue.hover,.icheckbox-blue:hover {
+	background-position: -20px 0
+}
+
+.icheckbox-blue.checked {
+	background-position: -40px 0
+}
+
+.icheckbox-blue.disabled {
+	background-position: -60px 0;
+	cursor: default
+}
+
+.icheckbox-blue.checked.disabled {
+	background-position: -80px 0
+}
+
+.iradio-blue,.iradio-blue.static:hover {
+	background-position: -100px 0
+}
+
+.iradio-blue.hover,.iradio-blue:hover {
+	background-position: -120px 0
+}
+
+.iradio-blue.checked {
+	background-position: -140px 0
+}
+
+.iradio-blue.disabled {
+	background-position: -160px 0;
+	cursor: default
+}
+
+.iradio-blue.checked.disabled {
+	background-position: -180px 0
 }
 
 /** 遮罩层 */
 .loaderbox {
-  display: inline-block;
-  min-width: 125px;
-  padding: 10px;
-  margin: 0 auto;
-  color: #000 !important;
-  font-size: 13px;
-  font-weight: 400;
-  text-align: center;
-  vertical-align: middle;
-  border: 1px solid #ddd;
-  background-color: #eee;
-  -webkit-border-radius: 2px;
-  -moz-border-radius: 2px;
-  -ms-border-radius: 2px;
-  -o-border-radius: 2px;
-  border-radius: 2px;
-  -webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
-  -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+	display: inline-block;
+	min-width: 125px;
+	padding: 10px;
+	margin: 0 auto;
+	color: #000 !important;
+	font-size: 13px;
+	font-weight: 400;
+	text-align: center;
+	vertical-align: middle;
+	border: 1px solid #ddd;
+	background-color: #eee;
+	-webkit-border-radius: 2px;
+	-moz-border-radius: 2px;
+	-ms-border-radius: 2px;
+	-o-border-radius: 2px;
+	border-radius: 2px;
+	-webkit-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+	-moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
+	box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
 }
 
 .loaderbox .loading-activity {
-  float: left;
-  width: 18px;
-  height: 18px;
-  border: solid 2px transparent;
-  border-top-color: #000;
-  border-left-color: #000;
-  border-radius: 10px;
-  -webkit-animation: pace-spinner 400ms linear infinite;
-  -moz-animation: pace-spinner 400ms linear infinite;
-  -ms-animation: pace-spinner 400ms linear infinite;
-  -o-animation: pace-spinner 400ms linear infinite;
-  animation: pace-spinner 400ms linear infinite;
+	float: left;
+	width: 18px;
+	height: 18px;
+	border: solid 2px transparent;
+	border-top-color: #000;
+	border-left-color: #000;
+	border-radius: 10px;
+	-webkit-animation: pace-spinner 400ms linear infinite;
+	-moz-animation: pace-spinner 400ms linear infinite;
+	-ms-animation: pace-spinner 400ms linear infinite;
+	-o-animation: pace-spinner 400ms linear infinite;
+	animation: pace-spinner 400ms linear infinite;
 }
 
 @media (max-width: 767px) {
-  .loading-activity {
-    width: 18px;
-    height: 18px;
-  }
+	.loading-activity {
+		width: 18px;
+		height: 18px;
+	}
 }
 
 @-ms-keyframes pace-spinner {
-  0% {
-    -ms-transform: rotate(0deg);
-    transform: rotate(0deg);
-  }
-  100% {
-    -ms-transform: rotate(360deg);
-    transform: rotate(360deg);
-  }
+	0% {
+		-ms-transform: rotate(0deg);
+		transform: rotate(0deg);
+	}
+
+	100% {
+		-ms-transform: rotate(360deg);
+		transform: rotate(360deg);
+	}
 }
+
 @keyframes pace-spinner {
-  0% {
-    transform: rotate(0deg);
-  }
-  100% {
-    transform: rotate(360deg);
-  }
+	0% {
+		transform: rotate(0deg);
+	}
+
+	100% {
+		transform: rotate(360deg);
+	}
 }
 
 /** 表单查询条件 */
@@ -236,12 +299,12 @@ li {
 }
 
 label {
-    font-weight: normal;
+	font-weight: normal;
 }
 
 .container-div {
-	padding:10px 35px;
-	height:100%;
+	padding: 10px 35px;
+	height: 100%;
 }
 
 .container-div .row {
@@ -249,13 +312,13 @@ label {
 }
 
 .select-info,.select-table {
-	width:100%;
+	width: 100%;
 	background: #fff;
-    border-radius: 6px;
-    margin-top:10px;
-    padding-top: 5px;
-    padding-bottom: 13px;
-    box-shadow: 1px 1px 3px rgba(0,0,0,.2);
+	border-radius: 6px;
+	margin-top: 10px;
+	padding-top: 5px;
+	padding-bottom: 13px;
+	box-shadow: 1px 1px 3px rgba(0,0,0,.2);
 }
 
 .select-info {
@@ -263,97 +326,108 @@ label {
 }
 
 .select-info .col-sm-6 .control-label {
-	color:#333;
+	color: #333;
 }
 
 @media ( max-width : 768px) {
-    .select-info {
-        display: none;
-    }
+	.select-info {
+		display: none;
+	}
 }
 
-.select-list li{
-	float:left;
-	color:#333;
+.select-list li {
+	float: left;
+	color: #333;
 	margin: 5px 15px 5px 0px;
 }
-.select-list li input{
-	border:1px solid #ddd;
+
+.select-list li input {
+	border: 1px solid #ddd;
 	border-radius: 4px;
 	background: transparent;
 	outline: none;
 	height: 30px;
-	width:280px;
-	padding-left:5px;
+	width: 280px;
+	padding-left: 5px;
 }
-.select-list li .submit-btn{
-	border:0px;
+
+.select-list li .submit-btn {
+	border: 0px;
 	border-radius: 4px;
 	background: transparent;
 	outline: none;
 	width: 40px;
-    height: 23px;
+	height: 23px;
 }
-.select-list li select{
-	border:1px solid #ddd;
+
+.select-list li select {
+	border: 1px solid #ddd;
 	border-radius: 4px;
 	background: transparent;
 	outline: none;
 	height: 30px;
-	width:280px;
+	width: 280px;
 }
 
-.select-list .select-time input{
-	width:133px;
+.select-list .select-time input {
+	width: 133px;
 }
 
-.select-time label,.select-time span,.select-time input{
-	float:left;
+.select-time label,.select-time span,.select-time input {
+	float: left;
 }
-.select-time label{
-	    margin-top: 5px;
+
+.select-time label {
+	margin-top: 5px;
 }
-.select-time span{
-	    display: block;
-    margin: 5px 5px;
+
+.select-time span {
+	display: block;
+	margin: 5px 5px;
 }
-.search-btn{
+
+.search-btn {
 	background-color: #1ab394;
-    border-color: #1ab394;
-    color: #FFF;
-    margin-bottom: 5px;
-    display: inline-block;
-    padding: 6px 12px;
-    margin-bottom: 0;
-    font-size: 14px;
-    font-weight: 400;
-    line-height: 1.42857143;
-    text-align: center;
-    white-space: nowrap;
-    border-radius: 3px;
-    vertical-align: middle;
-    cursor: pointer;
+	border-color: #1ab394;
+	color: #FFF;
+	margin-bottom: 5px;
+	display: inline-block;
+	padding: 6px 12px;
+	margin-bottom: 0;
+	font-size: 14px;
+	font-weight: 400;
+	line-height: 1.42857143;
+	text-align: center;
+	white-space: nowrap;
+	border-radius: 3px;
+	vertical-align: middle;
+	cursor: pointer;
 }
 
 /** 表格查询数据 */
-.table-striped{
-	min-height:75%;
+.table-striped {
+	min-height: 75%;
 }
-.table-striped .bootstrap-table{
-	border:0px!important;
+
+.table-striped .bootstrap-table {
+	border: 0px!important;
 }
-.table-striped .table, .fixed-table-container, table, .table-striped .table, .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{
-   border-bottom: 1px solid #e7eaec!important;
-   background-color: transparent!important;
-   border: 0px;
+
+.table-striped .table, .fixed-table-container, table, .table-striped .table, .table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td {
+	border-bottom: 1px solid #e7eaec!important;
+	background-color: transparent!important;
+	border: 0px;
 }
-.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th{
+
+.table-striped .table>thead>tr>th, .table-striped .table>tbody>tr>th {
 	border-bottom: 1px solid #ccc!important;
 	border-top: 0px!important;
 }
-.table-striped .table>thead:first-child>tr:first-child>th{
-	color:#333;
+
+.table-striped .table>thead:first-child>tr:first-child>th {
+	color: #333;
 }
+
 .table-bordered td,.table-bordered th {
 	border: 1px solid #ddd!important
 }

File diff suppressed because it is too large
+ 3 - 3
src/main/resources/static/ruoyi/css/ry-ui.min.css


+ 24 - 8
src/main/resources/static/ruoyi/js/common.js

@@ -3,8 +3,8 @@
  * Copyright (c) 2018 ruoyi 
  */
 
-$(function(){
-	// 复选框事件绑定
+$(function() {
+	// select2复选框事件绑定
 	if ($.fn.select2 !== undefined) {
 		$("select.form-control:not(.noselect2)").each(function () {
 			$(this).select2().on("change", function () {
@@ -12,18 +12,21 @@ $(function(){
 			})
 		})
 	}
-	if ($(".i-checks").length > 0) {
-	    $(".i-checks").iCheck({
-	        checkboxClass: "icheckbox_square-green",
-	        radioClass: "iradio_square-green",
+	// checkbox 事件绑定
+	if ($(".check-box").length > 0) {
+	    $(".check-box").iCheck({
+	    	checkboxClass: 'icheckbox-blue',
+			radioClass: 'iradio-blue',
 	    })
 	}
+	// radio 事件绑定
 	if ($(".radio-box").length > 0) {
 	    $(".radio-box").iCheck({
-	        checkboxClass: "icheckbox_square-green",
-	        radioClass: "iradio_square-green",
+	    	checkboxClass: 'icheckbox-blue',
+			radioClass: 'iradio-blue',
 	    })
 	}
+	// laydate 时间控件绑定
 	if ($(".select-time").length > 0) {
 		layui.use('laydate', function() {
 		    var laydate = layui.laydate;
@@ -31,6 +34,19 @@ $(function(){
 		    laydate.render({ elem: '#endTime', theme: 'molv' });
 		});
 	}
+	// tree 关键字搜索绑定
+	if ($("#keyword").length > 0) {
+		$("#keyword").bind("focus", function focusKey(e) {
+		    if ($("#keyword").hasClass("empty")) {
+		        $("#keyword").removeClass("empty");
+		    }
+		}).bind("blur", function blurKey(e) {
+		    if ($("#keyword").val() === "") {
+		        $("#keyword").addClass("empty");
+		    }
+		    $.tree.searchNode(e);
+		}).bind("input propertychange", $.tree.searchNode);
+	}
 });
 
 /** 创建选项卡 */

+ 202 - 10
src/main/resources/static/ruoyi/js/ry-ui.js

@@ -1,9 +1,11 @@
 /**
- * 通用方法封装处理
+ * 通用js方法封装处理
  * Copyright (c) 2018 ruoyi
  */
 (function ($) {
     $.extend({
+    	_treeTable: {},
+    	_tree: {},
     	// 表格封装处理
     	table: {
             _option: {},
@@ -111,10 +113,10 @@
         	    });
             },
             // 回显数据字典
-            selectDictLabel: function(_datas, _value) {
+            selectDictLabel: function(datas, value) {
             	var actions = [];
-                $.each(_datas, function(index, dict) {
-                    if (dict.dictValue == _value) {
+                $.each(datas, function(index, dict) {
+                    if (dict.dictValue == value) {
                     	actions.push("<span class='badge badge-" + dict.listClass + "'>" + dict.dictLabel + "</span>");
                         return false;
                     }
@@ -125,7 +127,6 @@
         // 表格树封装处理
         treeTable: {
             _option: {},
-            _treeTable: {},
             // 初始化表格
             init: function(options) {
                 $.table._option = options;
@@ -141,7 +142,7 @@
         			expandAll : $.common.visible(options.expandAll), // 是否全部展开
         	        columns: options.columns
         	    });
-                $.treeTable._treeTable = treeTable;
+                $._treeTable = treeTable;
             },
             // 条件查询
             search: function(formId) {
@@ -150,11 +151,11 @@
             	$.each($("#" + currentId).serializeArray(), function(i, field) {
             		params[field.name] = field.value;
 		        });
-            	$.treeTable._treeTable.bootstrapTreeTable('refresh', params);
+            	$._treeTable.bootstrapTreeTable('refresh', params);
             },
             // 刷新
             refresh: function() {
-            	$.treeTable._treeTable.bootstrapTreeTable('refresh');
+            	$._treeTable.bootstrapTreeTable('refresh');
             },
         },
         // 表单封装处理
@@ -285,7 +286,7 @@
                     title = false;
                 };
                 if ($.common.isEmpty(url)) {
-                    url = "404.html";
+                    url = "/404.html";
                 };
                 if ($.common.isEmpty(width)) {
                 	width = 800;
@@ -306,6 +307,29 @@
             		shadeClose: true
             	});
             },
+            // 弹出层指定参数选项
+            openOptions: function (options) {
+            	var _url = $.common.isEmpty(options.url) ? "/404.html" : options.url; 
+            	var _title = $.common.isEmpty(options.title) ? "系统窗口" : options.title; 
+                var _width = $.common.isEmpty(options.width) ? "800" : options.width; 
+                var _height = $.common.isEmpty(options.height) ? ($(window).height() - 50) : options.height;
+                layer.open({
+                    type: 2,
+            		maxmin: true,
+                    shade: 0.3,
+                    title: _title,
+                    fix: false,
+                    area: [_width + 'px', _height + 'px'],
+                    content: _url,
+                    shadeClose: true,
+                    btn: ['<i class="fa fa-check"></i> 确认', '<i class="fa fa-close"></i> 关闭'],
+                    yes: function (index, layero) {
+                        options.callBack(index, layero)
+                    }, cancel: function () {
+                        return true;
+                    }
+                });
+            },
             // 弹出层全屏
             openFull: function (title, url, width, height) {
             	//如果是移动端,就使用自适应大小弹窗
@@ -317,7 +341,7 @@
                     title = false;
                 };
                 if ($.common.isEmpty(url)) {
-                    url = "404.html";
+                    url = "/404.html";
                 };
                 if ($.common.isEmpty(width)) {
                 	width = 800;
@@ -459,6 +483,170 @@
                 return false;
             }
         },
+        // 树插件封装处理
+        tree: {
+        	_option: {},
+        	_lastValue: {},
+        	// 初始化树结构
+        	init: function(options) {
+        		$.tree._option = options;
+        		// 属性ID
+        		var _id = $.common.isEmpty(options.id) ? "tree" : options.id;
+        		// 展开等级节点
+        		var _expandLevel = $.common.isEmpty(options.expandLevel) ? 0 : options.expandLevel;
+        		// 树结构初始化加载
+        	    var setting = {
+        	    	check: options.check,
+        	        view: { selectedMulti: false, nameIsHTML: true },
+        	        data: { key: { title: "title" }, simpleData: { enable: true } },
+        	        callback: { onClick: options.onClick }
+        	    };
+        	    $.get(options.url, function(data) {
+        	    	var treeName = $("#treeName").val();
+        			var treeId = $("#treeId").val();
+        			tree = $.fn.zTree.init($("#" + _id), setting, data);
+        			$._tree = tree;
+        			// 展开第一级节点
+        			var nodes = tree.getNodesByParam("level", 0);
+        			for (var i = 0; i < nodes.length; i++) {
+        				if(_expandLevel > 0) {
+        					tree.expandNode(nodes[i], true, false, false);
+        				}
+    				    $.tree.selectByIdName(treeId, treeName, nodes[i]);
+        			}
+        			// 展开第二级节点
+        			nodes = tree.getNodesByParam("level", 1);
+        			for (var i = 0; i < nodes.length; i++) {
+        				if(_expandLevel > 1) {
+        					tree.expandNode(nodes[i], true, false, false);
+        				}
+    				    $.tree.selectByIdName(treeId, treeName, nodes[i]);
+        			}
+        			// 展开第三级节点
+        			nodes = tree.getNodesByParam("level", 2);
+        			for (var i = 0; i < nodes.length; i++) {
+        				if(_expandLevel > 2) {
+        					tree.expandNode(nodes[i], true, false, false);
+        				}
+    				    $.tree.selectByIdName(treeId, treeName, nodes[i]);
+        			}
+        		}, null, null, "正在加载,请稍后...");
+        	},
+        	// 搜索节点
+        	searchNode: function() {
+        		// 取得输入的关键字的值
+        		var value = $.common.trim($("#keyword").val());
+        		if ($.tree._lastValue === value) {
+        		    return;
+        		}
+        		// 保存最后一次搜索名称
+        		$.tree._lastValue = value;
+        		var nodes = $._tree.getNodes();
+        		// 如果要查空字串,就退出不查了。
+        		if (value == "") {
+        		    $.tree.showAllNode(nodes);
+        		    return;
+        		}
+        		$.tree.hideAllNode(nodes);
+        		// 根据搜索值模糊匹配
+        		$.tree.updateNodes($._tree.getNodesByParamFuzzy("name", value));
+        	},
+        	// 根据Id和Name选中指定节点
+        	selectByIdName: function(treeId, treeName, node) {
+        		if ($.common.isNotEmpty(treeName) && $.common.isNotEmpty(treeId)) {
+        			if (treeId == node.id && treeName == node.name) {
+            			$._tree.selectNode(node, true);
+            		}
+        		}
+        	},
+        	// 显示所有节点
+        	showAllNode: function(nodes) {
+        		nodes = $._tree.transformToArray(nodes);
+        		for (var i = nodes.length - 1; i >= 0; i--) {
+        		    if (nodes[i].getParentNode() != null) {
+        		    	$._tree.expandNode(nodes[i], true, false, false, false);
+        		    } else {
+        		    	$._tree.expandNode(nodes[i], true, true, false, false);
+        		    }
+        		    $._tree.showNode(nodes[i]);
+        		    $.tree.showAllNode(nodes[i].children);
+        		}
+        	},
+        	// 隐藏所有节点
+        	hideAllNode: function(nodes) {
+        	    var tree = $.fn.zTree.getZTreeObj("tree");
+        	    var nodes = $._tree.transformToArray(nodes);
+        	    for (var i = nodes.length - 1; i >= 0; i--) {
+        	    	$._tree.hideNode(nodes[i]);
+        	    }
+        	},
+        	// 显示所有父节点
+        	showParent: function(treeNode) {
+        		var parentNode;
+        		while ((parentNode = treeNode.getParentNode()) != null) {
+        			$._tree.showNode(parentNode);
+        			$._tree.expandNode(parentNode, true, false, false);
+        		    treeNode = parentNode;
+        		}
+        	},
+        	// 显示所有孩子节点
+        	showChildren: function(treeNode) {
+        		if (treeNode.isParent) {
+        		    for (var idx in treeNode.children) {
+        		        var node = treeNode.children[idx];
+        		        $._tree.showNode(node);
+        		        $.tree.showChildren(node);
+        		    }
+        		}
+        	},
+        	// 更新节点状态
+        	updateNodes: function(nodeList) {
+        		$._tree.showNodes(nodeList);
+        		for (var i = 0, l = nodeList.length; i < l; i++) {
+        		    var treeNode = nodeList[i];
+        		    $.tree.showChildren(treeNode);
+        		    $.tree.showParent(treeNode)
+        		}
+        	},
+        	// 获取当前被勾选集合
+        	getCheckedNodes: function(column) {
+        		var _column = $.common.isEmpty(column) ? "id" : column;
+        		var nodes = $._tree.getCheckedNodes(true);
+        		return $.map(nodes, function (row) {
+        	        return row[_column];
+        	    }).join();
+        	},
+        	// 不允许根父节点选择
+        	notAllowParents: function(_tree) {
+    		    var nodes = _tree.getSelectedNodes();
+    		    for (var i = 0; i < nodes.length; i++) {
+    		        if (nodes[i].level == 0) {
+    		            $.modal.msgError("不能选择根节点(" + nodes[i].name + ")");
+    		            return false;
+    		        }
+    		        if (nodes[i].isParent) {
+    		            $.modal.msgError("不能选择父节点(" + nodes[i].name + ")");
+    		            return false;
+    		        }
+    		    }
+        		return true;
+        	},
+        	// 隐藏/显示搜索栏
+        	toggleSearch: function() {
+        		$('#search').slideToggle(200);
+        		$('#btnShow').toggle();
+        		$('#btnHide').toggle();
+        		$('#keyword').focus();
+        	},
+        	// 折叠
+        	collapse: function() {
+        		$._tree.expandAll(false);
+        	},
+        	// 展开
+        	expand: function() {
+        		$._tree.expandAll(true);
+        	}
+        },
         // 通用方法封装处理
     	common: {
     		// 判断字符串是否为空
@@ -468,6 +656,10 @@
                 }
                 return false;
             },
+            // 判断一个字符串是否为非空串
+            isNotEmpty: function (value) {
+            	return !$.common.isEmpty(value);
+            },
             // 是否显示数据 为空默认为显示
             visible: function (value) {
                 if ($.common.isEmpty(value) || value == true) {

File diff suppressed because it is too large
+ 3 - 3
src/main/resources/static/ruoyi/js/ry-ui.min.js


+ 3 - 4
src/main/resources/templates/include.html

@@ -6,14 +6,13 @@
 	<meta name="description" content="">
 	<link rel="shortcut icon" href="favicon.ico">
 	<link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
-	<link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+	<link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
 	<!-- bootstrap-table 表格插件样式 -->
 	<link th:href="@{/ajax/libs/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
 	<link th:href="@{/ajax/libs/bootstrap-treetable/bootstrap-treetable.css}" rel="stylesheet"/>
 	<link th:href="@{/css/animate.css}" rel="stylesheet"/>
 	<link th:href="@{/css/style.css}" rel="stylesheet"/>
 	<link th:href="@{/ajax/libs/select/select2.css}" rel="stylesheet"/>
-	<link th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
 	<link th:href="@{/ruoyi/css/ry-ui.min.css}" rel="stylesheet"/>
 </head>
 <div th:fragment="footer">
@@ -39,8 +38,8 @@
 	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	<script th:src="@{/ajax/libs/layer/layer.min.js}"></script>
 	<script th:src="@{/ajax/libs/layui/layui.js}"></script>
-	<script th:src="@{/ruoyi/js/common.js?v=2.3.0}"></script>
-	<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
+	<script th:src="@{/ruoyi/js/common.js?v=2.4.0}"></script>
+	<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
 	<script src="http://tajs.qq.com/stats?sId=62048022"></script>
 	<script th:inline="javascript"> var ctx = [[@{/}]]; </script>
 </div>

+ 3 - 3
src/main/resources/templates/index.html

@@ -12,10 +12,10 @@
     <![endif]-->
     <link th:href="@{favicon.ico}" rel="stylesheet"/>
     <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
-    <link th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
     <link th:href="@{/css/animate.css}" rel="stylesheet"/>
     <link th:href="@{/css/style.css}" rel="stylesheet"/>
-    <link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
+    <link th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/>
     <style type="text/css">
         .nav > li:hover .dropdown-menu {display: block;}
     </style>
@@ -136,7 +136,7 @@
 <script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
 <script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
 <script src="http://tajs.qq.com/stats?sId=62048022"></script>
-<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
+<script th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
 <script th:src="@{/ruoyi/index.js}"></script>
 <script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
 </body>

+ 3 - 3
src/main/resources/templates/login.html

@@ -8,11 +8,11 @@
     <meta name="keywords" content="若依管理系统">
     <meta name="description" content="RuoYi">
     <link href="../static/css/bootstrap.min.css" th:href="@{css/bootstrap.min.css}" rel="stylesheet"/>
-    <link href="../static/css/font-awesome.css" th:href="@{css/font-awesome.css}" rel="stylesheet"/>
+    <link href="../static/css/font-awesome.min.css" th:href="@{css/font-awesome.min.css}" rel="stylesheet"/>
     <link href="../static/css/style.css" th:href="@{css/style.css}" rel="stylesheet"/>
     <link href="../static/css/login.min.css" th:href="@{css/login.min.css}" rel="stylesheet"/>
     <link href="../static/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
-    <link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.3.0}" rel="stylesheet"/>
+    <link href="../static/ruoyi/css/ry-ui.min.css" th:href="@{/ruoyi/css/ry-ui.min.css?v=2.4.0}" rel="stylesheet"/>
     <!--[if lt IE 9]>
     <meta http-equiv="refresh" content="0;ie.html" />
     <![endif]-->
@@ -82,7 +82,7 @@
 <script src="../static/ajax/libs/iCheck/icheck.min.js" th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 <script src="../static/ajax/libs/blockUI/jquery.blockUI.js" th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
 <script src="http://tajs.qq.com/stats?sId=62048022"></script>
-<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.3.0}"></script>
+<script src="../static/ruoyi/js/ry-ui.min.js" th:src="@{/ruoyi/js/ry-ui.min.js?v=2.4.0}"></script>
 <script src="../static/ruoyi/login.js" th:src="@{/ruoyi/login.js}"></script>
 </body>
 </html>

+ 52 - 21
src/main/resources/templates/main.html

@@ -7,7 +7,7 @@
     <title>若依介绍</title>
     <link rel="shortcut icon" href="favicon.ico">
     <link href="../static/css/bootstrap.min.css" th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
-    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.css}" rel="stylesheet"/>
+    <link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
     <link href="../static/css/main/animate.min.css" th:href="@{/css/main/animate.min.css}" rel="stylesheet"/>
     <link href="../static/css/main/style.min862f.css" th:href="@{/css/main/style.min862f.css}" rel="stylesheet"/>
 </head>
@@ -94,13 +94,44 @@
                     <div class="ibox-content no-padding">
                         <div class="panel-body">
                             <div class="panel-group" id="version">
-                            <div class="panel panel-default">
+							<div class="panel panel-default">
 								<div class="panel-heading">
+								   <h5 class="panel-title">
+									   <a data-toggle="collapse" data-parent="#version" href="#v24">v2.4.0</a><code class="pull-right">2018.09.03</code>
+								   </h5>
+								</div>
+								<div id="v24" class="panel-collapse collapse in">
+									<div class="panel-body">
+									   <ol>
+											<li>支持部门多级查询</li>
+											<li>修复菜单状态查询无效</li>
+											<li>支持IP地址开关</li>
+											<li>支持XSS开关</li>
+											<li>记录日志异步处理</li>
+											<li>字典回显样式更改为下拉框</li>
+											<li>菜单类型必填校验</li>
+											<li>修复在线用户排序报错</li>
+											<li>增加重置按钮</li>
+											<li>支持注解导入数据</li>
+											<li>支持弹层外区域关闭</li>
+											<li>备注更换为文本区域</li>
+											<li>新增角色逻辑删除</li>
+											<li>新增部门逻辑删除</li>
+											<li>支持部门数据权限</li>
+											<li>管理员默认拥有所有授权</li>
+											<li>字典数据采用分页</li>
+											<li>部分细节调整优化</li>
+										</ol>
+									</div>
+								</div>
+							</div>
+                            <div class="panel panel-default">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v23">v2.3.0</a><code class="pull-right">2018.08.06</code>
 									   </h5>
 									</div>
-									<div id="v23" class="panel-collapse collapse in">
+									<div id="v23" class="panel-collapse collapse">
 										<div class="panel-body">
 										   <ol>
 										        <li>支持表格不分页开关控制</li>
@@ -125,7 +156,7 @@
 									</div>
 								</div>
                                 <div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v22">v2.2.0</a><code class="pull-right">2018.07.23</code>
 									   </h5>
@@ -149,7 +180,7 @@
 									</div>
 								</div>
                                 <div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v21">v2.1.0</a><code class="pull-right">2018.07.10</code>
 									   </h5>
@@ -174,7 +205,7 @@
 									</div>
 								</div>
                             	<div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v20">v2.0.0</a><code class="pull-right">2018.07.02</code>
 									   </h5>
@@ -197,7 +228,7 @@
 									</div>
 								</div>
                                 <div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v16">v1.1.6</a><code class="pull-right">2018.06.04</code>
 									   </h5>
@@ -219,7 +250,7 @@
 									</div>
 								</div>
                             	<div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v15">v1.1.5</a><code class="pull-right">2018.05.28</code>
 									   </h5>
@@ -241,7 +272,7 @@
 									</div>
 								</div>
 							    <div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v14">v1.1.4</a><code class="pull-right">2018.05.20</code>
 									   </h5>
@@ -263,7 +294,7 @@
 									</div>
 								</div>
 								<div class="panel panel-default">
-								<div class="panel-heading">
+									<div class="panel-heading">
 									   <h5 class="panel-title">
 										   <a data-toggle="collapse" data-parent="#version" href="#v13">v1.1.3</a><code class="pull-right">2018.05.14</code>
 									   </h5>
@@ -284,7 +315,7 @@
 									</div>
 								</div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v12">v1.1.2</a><code class="pull-right">2018.05.07</code>
 										</h5>
@@ -306,7 +337,7 @@
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v11">v1.1.1</a><code class="pull-right">2018.04.23</code>
 										</h5>
@@ -325,7 +356,7 @@
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v10">v1.1.0</a><code class="pull-right">2018.04.20</code>
 										</h5>
@@ -345,7 +376,7 @@
                                     </div>
                                 </div>
                                 <div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v09">v1.0.9</a><code class="pull-right">2018.04.14</code>
 										</h5>
@@ -360,7 +391,7 @@
                                     </div>
                                 </div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v08">v1.0.8</a><code class="pull-right">2018.04.08</code>
 										</h5>
@@ -375,7 +406,7 @@
                                     </div>
                                 </div>
                             	<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v07">v1.0.7</a><code class="pull-right">2018.04.04</code>
 										</h5>
@@ -390,7 +421,7 @@
                                     </div>
                                 </div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v06">v1.0.6</a><code class="pull-right">2018.03.15</code>
 										</h5>
@@ -406,7 +437,7 @@
                                     </div>
                                 </div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v05">v1.0.5</a><code class="pull-right">2018.03.12</code>
 										</h5>
@@ -421,7 +452,7 @@
                                     </div>
                                 </div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v04">v1.0.4</a><code class="pull-right">2018.03.11</code>
 										</h5>
@@ -435,7 +466,7 @@
                                     </div>
                                 </div>
 								<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v03">v1.0.3</a><code class="pull-right">2018.03.08</code>
 										</h5>
@@ -449,7 +480,7 @@
                                     </div>
                                 </div>
                             	<div class="panel panel-default">
-                            	<div class="panel-heading">
+									<div class="panel-heading">
                                         <h5 class="panel-title">
 											<a data-toggle="collapse" data-parent="#version" href="#v02">v1.0.2</a><code class="pull-right">2018.03.04</code>
 										</h5>

+ 3 - 5
src/main/resources/templates/monitor/job/add.html

@@ -2,7 +2,6 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <meta charset="utf-8">
 <head th:include="include :: header"></head>
-<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
 <body class="white-bg">
 	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
 		<form class="form-horizontal m" id="form-job-add">
@@ -39,9 +38,9 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">执行策略:</label>
 				<div class="col-sm-8">
-					<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="1" /> 继续执行 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="2" /> 一次执行 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
+					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="1" /> 继续执行 </label> 
+					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="2" /> 一次执行 </label> 
+					<label class="radio-box"> <input type="radio" name="misfirePolicy" value="3" /> 放弃执行 </label>
 				</div>
 			</div>
 			<div class="form-group">
@@ -68,7 +67,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	<script type="text/javascript">
 		var prefix = ctx + "monitor/job"
 	

+ 3 - 5
src/main/resources/templates/monitor/job/edit.html

@@ -2,7 +2,6 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <meta charset="utf-8">
 <head th:include="include :: header"></head>
-<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
 <body class="white-bg">
 	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
 		<form class="form-horizontal m" id="form-job-edit" th:object="${job}">
@@ -40,9 +39,9 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">执行策略:</label>
 				<div class="col-sm-8">
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 继续执行 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 一次执行 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
+					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="1" /> 继续执行 </label> 
+					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="2" /> 一次执行 </label> 
+					<label class="radio-box"> <input type="radio" th:field="*{misfirePolicy}" name="misfirePolicy" value="3" /> 放弃执行 </label>
 				</div>
 			</div>
 			<div class="form-group">
@@ -69,7 +68,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	<script type="text/javascript">
 		var prefix = ctx + "monitor/job"
 	

+ 19 - 4
src/main/resources/templates/system/dept/add.html

@@ -15,7 +15,7 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">部门名称:</label>
 				<div class="col-sm-8">
-					<input class="form-control" type="text" name="deptName">
+					<input class="form-control" type="text" name="deptName" id="deptName">
 				</div>
 			</div>
 			<div class="form-group">
@@ -73,6 +73,9 @@
 		                type: "post",
 		                dataType: "json",
 		                data: {
+		                	"parentId": function() {
+		                		return $("input[name='parentId']").val();
+		                    },
 		                	"deptName" : function() {
 		                        return $.common.trim($("#deptName").val());
 		                    }
@@ -105,9 +108,21 @@
 	
 		/*部门管理-新增-选择父部门树*/
 		function selectDeptTree() {
-			var deptId = $("#treeId").val();
-			var url = prefix + "/selectDeptTree/" + deptId;
-			$.modal.open("选择部门", url, '380', '380');
+			var options = {
+				title: '部门选择',
+				width: "380",
+				height: "380",
+				url: prefix + "/selectDeptTree/" + $("#treeId").val(),
+				callBack: doSubmit
+			};
+			$.modal.openOptions(options);
+		}
+		
+		function doSubmit(index, layero){
+			var body = layer.getChildFrame('body', index);
+   			$("#treeId").val(body.find('#treeId').val());
+   			$("#treeName").val(body.find('#treeName').val());
+   			layer.close(index);
 		}
 	</script>
 </body>

+ 20 - 5
src/main/resources/templates/system/dept/edit.html

@@ -16,7 +16,7 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">部门名称:</label>
 				<div class="col-sm-8">
-					<input class="form-control" type="text" name="deptName" th:field="*{deptName}">
+					<input class="form-control" type="text" name="deptName" th:field="*{deptName}" id="deptName">
 				</div>
 			</div>
 			<div class="form-group">
@@ -74,7 +74,10 @@
 		                dataType: "json",
 		                data: {
 		                	"deptId": function() {
-		                        return $.common.trim($("#deptId").val());
+		                        return $("#deptId").val();
+		                    },
+		                    "parentId": function() {
+		                        return $("input[name='parentId']").val();
 		                    },
 		        			"deptName": function() {
 		                        return $.common.trim($("#deptName").val());
@@ -108,9 +111,21 @@
 	
 		/*部门管理-修改-选择部门树*/
 		function selectDeptTree() {
-			var deptId = $("#treeId").val();
-		    var url = prefix + "/selectDeptTree/" + deptId;
-		    $.modal.open("选择部门", url, '380', '380');
+		    var options = {
+				title: '部门选择',
+				width: "380",
+				height: "380",
+				url: prefix + "/selectDeptTree/" + $("#treeId").val(),
+				callBack: doSubmit
+			};
+			$.modal.openOptions(options);
+		}
+		
+		function doSubmit(index, layero){
+   			var body = layer.getChildFrame('body', index);
+   			$("#treeId").val(body.find('#treeId').val());
+   			$("#treeName").val(body.find('#treeName').val());
+   			layer.close(index);
 		}
 	</script>
 </body>

+ 17 - 152
src/main/resources/templates/system/dept/tree.html

@@ -10,173 +10,38 @@ button{font-family: "SimSun","Helvetica Neue",Helvetica,Arial;}
 <body class="hold-transition box box-main">
 	<input id="treeId"   name="treeId"    type="hidden" th:value="${dept.deptId}"/>
 	<input id="treeName" name="treeName"  type="hidden" th:value="${dept.deptName}"/>
-	<div class="wrapper"><div class="treeShowHideButton" onclick="search();">
+	<div class="wrapper"><div class="treeShowHideButton" onclick="$.tree.toggleSearch();">
 		<label id="btnShow" title="显示搜索" style="display:none;">︾</label>
 		<label id="btnHide" title="隐藏搜索">︽</label>
 	</div>
 	<div class="treeSearchInput" id="search">
 		<label for="keyword">关键字:</label><input type="text" class="empty" id="keyword" maxlength="50">
-		<button class="btn" id="btn" onclick="searchNode()"> 搜索 </button>
+		<button class="btn" id="btn" onclick="$.tree.searchNode()"> 搜索 </button>
 	</div>
 	<div class="treeExpandCollapse">
-		<a href="javascript:" id="btnExpand">展开</a> /
-		<a href="javascript:" id="btnCollapse">折叠</a>
+		<a href="#" onclick="$.tree.expand()">展开</a> /
+		<a href="#" onclick="$.tree.collapse()">折叠</a>
 	</div>
 	<div id="tree" class="ztree treeselect"></div>
 	</div>
-	<div class="layui-layer-btn">
-		<a class="layui-layer-btn0" th:onclick="'javascript:loadObj()'"><i class="fa fa-check"></i> 确定</a>
-		<a class="layui-layer-btn1" onclick="$.modal.close()"><i class="fa fa-close"></i> 关闭</a>
-	</div>
 	<div th:include="include::footer"></div>
 	<script th:src="@{/ajax/libs/jquery-ztree/3.5/js/jquery.ztree.all-3.5.js}"></script>
 	<script th:inline="javascript">
-		// 树结构初始化加载
-		var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{enable:true}},
-			callback:{onClick:function(event, treeId, treeNode){
-				var treeId = treeNode.id;
-				var treeName = treeNode.name;
-				$("#treeId").val(treeId);
-				$("#treeName").val(treeName);
-			}}
-		}, tree, loadTree = function(){
-			$.get(ctx + "system/dept/treeData", function(data) {
-				var treeName = $("#treeName").val();
-			    tree = $.fn.zTree.init($("#tree"), setting, data);
-			    // 展开第一级节点
-			    var nodes = tree.getNodesByParam("level", 0);
-			    for (var i = 0; i < nodes.length; i++) {
-			        tree.expandNode(nodes[i], true, false, false);
-			        selectCheckNode(treeName,nodes[i]);
-			    }
-			    // 展开第二级节点
-			    nodes = tree.getNodesByParam("level", 1);
-			    for (var i = 0; i < nodes.length; i++) {
-			        tree.expandNode(nodes[i], true, false, false);
-			        selectCheckNode(treeName,nodes[i]);
-			    }
-			    // 展开第二级节点
-			    nodes = tree.getNodesByParam("level", 2);
-			    for (var i = 0; i < nodes.length; i++) {
-			        tree.expandNode(nodes[i], true, false, false);
-			        selectCheckNode(treeName,nodes[i]);
-			    }
-			}, null, null, "正在加载,请稍后...");
-		};
-	
 		$(function() {
-		    loadTree();
-		});
-	
-		function selectCheckNode(treeName, node) {
-			if(treeName == node.name){
-				tree.selectNode(node, true);
-			}
-		}
-	
-		$('#btnExpand').click(function() {
-			tree.expandAll(true);
-		});
-		$('#btnCollapse').click(function() {
-			tree.expandAll(false);
+			var url = ctx + "system/dept/treeData";
+			var options = {
+		        url: url,
+		        expandLevel: 2,
+		        onClick : zOnClick
+		    };
+			$.tree.init(options);
 		});
-	
-		function loadObj(){
-			var treeId = $("#treeId").val();
-			var treeName = $("#treeName").val();
-			parent.$("#treeId").val(treeId);
-			parent.$("#treeName").val(treeName);
-			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
-			parent.layer.close(index);
-		}
-	
-		var lastValue = "", nodeList = [], key = $("#keyword");
-		key.bind("focus", focusKey).bind("blur", blurKey).bind("change cut input propertychange", searchNode);
-		key.bind("keydown", function (e){if(e.which == 13){searchNode();}});
-	
-		function focusKey(e) {
-			if (key.hasClass("empty")) {
-				key.removeClass("empty");
-			}
-		}
-	
-		function blurKey(e) {
-			if (key.get(0).value === "") {
-				key.addClass("empty");
-			}
-			searchNode(e);
-		}
-	
-		function searchNode() {
-			var value = $.trim(key.get(0).value);
-			var keyType = "name";
-			if (lastValue === value) {
-				return;
-			}
-			lastValue = value;
-			var nodes = tree.getNodes();
-			if (value == "") {
-				showAllNode(nodes);
-				return;
-			}
-			hideAllNode(nodes);
-			nodeList = tree.getNodesByParamFuzzy(keyType, value);
-			updateNodes(nodeList);
-		}
-	
-		function hideAllNode(nodes){
-			var tree = $.fn.zTree.getZTreeObj("tree");
-			nodes = tree.transformToArray(nodes);
-			for(var i=nodes.length-1; i>=0; i--) {
-				tree.hideNode(nodes[i]);
-			}
-		}
-	
-		function showAllNode(nodes){
-			nodes = tree.transformToArray(nodes);
-			for(var i=nodes.length-1; i>=0; i--) {
-				if(nodes[i].getParentNode()!=null){
-					tree.expandNode(nodes[i],false,false,false,false);
-				}else{
-					tree.expandNode(nodes[i],true,true,false,false);
-				}
-				tree.showNode(nodes[i]);
-				showAllNode(nodes[i].children);
-			}
-		}
-	
-		function updateNodes(nodeList) {
-			tree.showNodes(nodeList);
-			for(var i=0, l=nodeList.length; i<l; i++) {
-				var treeNode = nodeList[i];
-				showChildren(treeNode);
-				showParent(treeNode)
-			}
-		}
-	
-		function showChildren(treeNode){
-			if (treeNode.isParent){
-				for(var idx in treeNode.children){
-					var node = treeNode.children[idx];
-					tree.showNode(node);
-					showChildren(node);
-				}
-			}
-		}
-		function showParent(treeNode){
-			var parentNode;
-			while((parentNode = treeNode.getParentNode()) != null){
-				tree.showNode(parentNode);
-				tree.expandNode(parentNode, true, false, false);
-				treeNode = parentNode;
-			}
-		}
-	
-		function search($this) {
-			$('#search').slideToggle(200);
-			$('#btnShow').toggle();
-			$('#btnHide').toggle();
-			$('#keyword').focus();
+		
+		function zOnClick(event, treeId, treeNode) {
+		    var treeId = treeNode.id;
+		    var treeName = treeNode.name;
+		    $("#treeId").val(treeId);
+		    $("#treeName").val(treeName);
 		}
 	</script>
 </body>

+ 6 - 1
src/main/resources/templates/system/dict/data/data.html

@@ -121,7 +121,12 @@
 		
 		function queryParams(params) {
 			return {
-				dictType:       $("#dictType").val()
+				dictType:       $("#dictType").val(),
+				pageSize:       params.limit,
+    			pageNum:        params.offset / params.limit + 1,
+    			searchValue:    params.search,
+    			orderByColumn:  params.sort,
+    			isAsc:          params.order
 			};
 		}
 	</script>

+ 25 - 15
src/main/resources/templates/system/menu/add.html

@@ -2,7 +2,6 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <meta charset="utf-8">
 <head th:include="include :: header"></head>
-<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
 <body class="white-bg">
 	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
 		<form class="form-horizontal m" id="form-menu-add">
@@ -16,9 +15,9 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">菜单类型:</label>
 				<div class="col-sm-8">
-					<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="M" /> 目录 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="C" /> 菜单 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
+					<label class="radio-box"> <input type="radio" name="menuType" value="M" /> 目录 </label> 
+					<label class="radio-box"> <input type="radio" name="menuType" value="C" /> 菜单 </label> 
+					<label class="radio-box"> <input type="radio" name="menuType" value="F" /> 按钮 </label>
 				</div>
 			</div>
 			<div class="form-group">
@@ -74,7 +73,6 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	 <script>
         var prefix = ctx + "system/menu"
         $("#form-menu-add").validate({
@@ -89,6 +87,9 @@
                         type: "post",
                         dataType: "json",
                         data: {
+                        	"parentId": function() {
+		                		return $("input[name='parentId']").val();
+		                    },
                         	"menuName" : function() {
                                 return $.common.trim($("#menuName").val());
                             }
@@ -146,16 +147,25 @@
 
         /*菜单管理-新增-选择菜单树*/
         function selectMenuTree() {
-        	var menuId = $("#treeId").val();
-        	if(menuId > 0) {
-        		var url = prefix + "/selectMenuTree/" + menuId;
-        		$.modal.open("选择菜单", url, '380', '380');
-        	}
-        	else {
-                var url = prefix + "/selectMenuTree/1";
-                $.modal.open("选择菜单", url, '380', '380');
-            }
-        }
+        	var treeId = $("#treeId").val();
+        	var menuId = treeId > 0 ? treeId : 1;
+        	var url = prefix + "/selectMenuTree/" + menuId;
+			var options = {
+				title: '菜单选择',
+				width: "380",
+				height: "380",
+				url: url,
+				callBack: doSubmit
+			};
+			$.modal.openOptions(options);
+		}
+		
+		function doSubmit(index, layero){
+			var body = layer.getChildFrame('body', index);
+   			$("#treeId").val(body.find('#treeId').val());
+   			$("#treeName").val(body.find('#treeName').val());
+   			layer.close(index);
+		}
     </script>
 </body>
 </html>

+ 32 - 6
src/main/resources/templates/system/menu/edit.html

@@ -2,7 +2,6 @@
 <html lang="zh" xmlns:th="http://www.thymeleaf.org" >
 <meta charset="utf-8">
 <head th:include="include :: header"></head>
-<link href="/ajax/libs/iCheck/custom.css" th:href="@{/ajax/libs/iCheck/custom.css}" rel="stylesheet"/>
 <body class="white-bg">
 	<div class="wrapper wrapper-content animated fadeInRight ibox-content">
 		<form class="form-horizontal m" id="form-menu-edit" th:object="${menu}">
@@ -17,9 +16,9 @@
 			<div class="form-group">
 				<label class="col-sm-3 control-label">菜单类型:</label>
 				<div class="col-sm-8">
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="M" /> 目录 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="C" /> 菜单 </label> 
-					<label class="checkbox-inline i-checks"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
+					<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="M" /> 目录 </label> 
+					<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="C" /> 菜单 </label> 
+					<label class="radio-box"> <input type="radio" th:field="*{menuType}" name="menuType" value="F" /> 按钮 </label>
 				</div>
 			</div>
 			<div class="form-group">
@@ -75,11 +74,10 @@
 		</form>
 	</div>
 	<div th:include="include::footer"></div>
-	<script th:src="@{/ajax/libs/iCheck/icheck.min.js}"></script>
 	 <script>
         var prefix = ctx + "system/menu"
 
-        $(document).ready(function() {
+        $(function() {
             var menuType = $('input[name="menuType"]:checked').val();
             menuVisible(menuType);
         });
@@ -99,6 +97,9 @@
                         	"menuId": function() {
                                 return $("#menuId").val();
                             },
+                            "parentId": function() {
+		                		return $("input[name='parentId']").val();
+		                    },
                 			"menuName": function() {
                                 return $.common.trim($("#menuName").val());
                             }
@@ -171,6 +172,31 @@
         		$.modal.alertError("主菜单不能选择");
         	}
         }
+        
+        function selectMenuTree() {
+        	var menuId = $("#treeId").val();
+        	if(menuId > 0) {
+        		var url = prefix + "/selectMenuTree/" + menuId;
+        		var options = {
+       				title: '菜单选择',
+       				width: "380",
+       				height: "380",
+       				url: url,
+       				callBack: doSubmit
+       			};
+       			$.modal.openOptions(options);
+        	}
+        	else {
+        		$.modal.alertError("主菜单不能选择");
+        	}
+		}
+		
+		function doSubmit(index, layero){
+			var body = layer.getChildFrame('body', index);
+   			$("#treeId").val(body.find('#treeId').val());
+   			$("#treeName").val(body.find('#treeName').val());
+   			layer.close(index);
+		}
     </script>
 </body>
 </html>

Some files were not shown because too many files changed in this diff