根据权限动态显示菜单
This commit is contained in:
parent
ec48258cee
commit
4e6518825d
|
@ -10,7 +10,7 @@ Target Server Type : MYSQL
|
|||
Target Server Version : 50621
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 2017-02-12 01:56:12
|
||||
Date: 2017-02-12 02:26:36
|
||||
*/
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=0;
|
||||
|
@ -436,7 +436,7 @@ CREATE TABLE `upms_permission` (
|
|||
PRIMARY KEY (`permission_id`),
|
||||
KEY `FK_Reference_29` (`system_id`),
|
||||
CONSTRAINT `FK_Reference_29` FOREIGN KEY (`system_id`) REFERENCES `upms_system` (`system_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='权限';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='权限';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of upms_permission
|
||||
|
@ -448,7 +448,7 @@ INSERT INTO `upms_permission` VALUES ('4', '1', null, '用户角色管理', '1',
|
|||
INSERT INTO `upms_permission` VALUES ('5', '1', '4', '用户管理', '1', 'upms:user:read', '/user/index', '', '1', '5', '5');
|
||||
INSERT INTO `upms_permission` VALUES ('6', '1', '4', '角色管理', '1', 'upms:role:read', '/role/index', '', '1', '6', '6');
|
||||
INSERT INTO `upms_permission` VALUES ('7', '1', null, '权限资源管理', '1', '', '', 'zmdi zmdi-lock-outline', '1', '7', '7');
|
||||
INSERT INTO `upms_permission` VALUES ('8', '1', '7', '权限管理', '1', 'upms:permission:read', '/permission/index', '', '1', '8', '8');
|
||||
INSERT INTO `upms_permission` VALUES ('8', '1', '7', '菜单管理', '1', 'upms:permission:read', '/permission/menu', '', '1', '8', '8');
|
||||
INSERT INTO `upms_permission` VALUES ('9', '1', null, '权限分配管理', '1', '', '', 'zmdi zmdi-key', '1', '9', '9');
|
||||
INSERT INTO `upms_permission` VALUES ('10', '1', '9', '角色授权', '1', 'upms:role_permission:read', '/role_permission/index', '', '1', '10', '10');
|
||||
INSERT INTO `upms_permission` VALUES ('11', '1', '9', '用户授权', '1', 'upms:user_permission:read', '/user_permission/index', '', '1', '11', '11');
|
||||
|
@ -457,6 +457,13 @@ INSERT INTO `upms_permission` VALUES ('13', '1', '12', '公共码表', '1', 'upm
|
|||
INSERT INTO `upms_permission` VALUES ('14', '1', '12', '会话管理', '1', 'upms:session:read', '/session/index', '', '1', '14', '14');
|
||||
INSERT INTO `upms_permission` VALUES ('15', '1', '12', '日志记录', '1', 'upms:log:read', '/log/index', '', '1', '15', '15');
|
||||
INSERT INTO `upms_permission` VALUES ('16', '1', '12', '键值设置', '1', 'upms:map:read', '/map/index', '', '1', '16', '16');
|
||||
INSERT INTO `upms_permission` VALUES ('17', '2', null, '标签类目管理', '1', null, null, null, '1', '17', '17');
|
||||
INSERT INTO `upms_permission` VALUES ('18', '2', '17', '标签管理', '1', 'cms:tag:read', '/tag/index', null, '1', '18', '18');
|
||||
INSERT INTO `upms_permission` VALUES ('19', '2', '17', '类目管理', '1', 'cms:category:read', '/category/index', null, '1', '19', '19');
|
||||
INSERT INTO `upms_permission` VALUES ('20', '2', null, '文章内容管理', '1', null, null, null, '1', '20', '20');
|
||||
INSERT INTO `upms_permission` VALUES ('21', '2', '20', '文章管理', '1', 'cms:article:read', '/article/index', null, '1', '21', '21');
|
||||
INSERT INTO `upms_permission` VALUES ('22', '2', '20', '回收管理', '1', 'cms:article:read', '/article/recycle', null, '1', '22', '22');
|
||||
INSERT INTO `upms_permission` VALUES ('23', '1', '7', '按钮管理', '1', 'upms:permission:read', '/permission/button', null, '1', '24', '24');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for upms_role
|
||||
|
@ -487,7 +494,7 @@ CREATE TABLE `upms_role_permission` (
|
|||
PRIMARY KEY (`role_permission_id`),
|
||||
KEY `FK_Reference_22` (`permission_id`),
|
||||
CONSTRAINT `FK_Reference_22` FOREIGN KEY (`permission_id`) REFERENCES `upms_permission` (`permission_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='角色权限关联表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='角色权限关联表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of upms_role_permission
|
||||
|
@ -508,6 +515,13 @@ INSERT INTO `upms_role_permission` VALUES ('13', '1', '13');
|
|||
INSERT INTO `upms_role_permission` VALUES ('14', '1', '14');
|
||||
INSERT INTO `upms_role_permission` VALUES ('15', '1', '15');
|
||||
INSERT INTO `upms_role_permission` VALUES ('16', '1', '16');
|
||||
INSERT INTO `upms_role_permission` VALUES ('17', '1', '17');
|
||||
INSERT INTO `upms_role_permission` VALUES ('18', '1', '18');
|
||||
INSERT INTO `upms_role_permission` VALUES ('19', '1', '19');
|
||||
INSERT INTO `upms_role_permission` VALUES ('20', '1', '20');
|
||||
INSERT INTO `upms_role_permission` VALUES ('21', '1', '21');
|
||||
INSERT INTO `upms_role_permission` VALUES ('22', '1', '22');
|
||||
INSERT INTO `upms_role_permission` VALUES ('23', '1', '23');
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for upms_system
|
||||
|
|
|
@ -128,12 +128,11 @@
|
|||
<!-- 菜单区 -->
|
||||
<ul class="main-menu">
|
||||
<li>
|
||||
<a class="waves-effect" href="javascript:Tab.addTab('首页', 'home');"><i class="zmdi zmdi-home"></i> 首页</a>
|
||||
<a class="waves-effect" href="javascript:Tab.addTab('首页', 'home');"><i class="zmdi zmdi-home"></i> 首页2</a>
|
||||
</li>
|
||||
<c:forEach var="upmsSystem" items="${upmsSystems}" varStatus="status">
|
||||
<c:forEach var="upmsPermission" items="${upmsPermissions}">
|
||||
<c:forEach var="upmsPermission" items="${upmsPermissions}" varStatus="status">
|
||||
<c:if test="${upmsPermission.pid == null}">
|
||||
<li class="sub-menu system_menus system_${upmsSystem.systemId}" <c:if test="${status.index != 0}">style="display:none;"</c:if>>
|
||||
<li class="sub-menu system_menus system_${upmsPermission.systemId} ${status.index}" <c:if test="${upmsPermission.systemId != 1}">style="display:none;"</c:if>>
|
||||
<a class="waves-effect" href="javascript:;"><i class="${upmsPermission.icon}"></i> ${upmsPermission.name}</a>
|
||||
<ul>
|
||||
<c:forEach var="subUpmsPermission" items="${upmsPermissions}">
|
||||
|
@ -145,7 +144,6 @@
|
|||
</li>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
<li>
|
||||
<div class="upms-version">© ZHENG-UPMS V1.0.0</div>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue