<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>FH Admin</title>
    <!-- HTML5 Shim and Respond.js IE10 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 10]>
		<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
		<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
		<![endif]-->
    <!-- Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="author" content="FH Admin QQ313596790" />

    <link rel="icon" href="../../../assets/images/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="../../../assets/fonts/fontawesome/css/fontawesome-all.min.css">
    <link rel="stylesheet" href="../../../assets/fonts/simple-line-icons/css/simple-line-icons.css">
    <link rel="stylesheet" href="../../../assets/plugins/animation/css/animate.min.css">
    <link rel="stylesheet" href="../../../assets/css/style.css">
    
    <!-- vue -->
	<script src="../../../assets/js-vue/vue.js"></script>
    <!--全局配置-->
    <script src="../../../assets/js-v/config.js"></script>

</head>

<body>
<!-- [加载状态 ] start -->
<div class="loader-bg">
    <div class="loader-track">
        <div class="loader-fill"></div>
    </div>
</div>
<!-- [ 加载状态  ] End -->

<!-- [ 主内容区 ] start -->
    <div class="pcoded-wrapper" id="app">
        <div class="pcoded-content">
            <div class="pcoded-inner-content">
                <div class="main-body">
                    <div class="page-wrapper">
                        <!-- [ Main Content ] start -->
                        <div class="row">

			    			<!-- [ Hover-table ] start -->
                            <div class="col-xl-12">
                                <div class="card">

									<table style="margin-top: 8px;margin-left: 20px;">
										<tr height="35">
											<td style="width:86px;"><button v-show="add" v-on:click="addRole(0);" class="btn btn-light btn-sm">新增组</button></td>
											<!-- 开始循环 -->	
								            <template v-for="(role,index) in roleList">
												<td style="width:135px;">
													<button v-bind:class="'btn btn-'+(ROLE_ID == role.role_ID?'secondary':'light')+' btn-sm'"  v-on:click="getList(role.role_ID)">
													<i class="feather icon-users"></i>{{role.role_NAME}}
													</button>
												</td>
												<td style="width:1px;"></td>
											</template>
											<td v-show="loading">
												<!-- [加载状态 ] start -->
										    	<div class="d-flex justify-content-center" style="margin-top:-1px;">
		                                            <div class="spinner-grow spinner-grow-sm" role="status">
		                                                <span class="sr-only">Loading...</span>
		                                            </div>
		                                        </div>
										    	<!-- [ 加载状态  ] End -->
											</td>
											<td></td>
										</tr>
										<tr v-show="roleList.length==0"><td colspan="100">没有相关数据</td></tr>
									</table>
									
									<table style="margin-top: 5px;margin-left: 20px;">
										<tr>
										<td style="width:79px;">本组：</td>
										<td style="width:400px;">
										<a v-show="edit" class="btn btn-light btn-sm" v-on:click="editRole(ROLE_ID)">修改组名称</a>
											<a v-show="edit" class="btn btn-light btn-sm" v-on:click="editRights(ROLE_ID)">
												<template v-if="ROLE_ID == '1'">Admin 菜单权限</template>
												<template v-if="ROLE_ID != '1'">组菜单权限</template>
											</a>
											<a v-show="del && ROLE_ID != '1'" class="btn btn-light btn-sm" style="width: 20px;height:30px;" title="删除" v-on:click="delRole(ROLE_ID,'z',pd.ROLE_NAME);">
												<i style="margin-left:-7px;" class="feather icon-x"></i>
											</a>
										</td>
										<td></td>
										</tr>
									</table>
									<div class="card-block table-border-style" style="margin-top: -15px">
                                    	<div class="table-responsive">
											<table class="table table-hover">
												<thead>
												<tr>
													<th>NO</th>
													<th>角色</th>
													<th>编码</th>
													<th v-show="edit">增</th>
													<th v-show="edit">删</th>
													<th v-show="edit">改</th>
													<th v-show="edit">查</th>
													<th>操作</th>
												</tr>
												</thead>
												<tbody>
												<template v-for="(role,index) in roleList_z">
													<tr>
													<td scope="row" style="width:30px;">{{index+1}}</td>
													<td style="width:200px;" v-bind:id="'ROLE_NAMETd'+role.role_ID">{{role.role_NAME}}</td>
													<td>{{role.rnumber }}</td>
													<td style="width:30px;" v-show="edit"><a v-on:click="roleButton(role.role_ID,'add_qx')" title="分配新增权限" style="cursor:pointer;"><i class="icon-wrench"></i></a></td>
													<td style="width:30px;" v-show="edit"><a v-on:click="roleButton(role.role_ID,'del_qx')" title="分配删除权限" style="cursor:pointer;"><i class="icon-wrench"></i></a></td>
													<td style="width:30px;" v-show="edit"><a v-on:click="roleButton(role.role_ID,'edit_qx')" title="分配修改权限" style="cursor:pointer;"><i class="icon-wrench"></i></a></td>
													<td style="width:30px;" v-show="edit"><a v-on:click="roleButton(role.role_ID,'cha_qx')" title="分配查看权限" style="cursor:pointer;"><i class="icon-wrench"></i></a></td>
													<td style="width:155px;">
													<a v-show="edit" v-on:click="editRights(role.role_ID)" title="菜单权限" style="cursor:pointer;"><i class="feather icon-tag"></i></a>
														<template v-if="role.role_ID != 'fhadminzhuche'"><!-- 注册用户角色不能修改 -->
															<a v-show="edit" title="编辑" v-on:click="editRole(role.role_ID)" style="cursor:pointer;"><i class="feather icon-edit-2"></i></a>
														</template>
														<template v-if="role.role_ID != '1' && role.role_ID != 'fhadminzhuche'"><!-- 注册用户角色和admin角色不能删除 -->
															<a v-show="del" title="删除" v-on:click="delRole(role.role_ID,'c',role.role_NAME);" style="cursor:pointer;"><i class="feather icon-x"></i></a>
														</template>
													</td>
													</tr>
												</template>
												<tr v-show="roleList_z.length==0"><td colspan="100">没有相关数据</td></tr>
												</tbody>
											</table>
											<table style="width:100%;margin-top:15px;">
												<tr>
													<td style="vertical-align:top;">
														<a v-show="add" class="btn btn-light btn-sm" v-on:click="addRole(ROLE_ID);">新增</a>
													</td>
												</tr>
											</table>
										</div>
                                	</div>
								</div>
                        	</div>
                        	<!-- [ Hover-table ] end -->

                    	</div>
                    	<!-- [ Main Content ] end -->
	                </div>
	            </div>
	        </div>
	    </div>
	</div>
<!-- [ 主内容区 ] end -->
        
<script type="text/javascript" src="../../../assets/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="../../../assets/js/pre-loader.js"></script>
<script type="text/javascript" src="../../../assets/plugins/sweetalert/js/sweetalert.min.js"></script>

<!-- 本页面js --> 
<script type="text/javascript" src="../../../assets/js-v/sys/role_list.js"></script>

</body>
</html>