📄 roleuserlist.jsp
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@page import="com.yuanchung.sales.model.admin.role.Role"%>
<%@page import="com.yuanchung.sales.service.admin.role.impl.RoleMgrImpl"%>
<%@page import="java.util.List"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; UTF-8">
<title>Y6高级销售管理平台-用户角色管理</title>
<link href="${pageContext.request.contextPath}/css/global.css" rel="stylesheet" type="text/css">
<link href="${pageContext.request.contextPath}/css/common.css"
rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/fillet_common.css"
rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/fillet_common_systemAdmin.css"
rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/systemAdmin.css"
rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: 14px}
-->
</style>
<script type="text/javascript">
function grantRole(userId){
var width = 600;
var height = 400;
var left = (screen.width/2) - width/2;
var top = (screen.height/2) - height/2;
var styleStr = 'toolbar=no,location=no,directories=auto,status=no,menubar=no,scrollbars=no resizable=no,z-lock=yes,width='+width+',height='+height+',left='+left+',top='+top+',screenX='+left+',screenY='+top;
var urlStr = "${pageContext.request.contextPath}/role.do?dispatch=getRolesToGrantPage&userId=" + userId;
window.open(urlStr, "", styleStr);
}
</script>
</head>
<body>
<div class="title">
<ul>
<li class="content">
系统管理
</li>
</ul>
</div>
<br>
<div class="relationSearch">
<table width="98%" border="0" cellspacing="0" cellpadding="0" height="27" align="center">
<tr >
<td width="28%"> </td>
<td width="7%" align="center">姓名</td>
<td width="24%" align="left">
<input name="familyName" type="text">
</td>
<td width="41%" align="left">
<input id="" type="submit" src="${pageContext.request.contextPath}/images/xg.gif" class="userButton"
value="查 询" onClick="findTreeviewByPostionAndUserName();"/>
</td>
</tr>
</table>
</div>
<div class="wrapper">
<div class="title1">
<ul>
<li class="content" style="font-weight: bold; color: #ffffff;">
用户角色管理
</li>
</ul>
</div>
<div class="body1">
<ul>
<form action="${pageContext.request.contextPath}/role.do" method="post" onSubmit="return checkForm(this)">
<input type="hidden" name="dispatch" value="getUsersToPage">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="3"></td>
</tr>
<tr>
<td>
<div id="mybusiOpports" style="text-align: center;">
<table class="dataTable" width="99%" border="0"
bordercolor="#000000" bordercolordark="#FFFFFF"
cellspacing="0" cellpadding="0">
<tr class="dataTop">
<td>
序号
</td>
<td>
登录名
</td>
<td>
姓名
</td>
<td>
类型</td>
<td>
拥有角色</td>
<td>
授予角色</td>
</tr>
<logic:notEmpty name="xpage">
<logic:iterate id="user" name="xpage" property="currentItems" scope="request" indexId="i">
<tr align="center" class="dataTr">
<td width="3%">
${i+1 }
</td>
<td height="20" width="15%">
${user.userName }
</td>
<td height="20" width="15%">
${user.familyName }
</td>
<td height="20" width="15%">
${user.type=='1'?"管理员":"普通用户"}
</td>
<td height="20" width="15%">
<bean:define id="us" name="user" type="com.yuanchung.sales.model.user.User"></bean:define>
<%
List<Role> roles = RoleMgrImpl.findRolesByUserId(us.getId());
for(int j=0; j<roles.size(); j++){
out.print(roles.get(j).getRoleName()+" ");
if((j+1)%4 == 0){
%>
<br/>
<%
}
}
%>
</td>
<td height="20" width="15%">
<input type="button" class="userButton" value="授予角色" onclick="grantRole('${user.id }')">
</td>
</tr>
<tr>
<td class="tdHr" colspan="20"></td>
</tr>
</logic:iterate>
<tr align="center">
<td height="25" colspan="20">
${xpage.pageBar }
</td>
</tr>
</logic:notEmpty>
</table>
</div>
</td>
</table>
</form>
</ul>
</div>
<b class="rb"> <b class="rb5"></b> <b class="rb4"></b> <b
class="rb3"></b> <b class="rb2"></b> <b class="rb1"></b> </b>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -