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 "删除病历";
}
}
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM