87,990
社区成员
发帖
与我相关
我的任务
分享var tdResponseId = $('#tdViewRules_view #tdViewRules_view_tb #tdResponseId').val();
var brFrandUrl ="";
if(tdResponseId =="" || typeof(tdResponseId) == "undefined"){
brFrandUrl ="";
}else{
brFrandUrl ='${pageContext.request.contextPath}/thirdrisk/tdPolicycAction!getRules.action?tdResponseId='+tdResponseId;
}
$(function(){
$('#tdViewRules_view_tb').datagrid({
url : brFrandUrl,
idField:'rulerId',
fit:false,
border:false,
singleSelect: true,
toolbar: '#tb',
rownumbers:true,
frozenColumns:[[
{
field:'rulerId',
title:'主键ID',
width:200,
hidden:true
}
]],
columns:[[
{
field:'rulercode',
title:'规则编号',
align : 'center',
width:150
},{
field:'name',
title:'规则名称',
width:500
},{
field:'score',
width:150,
title:'规则分数'
},{
field:'decision',
width:150,
title:'规则结果'
},{
field : 'action',
align : 'center',
title : '查看规则详情',
width : 150,
formatter : function(value, row, index) {
var conditionsStr = row.conditions.replace(/"/g,"conditions");
var str = '';
if(conditionsStr=="[]" || conditionsStr==""){
str = "暂无详情";
}else{
str += parent.sy.fs('<img onclick="viewRule(\'{0}\',\'{2}\',\'{3}\');" src="{1}" title="查看"/>',row.rulerId,
'${pageContext.request.contextPath}/style/images/extjs_icons/book_open.png',
conditionsStr,row.name);
}
return str;
}
}
]]
});
});