rushfee/resource/html/rush/companyauth.html

86 lines
2.0 KiB
HTML
Raw Normal View History

2022-05-16 15:07:40 +00:00
<html login="false">
<head>
<title>权限分配</title>
</head>
<body>
<div widget="toolbar" style="padding:10px;border:0;">
<input widget="edit" name="cname" label="人员"/>
<a widget="button" iconCls="icon-search" onclick="search()">查询</a>
<a widget="button" iconCls="icon-add" onclick="add()">新增</a>
<a widget="button" iconCls="icon-delete" onclick="remove()">删除</a>
<a widget="button" iconCls="icon-edit" onclick="edit()">权限授权</a>
</div>
<div widget="autosize">
<div widget="datagrid" name="grid" style="width: 100%; height: 100%;" url="company/auth/getList" allowalternating="true">
<div type="indexcolumn" width="15" header="序号"></div>
<div field="cname" width="15" header="姓名">></div>
<div field="cguid" visible="false"></div>
<div field="org_name" width="70" header="拥有权限"></div>
</div>
</div>
</body>
<script type="text/javascript">
var grid = aos.get('grid');
grid.load();
function search(){
var params={CNAME:aos.get('cname').value};
grid.load(params);
}
function edit(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
var param = {};
param['pageState'] = 'editold';
param['cguid'] = data.cguid;
param['cname'] = data.cname;
aos.showWindow('canvas/rush/companyedit', param, '400px', '800px', '功能授权',function(rtnValue){
grid.reload();
});
}
function remove(){
var data = grid.getSelected();
if(!data){
aos.alert('请选择一条数据。');
return;
}
aos.post({
url:"company/auth/deleteAuth",
data:{cguid:data.cguid},
success:function(){
aos.tip('删除成功。');
grid.reload();
}
});
}
function add(){
var param = {};
param['pageState'] = 'editnew';
aos.showWindow('canvas/rush/companyadd', param, '500px', '900px', '权限授权添加', function(rtnValue){
grid.reload();
});
}
</script>
</html>