This commit is contained in:
hanjian
2024-08-14 15:17:51 +08:00
parent 20a221c1a2
commit b610f94b2e
3483 changed files with 650965 additions and 0 deletions

View File

@@ -0,0 +1,182 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@page import="com.blueland.bpm.engine.config.model.*" %>
<%@ include file="/commons/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/commons/meta.jsp"%>
<link rel="stylesheet" href="${ctx}/resource/js/plugins/codemirror/codemirror.css">
<link rel="stylesheet" href="${ctx}/resource/js/plugins/codemirror/eclipse.css">
<style>
.CodeMirror {
/* Set height, width, borders, and global font properties here */
font-family: monospace;
height: 180px;
}
</style>
<script src="${ctx}/resource/js/plugins/codemirror/codemirror.js"></script>
<script src="${ctx}/resource/js/plugins/codemirror/clike.js"></script>
<base href="<%=basePath%>">
<title>流程环节规则表新增</title>
<script>
var demo;
var ischeck = true;
var javaEditor;
$(document).ready(function() {
javaEditor = CodeMirror.fromTextArea(document.getElementById("ruleScript"), {
lineNumbers: true,
matchBrackets: true,
//indentWithTabs: true,
// styleActiveLine: true,
theme:"eclipse",
// smartIndent: true,
// autofocus: true,
mode: "text/x-java"
});
$.Tipmsg.r=null;
$("#myForm").Validform({
tiptype:function(msg){
alert(msg);//验证提示信息
},
tipSweep:true,
btnSubmit:"#addButton",
callback:function(form){
var ruleScript = javaEditor.getValue();
if(""==ruleScript){
alert("验证脚本不能为空!");
return false;
}
document.getElementById("myForm").action="${ctx}/actInfo/activityResourceRule/save.do";
return true;
}
});
});
function editActivityRule(ruleId){
var url="${ctx}/actInfo/activityResourceRule/getActivityRule.do?ruleId="+ruleId;
$.post(url,function(result){
var jsonObject = eval(result);
$.each(jsonObject, function(name, value) {
if(name=="ruleScript"){
javaEditor.setValue(value);
}else{
var inputObj=$("#"+name);
if(inputObj.attr("type")!="hidden"||name=="ruleId"){
inputObj.val(value);
}
}
});
});
}
function update(){
if($("#ruleId").val()==""){
alert("该规则没有在数据库中,请点击规则列表后再进行更新!");
return;
}
var ruleName = $("#ruleName").val();
if(""==ruleName){
alert("请填写规则名称!");
return ;
}
var ruleScript = javaEditor.getValue();
if(""==ruleScript){
alert("验证脚本不能为空!");
return ;
}
document.getElementById("myForm").action="${ctx}/actInfo/activityResourceRule/update.do";
document.getElementById("myForm").submit();
}
function validate(){
var ruleScript=javaEditor.getValue();;
if(ruleScript==""){
alert("规则脚本不允许为空,请您重新输入!");
return ;
}
var url="${ctx}/actInfo/activityResourceRule/validate.do?ruleScript="+ruleScript;
showDiaLog(url,'验证规则脚本','600px','300px');
}
function describe(){
window.open("${ctx}/commons/bpm_script_info.html")
}
</script>
</head>
<body class="white-page">
<form id="myForm" action="${ctx}/actInfo/activityResourceRule/save.do" method="post">
<div class="main-container" id="main-container">
<div class="panel panel-primary">
<div class="panel-body">
<div class="well well-sm">
<button id="addButton" name="submitButton" type="button" class="btn btn-xs btn-success">
新 增
<i class="ace-icon fa fa-plus bigger-110"></i>
</button>
<button id="submitButton" name="submitButton" type="button" onclick="update();" class="btn btn-xs btn-success">
更 新
<i class="ace-icon fa fa-pencil bigger-110"></i>
</button>
<button type="button" onclick="art.dialog.close();" class="btn btn-xs btn-danger">
关 闭
<i class="ace-icon fa fa-times bigger-110"></i>
</button>
</div>
<table class='table table-bordered form-table' border="0" cellspacing="0"
cellpadding="0" id="myTable">
<input type="hidden" name="ruleType" value="${activityRule.ruleType}" id="ruleType"/>
<input type="hidden" name="ruleId" value="${activityRule.ruleId}" id="ruleId"/>
<input type="hidden" name="procDefId" value="${activityRule.procDefId}" id="procDefId"/>
<input type="hidden" name="sourceActId" value="${activityRule.sourceActId}" id="sourceActId"/>
<input type="hidden" name="sourceActName" value="${activityRule.sourceActName}" id="sourceActName"/>
<input type="hidden" name="targetActId" value="${activityRule.targetActId}" id="targetActId"/>
<input type="hidden" name="targetActName" value="${activityRule.targetActName}" id="targetActName"/>
<!-- 存放表单的区域 -->
<tr>
<td>当前环节<font color="red">*</font></td>
<td>${activityRule.sourceActName}</td>
<td width="135px">目标环节<font color="red">*</font></td>
<td>${activityRule.targetActName}</td>
</tr>
<tr>
<td>规则名称<font color="red">*</font></td>
<td colspan="3"><input style="width: 250px" type="text" name="ruleName"
value="${activityRule.ruleName}" id="ruleName"
nullmsg="请填写规则名称" datatype="*"/></td>
</tr>
<tr>
<td>规则脚本<font color="red">*</font></td>
<td colspan="3">
<!-- <a href="javascript:void(0);" onclick="">常用脚本</a>&nbsp;&nbsp; -->
<a href="javascript:void(0);" onclick="validate();">验证脚本</a>&nbsp;&nbsp;
<a href="javascript:void(0);" onclick="describe();">脚本说明</a>
<br/>
<textarea name="ruleScript" id="ruleScript" style="width: 700px;height: 50px">${activityRule.ruleScript}</textarea>
<br/>
环节人员规则通过groovy返回字符串来定义环节的处理人员列表。返回的人员格式包括人员ID和组织ID以井号分隔
</br>返回多人时人员之间以逗号分隔。返回的示例如下return "wugf1202#204300010999,liysh124#204300010599";
</td>
</tr>
<tr>
<td>规则描述:</td>
<td colspan="3"><textarea style="width: 700px;height: 50px" name="ruleRemark" id="ruleRemark">${activityRule.ruleRemark}</textarea></td>
</tr>
</table>
<IFRAME style="width:100%;height:180px;" scrolling="auto" src="${ctx}/actInfo/activityResourceRule/list.do?procDefId=${activityRule.procDefId}&sourceActId=${activityRule.sourceActId}&targetActId=${activityRule.targetActId}" frameBorder="0" id="rightFrame" name="rightFrame" allowTransparency="true"></IFRAME>
</div>
</div>
</div>
</form>
</body>
</html>