`

角色管理

    博客分类:
  • java
阅读更多
<%@ page language="java" pageEncoding="GBK"%>
<jsp:directive.page import="com.accp.crm.common.PaginationBean" />

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<title>角色管理</title>
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath }/css/styles.css">
<script>
function doDel(id){
if ( window.confirm("确定删除?") ){
window.location.href = "${pageContext.request.contextPath }/role.do?o=doDel&id=" + id;
}
}
//按钮操作
function doSubmit(o){
         document.forms[0].action="${pageContext.request.contextPath }/role.do?o="+o;
     document.forms[0].submit();
}
</script>
</head>

<body class="main">
<html:form action="/role?o=toList" method="post">
<div class="page_title">
权限管理 > 角色管理
</div>
<div class="button_bar">
${requestScope.operMessage }
<button class="common_button" onclick="javascript:doSubmit('toAdd')">
新建
</button>
<button class="common_button" onclick="javascript:doSubmit('toList')">
查询
</button>
</div>
<table class="query_form_table" border="0" cellPadding="3"
cellSpacing="0">
<tr>
<th class="input_title">
角色名
</th>
<td class="input_content">
<html:text property="role.roleName" />
</td>
<th class="input_title">
状态
</th>
<td class="input_content">
<html:select property="role.roleFlag">
<html:option value="-1">全部</html:option>
<html:option value="1">正常</html:option>
<html:option value="0">已删除</html:option>
</html:select>
</td>
</tr>
</table>
<!-- 列表数据 -->
<br />
<table class="data_list_table" border="0" cellPadding="3"
cellSpacing="0">
<tr>
<th class="data_title">
编号
</th>
<th class="data_title">
角色名
</th>
<th class="data_title">
角色描述
</th>
<th class="data_title">
状态
</th>
<th class="data_title">
操作
</th>
</tr>
<c:forEach items="${requestScope.roleList}" var="item">
<tr>
<td class="data_cell" style="text-align:right;padding:0 10px;">
${item.roleId }
</td>
<td class="data_cell" style="text-align:center;">
${item.roleName }
</td>
<td class="data_cell" style="text-align:left;">
${item.roleDesc }&nbsp;
</td>
<td class="data_cell" style="text-align:center;">
${item.roleFlagString }&nbsp;
</td>
<td class="data_cell">
<img class="op_button"
onclick="window.location.href='${pageContext.request.contextPath }/role.do?o=toDetail&id=${item.roleId }'"
src="${pageContext.request.contextPath }/images/bt_detail.gif"
title="查看" />
<img class="op_button"
onclick="window.location.href='${pageContext.request.contextPath }/role.do?o=toEdit&id=${item.roleId }'"
src="${pageContext.request.contextPath }/images/bt_edit.gif"
title="编辑" />
<img class="op_button"
onclick="window.location.href='${pageContext.request.contextPath }/role.do?o=toAssignRights&id=${item.roleId }'"
title="分配权限"
src="${pageContext.request.contextPath }/images/bt_linkman.gif" />
<c:if test="${item.roleFlag!=0 }">
<img class="op_button" onclick="doDel(${item.roleId })"
src="${pageContext.request.contextPath }/images/bt_del.gif"
title="删除" />
</c:if>
</td>
</tr>
</c:forEach>
<c:if test="${empty requestScope.roleList}">
<tr>
<td class="data_cell" colspan="20"
style="text-align:center;height:40px;">
没有记录
</td>
</tr>
</c:if>
</table>
<!-- 导入分页 -->
<%@include file="../frame/pagination.jsp" %>
</html:form>
</body>
</html:html>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics