97 lines
2.7 KiB
HTML
97 lines
2.7 KiB
HTML
<html login="false">
|
|
<head>
|
|
<title>权限分配</title>
|
|
</head>
|
|
<body>
|
|
<div widget="toolbar" style="padding:10px;border:0;">
|
|
<input widget="edit" name="cname" label="人员" emptyText="请输入未分配权限的职员" required="true"/>
|
|
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
|
|
<a widget="button" iconCls="icon-save" onclick="save" linkToState="editold,editnew">保存</a>
|
|
<a widget="button" iconCls="icon-save" id="savebtn" onclick="quanxuan" linkToState="editold,editnew">全选</a>
|
|
<a widget="button" iconCls="icon-save" id="savebtn" onclick="buxuan" linkToState="editold,editnew">不选</a>
|
|
</div>
|
|
<div widget="autosize">
|
|
<div widget="datagrid" name="grid" style="width: 100%; height: 35%;" url="company/auth/getqueryuserList" allowalternating="true">
|
|
<div type="checkcolumn" width="30" header="选择" ></div>
|
|
<div type="indexcolumn" width="15" header="序号"></div>
|
|
<div field="cname" width="25" header="姓名"></div>
|
|
<div field="name" header="所属组织"></div>
|
|
<div field="cguid" visible="cguid"></div>
|
|
</div>
|
|
<div widget="autosize">
|
|
<div name="tree" widget="tree" expandOnLoad="0" showTreeIcon="true" valueField="id"
|
|
textField="text" url="company/auth/getuserTreeData"
|
|
transformtotreeformat="true" showCheckBox="true"
|
|
referWidgets="selectStrategy;currentOrgnId;orgntype;root" style="width: 100%; height: 100%;"></div>
|
|
|
|
</div>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var grid = aos.get('tree');
|
|
grid.load();
|
|
var cguid = aos.get('grid');
|
|
cguid.load();
|
|
function save(){
|
|
var cguid = aos.get('grid');
|
|
var data = cguid.getSelected();
|
|
if(!data){
|
|
aos.alert('请选择职员。');
|
|
return;
|
|
}
|
|
var param={};
|
|
param['id']=grid.getValue();
|
|
param['cguid']=data.cguid;
|
|
|
|
if(param['id']==null||param['id']==''){
|
|
aos.tip('请选择可查询人员');
|
|
return;
|
|
}
|
|
|
|
|
|
|
|
aos.post({
|
|
url:"company/auth/addqueryauth",
|
|
data:param,
|
|
success:function(rtnData){
|
|
|
|
aos.tip('保存成功');
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function search(){
|
|
var grid = aos.get('grid');
|
|
grid.load();
|
|
var params={cname:aos.get('cname').value};
|
|
grid.load(params);
|
|
|
|
}
|
|
function quanxuan(){
|
|
|
|
aos.post({
|
|
url:"company/auth/quanxuan",
|
|
|
|
success:function(rtnData){
|
|
|
|
grid.setValue(rtnData.id);
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
function buxuan(){
|
|
grid.setValue();
|
|
}
|
|
|
|
|
|
</script>
|
|
</html> |