<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<c:url value='/scripts/lib/layui/layui.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/styles/AdminLTE.css'/>" rel="stylesheet" type="text/css" />
<link href="<c:url value='/styles/elementgroupList/elementgroupList.css'/>" rel="stylesheet" type="text/css" />
<!-- date -->
<script src="${ctx }/scripts/lib/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/layui/layui.js'/>"></script>
<script type="text/javascript" src="<c:url value='/scripts/lib/template-native.js'/>"></script>
<script type="text/javascript" src="${ctx }/scripts/admin/elementgroupList/elementgroupList.js"></script>
<body>
	<input type="hidden" id="funcid" value="${funcid}">
	<input type="hidden" id="updateAct" value="${updateAct}">
	<input type="hidden" value="${ctx}" id="contextPath" />

	<%-- 因为js中无法直接调用自定义的权限校验标签 --%>
	<%-- 判断当前用户是否有相应权限,如果有权限则在JSP页面新增隐藏input标签,方便js代码调用 --%>

	<%-- 是否有修改权限 --%>
	<perm:hasPermission permCode="pc:basics:dictionary:edit">
		<input type="hidden" value="1" id="perm-edit" />
	</perm:hasPermission>


	<div class="bread-wp">
		基础设置  > 数据字典配置
	</div>
	<div class="right-content">
		<div class="main-content-mode-wp clearfloat email-publish-wp ">
		<form:form  id="conditionform"  class="clearfloat">
			<div class="part-wp">
				<span class="search-tips">组名</span>
				<input class="small-input groupcode" type="text" placeholder="请输入组名"/>
			</div>
			<div class="part-wp">
				<span class="search-tips">组名备注</span>
				<input class="small-input groupname"  type="text" placeholder="请输入组名备注"/>
			</div>
			<button class="search-btn btn-red" type="button">查询</button>
			<button class="set-btn btn-white" type="button">重置</button>
		</form:form>
		 <div class="main-operate-wp">
		 	<perm:hasPermission permCode="pc:basics:dictionary:add">
		 		<button class="btn-add-blue add-ele-btn" type="button">新增</button>
			</perm:hasPermission>
			 <perm:hasPermission permCode="pc:basics:dictionary:delete">
		 		<button class="btn-del-red del-ele-btn" type="button">删除</button>
			 </perm:hasPermission>
		 </div>
	 	 <table class="layui-hide" id="LAY_table_user" lay-filter="user"></table>  
		</div>
	</div>
	<%-- <section class="content">
		<div class="row">
			<div class="col-xs-12">
				<div class="boxlist">
					<!-- /.box-header -->
					<div class="box-body table-responsive">
						<form:form modelAttribute="elementGroup" action="${ctx}/system/elementgroup"
							method="POST" id="conditionform">
							<input type="hidden" id="pageNo" name="pageNo" />
							<input type="hidden" name="funcid" value="${funcid}"/>
							<div class="form-group">
								<label>组名</label> <input name="groupcode" /> <label>组名备注</label>
								<input name="groupname" />
							</div>
							
						</form:form>
						<div   class="form-search-wp">
								<button type="button" class="btn-red" id="btn-search">查询</button>
								<c:if test="${addAct =='1' }">
									<button type="button" class="btn btn-white" id="addBtn">新增</button>
							</c:if>
								<c:if test="${deleteAct =='1' }">
									<button type="button" class="btn btn-white" id="delBtn">删除</button>
								</c:if>
						</div>
						<table class="table table-bordered table-hover" id="dataareaid">
							<thead>
								<tr>
									<th style="width: 5%"><input type="checkbox" id="checkAll">
									</td>
									<th style="width: 10%">组名
									</td>
									<th style="width: 12%">组名备注
									</td>
									<th style="width: 65%">成员
									</td>
									<th style="width: 8%">操作
									</td>
								</tr>
							</thead>
							<c:forEach items="${page.items }" var="obj">
								<tr>
									<td><input type="checkbox" name="chkBtn"
										value="${obj.id }"></td>
									<td>${obj.groupcode}</td>
									<td>${obj.groupname }</td>
									<td>${page.extraData[obj.id] }</td>
									<td><c:if test="${updateAct =='1' }">
											<a
												href="<c:url value='/system/elementgroup/preModify?id=${obj.id}&funcid=${funcid}'/>"
												title="修改"><i class="fa fa-edit"></i></a>
										</c:if></td>
								</tr>
							</c:forEach>
						</table>
						<div class="btn-page">
		                    <!-- 页码 -->
		                    <div align="center" class="pages clearfix">
		                           <c:forEach items="${page.iterPages }" var="pageNo">
									<c:choose>
										<c:when test="${pageNo == page.currentPage }">
											<span class='current'>${pageNo }</span>
										</c:when>
										<c:when test="${pageNo != null}">
											<a href="javascript:void(0);" onclick='goPage(${pageNo});'>${pageNo}</a>
										</c:when>
										<c:otherwise>
											<em>...</em>
										</c:otherwise>
									</c:choose>
								</c:forEach>
								<strong>共<span style="color:black;font-weight:bold;font-size:16px;">${page.totalCount}</span>条</strong>
								<strong>跳转到第</strong><input type="text" id="gopage" style="width: 40px;" onkeyup="this.value=this.value.replace(/\D/g,'')" onkeypress="this.value=this.value.replace(/\D/g,'')"/><strong>页</strong>
								<a class="btn-sm btn-red" href="javascript:goPage('gopage');" id='bindBtn'>确定</a>
		                	</div>
			            </div>
					</div>
				</div>
			</div>
		</div>
	</section> --%>
</body>
</html>