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

//默认
function initDefault() {

    initGrid();
}

//查询条件
function getQueryParams() {
    var sParam = {};

    sParam.LIKEldmc = $('#LIKEldmc').textbox("getValue");
	sParam.LIKEgxdwmc = $('#LIKEgxdwmc').textbox("getValue");
    sParam.order = " order by ldmc"

    return sParam;
}

//加载列表
function initGrid() {
    var toolbar = [{
        text: '查询',
        iconCls: 'icon-search',
        handler: doSearch
    }];
    $('#tableGrid').datagrid({
        toolbar: toolbar,
        singleSelect: true,
        rownumbers: true,
        queryParams: getQueryParams(),
        url: 'zxldAction!listZxldByPage.do',
        columns: [[
            {
                field: 'A',
                checkbox:'true',
                width:30
            },
            {field: 'xh', title: '编码', hidden: true, width: 120},
            {field: 'ldmc', title: '雷达名称', hidden: false, width: 120},
            {
                field: 'ldbh', title: '雷达编号', hidden: false, width: 120,
            },
            {field: 'gxdwbh', title: '管辖单位编号', hidden: false, width: 120},
            {field: 'gxdwmc', title: '管辖单位名称', hidden: false, width: 120},
            {field: 'jd', title: '经度', hidden: false, width: 120},
            {field: 'wd', title: '纬度', hidden: false, width: 120},
            {field: 'fx', title: '方向', hidden: false, width: 120},
            {field: 'qs', title: '期数', hidden: false, width: 120},
			{field: 'bz', title: '备注', hidden: false, width: 120},

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

