<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
	<!-- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 房佳（专业的新房分销ERP管理系统）
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| Copyright (c) 2008-2019 http://fj.ytsofts.cn/ All rights reserved.
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| 本系统由淮南市银泰软件科技有限公司提供技术支持
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	| QQ号：984784483
	+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
		<meta http-equiv="Cache-Control" content="no-siteapp"/>
		<link rel="Bookmark" href="/Public/favicon.ico">
		<link rel="Shortcut Icon" href="/Public/favicon.ico"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui/css/H-ui.min.css" />
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/H-ui.admin.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/lib/Hui-iconfont/1.0.8/iconfont.css"/>
		<link rel="stylesheet" type="text/css" href="/Public/static/h-ui.admin/css/style.css"/>
		
	<link rel="stylesheet" href="/Public/lib/layui/css/layui.css"  media="all">
	<link rel="stylesheet" href="/Public/lib/treeTable/treeTable.css">

	</head>
	<body>
		
	<div class="page-container">
		<div class="cl pd-5 bg-1 bk-gray">
			<span class="l">
				<a class="layui-btn layui-btn-normal" href="javascript:;" onclick="layer_show('添加部门','<?php echo U('Rbac/addBumen');?>','480','480')" style="text-decoration:none">
					<i class="Hui-iconfont">&#xe604;</i> 添加部门
				</a>
			</span>
			<span style="float: right;">
				<a class="layui-btn layui-btn-radius layui-btn-primary" href="javascript:location.replace(location.href);" title="刷新" style="text-decoration:none">
					<i class="Hui-iconfont">&#xe68f;</i> 刷新
				</a>
				<a class="layui-btn layui-btn-radius layui-btn-primary" href="javascript:;" onclick="parent.removeIframe()" style="text-decoration:none">
					<i class="Hui-iconfont">&#xe706;</i> 关闭
				</a>
			</span>
		</div>
		<table class="table table-border table-bordered table-hover table-bg" id="menus-table">
			<thead>
				<tr class="text-c">
					<th width="">部门id</th>
					<th width="">级别</th>
					<th width="">部门名</th>
					<th width="">部门电话</th>
					<th width="">操作</th>
				</tr>
			</thead>
			<tbody>
				<?php echo ($categorys); ?>
			</tbody>
		</table>
	</div>

		<script type="text/javascript" src="/Public/lib/jquery/1.9.1/jquery.min.js"></script> 
		<script type="text/javascript" src="/Public/lib/layer/2.4/layer.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui/js/H-ui.min.js"></script>
		<script type="text/javascript" src="/Public/static/h-ui.admin/js/H-ui.admin.js"></script>
		<script>
			$(document).ready(function(){
				$(document).bind("contextmenu",function(e){
					return false;
				});
			});
		</script>
		
	<script type="text/javascript" src="/Public/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="/Public/lib/treeTable/treeTable.js"></script>
	<script type="text/javascript">
		/*管理员-片区-删除*/
		function admin_bumen_del(obj,id){
			layer.confirm('部门删除须谨慎，确认要删除吗？',function(index){
				$.ajax({
					type: 'POST',
					url: '<?php echo U('Rbac/delBumen');?>',
					data: {'id':id},
					dataType: 'json',
					success: function(data){
						if (data.status) {
							$(obj).parents("tr").remove();
							layer.msg(data.info,{icon:1,time:1000});
						}else{
							layer.msg(data.info,function(){});
						}
					},
					error:function(data) {
						console.log(data.msg);
					},
				});
			});
		}
		$(document).ready(function() {
			$("#menus-table").treeTable({
				indent : 20
			});
		});
	</script>

	</body>
</html>