var hlskz = new Object(); hlskz.loadSearchModule = function(p) { var $div = $("#" + p.id); if ($div.length > 0) { $div.load('hlskzSearchModule.htm', { from : p.from, callBackFunName : p.callBackFunName }, function() { }); } }; /** * 加载参数设置查询模块 */ hlskz.loadSearchModule({ id : 'hlskzSearchModule', from : 'hlskz', callBackFunName : 'searchHlskzCallBack' }); /** * 搜索条件回调函数 * * @param {搜索条件对象} * data * @param {分隔符} * fgf */ function searchHlskzCallBack(data, fgf) { huimv.searchGrid("hlskzGrid", { url : 'getHlskzList.htm', params : [{ name : 'param', value : data }, { name : 'fgf', value : fgf }] }, 'HLS搜索结果'); } /** * 加载参数设置列表数据 */ function loadHlskzGrid(hlskzSearchGrid) { jQuery("#hlskzGrid").flexigrid({ url : 'getHlskzList.htm', dataType : 'json', method : 'post', params : [{ name : 'hlskzSearchGrid', value : $('#hlskzSearchGrid').val() }, { name : 'from', value : $('#from').val() }], title : 'HLS直播浏览', usepager : true, useRp : true, rp : 10, singleSelect : true, hidehead : false, showInputPage : true, showSelectRp : false, showTableToggleBtn : false, width : '790', resizable : false, height : '335', 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 : 100, sortable : true, align : 'center' }, { display : '设备名称', name : 'sbmc', width : 80, sortable : true, align : 'center', process : function(col, record, postion, pid) { jQuery(col).addClass('s'); jQuery(col).html('' + record.sbmc + ''); } }, { display : '设备IP', name : 'sbip', width : 100, sortable : false, align : 'center' }, { display : '通道1', name : '', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td1); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道2', name : '', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td2); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道3', name : '', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td3); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道4', name : 'td4', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td4); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道5', name : 'td5', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td5); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道6', name : 'td6', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td6); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道7', name : 'td7', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td7); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道8', name : 'td8', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td8); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道9', name : 'td9', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td9); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道10', name : 'td10', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td10); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道11', name : 'td11', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td11); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道12', name : 'td12', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td12); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道13', name : 'td13', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td13); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道14', name : 'td14', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td14); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道15', name : 'td15', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td15); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '通道16', name : 'td16', width : 60, sortable : false, align : 'center', process: function(col, record, position, pid) { var State = ""; var num = Number(record.td16); if (num <= 0 || (num > 400000 && num < 500000)) { State = "已停"; } else { State = "直播中"; } jQuery(col).html(State); } }, { display : '操作', name : '', width : 80, sortable : false, align : 'center', process : function(col, record, postion, pid) { jQuery(col).addClass('s'); jQuery(col).html('查看'); } }] }); } loadHlskzGrid($('#hlskzSearchGrid')); /** * 加载HLS查看页面 * @param id */ function viewHlskz(id) { huimv.loadPage('jkkzRight', 'viewHlskz.htm', { "id" : id }); }