var tableIns = table.render({
elem: '#test'
,url:'<%=path%>/partyMember/getPartyMembersByOrgCode'
, width: '100%'
, height: 480
,id:'PM_CODE'
,cols: [[ //标题栏
{checkbox: true, LAY_CHECKED: false, filter:'test'}
, {field: 'PM_CODE', title: 'PM_CODE', width: 180, align: 'center'}
, {field: 'HEAD_URL', title: '头像', width: 100, align: 'center',templet:'#imgTpl'}
, {field: 'NAME', title: '党员姓名', width: 180, align: 'center'}
, {field: 'ORG_NAME', title: '组织机构', width: 180, align: 'center'}
, {field: 'MOBILE_NO', title: '手机号', width: 120, align: 'center'}
, {field: 'SEX', title: '性别', width: 80, align: 'center',templet:'#sexTpl'}
]]
, page: true //是否显示分页
,limits : [ 10, 20,50, 100 ],
limit : 10
,done:function(res,curr,count){
// 隐藏列
$(".layui-table-box").find("[data-field='PM_CODE']").css("display","none");
}
});
在done函数中设置该列的display为none。