layui table中cols取list中的实体类,并且给状态添加判断

1 table中cols取list中的实体类 比如 

{field: 'user.uname', title: '用户名', width: 80, sort: true}
这样取不到值

需要在实体类中添加
public String getBedName() {
return bed.getBedName();
}

2 给状态添加判断
{field: 'mrStatus', title: '状态', width:240,
templet : function(data) {// 替换数据
if (data.mrStatus == 1) {
return "生成病历";
} else if (data.mrStatus == 2) {
return "添加床位医生护士";
} else if (data.mrStatus == 3) {
return "出院申请";
} else if (data.mrStatus == 4) {
return "结算费用";
} else if (data.mrStatus == 5) {
return "出院成功";
} else if (data.mrStatus == 6) {
return "删除病历";
}
}
}
posted @ 2020-10-20 11:22  金木羽  阅读(3284)  评论(0)    收藏  举报