<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/head:: Head_Premiss(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
<link rel="stylesheet" th:href="@{/static/js/treegrid/jquery.treegrid.min.css}">


<style type="text/css">
/**
*这里写单独的css样式
*/
</style>
</head>

<body id="listbody">
<!-- ###############################代码编写处############################### -->
<!-- 右边内容 -->
<div class="wrap-fluid">
 <div class="container-fluid paper-wrap bevel tlbr">
        <!-- 内容 -->
        <!--标题 通用-->
        <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
        </div>
        <!-- 结束标题 通用-->
        <div class="content-wrap">
            <!-- 结束内容 -->
            <div class="row">
                <div class="col-sm-12">
                <!-- 搜索条件 -->
                
                	 <div class="nest" id="inlineClose">
                            <div class="title-alt">
                                <h6>搜索条件</h6>
                                <div class="titleClose">
                                    <a class="gone" href="#inlineClose">
                                        <span class="entypo-cancel"></span>
                                    </a>
                                </div>
                                <div class="titleToggle">
                                    <a class="nav-toggle-alt" href="#search_div">
                                        <span class="entypo-down-open"></span>
                                    </a>
                                </div>
                            </div>

                            <div class="body-nest" id="search_div" style="display: none">
                                <div class="form_left">
                                    <form role="form" class="form-inline">
                                        <div class="form-group">
                                            <label for="exampleInputEmail2" class="sr-only">权限名字</label>
                                            <input type="text" name="searchText" placeholder="权限名字"class="form-control">
                                        </div>
                                        <button onclick="$.table.search(this)" class="btn btn-success" type="button"><i class="fa fa-search"></i>&nbsp;搜索</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                	<!-- END搜索条件 -->
                    <!-- 空白页开始-->
                    <div class="nest" id="Blank_PageClose">
                        <div class="title-alt">
                            <h6>表单</h6>
                            <div class="titleClose">
                                <a class="gone" href="#Blank_PageClose">
                                    <span class="entypo-cancel"></span>
                                </a>
                            </div>
                            <div class="titleToggle">
                                <a class="nav-toggle-alt" href="#Blank_Page_Content">
                                    <span class="entypo-up-open"></span>
                                </a>
                            </div>
                        </div>
                        
                        <div class="body-nest" id="Blank_Page_Content">
                            <!-- 工具条 -->
                            <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
                            	<button onclick="$.operate.add()" type="button" class="btn btn-primary">
                                    <span class="entypo-plus-squared"></span>&nbsp;&nbsp;新增
                                </button>
                               <button onclick="$.operate.batRemove()" type="button" class="btn btn-info">
                                    <span class="entypo-trash"></span>&nbsp;&nbsp;删除
                               </button>
                               <button onclick="$.operate.expandAll()"  type="button" class="btn btn-success">
                                    <span class="entypo-shuffle"></span>&nbsp;&nbsp;展开/折叠
                               </button>
                               
                           </div>
                            <!-- 工具条 end-->
                           <table id="dataTable" class="table-striped footable-res footable metro-blue" data-page-size="6">
                                   
                                    
                           </table>
                           
                           
                        </div>
                    </div>
                </div>
                <!-- 空白页结束 -->
            </div>
            <!-- 结束内容 -->
        </div>
    </div>
</div>
<!-- 结束右边内容 -->
<!-- ###############################代码编写处end############################### -->







<!-- 右侧隐藏滑块内容 -->
<div th:include="admin/common/html/rightHide :: rightHide">
    
</div>
   <!-- END 右侧隐藏滑块内容-->

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js_Premiss">
   
</div>
<!-- 列表参数 -->
<script>

var dataUrl=window.rootPath+"/PermissionController/list2";
var removeUrl=window.rootPath+"/PermissionController/remove";
var createUrl=window.rootPath+"/PermissionController/add";
var updateUrl=window.rootPath+"/PermissionController/edit/{id}";
var exportUrl=window.rootPath+"/PermissionController/export";
  var options = {
		dataUrl: dataUrl,
        createUrl: createUrl,
        updateUrl: updateUrl,
        removeUrl:removeUrl,
        exportUrl: exportUrl,
        sortName: "id",
        modalName: "权限",
        search: false,
	   dataColumns: [
			{
			    checkbox: true
			},                   
			{
			    field: 'id',
			    title: '序号'
			},{
			    field: 'name',
			    title: '权限名称',
			    formatter: function (value, row, index) {
			        var actions = [];
			        actions.push(value+' <i class="'+row.icon+'"></i>');
			      	return actions.join('');			    
				 }
			},
			{
			    field: 'url',
			    title: '权限URL'
			},
			{
			    field: 'isBlank',
			    title: '是否跳转',
			    formatter: function (value, row, index) {
			        var actions = [];
			        if(value==0){
			        	 actions.push('<span class="label label-primary">否</span>');
			        }else if(value==1){
			        	 actions.push('<span class="label label-danger">是</span>');
			        }
			      	return actions.join('');			    
				 }
			},
			{
			    field: 'perms',
			    title: '权限关键字'
			},
			{
				 field: 'type',
				 title: '菜单类型',
				 formatter: function (value, row, index) {
			        var actions = [];
			        if(value==0){
			        	 actions.push('<span class="label label-primary">目录</span>');
			        }else if(value==1){
			        	 actions.push('<span class="label label-success">菜单</span>');
			        }else if(value==2){
			        	 actions.push('<span class="label label-warning">按钮</span>');
			        }
			      	return actions.join('');			    
				 }
			},
			{
				 field: 'visible',
				 title: '可见',
				 formatter: function (value, row, index) {
			        var actions = [];
			        if(value==0){
			        	 actions.push('<span class="badge badge-success">显示</span>');
			        }else if(value==1){
			        	 actions.push('<span class="badge badge-important">隐藏</span>');
			        }
			      	return actions.join('');			    
				 }
			},
			{
				 field: 'orderNum',
				 title: '排序'
			},
			{
			    field: 'descripion',
			    title: '描述'
			},
			{
			    title: '操作',
			    formatter: function (value, row, index) {
			        var id = row.id;
			        var actions = [];
			        actions.push('<a class="btn btn-success btn-xs"  href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
			        actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
			        return actions.join('');			    
			    }
			}
		]
  };
  

  

</script>


<script type="text/javascript">

$(function(){
	//加载列表
	//加载列表
	var oTab=$.table.oTableInit(options);
	oTab.Init();
})
</script>



</body>


</html>
