var windowId,proName = window.location.pathname.split("/")[1],sysUrl = "http://"+window.location.host+"/"+proName,toEdit;
var displayType = "VideotaskrunresultList";
var toolbar = [];
$(function(){
	initGrid();
});

//加载列表
function initGrid(){
	toolbar = [{
		text	:	'查询',
		iconCls	:	'icon-search',
		handler	:	doSearch
	}];

	$('#tableGrid').datagrid({
		toolbar : toolbar,
		singleSelect:true,
		rownumbers:true,
		queryParams:getQueryParams(),
		url : 'sbxxAction!list_TaskSbxx.do',
		columns : [[
			{field: 'A',checkbox:'true',width:30},
			{field:'sbbh',title:'设备编号',hidden:false,width:155},
			{field:'sbmc',title:'设备名称',hidden:false,width:120},
			{field:'cjbh',title:'cjbh',hidden:true,width:80},
			{field:'sbip',title:'IP地址',hidden:false,width:105},
			{field:'cjmc',title:'设备厂商',hidden:false,width:60},
			{field:'sbzl',title:'设备类型',hidden:true,width:70},
			{field:'xzmc',title:'行政目录',hidden:true,width:80},
			{field:'xzbh',title:'xzbh',hidden:true,width:80},
			{field:'csmc',title:'类型名称',hidden:false,width:80},
			{field:'sbzt',title:'sbzt',hidden:true,width:70},
			{field:'sbztname',title:'设备状态',hidden:false,width:60}
		]]
	});
}

//查询
function doSearch(){
	$('#tableGrid').datagrid('load',getQueryParams());
}

//查询条件
function getQueryParams(){
	var sParam = {};
	sParam.LIKEsbmc =  $('#LIKEsbmc').textbox("getValue");;
	sParam.istaskdevice = $('#istaskvideo').combobox("getValue");
	return sParam;
}

