60 lines
1.6 KiB
HTML
60 lines
1.6 KiB
HTML
<html login="false">
|
|
<head>
|
|
<title>权限分配</title>
|
|
</head>
|
|
<body>
|
|
<div widget="toolbar" style="padding:10px;border:0;">
|
|
<input widget="edit" name="cname" label="人员" allowInput="false"/>
|
|
<input widget="hidden" name="cguid" />
|
|
<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 name="tree" widget="tree" expandOnLoad="0" showTreeIcon="true" valueField="id"
|
|
textField="text" 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(); /*checkedField="id" */
|
|
function init(param){
|
|
var cname=param['cname'];
|
|
var cguid=param['cguid'];
|
|
aos.get('cname').setValue(cname);
|
|
aos.get('cguid').setValue(cguid);
|
|
aos.post({
|
|
url:"rush/bureau/getinfobyid",
|
|
data:param,
|
|
success:function(rtnData){
|
|
|
|
grid.setValue(rtnData.id);
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
function save(){
|
|
var param={};
|
|
param['id']=grid.getValue();
|
|
param['cguid']=aos.get('cguid').value;
|
|
if(param['id']!=""){
|
|
aos.post({
|
|
url:"rush/bureau/addCompany",
|
|
data:param,
|
|
success:function(rtnData){
|
|
aos.tip('修改成功');
|
|
}
|
|
});
|
|
}
|
|
else{
|
|
aos.tip('请分配权限');
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
</html> |