var webservicexyxx = new Object();
webservicexyxx.loadSearchModule = function(p) {
var $div = $("#" + p.id);
if ($div.length > 0) {
$div.load('webserviceSearchModule.htm', {
callBackFunName : p.callBackFunName
}, function() {
});
}
};
webservicexyxx.loadSearchModule({
id : 'webserviceSearchModule',
callBackFunName : 'searchWebserviceCallBack'
});
function searchWebserviceCallBack(data, fgf) {
huimv.searchGrid("webservicexyxxGrid", {
url : 'getWebservicexyxxList.htm',
params : [{
name : 'param',
value : data
}, {
name : 'fgf',
value : fgf
}]
}, 'webservice响应信息搜索结果');
}
function loadWebservicexyxxGrid() {
jQuery("#webservicexyxxGrid").flexigrid({
url : 'getWebservicexyxxList.htm',
dataType : 'json',
method : 'post',
title : 'webservice响应信息浏览',
usepager : true,
useRp : true,
rp : 10,
singleSelect : true,
hidehead : false,
showInputPage : true,
showSelectRp : false,
showTableToggleBtn : false,
width : '790',
height : '335',
nowrap : true,
resizable : false,
cache : false,// 清除缓存
colModel : [{
display : '行号',
name : 'hh',
width : 25,
sortable : false,
align : 'center',
process : function(col, record, d) {
jQuery(col).html(d + 1);
}
}, {
display : '牧场名称',
name : 'mcmc',
width : 120,
sortable : false,
align : 'center'
}, {
display : '猪舍名称',
name : 'zsmc',
width : 120,
sortable : false,
align : 'center'
}, {
display : '机器编号',
name : 'jqid',
width : 100,
sortable : true,
align : 'center',
process : function(col, record, postion, pid) {
jQuery(col).addClass('s');
jQuery(col).html('' + record.jqid + '');
}
}, {
display : '命令',
name : 'cmd',
width : 100,
sortable : false,
align : 'center'
},{
display : '参数',
name : 'cs',
width : 100,
sortable : false,
align : 'center'
}, {
display : '相应时间',
name : 'xysj',
width : 60,
sortable : false,
align : 'center'
}, {
display : '返回值',
name : 'fhz',
width : 90,
sortable : false,
align : 'center'
}, {
display : '操作',
name : '',
width : 90,
sortable : false,
align : 'center',
process : function(col, record, postion, pid) {
jQuery(col).addClass('s');
var str = '修改 ';
str += '删除';
jQuery(col).html(str);
}
}]
});
}
/**
* 删除此条webservice响应信息
* @param id
*/
function disableWebservicexyxx(id) {
Dialogs.alert("确定删除当前webservice响应信息?", {
title : '提示信息',
width : 250,
height : 80,
top : 150,
button : {
ok : ['确定',function(){
this.close();
huimv.showProcessModel('处理数据中');
jQuery.ajax({
url : 'disableWebservicexyxx.htm',
dataType : 'json',
type : 'post',
cache : false,
data : {"id" : id},
success : function(data) {
huimv.hideProcessModel();
if (data.returnCode > 0) {
loadWebservicexyxxList();
} else {
Dialogs.alert("传入参数有误!", {
width : 300,
height : 50
});
}
},
error : function(data) {
huimv.showError(data.responseText);
}
});
}],
cancel : ['取消',function(){
this.close();
}]
}
});
}
/**
* 编辑Webservice详细信息
* @param id
*/
function editWebservicexyxx(id,from) {
Dialogs.load('editWebservicexyxx.htm', {"id" : id, "from" : from}, {
// 对话框基本配置选项
draggable: true,//是否拖动
autosize: false,//是否自适应大小
resizable: true,//是否可以改变大小
maximizable: true,//是否显示最大化最小化
autopos: 'fixed',// 窗口是否(自动剧中,fixed)页面 默认’fixed’
title: "修改",//窗口标题
lightbox: true,//窗口应用时是否禁用其他操作
width: 400,//窗口宽度
height: 200,//窗口高度
button: {
ok: ['保存',function(){
saveWebservicexyxx(id);
}],
cancel: ['取消',function(){
this.close();
}]
}
});
}
loadWebservicexyxxGrid();
function viewWebservicexyxx(id, jqid ) {
huimv.loadPage("webserviceRight", "viewWebservicexyxx.htm", {
"id" : id,
"jqid" : jqid,
});
}