You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
223 lines
6.5 KiB
223 lines
6.5 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%@ page import="org.wdk.WDKConstant"%>
|
||
|
<%@ page import="org.wdk.WDKCore"%>
|
||
|
<%@ page import="org.wdk.WDK"%>
|
||
|
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
||
|
SessionUser su = (SessionUser)WDK.getSessionUser(request, response);
|
||
|
WDK.writeSessionUser(out, su);
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
|
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
||
|
<title>AppKey管理</title>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
var _account_id = $.getSessionUser().account_id;
|
||
|
var _manage_unit_uuid = $.getSessionUser().manageunituuid;
|
||
|
//grid相关
|
||
|
var _gridcode = "platform.uum.avatar_role_grid";
|
||
|
var _gridid = $.getUUID();
|
||
|
//初始化
|
||
|
$(function(){
|
||
|
//初始化grid
|
||
|
var dataParam = getGridQueryParam();
|
||
|
$.grid({
|
||
|
id : _gridid,
|
||
|
containerid : 'layout_grid',
|
||
|
gridcode : _gridcode,
|
||
|
checkbox : false,
|
||
|
checkOnSelect : false,
|
||
|
selectOnCheck : false,
|
||
|
idField:"avatar_uuid",
|
||
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
||
|
queryParams:dataParam,
|
||
|
fitColumns:true, //是否自动填充满
|
||
|
nowrap:false, //自动换行
|
||
|
pagination:true,
|
||
|
formatter: {
|
||
|
command:'formatter_command'
|
||
|
}
|
||
|
,onLoaded:function(){
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
|
||
|
function removeBlank(e) {
|
||
|
if(e.keyCode == 32){
|
||
|
e.preventDefault();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//format 操作
|
||
|
function formatter_command(value,row,index) {
|
||
|
var str = '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="btn_modify(\''+ row.avatar_uuid +'\')"></i>';
|
||
|
str += '<i tilte="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" onclick="btn_delete(\''+ row.avatar_uuid +'\')"></i>';
|
||
|
return str;
|
||
|
}
|
||
|
|
||
|
function formatter_status(value,row,index) {
|
||
|
return row.status == "0" ? "停用" : "启用";
|
||
|
}
|
||
|
|
||
|
//获取grid查询参数
|
||
|
function getGridQueryParam(){
|
||
|
//组织参数
|
||
|
var dataParam = {
|
||
|
_SRVNAME:'service.usr.vrole',
|
||
|
_SRVMETHOD:'pagequeryVirtualRoleList',
|
||
|
_DATA:$.json2str({
|
||
|
op_acc : _sessionuser.account_id,
|
||
|
manage_unit_uuid : _sessionuser.manageunituuid,
|
||
|
avatar_uuid : _sessionuser.appuuid,
|
||
|
search_content : $("#search_bar").val(),
|
||
|
result_fields:'',
|
||
|
order_expr:'display_order'
|
||
|
}),
|
||
|
_RSTYPE:'grid',
|
||
|
_RSFIELD:'result',
|
||
|
_RSPARAM:$.json2str({pagequery:'1'})
|
||
|
};
|
||
|
return dataParam;
|
||
|
}
|
||
|
|
||
|
//查询
|
||
|
function btn_query(){
|
||
|
//组织参数
|
||
|
var dataParam = getGridQueryParam();
|
||
|
$.grid_reload({
|
||
|
id:_gridid,
|
||
|
queryParams:dataParam
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function btn_add(){
|
||
|
$.openWin({
|
||
|
id:$.getUUID(),
|
||
|
title:'虚拟角色-新增',
|
||
|
height:400,
|
||
|
width:700,
|
||
|
url:'platform/uum/avatar_role_add.jsp',
|
||
|
queryParams:{
|
||
|
actionflag:'add'
|
||
|
},
|
||
|
onClose:function(){
|
||
|
btn_query();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//修改 btn_modify Button
|
||
|
function btn_modify(avatar_uuid){
|
||
|
$.openWin({
|
||
|
id:$.getUUID(),
|
||
|
title:'虚拟角色-修改',
|
||
|
height:400,
|
||
|
width:700,
|
||
|
url:'platform/uum/avatar_role_add.jsp',
|
||
|
queryParams:{
|
||
|
actionflag:'update',
|
||
|
avatar_uuid : avatar_uuid
|
||
|
},
|
||
|
onClose:function(){
|
||
|
btn_query();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//删除
|
||
|
function btn_delete(avatar_uuid) {
|
||
|
// if(!confirm('是否确认删除!')){
|
||
|
// return;
|
||
|
// }
|
||
|
confirmDialog('是否确认删除!',function(){
|
||
|
//打开旋转
|
||
|
$.wait_open();
|
||
|
|
||
|
//组织参数
|
||
|
var dataParam = {
|
||
|
_SRVNAME:'service.usr.vrole',
|
||
|
_SRVMETHOD:'delete',
|
||
|
_DATA:$.json2str({
|
||
|
op_account_uuid:$.getSessionUser().account_id,
|
||
|
avatar_uuid : avatar_uuid
|
||
|
})
|
||
|
};
|
||
|
|
||
|
//加载数据
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:dataParam,
|
||
|
success:function(result) {
|
||
|
//关闭旋转
|
||
|
$.wait_close();
|
||
|
var jres = $.str2json(result);
|
||
|
if (jres.code == "1") { //操作成功
|
||
|
alert(jres.desc);
|
||
|
//删除后重新请求
|
||
|
btn_query();
|
||
|
}else{
|
||
|
alert(jres.desc);
|
||
|
}
|
||
|
},
|
||
|
error:function(result){
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
},function(){});
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
</script>
|
||
|
|
||
|
|
||
|
</head>
|
||
|
|
||
|
<body>
|
||
|
<div class="easyui-layout" data-options="fit:true">
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
||
|
<div class="page-toolbar" style="padding-bottom: 5px;">
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="btn_add()" >新增</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div data-options="region:'center',border:false,collapsed:false" >
|
||
|
<div class="easyui-layout" data-options="fit:true">
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:0 10px;overflow:hidden;" >
|
||
|
<form id="search_form" >
|
||
|
<div class="h_layout">
|
||
|
<div>
|
||
|
<div class="inputgroup">
|
||
|
<label>关键字</label>
|
||
|
<div>
|
||
|
<input class="easyui-validatebox" id="search_bar" name="search_bar" placeholder="请输入关键字进行检索"/>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div style="width:125px;">
|
||
|
<a class="eapbutton" style="float:right;" onclick="btn_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
</form>
|
||
|
</div>
|
||
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|