本帖最后由 Chain 于 2018-3-26 15:43 编辑
【公司名】:北京智源普华信息技术有限公司
【myApps/OBPM版本号】:
【系统版本】:后台 - 系统信息 - 系统版本:weioa365 30204
【浏览器类型】:Chrome、IE
【联系方式-QQ】:994641698
【联系方式-电话】:15963132648
【问题描述】:
通过在查询表单添加jQuery,在视图列中添加脚本的方式,实现根据流程状态标签改变视图行颜色,现在这个平台经典皮肤模式下可以实现,H5皮肤模式下无法实现,请求协助,代码如下:
//在查询表单里的源代码代码里增加如下:
<script>
jQuery(document).ready(function(){
setTimeout(function(){
jQuery("div.changeColor_red").each(function(){
jQuery(this).parents("tr").find("td").find("a").css("color","#FF0000");
});
jQuery("div.changeColor_blue").each(function(){
jQuery(this).parents("tr").find("td").find("a").css("color","#111FEE");
});
jQuery("div.changeColor_green").each(function(){
jQuery(this).parents("tr").find("td").find("a").css("color","#408A10");
});
jQuery("div.changeColor_black").each(function(){
jQuery(this).parents("tr").find("td").find("a").css("color","#000000");
});
},300);
});
</script>
//在视图里编号列中增加脚本:
var flowType= getCurrentDocument().getLastFlowOperation();
var bh = getItemValueAsString("编号");
var state = getCurrentDocument().getStateInt();
var col=bh;
if(flowType==8){//表示流程终止
col += "<div class='changeColor_red' style='display:none;'></div>";
}else if(state==256){//审批中
col += "<div class='changeColor_blue' style='display:none;'></div>";
}else if(state==1048576){//审批通过
// rtn = "<font color='#00FF00'>"+bh+"</font>";//设置不同状态时候字段值显示的颜色
col += "<div class='changeColor_green' style='display:none;'></div>";
}else{
//rtn="<font color='#000000'>"+bh+"</font>";}
col += "<div class='changeColor_black' style='display:none;'></div>";
}
col;
|