123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- 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
- }]
- }, '<b>webservice响应信息搜索结果</b>');
- }
- function loadWebservicexyxxGrid() {
- jQuery("#webservicexyxxGrid").flexigrid({
- url : 'getWebservicexyxxList.htm',
- dataType : 'json',
- method : 'post',
- title : '<b>webservice响应信息浏览</b>',
- 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('<a onclick="viewWebservicexyxx(\'' + record.id + '\' ,\'' + record.jqid + '\');">' + record.jqid + '</a>');
- }
- }, {
- 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 = '<a onclick="editWebservicexyxx(\'' + record.id + '\' ,\'' + "edit" + '\');">修改</a> ';
- str += '<a onclick="disableWebservicexyxx(\''+ record.id + '\');">删除</a>';
- 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,
- });
- }
|