layui templet

function toUrl(refUrl) {
window.open(refUrl, "服务报告", "_blank");
}
function mm(logName,sourceType,refUrl) {
/* */
if (sourceType==='TSE_MM'||sourceType==='FAE_MM') {
return '<a style="text-decoration :underline ; text-underline: #00a0e9;" οnclick="toUrl(\''+refUrl+'\')">'+logName+'</a>';
} else {
return logName;
}
}
layui.use(['jquery', 'table', 'laypage', 'form'], function () {
$ = layui.jquery;
var table = layui.table;
var forLineId=$("#forLineId").val();
table.render({
id: 'dit'
,elem: '#dit'
,method:"post"
, url: $("#PageContext").val() + '/workLog/listPage?forLineId='+forLineId
, cols: [[
{type: 'numbers', width: '5%'},
{field: 'logDate', width: '15%', title: '服务日期', sort: false},
{field: 'userName', width: '12%', title: '服务人', sort: false},
{field: 'logName', width: '68%', title: '服务内容', sort: false,templet:'<div>{{ mm(d.logName,d.sourceType,d.refUrl)}}</div>'}
]]
, page: true
, limit: 10//每页条数
, limits: [10, 20, 30, 40, 50]
, height: 480
});

转载于:https://www.cnblogs.com/albert-think/p/10401843.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值