- 浏览: 41814 次
- 性别:
- 来自: 上海
最新评论
-
lmjavajas:
很有帮助,将代码打包给精简的例子就更好啦
Java使用POI 动态创建excel table表格样式等 -
tianweibytj:
[b][/b][i][/i][u][/u]引用
[img][ ...
有两个有序整数集合a和b,写一个函数找出它们的交集? -
iamhere365:
呵呵,翻译带来的乐趣,这还不算什么,看到过404 error的 ...
有歧义的Logo
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%
String path = request.getContextPath();
response.setHeader("P3P", "CP=CAO PSA OUR");
%>
<head>
<title>权限管理页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
href="<%=path%>/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"
href="<%=path%>/controlpanel/css/desktop.css" />
<!-- GC -->
<!-- LIBS -->
<script type="text/javascript"
src="<%=path%>/ext/adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="<%=path%>/ext/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
Ext.QuickTips.init();
var customservice_rn = null;//行序列
var customservice_sm = null;//复选框
var customservice_cm = null;//用户信息表格列模型
var customservice_bbar = null;//用户信息分页条
var customservice_ds = null;//用户信息数据源
var customservice_grid = null;//用户信息Grid对象
var customservice_query_form = null;//搜索Form对象
//窗口对象
var roleuserinfo_add_form = null;//管理用户权限表单
var roleuserinfo_add_window = null;//管理用户角色详情窗口
var roleuserinfo_window = null;
var crm_roleuserinfo_detail_form = null;//CRM权限列表表单
var crm_roleuserinfo_detail_window = null;//CRM权限列表表单
var roleinfo_cmb = null;//角色下拉框
var roleinfo_ds = null;//角色数据源
var dictionary_cmb = null;//营业部下拉框
var dictionary_ds = null;//营业部数据源
var roleuserinfo_loadmask = new Ext.LoadMask(Ext.getBody(), {
msg : "正在处理,请稍候..."
});
//设置用户信息行序列
customservice_rn = new Ext.grid.RowNumberer();
//设置复选框
customservice_sm = new Ext.grid.CheckboxSelectionModel({
singleSelect:false //设置复选
});
//初始化列标题
customservice_cm = new Ext.grid.ColumnModel([
customservice_rn,
//customservice_sm,
{
header: "用户名",
width: 100,
sortable: false,
dataIndex: 'name',
menuDisabled : true
},
{
header: "真实姓名",
width: 100,
sortable: false,
dataIndex: 'realName',
menuDisabled : true
},
{
header: "营部门名称",
width: 100,
sortable: false,
dataIndex: 'branchName',
menuDisabled : true
},
{
header: "电子邮件",
width: 100,
sortable: false,
dataIndex: 'email',
menuDisabled : true
},
{
header: "手机号码",
width: 100,
sortable: false,
dataIndex: 'mobile',
menuDisabled : true
},
{
header: "操作",
width: 100,
align: 'center',
dataIndex: 'id',
renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){
return "<a href='#' title='管理权限' onclick='roleuserinfo_add_function(\"" + record.data['id'] + "\")'><img src='<%=path%>/shared/icons/fam/plugin.gif'></a>";
},
menuDisabled : true
}
]);
//数据源绑定
customservice_ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"<%=path%>/customServiceAction.do?method=getAllCustomService"}),
reader: new Ext.data.JsonReader({
root:'customServiceList',
totalProperty : 'customServiceTotal'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'name',mapping: 'name',type: 'string'},
{name: 'realName',mapping: 'realName',type: 'string'},
{name: 'employeeId',mapping: 'employeeId',type: 'string'},
{name: 'provinceId',mapping: 'provinceId',type: 'string'},
{name: 'refId',mapping: 'refId',type: 'string'},
{name: 'email',mapping: 'email',type: 'string'},
{name: 'mobile',mapping: 'mobile',type: 'string'},
{name: 'branchName',mapping: 'branchName',type: 'string'}
])
});
//分页导航
customservice_bbar = new Ext.PagingToolbar({
pageSize: 15,
store: customservice_ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录",
afterPageText: '/ {0}',
beforePageText: '页',
firstText: '首页',
prevText: '上一页',
nextText: '下一页',
lastText: '尾页',
refreshText: '刷新'
});
//数据表格对象
customservice_grid = new Ext.grid.GridPanel({
renderTo:'authority_grid_context',
border:false,
ds: customservice_ds,
cm: customservice_cm,
//width:730,
//height:440,
width:Ext.getBody().getWidth(),
height:Ext.getBody().getHeight()-45,
region:'center',
frame:false,
resizable:false,
collapsible: false,
viewConfig: {
forceFit:true
},
bbar: customservice_bbar
});
roleinfo_ds = new Ext.data.Store({
//autoLoad : true,
//baseParams : {
// start:0,
// limit:1000
//},
proxy: new Ext.data.HttpProxy({url:"<%=path%>/roleInfoAction.do?method=getAllRoleInfo"}),
reader: new Ext.data.JsonReader({
root:'roleInfoList',
totalProperty : 'roleInfoTotal'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'roleCode',mapping: 'roleCode',type: 'string'},
{name: 'name',mapping: 'name',type: 'string'}
])
});
roleinfo_ds.load({params:{start:0, limit:1000}});
dictionary_ds = new Ext.data.Store({
//autoLoad : true,
//baseParams : {
// start:0,
// limit:1000
//},
proxy: new Ext.data.HttpProxy({url:"<%=path%>/dictionaryAction.do?method=getAllDictionary"}),
reader: new Ext.data.JsonReader({
root:'dictionaryList'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'keyCode',mapping: 'keyCode',type: 'string'},
{name: 'keyName',mapping: 'keyName',type: 'string'}
])
});
dictionary_ds.load();
roleinfo_cmb = new Ext.form.ComboBox({
id:'customservice_query_roleCode',
name:'customservice_query_roleCode',
fieldLabel: '角色名称',
width:80,
xtype:'combo',
typeAhead: true,
//readOnly:true,
store:roleinfo_ds,
loadingText: '',
valueField: 'id',
displayField:'name',
mode: 'remote',
triggerAction: 'all',
editable:false,
emptyText: '所有',
selectOnFocus:true,
forceSelection: true,
value: '',
resizable:true
});
dictionary_cmb = new Ext.form.ComboBox({
id:'customservice_query_branchId',
name:'customservice_query_branchId',
fieldLabel: '营业部',
width:80,
xtype:'combo',
typeAhead: true,
//readOnly:true,
store:dictionary_ds,
loadingText: '',
valueField: 'keyCode',
displayField:'keyName',
mode: 'remote',
triggerAction: 'all',
editable:false,
emptyText: '所有',
selectOnFocus:true,
forceSelection: true,
value: '',
resizable:true
});
customservice_query_form = new Ext.FormPanel({
renderTo:'authority_query_context',
//width: 730,
width:Ext.getBody().getWidth(),
height:45,
border:false,
//bodyStyle:'padding:8px 8px;',
frame:true,
region:'north',
layout:'column',
items:[{
layout:'form',
border:false,
width:150,
labelWidth:50,
items:[{
xtype:'textfield',
id: 'customservice_query_name',
name: 'customservice_query_name',
fieldLabel: '用户名',
width:80
}]
},{
layout:'form',
border:false,
width:160,
labelWidth:60,
items:[{
xtype:'textfield',
id: 'customservice_query_realName',
name: 'customservice_query_realName',
fieldLabel: '真实姓名',
width:80
}]
},{
layout:'form',
border:false,
width:150,
labelWidth:50,
items:dictionary_cmb
},{
layout:'form',
border:false,
width:160,
labelWidth:60,
items:roleinfo_cmb
},{
layout:'form',
border:false,
labelWidth:10,
width:40,
items:[{
xtype:'button',
text:'查询',
labelWidth:10,
handler:function(){
var _customservice_query_name = Ext.get('customservice_query_name').getValue();
var _customservice_query_realName = Ext.get('customservice_query_realName').getValue();
var _customservice_query_branchId = Ext.getCmp('customservice_query_branchId').getValue();
var _customservice_query_roleCode = Ext.getCmp('customservice_query_roleCode').getValue();
customservice_ds.baseParams["query_name"] = _customservice_query_name;
customservice_ds.baseParams["query_realName"] = _customservice_query_realName;
customservice_ds.baseParams["query_branchId"] = _customservice_query_branchId;
customservice_ds.baseParams["query_roleCode"] = _customservice_query_roleCode;
customservice_ds.load({params:{start:0, limit:15}});
}
}]
},{
layout:'form',
border:false,
labelWidth:10,
width:40,
items:[{
xtype:'button',
text:'清空',
labelWidth:10,
handler:function(){
//customservice_query_form.getForm().reset();
Ext.getCmp('customservice_query_name').setValue(null);
Ext.getCmp('customservice_query_realName').setValue(null);
Ext.getCmp('customservice_query_branchId').setValue(null);
Ext.getCmp('customservice_query_roleCode').setValue(null);
customservice_ds.baseParams["query_name"] = "";
customservice_ds.baseParams["query_realName"] = "";
customservice_ds.baseParams["query_branchId"] = "";
customservice_ds.baseParams["query_roleCode"] = "";
customservice_ds.load({params:{start:0, limit:15}});
}
}]
}]
});
//创建管理用户权限表单
roleuserinfo_add_form = new Ext.FormPanel({
labelWidth: 200,
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,
height:400,
autoScroll:true,
defaults: {width: 200},
defaultType: 'textfield',
modal:true,
layout: 'column'
});
//设置查看用户权限详情窗口
roleuserinfo_add_window = new Ext.Window({
id: 'roleuserinfo_add_window_id',
title: '权限列表',
width: 650,
height:300,
minWidth: 450,
minHeight: 300,
layout: 'fit',
plain:true,
bodyStyle:'padding:0px',
buttonAlign:'center',
closeAction: 'hide',
items: roleuserinfo_add_form,
buttons: [{
id:'roleuserinfo_add_form_btn_modify',
text: '修改',
handler: function(){
roleuserinfo_loadmask.show();
roleuserinfo_modify_function(roleuserinfo_add_form.id);
Ext.getCmp('roleuserinfo_add_form_btn_modify').disable();
}
},{
text: '取消',
handler:function(){
roleuserinfo_add_window.hide();
}
}]
});
//创建管理用户权限表单
crm_roleuserinfo_detail_form = new Ext.FormPanel({
labelWidth: 200,
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,
height:400,
autoScroll:true,
defaults: {width: 200},
defaultType: 'textfield',
modal:true,
layout: 'column'
});
//设置查看用户CRM权限详情窗口
crm_roleuserinfo_detail_window = new Ext.Window({
id: 'crm_roleuserinfo_detail_window_id',
title: 'CRM权限列表',
width: 450,
height:300,
minWidth: 450,
minHeight: 300,
layout: 'fit',
plain:true,
bodyStyle:'padding:0px',
buttonAlign:'center',
closeAction: 'hide',
items: crm_roleuserinfo_detail_form,
buttons: [{
text: '关闭',
handler:function(){
crm_roleuserinfo_detail_window.hide();
}
}]
});
crm_roleuserinfo_detail_function = function(refId){
// 先删除原来的,防止重复
for(var i= crm_roleuserinfo_detail_form.items.length-1;i>=0; i--){
crm_roleuserinfo_detail_form.remove(crm_roleuserinfo_detail_form.items.get(i));
}
Ext.Ajax.request({
url:'<%=path%>/crmRoleUserInfoAction.do?method=displayCRMRoleUserInfo',
method:'post',
params:{userId: refId},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
var jsonObj = obj.crmRoleUserInfoList;
for(var i= 0; i< jsonObj.length; i++){
var stritem = new Ext.form.Label({'text':jsonObj[i].roleName});
crm_roleuserinfo_detail_form.add(stritem).show();
}
crm_roleuserinfo_detail_form.doLayout();
crm_roleuserinfo_detail_form.id = refId;
crm_roleuserinfo_detail_window.show();
},
failure:function(form,action){
crm_roleuserinfo_detail_window.close();
Ext.MessageBox.show({
title: '警告',
msg: '获取CRM权限列表出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
//点击查看用户权限管理按钮事件
roleuserinfo_add_function = function(refId){
// 先删除原来的,防止重复
for(var i= roleuserinfo_add_form.items.length-1;i>=0; i--){
roleuserinfo_add_form.remove(roleuserinfo_add_form.items.get(i));
}
Ext.Ajax.request({
url:'<%=path%>/roleUserInfoAction.do?method=displayRoleUserInfo',
method:'post',
params:{userId: refId},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
var jsonObj = obj.roleInfoList;
for(var i= 0; i< jsonObj.length; i++){
var stritem = new Ext.form.Checkbox({'name':'roleIdArray','boxLabel':jsonObj[i].name,'inputValue':jsonObj[i].id, 'checked':jsonObj[i].flag});
roleuserinfo_add_form.add(stritem).show();
}
roleuserinfo_add_form.doLayout();
roleuserinfo_add_form.id = refId;
roleuserinfo_add_window.show();
Ext.getCmp('roleuserinfo_add_form_btn_modify').enable();
},
failure:function(form,action){
roleuserinfo_add_window.close();
Ext.MessageBox.show({
title: '警告',
msg: '获取权限列表出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
//点击查看用户角色详情按钮事件
roleuserinfo_modify_function = function(refId){
var roleIds = '';
for(var i= 0;i< roleuserinfo_add_form.items.length;i++){
var rs = roleuserinfo_add_form.items.get(i);
if(rs.checked == true){
roleIds = roleIds + "," + rs.inputValue;
}
}
Ext.Ajax.request({
url:'<%=path%>/roleUserInfoAction.do?method=modifyRoleUserInfo',
method:'post',
params:{
userId: refId,
roleIds:roleIds
},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
if(obj.result==true){
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '成功',
msg:'修改权限成功!',
buttons:{"ok":"确定"},
width:250,
icon: Ext.MessageBox.INFO
});
//customservice_ds.reload({params:{start:0, limit:15}});
}else
{
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '失败',
msg: '修改权限失败!',
buttons:{"ok":"确定"},
width:250,
icon: Ext.MessageBox.INFO
});
}
},
failure:function(form,action){
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '警告',
msg: '修改权限出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
window.onresize = function() {
customservice_query_form.setHeight(45);
customservice_query_form.setWidth(Ext.getBody().getWidth());
customservice_grid.setHeight(Ext.getBody().getHeight()-45);
customservice_grid.setWidth(Ext.getBody().getWidth());
};
//渲染数据表格对象
customservice_grid.render();
//加载数据源对象,传递分页参数
//var _customservice_query_realName = Ext.get('customservice_query_realName').getValue();
//customservice_ds.baseParams["query_realName"] = _customservice_query_realName;
customservice_ds.load({params:{start:0, limit:15}});
});
</script>
</head>
<body>
<div id="authority_grid_context" style="width:100%;" />
<div id="authority_query_context" style="width:100%;" />
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<%
String path = request.getContextPath();
response.setHeader("P3P", "CP=CAO PSA OUR");
%>
<head>
<title>权限管理页面</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
href="<%=path%>/ext/resources/css/ext-all.css" />
<link rel="stylesheet" type="text/css"
href="<%=path%>/controlpanel/css/desktop.css" />
<!-- GC -->
<!-- LIBS -->
<script type="text/javascript"
src="<%=path%>/ext/adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->
<script type="text/javascript" src="<%=path%>/ext/ext-all.js"></script>
<script type="text/javascript">
Ext.onReady(function() {
Ext.QuickTips.init();
var customservice_rn = null;//行序列
var customservice_sm = null;//复选框
var customservice_cm = null;//用户信息表格列模型
var customservice_bbar = null;//用户信息分页条
var customservice_ds = null;//用户信息数据源
var customservice_grid = null;//用户信息Grid对象
var customservice_query_form = null;//搜索Form对象
//窗口对象
var roleuserinfo_add_form = null;//管理用户权限表单
var roleuserinfo_add_window = null;//管理用户角色详情窗口
var roleuserinfo_window = null;
var crm_roleuserinfo_detail_form = null;//CRM权限列表表单
var crm_roleuserinfo_detail_window = null;//CRM权限列表表单
var roleinfo_cmb = null;//角色下拉框
var roleinfo_ds = null;//角色数据源
var dictionary_cmb = null;//营业部下拉框
var dictionary_ds = null;//营业部数据源
var roleuserinfo_loadmask = new Ext.LoadMask(Ext.getBody(), {
msg : "正在处理,请稍候..."
});
//设置用户信息行序列
customservice_rn = new Ext.grid.RowNumberer();
//设置复选框
customservice_sm = new Ext.grid.CheckboxSelectionModel({
singleSelect:false //设置复选
});
//初始化列标题
customservice_cm = new Ext.grid.ColumnModel([
customservice_rn,
//customservice_sm,
{
header: "用户名",
width: 100,
sortable: false,
dataIndex: 'name',
menuDisabled : true
},
{
header: "真实姓名",
width: 100,
sortable: false,
dataIndex: 'realName',
menuDisabled : true
},
{
header: "营部门名称",
width: 100,
sortable: false,
dataIndex: 'branchName',
menuDisabled : true
},
{
header: "电子邮件",
width: 100,
sortable: false,
dataIndex: 'email',
menuDisabled : true
},
{
header: "手机号码",
width: 100,
sortable: false,
dataIndex: 'mobile',
menuDisabled : true
},
{
header: "操作",
width: 100,
align: 'center',
dataIndex: 'id',
renderer:function(value, cellmeta, record, rowIndex, columnIndex, store){
return "<a href='#' title='管理权限' onclick='roleuserinfo_add_function(\"" + record.data['id'] + "\")'><img src='<%=path%>/shared/icons/fam/plugin.gif'></a>";
},
menuDisabled : true
}
]);
//数据源绑定
customservice_ds = new Ext.data.Store({
proxy: new Ext.data.HttpProxy({url:"<%=path%>/customServiceAction.do?method=getAllCustomService"}),
reader: new Ext.data.JsonReader({
root:'customServiceList',
totalProperty : 'customServiceTotal'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'name',mapping: 'name',type: 'string'},
{name: 'realName',mapping: 'realName',type: 'string'},
{name: 'employeeId',mapping: 'employeeId',type: 'string'},
{name: 'provinceId',mapping: 'provinceId',type: 'string'},
{name: 'refId',mapping: 'refId',type: 'string'},
{name: 'email',mapping: 'email',type: 'string'},
{name: 'mobile',mapping: 'mobile',type: 'string'},
{name: 'branchName',mapping: 'branchName',type: 'string'}
])
});
//分页导航
customservice_bbar = new Ext.PagingToolbar({
pageSize: 15,
store: customservice_ds,
displayInfo: true,
displayMsg: '显示第 {0} 条到 {1} 条记录,一共 {2} 条',
emptyMsg: "没有记录",
afterPageText: '/ {0}',
beforePageText: '页',
firstText: '首页',
prevText: '上一页',
nextText: '下一页',
lastText: '尾页',
refreshText: '刷新'
});
//数据表格对象
customservice_grid = new Ext.grid.GridPanel({
renderTo:'authority_grid_context',
border:false,
ds: customservice_ds,
cm: customservice_cm,
//width:730,
//height:440,
width:Ext.getBody().getWidth(),
height:Ext.getBody().getHeight()-45,
region:'center',
frame:false,
resizable:false,
collapsible: false,
viewConfig: {
forceFit:true
},
bbar: customservice_bbar
});
roleinfo_ds = new Ext.data.Store({
//autoLoad : true,
//baseParams : {
// start:0,
// limit:1000
//},
proxy: new Ext.data.HttpProxy({url:"<%=path%>/roleInfoAction.do?method=getAllRoleInfo"}),
reader: new Ext.data.JsonReader({
root:'roleInfoList',
totalProperty : 'roleInfoTotal'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'roleCode',mapping: 'roleCode',type: 'string'},
{name: 'name',mapping: 'name',type: 'string'}
])
});
roleinfo_ds.load({params:{start:0, limit:1000}});
dictionary_ds = new Ext.data.Store({
//autoLoad : true,
//baseParams : {
// start:0,
// limit:1000
//},
proxy: new Ext.data.HttpProxy({url:"<%=path%>/dictionaryAction.do?method=getAllDictionary"}),
reader: new Ext.data.JsonReader({
root:'dictionaryList'
},
[
{name: 'id',mapping: 'id',type: 'int'},
{name: 'keyCode',mapping: 'keyCode',type: 'string'},
{name: 'keyName',mapping: 'keyName',type: 'string'}
])
});
dictionary_ds.load();
roleinfo_cmb = new Ext.form.ComboBox({
id:'customservice_query_roleCode',
name:'customservice_query_roleCode',
fieldLabel: '角色名称',
width:80,
xtype:'combo',
typeAhead: true,
//readOnly:true,
store:roleinfo_ds,
loadingText: '',
valueField: 'id',
displayField:'name',
mode: 'remote',
triggerAction: 'all',
editable:false,
emptyText: '所有',
selectOnFocus:true,
forceSelection: true,
value: '',
resizable:true
});
dictionary_cmb = new Ext.form.ComboBox({
id:'customservice_query_branchId',
name:'customservice_query_branchId',
fieldLabel: '营业部',
width:80,
xtype:'combo',
typeAhead: true,
//readOnly:true,
store:dictionary_ds,
loadingText: '',
valueField: 'keyCode',
displayField:'keyName',
mode: 'remote',
triggerAction: 'all',
editable:false,
emptyText: '所有',
selectOnFocus:true,
forceSelection: true,
value: '',
resizable:true
});
customservice_query_form = new Ext.FormPanel({
renderTo:'authority_query_context',
//width: 730,
width:Ext.getBody().getWidth(),
height:45,
border:false,
//bodyStyle:'padding:8px 8px;',
frame:true,
region:'north',
layout:'column',
items:[{
layout:'form',
border:false,
width:150,
labelWidth:50,
items:[{
xtype:'textfield',
id: 'customservice_query_name',
name: 'customservice_query_name',
fieldLabel: '用户名',
width:80
}]
},{
layout:'form',
border:false,
width:160,
labelWidth:60,
items:[{
xtype:'textfield',
id: 'customservice_query_realName',
name: 'customservice_query_realName',
fieldLabel: '真实姓名',
width:80
}]
},{
layout:'form',
border:false,
width:150,
labelWidth:50,
items:dictionary_cmb
},{
layout:'form',
border:false,
width:160,
labelWidth:60,
items:roleinfo_cmb
},{
layout:'form',
border:false,
labelWidth:10,
width:40,
items:[{
xtype:'button',
text:'查询',
labelWidth:10,
handler:function(){
var _customservice_query_name = Ext.get('customservice_query_name').getValue();
var _customservice_query_realName = Ext.get('customservice_query_realName').getValue();
var _customservice_query_branchId = Ext.getCmp('customservice_query_branchId').getValue();
var _customservice_query_roleCode = Ext.getCmp('customservice_query_roleCode').getValue();
customservice_ds.baseParams["query_name"] = _customservice_query_name;
customservice_ds.baseParams["query_realName"] = _customservice_query_realName;
customservice_ds.baseParams["query_branchId"] = _customservice_query_branchId;
customservice_ds.baseParams["query_roleCode"] = _customservice_query_roleCode;
customservice_ds.load({params:{start:0, limit:15}});
}
}]
},{
layout:'form',
border:false,
labelWidth:10,
width:40,
items:[{
xtype:'button',
text:'清空',
labelWidth:10,
handler:function(){
//customservice_query_form.getForm().reset();
Ext.getCmp('customservice_query_name').setValue(null);
Ext.getCmp('customservice_query_realName').setValue(null);
Ext.getCmp('customservice_query_branchId').setValue(null);
Ext.getCmp('customservice_query_roleCode').setValue(null);
customservice_ds.baseParams["query_name"] = "";
customservice_ds.baseParams["query_realName"] = "";
customservice_ds.baseParams["query_branchId"] = "";
customservice_ds.baseParams["query_roleCode"] = "";
customservice_ds.load({params:{start:0, limit:15}});
}
}]
}]
});
//创建管理用户权限表单
roleuserinfo_add_form = new Ext.FormPanel({
labelWidth: 200,
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,
height:400,
autoScroll:true,
defaults: {width: 200},
defaultType: 'textfield',
modal:true,
layout: 'column'
});
//设置查看用户权限详情窗口
roleuserinfo_add_window = new Ext.Window({
id: 'roleuserinfo_add_window_id',
title: '权限列表',
width: 650,
height:300,
minWidth: 450,
minHeight: 300,
layout: 'fit',
plain:true,
bodyStyle:'padding:0px',
buttonAlign:'center',
closeAction: 'hide',
items: roleuserinfo_add_form,
buttons: [{
id:'roleuserinfo_add_form_btn_modify',
text: '修改',
handler: function(){
roleuserinfo_loadmask.show();
roleuserinfo_modify_function(roleuserinfo_add_form.id);
Ext.getCmp('roleuserinfo_add_form_btn_modify').disable();
}
},{
text: '取消',
handler:function(){
roleuserinfo_add_window.hide();
}
}]
});
//创建管理用户权限表单
crm_roleuserinfo_detail_form = new Ext.FormPanel({
labelWidth: 200,
frame:true,
bodyStyle:'padding:5px 5px 0',
width: 600,
height:400,
autoScroll:true,
defaults: {width: 200},
defaultType: 'textfield',
modal:true,
layout: 'column'
});
//设置查看用户CRM权限详情窗口
crm_roleuserinfo_detail_window = new Ext.Window({
id: 'crm_roleuserinfo_detail_window_id',
title: 'CRM权限列表',
width: 450,
height:300,
minWidth: 450,
minHeight: 300,
layout: 'fit',
plain:true,
bodyStyle:'padding:0px',
buttonAlign:'center',
closeAction: 'hide',
items: crm_roleuserinfo_detail_form,
buttons: [{
text: '关闭',
handler:function(){
crm_roleuserinfo_detail_window.hide();
}
}]
});
crm_roleuserinfo_detail_function = function(refId){
// 先删除原来的,防止重复
for(var i= crm_roleuserinfo_detail_form.items.length-1;i>=0; i--){
crm_roleuserinfo_detail_form.remove(crm_roleuserinfo_detail_form.items.get(i));
}
Ext.Ajax.request({
url:'<%=path%>/crmRoleUserInfoAction.do?method=displayCRMRoleUserInfo',
method:'post',
params:{userId: refId},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
var jsonObj = obj.crmRoleUserInfoList;
for(var i= 0; i< jsonObj.length; i++){
var stritem = new Ext.form.Label({'text':jsonObj[i].roleName});
crm_roleuserinfo_detail_form.add(stritem).show();
}
crm_roleuserinfo_detail_form.doLayout();
crm_roleuserinfo_detail_form.id = refId;
crm_roleuserinfo_detail_window.show();
},
failure:function(form,action){
crm_roleuserinfo_detail_window.close();
Ext.MessageBox.show({
title: '警告',
msg: '获取CRM权限列表出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
//点击查看用户权限管理按钮事件
roleuserinfo_add_function = function(refId){
// 先删除原来的,防止重复
for(var i= roleuserinfo_add_form.items.length-1;i>=0; i--){
roleuserinfo_add_form.remove(roleuserinfo_add_form.items.get(i));
}
Ext.Ajax.request({
url:'<%=path%>/roleUserInfoAction.do?method=displayRoleUserInfo',
method:'post',
params:{userId: refId},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
var jsonObj = obj.roleInfoList;
for(var i= 0; i< jsonObj.length; i++){
var stritem = new Ext.form.Checkbox({'name':'roleIdArray','boxLabel':jsonObj[i].name,'inputValue':jsonObj[i].id, 'checked':jsonObj[i].flag});
roleuserinfo_add_form.add(stritem).show();
}
roleuserinfo_add_form.doLayout();
roleuserinfo_add_form.id = refId;
roleuserinfo_add_window.show();
Ext.getCmp('roleuserinfo_add_form_btn_modify').enable();
},
failure:function(form,action){
roleuserinfo_add_window.close();
Ext.MessageBox.show({
title: '警告',
msg: '获取权限列表出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
//点击查看用户角色详情按钮事件
roleuserinfo_modify_function = function(refId){
var roleIds = '';
for(var i= 0;i< roleuserinfo_add_form.items.length;i++){
var rs = roleuserinfo_add_form.items.get(i);
if(rs.checked == true){
roleIds = roleIds + "," + rs.inputValue;
}
}
Ext.Ajax.request({
url:'<%=path%>/roleUserInfoAction.do?method=modifyRoleUserInfo',
method:'post',
params:{
userId: refId,
roleIds:roleIds
},
success:function(form,action){
var obj = Ext.util.JSON.decode(form.responseText);
if(obj.result==true){
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '成功',
msg:'修改权限成功!',
buttons:{"ok":"确定"},
width:250,
icon: Ext.MessageBox.INFO
});
//customservice_ds.reload({params:{start:0, limit:15}});
}else
{
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '失败',
msg: '修改权限失败!',
buttons:{"ok":"确定"},
width:250,
icon: Ext.MessageBox.INFO
});
}
},
failure:function(form,action){
roleuserinfo_loadmask.hide();
roleuserinfo_add_window.hide();
Ext.MessageBox.show({
title: '警告',
msg: '修改权限出现异常,未能完成,请重试!',
buttons:{"ok":"确定"},
icon: Ext.MessageBox.ERROR
});
}
});
}
window.onresize = function() {
customservice_query_form.setHeight(45);
customservice_query_form.setWidth(Ext.getBody().getWidth());
customservice_grid.setHeight(Ext.getBody().getHeight()-45);
customservice_grid.setWidth(Ext.getBody().getWidth());
};
//渲染数据表格对象
customservice_grid.render();
//加载数据源对象,传递分页参数
//var _customservice_query_realName = Ext.get('customservice_query_realName').getValue();
//customservice_ds.baseParams["query_realName"] = _customservice_query_realName;
customservice_ds.load({params:{start:0, limit:15}});
});
</script>
</head>
<body>
<div id="authority_grid_context" style="width:100%;" />
<div id="authority_query_context" style="width:100%;" />
</body>
</html>
发表评论
-
ICE中间件开发IceGrid发布Shell脚本封装
2011-08-30 16:52 1960#!/bin/sh #set -x log_registry ... -
ICE中间件开发,IceGrid自动化布署Shell脚本封装
2011-08-30 16:44 1969#!/bin/sh #set -x log_registry ... -
有两个有序整数集合a和b,写一个函数找出它们的交集?
2011-02-28 09:41 3993这个题目,是无意在在CSDN网站上 一位论坛网友发布的题目,感 ... -
咱们那里的搞笑方言
2011-01-06 11:15 889老师说:“请用足球,篮球,水球,排球,冰球,网球,手球,气球造 ... -
学习"纯真IP数据库格式详解"关键字
2011-01-06 10:38 1324LumaQQ little-endian QName -
Java使用POI 动态创建excel table表格样式等
2011-01-05 10:42 10049import java.io.FileInputStr ...
相关推荐
### ETX&ETX Express:Kontron ePanel Platform解析 #### 概述 在现代信息技术领域,特别是嵌入式计算技术方面,时间是至关重要的因素。对于产品开发来说,“快速上市”几乎是所有企业的追求目标。然而,在实际...
标题中的"ETX.rar_ETX-DC_ETX-pm _etx"可能指的是一个关于ETX接口技术的压缩包文件,其中包含了与直流电源(DC)和电源管理(PM)相关的资料。ETX是Embedded Technology eXtended的缩写,是一种基于Intel的MicroATX...
### etx2.7 规范 控创发起的相关知识点 #### 一、概述与目标 **ETX(Embedded Technology eXtensions)**是一种嵌入式计算机模块标准,旨在为工业计算机提供高度灵活且可互换的解决方案。ETX 2.7规范由控创公司...
考试管理机的安装通常包括安装操作系统、配置网络环境以及安装ETX考试系统管理端软件等步骤,以确保管理员能够对整个考场进行有效的监控和管理。 2.2 考试应用服务器安装 考场应用服务器的安装涉及到数据库的设置...
英德斯ETX-821是一款基于ETX(Embedded Technology eXtended)标准的嵌入式CPU模块,主要用于工业自动化、医疗设备、车载系统等应用领域。BIOS(Basic Input/Output System)是计算机启动时加载的第一个软件,它负责...
- **兼容性**: 该模块支持多种操作系统,包括Windows、Linux等,便于用户根据具体应用场景选择合适的操作环境。 #### 四、产品型号及规格 - **ETX-PM 18008-0000-11-0**: Intel® Pentium® M 1.1GHz处理器版本。 ...
ETX-620E是一款基于AMD® Geode™ LX800处理器的ETX® CPU模块,其设计特点是宽温工作范围在-40至85摄氏度,并采用无风扇设计。ETX是一种嵌入式计算机模块标准,主要用于支持工业级的应用环境,拥有较长的生命周期和...
手册可能会涵盖ETX-EVAL支持的操作系统,如Windows Embedded、Linux等,并可能包含驱动程序安装和更新指南,以确保模块与软件的兼容性。 9. **开发工具和调试**: 评估板通常配有专门的开发工具和调试接口,如...
控创公司推出的ETX-PM嵌入式计算机模块是一系列针对嵌入式应用的高性能计算解决方案。这些模块基于Intel® Pentium® M处理器以及Intel® Celeron® M处理器,并引入了独特的Enhanced SpeedStep™技术,旨在提供极致...
根据给定文件信息,我们需要详细说明凌华ETX模块ETX-IM333产品手册中涉及的知识点。首先,我们知道手册的标题是“凌华ETX...任何对模块的使用和操作都应基于对手册内容的完全理解,以便确保系统的正常运行和可靠性能。
"etx_LX开发板"很可能是指采用LX(Linux)操作系统的ETX开发平台,用于开发和测试针对这种硬件的驱动程序。 在开发ETX驱动时,主要涉及以下几个关键知识点: 1. **硬件接口**:ETX模块通常包含多种接口,如PCI、...
1. ETX模块介绍: ETX模块是一种嵌入式计算机模块,采用无风扇设计,以降低噪音并提高系统的可靠性。模块采用了板贴型设计,集成了Intel® Atom™ N450处理器,运行频率为1.66GHz。由于设计为宽温工作模式,它能够在...
控创嵌入式计算机模块ETX?-DC是一款基于Intel® Atom™处理器N270的嵌入式计算机模块,采用了ETX® 3.0规范。该模块设计用于无风扇操作环境,并具备了一系列的技术参数,使其适合于嵌入式系统应用。 Intel® Atom™...
9. **软件支持**:康佳特可能提供BIOS、驱动程序、嵌入式操作系统(如Windows Embedded、Linux等)的支持,方便客户进行系统集成。 10. **设计指南**:对于系统制造商来说,如何正确安装和连接ETX模块,以及机械...
ETX4.8考试系统使用培训,各考点必须在试考前进行环境检查的操作,检查完毕上传检查结果。在确保环境检查全部通过的情况下才能继续进行试考。
在IT领域,刷机是指对电子设备,尤其是智能手机或平板电脑的操作系统进行更新或替换的过程。这个过程通常涉及将新的固件或系统映像安装到设备的存储器中,以改变其原有的功能或提升性能。在描述中提到的"ETX4各系统...
ETX®-CD技术参数包括处理器、芯片组、接口、物理尺寸、功耗和操作系统等多方面的信息,以下详细介绍这些技术参数: 1. 处理器规格: ETX-CD模块支持多种Intel® Core™ 2 Duo处理器,包括: - Intel® Core™ 2 ...
控创 ETX-LX计算机模块产品介绍pdf,控创 ETX-LX计算机模块产品介绍
控创 ETX-CD计算机模块产品简介pdf,控创 ETX-CD计算机模块产品简介
本说明书涉及的是康佳特的ETX和XTX系列工控机HICS30,这是一种高度集成且适用于严苛环境的工业级计算机平台。 ETX(Embedded Technology eXtended)和XTX是两种基于模块化设计的嵌入式主板标准。ETX是一种紧凑型...