日志总量js提取到common.js中

This commit is contained in:
wangxin
2018-06-27 15:13:08 +08:00
parent 393c0f9917
commit de96ba18c6
3 changed files with 30 additions and 27 deletions

View File

@@ -289,7 +289,28 @@ $(function(){
$("input[name$='exprType']:checked").each(function(){
setDefaultMatchMethod(this);
});
/*
*配置展示日志总数,审核通过才会调用接口查询日志总量
必须放在是否审核一列之后
并且是否审核一列的span标签需配置data-audit="xxxx"属性
xxxx可用值为createdapprovedunapprovedcancel
td需要配置属性有functionIdcompileIdaction
*/
$("td[compileId]").each(function(){
var audit=$(this).prev().find("span").data("audit");
if(audit == "approved"){
var data={};
data.date=new Date();
data.compileId=$(this).attr("compileId");
data.action=$(this).attr("action");
data.functionId=$(this).attr("functionId");
data.audit=$(this).attr("audit");
data.obj=$(this)
GetLogTotal('${ctx}',data);
}else{
$(this).html("0");
}
});
});
//与表达式时,只允许为子串匹配
var setDefaultMatchMethod=function (obj){