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.
244 lines
6.7 KiB
244 lines
6.7 KiB
<%@ 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标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
|
|
|
<base href="<%=basePath%>" target="_self">
|
|
<title>应用云平台-应用注册</title>
|
|
<style type="text/css">
|
|
</style>
|
|
|
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
|
<script type="text/javascript">
|
|
<% if(null==su){%>
|
|
$.timeout();
|
|
<%}%>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="easyui-layout" data-options="fit:true,border:false,collapsed:false">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
|
<div class="page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="opt_add()">新增</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-gear'" onclick="appFunction()">功能</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 id="conditions" type="text" class="easyui-validatebox" placeholder="" aria-describedby="basic-addon1">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:125px;">
|
|
<a class="eapbutton" style="float:right;" onclick="opt_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>
|
|
|
|
<script>
|
|
|
|
var _gridcode = "platform.portal.saconsole.packageregrid";
|
|
//_gridcode = "platform.portal.saconsole.appreggrid";
|
|
var _gridid = $.getUUID();
|
|
//页面初始化
|
|
$(function() {
|
|
|
|
|
|
//查询grid数据
|
|
var gridid = $.grid({
|
|
id : _gridid,
|
|
containerid : 'layout_grid',
|
|
gridcode : _gridcode,
|
|
checkbox : false,
|
|
checkOnSelect : true,
|
|
selectOnCheck : true,
|
|
url:'wdk?action=portal.package&method=query&ajaxparam='+new Date().getTime(),
|
|
queryParams:{
|
|
conditions:$("#conditions").val(),
|
|
orderbyfield:'display_order,pack_code'
|
|
},
|
|
idField:"pack_uuid",
|
|
commandField:"command",
|
|
fitColumns:true, //是否自动填充满
|
|
nowrap:false, //自动换行
|
|
pagination:true,
|
|
formatter:{
|
|
pack_name:'formatter_pack_name',
|
|
is_active:'formatter_active',
|
|
command:'formatter_command'
|
|
}
|
|
});
|
|
//注册用户添加成功的监听
|
|
$.addListener("packagereg_add","opt_query");
|
|
});
|
|
|
|
function formatter_pack_name(value,row,index){
|
|
return "<a href='javascript:void(0);' onclick=opt_view('"+row.pack_uuid+"')>"+row.pack_name+"</a>";
|
|
}
|
|
function formatter_active(value,row,index){
|
|
return (value == '1') ? "是" : "否";
|
|
}
|
|
//操作
|
|
function formatter_command(value,row,index) {
|
|
/* '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick="opt_update(\''+ row.person_uuid +'\')"></i>' */
|
|
return '<i tilte="修改" class="fa fa-pencil-square-o grid-oper-icon" aria-hidden="true" onclick=modifyApp(\''+row.pack_uuid+'\')></i>'
|
|
+'<i tilte="删除" class="fa fa-trash-o grid-oper-icon" aria-hidden="true" onclick=deleteApp(\''+row.pack_uuid+'\')></i>'
|
|
//+"<span class='hr-space'>|</span><a href='javascript:void(0);' onclick=appFunction('"+row.pack_uuid+"')>功能</a>"
|
|
;
|
|
}
|
|
|
|
//查询
|
|
function opt_query() {
|
|
//组织参数
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:{
|
|
conditions:$("#conditions").val(),
|
|
muid:$.inputpop_getValue({id:'manage_unit_uuid'})
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
$("#conditions").on("keydown", function (e) {
|
|
if (e.which === 13) {
|
|
opt_query();
|
|
}
|
|
});
|
|
|
|
|
|
//新增
|
|
function opt_add(){
|
|
var _url = "platform/portal/saconsole/packagereg_add.jsp?ajaxparam="+new Date().getTime();
|
|
$.openInTab({
|
|
id: $.getUUID(),
|
|
title: '应用包注册-新增',
|
|
height: 500,
|
|
width: 700,
|
|
url: _url,
|
|
queryParams:{
|
|
actionflag:'add'
|
|
|
|
},
|
|
onClose:function(){
|
|
alert(1);
|
|
opt_query();
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
//修改
|
|
function modifyApp(pack_uuid){
|
|
var _url = "platform/portal/saconsole/packagereg_add.jsp?ajaxparam="+new Date().getTime();
|
|
$.openInTab({
|
|
id:$.getUUID(),
|
|
title:'应用包注册-修改',
|
|
type:'url',
|
|
url:_url,
|
|
queryParams:{
|
|
actionflag:'mdf',
|
|
pack_uuid:pack_uuid
|
|
},
|
|
height:560,
|
|
width:900,
|
|
onClose:function (){
|
|
opt_query();
|
|
}
|
|
});
|
|
}
|
|
|
|
|
|
|
|
//删除
|
|
function deleteApp(pack_uuid){
|
|
if(confirm("是否确定删除?")){
|
|
$.wait_open();
|
|
$.cuajax({
|
|
url:'wdk?action=portal.package&method=delete&ajaxparam='+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:{
|
|
pack_uuid:pack_uuid
|
|
},
|
|
success:function(result) {
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
if(jres.code=="1"){
|
|
opt_query();
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//查看
|
|
function opt_view(pack_uuid){
|
|
var _url = "platform/portal/saconsole/packagereg_add.jsp?ajaxparam="+new Date().getTime();
|
|
$.openInTab({
|
|
id:$.getUUID(),
|
|
title:'应用注册-查看',
|
|
type:'url',
|
|
url:_url,
|
|
queryParams:{
|
|
actionflag:'detail',
|
|
pack_uuid:pack_uuid
|
|
},
|
|
height:560,
|
|
width:900,
|
|
onClose:function (){
|
|
|
|
}
|
|
});
|
|
}
|
|
|
|
//应用功能
|
|
function appFunction(){
|
|
var row = $.grid_getSelected({
|
|
id : _gridid
|
|
});
|
|
if (!row.pack_uuid) {
|
|
alert('请选择要管理功能的应用!');
|
|
return;
|
|
}
|
|
var pack_uuid = row.pack_uuid;
|
|
window.location.href = "<%=basePath%>platform/portal/saconsole/functionreg.jsp?pack_uuid="+pack_uuid;
|
|
}
|
|
|
|
</script>
|
|
</html>
|