• 权限分配界面 纯手工 仅用到bootstrap的架构 以及 c标签


    <div class="form-group">
            <div class="row">
             <label class="col-sm-2 control-label">配置权限</label>
             <div class="col-sm-10">
              <c:forEach var="m" items="${model }">
               <c:forEach var="d" items="${m }">
                <c:if test="${d.level == 0 }">//最高等级
                 <div class="col-sm-12" style="
                  <input type="checkbox" value="${d.id }" name="roleMenu" onclick="changeSubMenu(this)"><b>${d.name }</b>//选择 根目录  其子目录 全部选择
                 </div>
                </c:if>
                <c:if test="${d.level != 0 }">//根目录 对应的子目录
                 <div class="col-sm-12">
                  <input type="hidden" name="${d.superId }">
                  <input type="checkbox" value="${d.id }" name="roleMenu">${d.name }
                 </div>
                </c:if>
               </c:forEach>
              </c:forEach>
             </div>
                              </div>
           </div>

      function changeSubMenu(obj){
             if(obj.checked){
                 $("input[type='hidden'][name='"+obj.value+"'] + input").prop("checked", "checked");
            }else{
                 $("input[type='hidden'][name='"+obj.value+"'] + input").prop("checked", false);
            }
       
          }

  • 相关阅读:
    THUWC 2019 第二轮 纯口胡题解
    Codeforces Round #607 (Div. 1) Solution
    Codeforces Round #606 (Div. 1) Solution
    CSP-S 2019 简要题解
    NOIP 2018 简要题解
    luogu P5605 小 A 与两位神仙
    luogu P5606 小 K 与毕业旅行
    AtCoder Grand Contest 040 简要题解
    AtCoder Grand Contest 035 简要题解
    AtCoder Grand Contest 036 简要题解
  • 原文地址:https://www.cnblogs.com/difme/p/5390002.html
Copyright © 2020-2023  润新知