menuList.vm 6.99 KB
<div class="table-responsive">
    <div id="sample-table-2_wrapper" class="dataTables_wrapper" role="grid">
        <div class="row hidden">
            <div class="col-sm-6" style="width:100%">
                <div id="sample-table-2_length" class="dataTables_length">
                <form action="$url_list" id="form" method="get">
                    <input type="hidden" name="currPage" value="0"/>
                    <input type="hidden" name="param[parentId]" value="$!{parentId}"/>

                    <div class="row">

                    </div>
                    <div class="clearfix">
                                    <span class="pull-right">
                                        <input type="submit" value="查询结果">
                                        <input type="button" value="重置条件" onclick="cleanForm('form');">
                                    </span>
                    </div>

                </form>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-xs-3">
                <div id="menuTree" class="ztree" style="overflow-y: auto; height: 800px;"></div>
            </div>
            <div class="col-xs-9">
                <table id="sample-table-2" class="table table-striped table-bordered table-hover dataTable" aria-describedby="sample-table-2_info">
                    <thead>
                    <tr role="row">
                        <th>id</th>
                        <th>菜单名字</th>
                        <th>类型</th>
                        <th>菜单url</th>
##                        <th>所属项目</th>
                        <th>菜单描述</th>
                        <th>排序</th>
                        <th><i class="icon-time bigger-110 hidden-480"></i>操作</th>
                    </tr>
                    </thead>


                    <tbody role="alert" aria-live="polite" aria-relevant="all">
                        #foreach($obj in $!{model.list})
                        <tr>
                            <td>
                                $!{obj.id}
                            </td>
                            <td>
                                $!{obj.label}
                            </td>
                            <td>
                                #if($!{obj.type} == 1)
                                    链接
                                #else
                                    菜单
                                #end

                            </td>
                            <td>
                                $!{obj.menuUrl}
                            </td>
##                            <td>
##                                $!{obj.navbar.projectName}
##                            </td>
                            <td>
                                $!{obj.description}
                            </td>
                            <td>
                                #set($xx = ${model.currPage} * ${model.pageSize})
                                #set($down = ${velocityCount} + ${xx})
                                #set($up = ${velocityCount} - 2  + ${xx})
                                #if(${up} != -1)
                                    <a href="${url_sort}?id=${obj.id}&sort=${up}">
                                        <i class="fa fa-arrow-up"></i>
                                    </a>
                                #else
                                    &nbsp;
                                #end
                                #if(${down} != ${model.totalSize})
                                    <a href="${url_sort}?id=${obj.id}&sort=${down}">
                                        <i class="fa fa-arrow-down"></i>
                                    </a>
                                #end
                            </td>
                            <td>
                                <div class="action-buttons">
##                                    <a class="green" href="${url_show}?id=${obj.id}">
##                                        <i class="fa fa-pencil "></i>查看
##                                    </a>
                                ##                                            #if(${obj.type} == 0)
                                ##                                                <a class="green" href="${url_list}?param[parentId]=${obj.id}">
                                ##                                                    <i class="fa fa-pencil "></i>子菜单
                                ##                                                </a>
                                ##                                            #end

                                    <a class="green" href="${url_save}?id=${obj.id}">
                                        <i class="fa fa-pencil "></i>修改
                                    </a>
##                                    #if(${obj.type} ==1)
##                                        <a class="green" href="${url_bind_resource}?param[type]=1&param[method]=GET&param[menuId]=${obj.id}">
##                                        ##                                                <a class="green" href="${url_bind_resource}?param[type]=1&param[method]=GET&param[status]=1&param[menuId]=${obj.id}">
##                                            <i class="fa fa-pencil "></i>关联资源
##                                        </a>
##                                    #end
                                    <a class="red" href="${url_del}?param[parentId]=${parentId}&param[id]=${obj.id}" onclick="return confirm('确定要删除!');">
                                        <i class="fa fa-trash  "></i>删除
                                    </a>
                                </div>
                            </td>

                        </tr>
                        #end
                    </tbody>
                </table>
                <div class="row">
                    <div class="col-sm-6">
                        #if(${model.query.param.parentId})
                            <a href="$url_save?parentId=${model.query.param.parentId}" class="btn btn-success btn-sm ">添加</a>
                        #else
                            <a href="$url_save" class="btn btn-success btn-sm ">添加</a>
                        #end
                    </div>
                    <div class="col-sm-6">
                        <div class="dataTables_paginate paging_bootstrap">
                            <div class="pull-right">
                                #page($!{model.totalPage},$!{model.currPage})
                            </div>
                            <span class="pull-right" style="line-height: 33px;">
                                #set($tmpPage = $model.currPage + 1)
                                查询出$!{model.totalSize}条数据,共$!{model.totalPage}页,当前第$!{tmpPage}页
                            </span>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>