hello world

layui的table,对列中的数据进行处理

 

 

{
field: 'syl',
title: '使用率',
align: 'center',
sort: true,
templet:function (res) {
console.log(res);
var syl;
var str="%";
if(res.BED_COUNT==0 || isNull(res.BED_COUNT)){
syl = 0;
return syl;
}
else {
syl = Math.round(Number(res.sum_in) * 100 / Number(res.BED_COUNT));
syl.append(str);
return syl;
}
}
}
posted @ 2021-01-22 11:42  SunsetRollercoaster  阅读(429)  评论(0)    收藏  举报