`
lisonghua2010
  • 浏览: 108643 次
  • 性别: Icon_minigender_1
  • 来自: 大连
社区版块
存档分类
最新评论

(新人第一帖)基于Springside3+Jquery+easyUI开发的权限管理系统

阅读更多
在JavaEye潜水多年,今天第一次发贴,给大家秀一下自己制作的一个东东,欢迎大家来拍砖! 
使用技术:
1.技术平台:Springside3+Jquery+easyUI
2.Server:Tomcat6(开发阶段使用)
3.数据库:Mysql5
4.开发工具:Eclipse3.4
5.构建工具:Maven2+Artifactory2.2

目前实现功能:
1.功能权限管理,可运行时配置
2.支持国际化
3.集成Drools5(目前正在制作Demo)

未来预期:
1.实现数据权限控制
2.完善开发工具
3.制作Demo
4.提供二次开发接口

截图:
1.登录页面

2.用户管理


3.角色管理

4.用户组管理

5.模块管理

6.组织机构维护

  • 描述: 登录
  • 大小: 73 KB
  • 大小: 114.9 KB
  • 大小: 119.7 KB
  • 大小: 106.3 KB
  • 大小: 109.5 KB
  • 大小: 152.8 KB
  • 大小: 120.1 KB
分享到:
评论
12 楼 haiyangyiba 2014-11-21  
azhqiang 写道
lisonghua2010 写道
azhqiang 写道
楼主,想请问下,你点左边菜单,右边创建tab是怎么实现的?

给你两端代码一看你就明白了!
function addTab(title,path){
	funcTab.tabs('add',{
		title: title,
		fit:true,
		href:'${ctx}/login/forword!forwardFramePage.action?_f_url='+path,
		iconCls:'icon-save',
		closable:true
	});
}

$(function(){
	menuObj=$('#menu').tree({
		url:'${ctx}/pm/user/user!displayAccessedModulesByUser.action',
		animate:true,
		onClick:function(node){
				//alert(node.isLeaf);
				var attributes = node.attributes;
				if(attributes.isLeaf=="1"){
					if(!isExistTab(node.text)){
						//alert(attributes.path);
						var url = "${ctx}"+attributes.path;
						//alert(url);
						addTab(node.text,url);
					}else{
						selectedTab(node.text);
					}
				}else{
					
				}
			},
		onDblClick:function(node){
				var attributes = node.attributes;
				if(attributes.isLeaf=="0"){
					$(this).tree('expand',node.target);
				}
			}
	});
});

楼主,怎么让,点击左边导航后右边只出现一次呢?而不是点一次,右边就创建一个tab。

友情回复一下:
在每次addTab时先使用tabs的exist函数判定一下,如果有这个名称存在的就切换过去,没有就新增一个
11 楼 azhqiang 2014-10-27  
lisonghua2010 写道
azhqiang 写道
楼主,想请问下,你点左边菜单,右边创建tab是怎么实现的?

给你两端代码一看你就明白了!
function addTab(title,path){
	funcTab.tabs('add',{
		title: title,
		fit:true,
		href:'${ctx}/login/forword!forwardFramePage.action?_f_url='+path,
		iconCls:'icon-save',
		closable:true
	});
}

$(function(){
	menuObj=$('#menu').tree({
		url:'${ctx}/pm/user/user!displayAccessedModulesByUser.action',
		animate:true,
		onClick:function(node){
				//alert(node.isLeaf);
				var attributes = node.attributes;
				if(attributes.isLeaf=="1"){
					if(!isExistTab(node.text)){
						//alert(attributes.path);
						var url = "${ctx}"+attributes.path;
						//alert(url);
						addTab(node.text,url);
					}else{
						selectedTab(node.text);
					}
				}else{
					
				}
			},
		onDblClick:function(node){
				var attributes = node.attributes;
				if(attributes.isLeaf=="0"){
					$(this).tree('expand',node.target);
				}
			}
	});
});

楼主,怎么让,点击左边导航后右边只出现一次呢?而不是点一次,右边就创建一个tab。
10 楼 lisonghua2010 2014-09-28  
azhqiang 写道
楼主,想请问下,你点左边菜单,右边创建tab是怎么实现的?

给你两端代码一看你就明白了!
function addTab(title,path){
	funcTab.tabs('add',{
		title: title,
		fit:true,
		href:'${ctx}/login/forword!forwardFramePage.action?_f_url='+path,
		iconCls:'icon-save',
		closable:true
	});
}

$(function(){
	menuObj=$('#menu').tree({
		url:'${ctx}/pm/user/user!displayAccessedModulesByUser.action',
		animate:true,
		onClick:function(node){
				//alert(node.isLeaf);
				var attributes = node.attributes;
				if(attributes.isLeaf=="1"){
					if(!isExistTab(node.text)){
						//alert(attributes.path);
						var url = "${ctx}"+attributes.path;
						//alert(url);
						addTab(node.text,url);
					}else{
						selectedTab(node.text);
					}
				}else{
					
				}
			},
		onDblClick:function(node){
				var attributes = node.attributes;
				if(attributes.isLeaf=="0"){
					$(this).tree('expand',node.target);
				}
			}
	});
});
9 楼 azhqiang 2014-09-27  
楼主,想请问下,你点左边菜单,右边创建tab是怎么实现的?
8 楼 luvek 2013-11-18  
不错啊,最近也在学springside,可否给我发一份代码,谢谢。 597752295@qq.com
7 楼 SoarDing 2012-09-21  
代码能不能发一份,谢谢。416350859@qq.com
6 楼 dig 2011-12-21  
我的js
function ajaxTable(){
//加载表格
$('#loginInfoTable').datagrid({
toolbar:[{//正上方工具栏
text:'添加新用户',
iconCls:'icon-add',
handler:function(){
//点击工具栏运行的js方法
openDialog_add();
}
},'-',{
text:'批量删除',
iconCls:'icon-cancel',
handler:function(){
batch('delete');
}
},'-',{
text:'批量启用',
iconCls:'icon-ok',
handler:function(){
batch('available');
}
},'-',{
text:'批量禁用',
iconCls:'icon-remove',
handler:function(){
batch('invalid');
}
}],
pageNumber : 1,
pageSize:5,
loadMsg:'数据加载中,请稍后...===============================================================',
pageList:[5,10,30,50,100], //设置每页显示多少条
onLoadError:function(){
alert('数据加载失败!');
},
queryParams:{//查询条件
},
onClickRow:function(rowIndex, rowData){
//取消选择某行后高亮
$('#loginInfoTable').datagrid('unselectRow', rowIndex);
},
onLoadSuccess:function(){
alert("===========");
var value = $('#loginInfoTable').datagrid('getData')['errorMsg'];

if(value!=null){
alert("错误消息:"+value);
}
}
}).datagrid('acceptChanges');
}


如果java代码返回的是 json.toStirng(),就会执行alert('数据加载失败!');
但返回json,也不会执行onLoadSuccess:function(){
5 楼 dig 2011-12-21  
还有我的html
<table id="loginInfoTable"
title="用户信息一览" 
border="0"
cellspacing="0"
cellpadding="0"
iconCls="icon-edit"
width="98%"
idField="id"
pagination="true"
remoteSort="false"
singleSelect="false"
showFooter="false"
striped="true"

url="${ctx}/account/user!list.action"
>
<thead>
<tr align="center">
<th field="ck" width="20" checkbox="true" width="20"></th>
<th field="email"  width="200">email</th>
<th field="name"  width="200">姓名</th>
<th field="loginName"  width="200">用户名</th>
<th field="password"  width="200">password</th>
<th field="opt" formatter='optFormater' width="150">操作</th>
</tr>
</thead>
</table>
4 楼 dig 2011-12-21  
lisonghua2010 写道
dig 写道
我想知道springseide3 的action 怎样返回能让 easyui 接收的json。

Struts2Utils.getResponse().setCharacterEncoding("UTF-8");
Struts2Utils.getResponse().getWriter().print(datas.toString());
return SUCCESS;
我这样返回后,总是显示加载失败,也改了好多配置,还是能好用。希望看到的话,指教一下,我邮箱dig0830@yahoo.com.cn.谢谢

要支持JSON要引入jsonlib
下面是Action中的一个方法体:
page4user.setPageNo(Integer.valueOf(this.getRequest().getParameter("page")));
page4user.setPageSize(Integer.valueOf(this.getRequest().getParameter("rows")));
Map<String, Object> conditions = new HashMap<String, Object>();
List<User> users = moduleManager.getAllUsersByModule(moduleId, page4user, conditions);
Map<String, Object> json = new HashMap<String, Object>();
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>();
for (User user : users) {
Map<String, Object> row = new HashMap<String, Object>();
row.put("userId", user.getUserId());
row.put("sso", user.getSso());
row.put("email", user.getEmail());
row.put("name", user.getName());
row.put("privilege", operationService.getOperation(1).getName());
rows.add(row);
}
json.put("rows", rows);
json.put("total", page4user.getTotalCount());
Struts2Utils.renderJson(json);
return null;



我按这个写了 并且在方法前加了@Action(value="/user.jsp",results=@Result(type="json", name="success",params = {"contentType", "text/html"} ))
public String list() throws Exception {但还是不行,
Struts2Utils.renderJson(json) 这样什么也不输出,也不报错, Struts2Utils.renderJson(json.toString()); 就加载失败,还有jquery easyui 的js 需要特珠设置吗? 可不可以把你的这个datagrid成功的例子给我发一下 dig0830@yahoo.com.cn,非常感谢。
3 楼 lisonghua2010 2011-12-21  
dig 写道
我想知道springseide3 的action 怎样返回能让 easyui 接收的json。

Struts2Utils.getResponse().setCharacterEncoding("UTF-8");
Struts2Utils.getResponse().getWriter().print(datas.toString());
return SUCCESS;
我这样返回后,总是显示加载失败,也改了好多配置,还是能好用。希望看到的话,指教一下,我邮箱dig0830@yahoo.com.cn.谢谢

要支持JSON要引入jsonlib
下面是Action中的一个方法体:
page4user.setPageNo(Integer.valueOf(this.getRequest().getParameter("page")));
page4user.setPageSize(Integer.valueOf(this.getRequest().getParameter("rows")));
Map<String, Object> conditions = new HashMap<String, Object>();
List<User> users = moduleManager.getAllUsersByModule(moduleId, page4user, conditions);
Map<String, Object> json = new HashMap<String, Object>();
List<Map<String, Object>> rows = new ArrayList<Map<String, Object>>();
for (User user : users) {
Map<String, Object> row = new HashMap<String, Object>();
row.put("userId", user.getUserId());
row.put("sso", user.getSso());
row.put("email", user.getEmail());
row.put("name", user.getName());
row.put("privilege", operationService.getOperation(1).getName());
rows.add(row);
}
json.put("rows", rows);
json.put("total", page4user.getTotalCount());
Struts2Utils.renderJson(json);
return null;
2 楼 dig 2011-12-19  
我想知道springseide3 的action 怎样返回能让 easyui 接收的json。

Struts2Utils.getResponse().setCharacterEncoding("UTF-8");
Struts2Utils.getResponse().getWriter().print(datas.toString());
return SUCCESS;
我这样返回后,总是显示加载失败,也改了好多配置,还是能好用。希望看到的话,指教一下,我邮箱dig0830@yahoo.com.cn.谢谢
1 楼 licg1234 2011-05-27  
不错啊,期待早日发版。

相关推荐

Global site tag (gtag.js) - Google Analytics