介绍
新建一个自定义格式的列表。
打开功能配置
点击自定义表格,自定义表格勾选启用
通过配置改变格局
代码示例:
function(data,config){
//自定义项的样式
// config.itemCls = 'je-demo-tableview2-item';
//var color = '#8e8e8e';
//if(data.XMINFO_XMZT_CODE == '01'){color='#128c4e';}
//else if(data.XMINFO_XMZT_CODE == '02'){color='#d53b2d';}\
//获取表格展示参数
var tx = data.KHINFO_KHTX;
var txPath = '头像';
var card_name = data.KHINFO_LXRXM;
var sex = 'jeicon-men';
if(data.KHINFO_LXRXB_CODE == '02'){
sex = 'jeicon-women';
}
// txPath = "<img class='je-user-photo' src='http://crm-private-dev.oss-cn-beijing.aliyuncs.com"+tx.split('*')[1]+"'>"
if(tx){
txPath = "<img class='je-user-photo' src='"+tx.split('*')[1]+"'>"
}else{
txPath = card_name.substring(card_name.length - 2);
}
//编辑样式
var html =
"<div class='dataCard'>" +
"<div class='leftdiv'>" +
"<div class='headerImg'>"+//头像
txPath +
"</div>" +
"<i class='jeicon "+sex+"'></i>" +//性别图标
"<div class='name'>{KHINFO_LXRXM}</div>" +
"<div class='duty'>{KHINFO_ZW_NAME}</div>" +
"</div>" +
"<div class='centerline'></div>" +
"<div class='rightdiv'>" +
"<div class='item'><span class='label'>部门</span><span class='note'>{KHINFO_BM_NAME}</span></div>" +
"<div class='item'><span class='label'>手机</span><span class='note'>{KHINFO_SJH}</span></div>" +
"<div class='item'><span class='label'>座机</span><span class='note'>{KHINFO_LXRZJ}</span></div>" +
"<div class='item'><span class='label'>邮箱</span><span class='note'>{KHINFO_YX}</span></div>" +
"</div>" +
"</div>";
return html;
}
案例展示
关键字
1.自定义表格
最后编辑: admin 文档更新时间: 2024-08-21 10:58 作者:admin