/**
 *
 * @author BOGON
 * @version 1.0
 */

var page = {
    initData: function () {
        $("#tb").datagrid({
            height: document.documentElement.clientHeight,
            url: g.ctx + 'pc/sys/validationRuleSetting/rest/getFieldSelectList',
            method: "GET",
            singleSelect: true,
            pagination: false,
            autoHeight: true,
            loadMsg: "数据加载中......",
            rownumbers: true,
            fitColumns: false,
            nowrap: true,
            remoteSort: true,
            striped: true,
            queryParams: {},
            columns: [[
                {field: 'ck', checkbox: true},
                {width: '200', align: 'left', field: 'labelName', title: '字段名称'},
                {align: 'left', field: 'fieldAlias', title: '别名'}
            ]]
        });
    },
    getChecked: function (call) {
        var rows = $('#tb').datagrid('getChecked');
        if (rows.length <= 0) {
            topWin.layer.msg("请选中一条记录");
            return;
        }
        call(rows)
    }
}
$(function () {
        page.initData()
    }
)