| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 | {extend name="common/common2" /}{block name="main"}<style>    .submit-btn{        position: fixed;        z-index: 10;        top: 3px;        right: 5px;    }    .submit-btn2{        position: fixed;        z-index: 10;        top: 3px;        right: 90px;    }    .panel-body{        height: 90%;        overflow: auto;    }</style><div class="tabs-container">    <ul class="nav nav-tabs">        <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">后台权限</a>        </li>        <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">APP权限</a>        </li>    </ul>    <form method="post" action="{:url('auth')}" class="form-horizontal">        <input type="hidden" name="rolesId" value="{$rolesId}">        <div class="tab-content">            <div id="tab-1" class="tab-pane active">                <div class="panel-body">                    <table class="table table-striped">                        <thead>                        <tr>                            <th style="width: 30px;"><input type="checkbox" class="check-all"></th>                            <th>权限名称</th>                        </tr>                        </thead>                        <tbody>                        {if condition="$menus"}                        {:widget_view('org/authtree',['data'=>$menus,'select'=>$sauth,'depth'=>0])}                        {/if}                        </tbody>                    </table>                </div>            </div>            <div id="tab-2" class="tab-pane">                <div class="panel-body">                    <table class="table table-striped">                        <thead>                        <tr>                            <th style="width: 30px;"><input type="checkbox" class="app-check-all"></th>                            <th>权限名称</th>                        </tr>                        </thead>                        <tbody>                        {if condition="$appauths"}                        {:widget_view('org/authtreeapp',['data'=>$appauths,'select'=>$sappauth,'depth'=>0])}                        {/if}                        </tbody>                    </table>                </div>            </div>        </div>        <button class="btn btn-primary ajax-post submit-btn" data-layer="1" target-form="form-horizontal" type="submit">保存权限</button>        <a href="{:url('auth',['id'=>$rolesId,'type'=>1])}" class="btn btn-warning submit-btn2">推荐权限</a>    </form></div><div class="ibox" style="display: none">    <div class="ibox-content">    </div></div>{/block}{block name="script"}<script>    $(document).on('click','.app-check-all',function(){        $(".appids").prop("checked", $(this).prop('checked'));    });    function checkSubClick(id,_this){        if($(_this).prop('checked') == true){            $('.sub_'+id).prop("checked", $(_this).prop('checked'));        }else {            $('.sub_'+id).prop("checked", false);        }    }</script>{/block}
 |