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.
250 lines
8.3 KiB
250 lines
8.3 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
|
pageEncoding="UTF-8"%>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="zh-cn">
|
|
<head>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<!-- 上述3个meta标签*必须*放在最前面,任何其他内容都*必须*跟随其后! -->
|
|
<title>应用云平台-服务管理</title>
|
|
</head>
|
|
<body 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="doAdd()">新增</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;" >
|
|
|
|
<div class="h_layout">
|
|
<div>
|
|
<div class="inputgroup">
|
|
<label>关键字</label>
|
|
<div>
|
|
<input class="easyui-validatebox" id="keywords" name="keywords" placeholder="可输入信息名称、编码、备注"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>消息分类</label>
|
|
<div>
|
|
<input id="group_uuid" name="group_uuid" title=""/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:125px;">
|
|
<a class="eapbutton" style="float:right;" onclick="doQuery()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
<!-- 消息信息表格 -->
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0 10px;" ></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var _getSessionUser = $.getSessionUser();
|
|
var _op_acc = _getSessionUser.account_id;
|
|
var _appsrv = 'service.portal.appkey';
|
|
//表格参数
|
|
var _gridid = $.getUUID();
|
|
var _gridcode = 'platform.portal.saconsole.servicegrid';
|
|
|
|
$(function() {
|
|
//消息分类
|
|
combo_box('group_uuid', 'PF_SRV_GROUP');
|
|
|
|
//初始化表格
|
|
$.grid({
|
|
id: _gridid,
|
|
containerid: 'layout_grid',
|
|
gridcode: _gridcode,
|
|
checkbox: false,
|
|
url: 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
queryParams: {
|
|
_SRVNAME: _appsrv,
|
|
_SRVMETHOD: 'querySrvListByKeywords',
|
|
_DATA: $.json2str ({
|
|
keywords: '',
|
|
group_uuid: '',
|
|
resultfields: '',
|
|
orderfields: 'display_order asc'
|
|
}),
|
|
_RSTYPE : 'grid',
|
|
_RSFIELD : 'results',
|
|
_RSPARAM : $.json2str({
|
|
pagequery : '1'
|
|
})
|
|
},
|
|
idField: 'service_uuid',
|
|
pagination: true,
|
|
formatter: {
|
|
code_name: 'formatter_view',
|
|
command: 'formatter_command'
|
|
}
|
|
})
|
|
});
|
|
|
|
function formatter_view(value,row,index) {
|
|
return '<a href="javascript:void(0);" onclick="doView(\''+ row.service_uuid +'\')">'+ value +'</a>';
|
|
}
|
|
function formatter_command(value,row,index) {
|
|
return '<i title="修改" class="fa fa-pencil-square-o oper-obj" style="font-size:14px;margin:0 5px;" aria-hidden="true" onclick="doEdit(\''+ row.service_uuid +'\')"></i>'
|
|
+ '<i title="删除" class="fa fa-trash-o grid-oper-icon" style="font-size:14px;margin:0 5px;" aria-hidden="true" onclick="doDelete(\''+ row.service_uuid +'\')"></i>';
|
|
}
|
|
|
|
function doQuery() {
|
|
|
|
var dataParams = {
|
|
_SRVNAME: _appsrv,
|
|
_SRVMETHOD: 'querySrvListByKeywords',
|
|
_DATA: $.json2str ({
|
|
keywords: $('#keywords').val().trim(),
|
|
code_type: $('#group_uuid').val(),
|
|
result_fields: '',
|
|
order_fields: 'display_order asc'
|
|
}),
|
|
_RSTYPE : 'grid',
|
|
_RSFIELD : 'results',
|
|
_RSPARAM : $.json2str({
|
|
pagequery : '1'
|
|
})
|
|
};
|
|
|
|
//重新加载grid数据
|
|
$.grid_reload({
|
|
id: _gridid,
|
|
queryParams: dataParams
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [doView 查看信息]
|
|
* @return {[type]} [无]
|
|
*/
|
|
function doView(service_uuid) {
|
|
var wid = $.getUUID();
|
|
$.openWin({
|
|
id: wid,
|
|
title: '查看信息',
|
|
height: 400,
|
|
width: 700,
|
|
url: 'platform/portal/saconsole/appservice_edit.jsp',
|
|
queryParams:{
|
|
actionflag: 'view',
|
|
selected_id: service_uuid
|
|
},
|
|
onClose: function() {
|
|
doQuery();
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [doAdd 新增信息]
|
|
* @return {[type]} [无]
|
|
*/
|
|
function doAdd(){
|
|
var wid = $.getUUID();
|
|
$.openWin({
|
|
id: wid,
|
|
title: '新增信息',
|
|
height:400,
|
|
width:700,
|
|
url: 'platform/portal/saconsole/appservice_edit.jsp',
|
|
queryParams: {
|
|
actionflag:'add'
|
|
},
|
|
onClose: function() {
|
|
doQuery();
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [doEdit 修改消息]
|
|
* @return {[type]} [无]
|
|
*/
|
|
function doEdit(service_uuid){
|
|
var wid = $.getUUID();
|
|
$.openWin({
|
|
id: wid,
|
|
title: '修改信息',
|
|
height:400,
|
|
width:700,
|
|
url: 'platform/portal/saconsole/appservice_edit.jsp',
|
|
queryParams: {
|
|
actionflag: 'edit',
|
|
selected_id: service_uuid
|
|
},
|
|
onClose: function() {
|
|
doQuery();
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* [doDelete 删除信息]
|
|
* @return {[type]} [无]
|
|
*/
|
|
function doDelete(service_uuid){
|
|
var ifdelete = confirm("确定要删除该信息吗?");
|
|
|
|
if (ifdelete) {
|
|
$.wait_open("删除中,请稍候。。。");
|
|
$.cuajax({
|
|
url: 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
method: "post",
|
|
timeout: WDK_Timeout,
|
|
data: {
|
|
_SRVNAME: _appsrv,
|
|
_SRVMETHOD: 'deleteSvr',
|
|
_DATA:$.json2str({
|
|
op_acc: _op_acc,
|
|
service_uuid: service_uuid
|
|
})
|
|
},
|
|
success:function(result) {
|
|
$.wait_close();
|
|
//返回值字符串转json
|
|
var jres = $.str2json(result);
|
|
if(jres.code == "1"){ //操作成功
|
|
doQuery();
|
|
} else {
|
|
alert(jres.desc);
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result=' + result);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//下拉框
|
|
function combo_box(id, moduleCode){
|
|
$.combobox({
|
|
id: id,
|
|
url: 'wdk?action=wdk.pub&method=call_service&ajaxparam=' + new Date().getTime(),
|
|
queryParams: {
|
|
_SRVNAME:'service.wdk.pub',
|
|
_SRVMETHOD:'wql_queryCombobox',
|
|
_DATA: $.json2str({
|
|
modulecode:moduleCode
|
|
,jparam:{
|
|
condition:''
|
|
}
|
|
}),
|
|
_RSFIELD:'result'
|
|
},
|
|
height: 25,
|
|
defaultOption: '请选择'
|
|
});
|
|
}
|
|
</script>
|
|
</html>
|
|
|