update
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
<%@ 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">
|
||||
<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 javaEditor;
|
||||
$(document).ready(function() {
|
||||
javaEditor = CodeMirror.fromTextArea(document.getElementById("ruleScript"), {
|
||||
lineNumbers: true,
|
||||
matchBrackets: true,
|
||||
theme:"eclipse",
|
||||
mode: "text/x-java"
|
||||
});
|
||||
});
|
||||
function save(){
|
||||
var ruleName = $("#ruleName").val();
|
||||
if(""==ruleName){
|
||||
alert("请填写规则名称!");
|
||||
return ;
|
||||
}
|
||||
|
||||
var ruleScript = javaEditor.getValue();
|
||||
if(""==ruleScript){
|
||||
alert("验证脚本不能为空!");
|
||||
return ;
|
||||
}
|
||||
//document.getElementById("myForm").submit();
|
||||
$.post('${ctx}/actInfo/activityRule/updateMgr.do',$('#myform').serialize(),function(result){
|
||||
alert(result);
|
||||
art.dialog.opener.location.reload();
|
||||
});
|
||||
}
|
||||
function validate(){
|
||||
var ruleScript= javaEditor.getValue();
|
||||
if(ruleScript==""){
|
||||
alert("规则脚本不允许为空,请您重新输入!");
|
||||
return ;
|
||||
}
|
||||
var url="${ctx}/actInfo/activityRule/validate.do?ruleScript="+ruleScript;
|
||||
showDiaLog(url,'验证规则脚本','600px','300px');
|
||||
}
|
||||
function describe(){
|
||||
window.open("${ctx}/commons/bpm_script_info.html")
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="white-page">
|
||||
<div class="box2" panelTitle="更新流程环节规则表" showStatus="false" roller="true">
|
||||
<form id="myForm" action="${ctx}/actInfo/activityRule/updateMgr.do" method="post">
|
||||
<button id="submitButton" class="btn btn-sm btn-primary" name="submitButton" type="button" onclick="save();">
|
||||
<span class="icon_save">保存</span>
|
||||
<i class="ace-icon fa fa-save bigger-110"></i>
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-primary" onclick="art.dialog.close();">
|
||||
<span class="icon_back">返回</span>
|
||||
</button>
|
||||
<table class='table table-bordered form-table' border="0" cellspacing="0"
|
||||
cellpadding="0" style="margin-top: 15px">
|
||||
<!-- 存放隐藏域的区域 -->
|
||||
<input type="hidden" name="procDefId" value="${activityRule.procDefId}" id="procDefId" />
|
||||
<input type="hidden" name="ruleType" value="${activityRule.ruleType}" id="ruleType" />
|
||||
<input type="hidden" name="sourceActId" value="${activityRule.sourceActId}" id="sourceActId" />
|
||||
<input type="hidden" name="targetActId" value="${activityRule.targetActId}" id="targetActId" />
|
||||
<input type="hidden" id="ruleId" name="ruleId" value="${activityRule.ruleId}" />
|
||||
<!-- 存放表单的区域 -->
|
||||
<tr>
|
||||
<td>环节规则名称<font color="red">*</font>:</td>
|
||||
<td><input type="text" name="ruleName" value="${activityRule.ruleName}" id="ruleName" /></td>
|
||||
<td>流程定义ID<font color="red">*</font>:</td>
|
||||
<td title="${activityRule.procDefId}"><input readonly="readonly" type="text" value="${activityRule.procDefId}" /></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>源环节ID<font color="red">*</font>:</td>
|
||||
<td><input type="text" readonly="readonly" value="${activityRule.sourceActId}" /></td>
|
||||
<td>目标环节ID<font color="red">*</font>:</td>
|
||||
<td><input type="text" readonly="readonly" value="${activityRule.targetActId}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>环节规则脚本<font color="red">*</font>:</td>
|
||||
<td colspan="3">
|
||||
<!-- <a href="javascript:void(0);" onclick="">常用脚本</a> -->
|
||||
<a href="javascript:void(0);" onclick="validate();">验证脚本</a>
|
||||
<a href="javascript:void(0);" onclick="describe();">脚本说明</a>
|
||||
<br/>
|
||||
<input type="textarea" style="width: 700px;height: 50px" name="ruleScript" value="${activityRule.ruleScript}" id="ruleScript" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>环节规则优先级:</td>
|
||||
<td><input type="text" name="rulePriority" value="${activityRule.rulePriority}" id="rulePriority" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>环节规则描述:</td>
|
||||
<td colspan="3"><input type="text" name="ruleRemark" value="${activityRule.ruleRemark}" id="ruleRemark" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,97 @@
|
||||
<%@page import="com.blueland.bpm.engine.config.model.*" %>
|
||||
<%@page import="com.blueland.bpm.common.util.*" %>
|
||||
<%@page import="java.util.*" %>
|
||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<%@ taglib tagdir="/WEB-INF/tags/simpletable" prefix="simpletable"%>
|
||||
<%@ 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">
|
||||
<head>
|
||||
<%@ include file="/commons/meta.jsp" %>
|
||||
<base href="<%=basePath%>">
|
||||
<title>环节规则管理</title>
|
||||
<link href="${ctx_js_plugins}/simpletable/simpletable.css" type="text/css" rel="stylesheet">
|
||||
<script type="text/javascript" src="${ctx_js_plugins}/simpletable/simpletable.js"></script>
|
||||
|
||||
|
||||
<script type="text/javascript" >
|
||||
$(document).ready(function() {
|
||||
// 分页需要依赖的初始化动作
|
||||
window.simpleTable = new SimpleTable('queryForm',${page.thisPageNumber},${page.pageSize},'${pageRequest.sortColumns}');
|
||||
});
|
||||
function editActivityRule(ruleId){
|
||||
parent.editActivityRule(ruleId);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/commons/messages.jsp" %>
|
||||
<form id="queryForm" name="queryForm" action="${ctx}/actInfo/activityRule/listMgr.do" method="get" style="display: inline;">
|
||||
<input type="hidden" name="procDefId" value="${query.procDefId}" id="procDefId"/>
|
||||
<input type="hidden" name="sourceActId" value="${query.sourceActId}" id="sourceActId"/>
|
||||
<input type="hidden" name="targetActId" value="${query.targetActId}" id="targetActId"/>
|
||||
<input type="hidden" name="ruleType" value="${activityRule.ruleType}" id="ruleType"/>
|
||||
<div class="main-container" id="main-container">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="table-responsive">
|
||||
<div style="width: 100%;overflow: auto;">
|
||||
<table style=" width: inherit;max-width: 600%;table-layout: fixed;" id="sample-table-1"
|
||||
class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<!-- 排序时为th增加sortColumn即可,new SimpleTable('sortColumns')会为tableHeader自动增加排序功能; -->
|
||||
<th sortColumn="ruleName">流程定义</th>
|
||||
<th sortColumn="ruleName">环节名称</th>
|
||||
<th sortColumn="ruleName">规则名称</th>
|
||||
<th sortColumn="ruleScript">规则脚本</th>
|
||||
<th sortColumn="ruleRemark">规则描述</th>
|
||||
<th style="width: 90px">操作</th>
|
||||
</tr>
|
||||
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
<c:forEach items="${page.result}" var="item" varStatus="status">
|
||||
<tr class="${status.count % 2 == 0 ? 'odd' : 'even'}">
|
||||
<td class="td" >
|
||||
<a href="javascript:void(0);"
|
||||
onclick="showDiaLog('${ctx}/actInfo/activityRule/editMgr.do?ruleId=${item.ruleId}','脚本规则配置','900px','600px')">
|
||||
${item.procDefId}
|
||||
</a>
|
||||
</td>
|
||||
<td class="td" title="${item.sourceActId}">${item.sourceActId}-> ${item.targetActId}</td>
|
||||
<td class="td" title="${item.ruleName}">${item.ruleName}</td>
|
||||
<td class="td" title="${item.ruleScript}">${item.ruleScript} </td>
|
||||
<td class="td" title="${item.ruleRemark}"> ${item.ruleRemark} </td>
|
||||
<td>
|
||||
<a href="${ctx}/actInfo/activityRule/deleteMgr.do?ruleId=${item.ruleId}&">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<simpletable:pageToolbar page="${page}">
|
||||
</simpletable:pageToolbar>
|
||||
</div>
|
||||
<!-- /.table-responsive -->
|
||||
</div>
|
||||
<!-- /span -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user