activateDay.html 1.6 KB
<table id="activateDay"></table>
<script type="text/javascript">
    $(function () {
        // 列表
        var grid2 = $("#activateDay");
        grid2.myDatagrid({
            fit: true,
            fitColumns: true,
            nowrap: false,
            url: contextPath + "/ActivateUnionRest/queryActivateDay",
            method: 'POST',
            queryParams: getId(),
            loadFilter: function (data) {
                var temp = defaultLoadFilter(data);
                temp.rows = temp.list;
                return temp;
            },
            columns: [[{
                title: "时间",
                field: "hour",
                width: 100,
                align: "center"
            }, {
                title: "ios激活数",
                field: "idfaCount",
                width: 180,
                align: "center"
            }, {
                title: "安卓激活数",
                field: "imeiCount",
                width: 120,
                align: "center"
            }]],
            cache: false,
            pageSize: 10,
            pageList: [10],
            singleSelect: false,
            checkOnSelect: false
        });

        function getId() {
            var params = getParam("searchForm");
            params["unionType"] = unionType;
            return params;
        }

    });

    function getParam(table) {
        var paramsArray = $("#"+table+"").serializeArray();
        var params = {};
        for (var i = 0; i < paramsArray.length; i++) {
            params[paramsArray[i].name] = paramsArray[i].value;
        }
        return params;
    }
</script>