var gridManager;
$(function () {
    initializeGrid();
});

function initializeGrid() {
    gridManager = UICtrl.grid('#maingrid', {
        columns: [
            {display: "流程编码", name: "code", width: 100, minWidth: 60, type: "string", align: "left"},
            {display: "流程名称", name: "name", width: 200, type: "string", align: "left"},
            {display: "图类型", name: "chartKindIdTextView", width: 150, type: "string", align: "left"},
            {display: "发布时间", name: "createdDate", width: 150, minWidth: 60, type: "string", align: "left"},
            {display: "发布人", name: "createdByName", width: 100, minWidth: 60, type: "string", align: "left"},
            {display: "版本号", name: "procVersion", width: 60, type: "string", align: "left"},
            {display: "当前版本", name: "statusTextView", width: 60, minWidth: 60, type: "string", align: "left"},
        ],
        dataAction: 'server',
        url: web_app.name + '/bpm/processDeployment/sliceQuery.ajax',
        parms: {procdefId: $('#procdefId').val()},
        sortName: "createdDate",
        SortOrder: "desc",
        width: '99.8%',
        height: '100%',
        heightDiff: -13,
        checkbox: true,
        fixedCellHeight: true,
        selectRowButtonOnly: true,
        onDblClickRow: function (data, rowindex, rowobj) {
        }
    });
}