80 lines
2.3 KiB
HTML
80 lines
2.3 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-exit" onclick="CloseWindow()">退出</a>
|
|
</div>
|
|
<div widget="autosize">
|
|
<div widget="datagrid" name="grid" style="width: 100%; height: 40%;" url="rush/bureau/getallList" allowalternating="true">
|
|
<div type="indexcolumn" width="15" header="序号"></div>
|
|
<div field="cname" width="25" header="姓名">></div>
|
|
<div field="name" header="所属组织"></div>
|
|
</div>
|
|
<div widget="autosize">
|
|
<div name="tree" widget="tree" expandOnLoad="0" showTreeIcon="true" valueField="id"
|
|
textField="text" parentField="pid" url="rush/bureau/getcompanybyshuiju"
|
|
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();
|
|
function init(param){
|
|
aos.post({
|
|
url:"company/auth/",
|
|
data:param,
|
|
success:function(rtnData){
|
|
aos.getForm().setData(rtnData);
|
|
}
|
|
});
|
|
}
|
|
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']!=""){
|
|
|
|
aos.post({
|
|
url:"rush/bureau/addCompany",
|
|
data:param,
|
|
success:function(rtnData){
|
|
|
|
aos.tip('保存成功');
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
aos.tip('请选择权限');
|
|
}
|
|
}
|
|
function search(){
|
|
var grid = aos.get('grid');
|
|
grid.load();
|
|
var params={cname:aos.get('cname').value};
|
|
grid.load(params);
|
|
|
|
}
|
|
|
|
|
|
|
|
</script>
|
|
</html> |