📄 rolelist.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-logic.tld" prefix="logic"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=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" />
<script language="JavaScript"
src="${pageContext.request.contextPath}/js/jquery-1.2.6.pack.js"></script>
<script language="JavaScript"
src="${pageContext.request.contextPath}/js/util.js"></script>
<style type="text/css">
<!--
.style1 {
font-size: 14px
}
-->
</style>
<script type="text/javascript">
function newCreateRole(){
window.parent.document.getElementById("mainframe").src = "${pageContext.request.contextPath}/admin/role/addRole.jsp";
}
function folder(){
var users = document.getElementById('users');
users.style.display == "none"?users.style.display="block":users.style.display="none";
if(users.style.display == "none"){
document.getElementById("listImg").src = "${pageContext.request.contextPath}/images/jia.gif";
}else{
document.getElementById("listImg").src = "${pageContext.request.contextPath}/images/324.gif";
}
}
//搜索业务机会
function searchRole(){
//getBusiOpport($('optionId').value);
document.location.href = "${pageContext.request.contextPath}/role.do?dispatch=searchRole&roleName=" + $("#roleName").attr("value");
}
function modifyBusiOpport(id){
document.location.href = "${pageContext.request.contextPath}/busiOpport.do?method=editBusiOpport&id="+id;
}
function editOption(){
var optionId = $('optionId').value;
if(optionId !=""){
document.location.href="${pageContext.request.contextPath}/busiOpport.do?method=editOption&optionId="+optionId;
}
}
function editUser(id) {
document.location.href="${pageContext.request.contextPath}/admin/user.do?method=modifyUser&id="+id;
}
function checkout(message){
if(message != null && message != ""){
alert(message);
global();
}
}
function global(){
var organize = "<iframe name='leftframe' id='leftframe' src='${pageContext.request.contextPath}/admin/left.jsp' width='200' height='700' scrolling='auto' ></iframe>";
window.parent.document.getElementById("organizeTree").innerHTML = organize;
}
function deleteRole(obj1){
var obj1Values = "";
$("." + obj1).each(
function() {
if(this.checked){
obj1Values = obj1Values + "," + this.value;
}
}
);
if(obj1Values == ""){
alert("请选中角色!");
return false;
}
window.parent.document.getElementById("mainframe").src = "${pageContext.request.contextPath}/role.do?dispatch=deleteRole&roleId=" + obj1Values;
}
function grantRights(obj1){
var obj1Values = "";
var n = 0;
$("." + obj1).each(
function() {
if(this.checked){
obj1Values = this.value;
n = n + 1;
}
}
);
if(obj1Values == ""){
alert("请选中角色!");
return false;
}
if(n > 1){
alert("只能对一个角色进行授权");
return false;
}
window.parent.document.getElementById("mainframe").src = "${pageContext.request.contextPath}/role.do?dispatch=getObjToPage&objId=" + obj1Values;
}
$(document).ready(
function(){
if("${delFlag}" == "y"){
if("${message}" == "y"){
if("${userRoleIds}" != ""){
alert("${userRoleIds}" + "已有用户,请先删除其用户");
}
}else{
if("${message}" != ""){
alert("${message}");
}
}
}
}
);
</script>
</head>
<body>
<div class="title">
<ul>
<li class="content">
角色:主页
</li>
</ul>
</div>
<div class="relationSearch">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="46"
background="${pageContext.request.contextPath}/images/main_22.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" width="50%">
<span class="style1">角色:<input type="text" name="roleName" id = "roleName"/> </span>
</td>
<td align="left" width="50%">
<input type="button" class="userButton" value="搜 索"
onClick="javascript:searchRole();"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div class="wrapper">
<div class="title1">
<ul>
<li class="content" style="font-weight: bold; color: #ffffff;">
角色
</li>
<li class="submit">
<input type="button" class="userButton"
onClick="newCreateRole();" value="新 建" />
<input type="button" class="userButton"
onClick="javascript:deleteRole('INPUT_ALL');" value="删 除" />
<input type="button" class="userButton"
onClick="javascript:grantRights('INPUT_ALL');" value="授 权" />
<input type="button" class="userButton"
onClick="javascript:window.history.go(-1);" value="返 回" />
</li>
</ul>
</div>
<div class="body1">
<ul>
<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 width="3%">
<input type="checkbox" onclick="javascript:selectedDetail(this,'INPUT_ALL');"/>
</td>
<td width="3%">
序号
</td>
<td>
角色
</td>
</tr>
<logic:notEmpty name="xpage">
<logic:iterate id="role" name="xpage" property="currentItems"
scope="request" indexId="i">
<tr align="center" class="dataTr">
<td width="3%">
<input type="checkbox" class="INPUT_ALL" value="${role.id }"/>
</td>
<td width="3%">
${i+1}
</td>
<td height="20">
${role. roleName}
</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>
</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 + -