常用菜单开发设计思路

1.常用菜单便于用户使用

遇到一系列的菜单,眼花缭乱!设计一张菜单用户表 加上系统原有的角色菜单表即可解决

2.常用菜单弹窗


class="addpop normal-addpop dis-none " id="addpop">
class="addpop_cont pdlr-0">
class="normal-subtitle">常用菜单已选(class="num">/10)
<form:form id="saveUserMenuForm" modelAttribute="sysUserMenu" action="${ctx}/sys/menu/saveUserMenu" method="post">
class="normal-select">
    class="js_normal_selected"> <c:forEach items="${fns:getUserMenuList()}" var="subMenu" > <c:if test="${subMenu.isShow==1}">
  • data-tag="${subMenu.parent.id}" id="${subMenu.id}">${subMenu.name}
  • c:if> c:forEach>
form:form>
class="normal-subtitle mgt-10">点击添加菜单href="#" οnclick="saveAllMenu()" class="font-blue fr">完成
class="normal-con"> <%----%> <c:forEach items="${fns:getNoUserMenuList()}" var="menu" varStatus="status"> <c:if test="${menu.parent.id eq '1'&&menu.isShow eq '1'}" >
class="normal-bg" id="manager${menu.id}">
class="normal-subtitle " id="${subMenu.id}">${menu.name}
class="normal-select">
    class="normal-option-list js_normal_options"> <c:forEach items="${fns:getNoUserMenuList()}" var="subMenu" > <c:if test="${subMenu.parent.id eq menu.id &&subMenu.isShow==1}">
  • data-tag="${ menu.id}" id="${subMenu.id}">${subMenu.name}
  • c:if> c:forEach>
c:if> c:forEach>
id="backMask" class="dis-none ">



3.对常用菜单选择处理



4。难点在于取消选择的常用菜单需要回到原来的节点上 

所以设计表的时候需要保存常用菜单的父节点ID




建表语句

-- Create table
create table SYS_USER_MENU
(
  MENU_ID     VARCHAR2(64) not null,
  USER_ID     VARCHAR2(64) not null,
  MENU_STATUS VARCHAR2(64),
  CREATED_BY  VARCHAR2(64),
  CREATED     TIMESTAMP(6)
)
tablespace YZ_BUSI07
  pctfree 10
  pctused 40
  initrans 1
  maxtrans 255
  storage
  (
    initial 10M
    next 10M
    minextents 1
    maxextents unlimited
    pctincrease 0
  );
-- Add comments to the table 
comment on table SYS_USER_MENU
  is '用户常用菜单权限管理';
-- Add comments to the columns 
comment on column SYS_USER_MENU.MENU_ID
  is '菜单ID:SEQ_MENU_ID自动生成';
comment on column SYS_USER_MENU.USER_ID
  is '用户ID';
comment on column SYS_USER_MENU.MENU_STATUS
  is '菜单状态  0 有效 1:删除';
comment on column SYS_USER_MENU.CREATED_BY
  is '菜单创建人';
comment on column SYS_USER_MENU.CREATED
  is '菜单创建时间';
-- Create/Recreate primary, unique and foreign key constraints 
alter table SYS_USER_MENU
  add constraint PK_SYS_USER_MENU primary key (MENU_ID, USER_ID)
  using index 
  tablespace YZ_BUSI07
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 10M
    next 10M
    minextents 1
    maxextents unlimited
    pctincrease 0
  );



实现效果



点击编辑




点击完成






你可能感兴趣的:(心得)