1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| const COLUMNS_KEY = "user"; let columnsAll = [{ field : 'id', title : '编号', width : 50, align: 'center', checkbox : true }, { field : 'loginname', title : '用户名', align: 'center', width : 60 }, { field : 'username', title : '姓名', align: 'center', width : 120 },{ field : 'deptname', title : '所属机构/部门', align: 'center', width : 70 }, { field : 'rolename', title : '角色', align: 'center', width : 70 }, { field : 'job', title : '职位名称', align: 'center', width : 70 }, { field : 'mobile', title : '手机号码', align: 'center', width : 80 }, { field : 'address', title : '联系地址', align: 'center', width : 80 }, { field : 'enabled', title : '用户状态', align: 'center', width : 80, formatter : function(value, row, index) { value = userEnabledMapJson[value]; return value; } } ];
let currentColumns = getCurrentColumns(columnsAll, COLUMNS_KEY);
columns : [ currentColumns ], onLoadSuccess : function() { $(this).datagrid('columnMoving', COLUMNS_KEY); },
|