first commit
This commit is contained in:
148
bin/WebRoot/jsp/snaker/historyorderList.jsp
Normal file
148
bin/WebRoot/jsp/snaker/historyorderList.jsp
Normal file
@ -0,0 +1,148 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程实例</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var resumeFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要唤醒此流程实例?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/order/resume.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','唤醒成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','唤醒失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '将级联流程实例的数据,且不可恢复,您确定要执行本操作?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/order/cascadeRemove.do', {id:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/snaker/order/getHistoryOrders.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20%', title : '流程ID', field : 'processId', sortable : true, halign:'center'},
|
||||
{width : '30%', title : '流程实例ID', field : 'id', sortable : true, halign:'center'},
|
||||
{width : '120', title : '开始时间', field : 'createTime', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value.length<20){
|
||||
return value;
|
||||
}else{
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{width : '120', title : '结束时间', field : 'endTime', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value.length<20){
|
||||
return value;
|
||||
}else{
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'orderState', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
if(value=='2'){
|
||||
<%if (sessionManager.havePermission(session,"snaker/order/resume.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-clock_play" title="唤醒" onclick="resumeFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
}
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"snaker/order/cascadeRemove.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程实例名称</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
86
bin/WebRoot/jsp/snaker/order.jsp
Normal file
86
bin/WebRoot/jsp/snaker/order.jsp
Normal file
@ -0,0 +1,86 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/common/taglibs.jsp"%>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>流程实例</title>
|
||||
<%@ include file="/common/meta.jsp"%>
|
||||
<link rel="stylesheet" href="${ctx}/styles/css/style.css" type="text/css" media="all" />
|
||||
<script src="${ctx}/styles/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||
<script src="${ctx}/styles/js/table.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="mainForm" action="${ctx}/snaker/order" method="get">
|
||||
<input type="hidden" name="pageNo" id="pageNo" value="${page.pageNo}"/>
|
||||
<table width="100%" border="0" align="center" cellpadding="0"
|
||||
class="table_all_border" cellspacing="0" style="margin-bottom: 0px;border-bottom: 0px">
|
||||
<tr>
|
||||
<td class="td_table_top" align="center">
|
||||
流程实例
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table_all" align="center" border="0" cellpadding="0"
|
||||
cellspacing="0" style="margin-top: 0px">
|
||||
<tr>
|
||||
<td align=center width=15% class="td_list_1" nowrap>
|
||||
流程名称
|
||||
</td>
|
||||
<td align=center width=15% class="td_list_1" nowrap>
|
||||
实例编号
|
||||
</td>
|
||||
<td align=center width=15% class="td_list_1" nowrap>
|
||||
实例启动时间
|
||||
</td>
|
||||
<td align=center width=15% class="td_list_1" nowrap>
|
||||
实例结束时间
|
||||
</td>
|
||||
<td align=center width=10% class="td_list_1" nowrap>
|
||||
期望完成时间
|
||||
</td>
|
||||
<td align=center width=10% class="td_list_1" nowrap>
|
||||
实例创建人
|
||||
</td>
|
||||
<td align=center width=10% class="td_list_1" nowrap>
|
||||
实例状态
|
||||
</td>
|
||||
<td align=center width=10% class="td_list_1" nowrap>
|
||||
操作
|
||||
</td>
|
||||
</tr>
|
||||
<c:forEach items="${page.result}" var="item">
|
||||
<tr>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.processName}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.orderNo}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.createTime}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.endTime}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.expireTime}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.creator}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
${item.orderState == 0 ? '已结束' : '运行中'}
|
||||
</td>
|
||||
<td class="td_list_2" align=left nowrap>
|
||||
<a href="${ctx}/snaker/process/display?orderId=${item.id} " class="btnPict" title="查看流程图">查看流程图</a>
|
||||
<a href="${ctx}/snaker/all?processId=${item.processId }&orderId=${item.id}&type=cc " class="btnView" title="查看">查看</a>
|
||||
</td>
|
||||
</tr>
|
||||
</c:forEach>
|
||||
<frame:page curPage="${page.pageNo}" totalPages="${page.totalPages }" totalRecords="${page.totalCount }"/>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
147
bin/WebRoot/jsp/snaker/orderList.jsp
Normal file
147
bin/WebRoot/jsp/snaker/orderList.jsp
Normal file
@ -0,0 +1,147 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程实例</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var terminateFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要废弃此流程实例?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/order/terminate.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','废弃成功','info');
|
||||
grid.datagrid('reload');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','废弃失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
//alert(datas);
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '将级联流程实例的数据,且不可恢复,您确定要执行本操作?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/order/cascadeRemove.do', {id:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/snaker/order/getOrders.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20%', title : '流程ID', field : 'processId', sortable : true, halign:'center'},
|
||||
{width : '30%', title : '流程实例ID', field : 'id', sortable : true, halign:'center'},
|
||||
{width : '60', title : '版本号', field : 'version', sortable : true, halign:'center'},
|
||||
{width : '120', title : '开始时间', field : 'createTime', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value.length<20){
|
||||
return value;
|
||||
}else{
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{width : '120', title : '最新操作时间', field : 'lastUpdateTime', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value.length<20){
|
||||
return value;
|
||||
}else{
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"snaker/order/terminate.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-tag_blue_delete" title="废弃" onclick="terminateFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%if (sessionManager.havePermission(session,"snaker/order/cascadeRemove.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程实例名称</td>
|
||||
<td><input id="search_pid" name="search_pid" class="easyui-combotree"/></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
48
bin/WebRoot/jsp/snaker/processDeploy.jsp
Normal file
48
bin/WebRoot/jsp/snaker/processDeploy.jsp
Normal file
@ -0,0 +1,48 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/common/taglibs.jsp"%>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>流程部署</title>
|
||||
<%@ include file="/common/meta.jsp"%>
|
||||
<link rel="stylesheet" href="${ctx}/styles/css/style.css" type="text/css" media="all" />
|
||||
<script src="${ctx}/styles/js/jquery-1.8.3.min.js" type="text/javascript"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="inputForm" action="${ctx }/snaker/process/deploy" method="post" enctype="multipart/form-data">
|
||||
<table width="100%" border="0" align="center" cellpadding="0"
|
||||
class="table_all_border" cellspacing="0" style="margin-bottom: 0px;border-bottom: 0px">
|
||||
<tr>
|
||||
<td class="td_table_top" align="center">
|
||||
流程部署
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table_all" align="center" border="0" cellpadding="0"
|
||||
cellspacing="0" style="margin-top: 0px">
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>上传流程定义文件:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
<input type="file" class="input_file" id="snakerFile" name="snakerFile"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align="center" border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr align="left">
|
||||
<td colspan="1">
|
||||
<input type="submit" class="button_70px" name="submit" value="提交">
|
||||
|
||||
<input type="button" class="button_70px" name="reback" value="返回"
|
||||
onclick="history.back()">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
117
bin/WebRoot/jsp/snaker/processDesign.jsp
Normal file
117
bin/WebRoot/jsp/snaker/processDesign.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<link rel="stylesheet" type="text/css" href="<%=contextPath%>/JS/snaker/style.css">
|
||||
<link type="text/css" href="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/css/smoothness/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-ui-1.8.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/snaker/table.js"></script>
|
||||
<script src="<%=contextPath%>/JS/raphael-min.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.designer.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.model.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.editors.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var json="";
|
||||
var model;
|
||||
if(json) {
|
||||
model=eval("(" + json + ")");
|
||||
} else {
|
||||
model="";
|
||||
}
|
||||
$('#snakerflow').snakerflow({
|
||||
basePath : ext.contextPath+"/JS/snaker/",
|
||||
ctxPath : ext.contextPath,
|
||||
restore : model,
|
||||
formPath : "forms/",
|
||||
tools : {
|
||||
save : {
|
||||
onclick : function(data) {
|
||||
parent.$.messager.confirm('提示', '您确定保存此工艺设计?', function(r) {
|
||||
if(r){
|
||||
saveModel(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function saveModel(data) {
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:ext.contextPath+"/snaker/process/deployXml.do",
|
||||
data:"model=" +data,
|
||||
async: false,
|
||||
globle:false,
|
||||
error: function(){
|
||||
alert('数据处理错误!');
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
if(data=="true"){
|
||||
top.$.messager.alert('提示', "保存成功", 'info',function(){
|
||||
parent.$('#designer').dialog('close');
|
||||
parent.$('#designer').dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
alert('数据处理错误!');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body BACKGROUND='<%=contextPath%>/JS/snaker/images/bg.png'>
|
||||
|
||||
<div id="toolbox" style="position: Fixed; top: 10; left: 10; background-color: #fff; width: 100px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="toolbox_handle" style="text-align: left;background-color: #acd6ff;" class="ui-widget-header">工具集</div>
|
||||
<div class="node" id="save"><img src="<%=contextPath%>/JS/snaker/images/save.gif" /> 保存</div>
|
||||
<div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="node selectable" id="pointer">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/select16.gif" /> 选择
|
||||
</div>
|
||||
<div class="node selectable" id="path">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/16/flow_sequence.png" /> 路线
|
||||
</div>
|
||||
<div>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="node state" id="start" type="start"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/start_event_empty.png" /> 开始</div>
|
||||
<div class="node state" id="end" type="end"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/end_event_terminate.png" /> 结束</div>
|
||||
<div class="node state" id="task" type="task"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 工序</div>
|
||||
<!-- <div class="node state" id="task" type="custom"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 自定义</div> -->
|
||||
<!-- <div class="node state" id="task" type="subprocess"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 子流程</div> -->
|
||||
<div class="node state" id="fork" type="decision"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_exclusive.png" /> 决策点</div>
|
||||
<div class="node state" id="fork" type="fork"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_red.png" /> 分支点</div>
|
||||
<div class="node state" id="join" type="join"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_green.png" /> 汇合点</div>
|
||||
</div>
|
||||
|
||||
<div id="properties" style="position: Fixed; top: 10; right: 10;background-color: #fff; width: 220px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="properties_handle" class="ui-widget-header">属性</div>
|
||||
<table class="properties_all" cellpadding="0" cellspacing="0" width="100%">
|
||||
</table>
|
||||
<div> </div>
|
||||
</div>
|
||||
|
||||
<div id="snakerflow"></div>
|
||||
</body>
|
||||
</html>
|
||||
85
bin/WebRoot/jsp/snaker/processEdit.jsp
Normal file
85
bin/WebRoot/jsp/snaker/processEdit.jsp
Normal file
@ -0,0 +1,85 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<link rel="stylesheet" type="text/css" href="<%=contextPath%>/JS/snaker/style.css">
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/snaker/table.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="<%=contextPath%>/JS/snaker/wbox/wbox.css" />
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/snaker/wbox.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<form id="inputForm" action="${ctx }/snaker/process/deploy" method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="id" value="${process.id }">
|
||||
<table width="100%" border="0" align="center" cellpadding="0"
|
||||
class="table_all_border" cellspacing="0" style="margin-bottom: 0px;border-bottom: 0px">
|
||||
<tr>
|
||||
<td class="td_table_top" align="center">
|
||||
流程定义
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="table_all" align="center" border="0" cellpadding="0"
|
||||
cellspacing="0" style="margin-top: 0px">
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>流程名称:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
${process.name }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>显示名称:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
${process.displayName }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>状态:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
${process.state == 1 ? '启用' : '禁用' }
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>上传流程定义文件:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
<input type="file" class="input_file" id="snakerFile" name="snakerFile"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="td_table_1">
|
||||
<span>流程定义:</span>
|
||||
</td>
|
||||
<td class="td_table_2" colspan="3">
|
||||
${content }
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table align="center" border="0" cellpadding="0"
|
||||
cellspacing="0">
|
||||
<tr align="left">
|
||||
<td colspan="1">
|
||||
<input type="submit" class="button_70px" name="submit" value="提交">
|
||||
|
||||
<input type="button" class="button_70px" name="reback" value="返回"
|
||||
onclick="history.back()">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
263
bin/WebRoot/jsp/snaker/processList.jsp
Normal file
263
bin/WebRoot/jsp/snaker/processList.jsp
Normal file
@ -0,0 +1,263 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
var initFun = function() {
|
||||
parent.$.messager.confirm('提示', '您确定初始化流程文件吗?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/process/init.do',function() {
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}});
|
||||
};
|
||||
var startFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '启用流程文件',
|
||||
url : ext.contextPath + '/snaker/process/start.do?id=' + id
|
||||
});
|
||||
};
|
||||
var designFun = function() {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'designer',
|
||||
title : '设计工艺流程',
|
||||
height:"80%",
|
||||
width:"80%",
|
||||
url : ext.contextPath + '/snaker/process/design.do?randomnum='+Math.random(),
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var redesignFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'designer',
|
||||
title : '修改工艺流程',
|
||||
height:"80%",
|
||||
width:"80%",
|
||||
url : ext.contextPath + '/snaker/process/redesign.do?id=' + id+'&randomnum='+Math.random(),
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var reuseFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
id:'designer',
|
||||
title : '重用工艺流程',
|
||||
height:"80%",
|
||||
width:"80%",
|
||||
url : ext.contextPath + '/snaker/process/reuse.do?id=' + id+'&randomnum='+Math.random(),
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var editFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '编辑工艺流程',
|
||||
url : ext.contextPath + '/snaker/process/edit.do?id=' + id+'&randomnum='+Math.random(),
|
||||
buttons : [{
|
||||
text : '保存',
|
||||
handler : function() {
|
||||
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
||||
}
|
||||
}]
|
||||
});
|
||||
};
|
||||
var undeployFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要禁用此工艺路线?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/process/undeploy.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','禁用成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','禁用失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var enableFun = function(id) {
|
||||
parent.$.messager.confirm('提示', '您确定要启用此工艺路线?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/process/process/enable.do', {id : id}, function(data) {
|
||||
if(data==1){
|
||||
parent.$.messager.alert('提示','启用成功','info',function(){
|
||||
grid.datagrid('reload');
|
||||
});
|
||||
}else{
|
||||
parent.$.messager.alert('提示','启用失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
var deletesFun = function() {
|
||||
var checkedItems = $('#grid').datagrid('getChecked');
|
||||
var datas="";
|
||||
$.each(checkedItems, function(index, item){
|
||||
datas+=item.id+",";
|
||||
});
|
||||
if(datas==""){
|
||||
top.$.messager.alert('提示', '请先选择要删除的记录','info');
|
||||
}else{
|
||||
parent.$.messager.confirm('提示', '将级联删除流程定义和流程实例的数据,且不可恢复,您确定要执行本操作?', function(r) {
|
||||
if (r) {
|
||||
$.post(ext.contextPath + '/snaker/process/cascadeRemove.do', {id:datas} , function(data) {
|
||||
if(data>0){
|
||||
parent.$.messager.alert('提示','成功删除'+data+'条记录','info');
|
||||
grid.datagrid('reload');
|
||||
grid.datagrid('clearChecked');
|
||||
}else{
|
||||
parent.$.messager.alert('提示','删除失败','info');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/snaker/process/getProcess.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20%', title : '工艺名称', field : 'name', sortable : true, halign:'center'},
|
||||
{width : '30%', title : '显示名称', field : 'displayName', sortable : true, halign:'center'},
|
||||
{width : '60', title : '工艺版本', field : 'version', sortable : true, align:'center'},
|
||||
{width : '60', title : '状态', field : 'state', sortable : true, halign:'center', align:'center', formatter : function(value, row, index) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return '禁用';
|
||||
case 1:
|
||||
return '启用';
|
||||
default:
|
||||
return '启用';
|
||||
}
|
||||
}
|
||||
},
|
||||
{title : '操作', field : 'action', width : '180', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%-- <%if (sessionManager.havePermission(session,"snaker/process/start.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-control_play_blue" title="启动流程" onclick="startFun(\''+row.id+'\');"/>';
|
||||
<%}%> --%>
|
||||
<%-- <%if (sessionManager.havePermission(session,"snaker/process/edit.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-table_edit" title="编辑" onclick="editFun(\''+row.id+'\');"/>';
|
||||
<%}%> --%>
|
||||
<%if (sessionManager.havePermission(session,"snaker/process/redesign.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-control_equalizer_blue" title="修改" onclick="redesignFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"snaker/process/reuse.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-control_repeat_blue" title="重用" onclick="reuseFun(\''+row.id+'\');"/>';
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"snaker/process/undeploy.do")) {%>
|
||||
if(row.state=='1'){
|
||||
str += '<img class="iconImg ext-icon-control_stop_blue" title="禁用" onclick="undeployFun(\''+row.id+'\');"/>';
|
||||
}
|
||||
if(row.state=='0'){
|
||||
str += '<img class="iconImg ext-icon-control_play_blue" title="启用" onclick="enableFun(\''+row.id+'\');"/>';
|
||||
}
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"process/worktask/snakertasklist.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-chart_organisation" title="工序配置" onclick="showdetailFun(\''+row.id+'\',\''+row.displayName+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
var showdetailFun = function(id,name) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : name,
|
||||
url : ext.contextPath + '/process/worktask/snakertasklist.do?id=' + id+'&randomnum='+Math.random(),
|
||||
height:"80%",
|
||||
width:"80%"
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false" id="qwert">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<%-- <%if (sessionManager.havePermission(session,"snaker/process/init.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-application_form_edit',plain:true"
|
||||
onclick="initFun();">初始化</a>
|
||||
</td>
|
||||
<%}%> --%>
|
||||
<%if (sessionManager.havePermission(session,"snaker/process/design.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true"
|
||||
onclick="designFun();">新增</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<%if (sessionManager.havePermission(session,"snaker/process/cascadeRemove.do")) {%>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
||||
onclick="deletesFun();">删除</a>
|
||||
</td>
|
||||
<%}%>
|
||||
<td><div class="datagrid-btn-separator"></div></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>显示名称</td>
|
||||
<td><input name="displayName" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
117
bin/WebRoot/jsp/snaker/processReDesign.jsp
Normal file
117
bin/WebRoot/jsp/snaker/processReDesign.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<link rel="stylesheet" type="text/css" href="<%=contextPath%>/JS/snaker/style.css">
|
||||
<link type="text/css" href="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/css/smoothness/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-ui-1.8.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/snaker/table.js"></script>
|
||||
<script src="<%=contextPath%>/JS/raphael-min.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.designer.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.model.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.editors.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var json="${process }";
|
||||
var model;
|
||||
if(json) {
|
||||
model=eval("(" + json + ")");
|
||||
} else {
|
||||
model="";
|
||||
}
|
||||
$('#snakerflow').snakerflow({
|
||||
basePath : ext.contextPath+"/JS/snaker/",
|
||||
ctxPath : ext.contextPath,
|
||||
restore : model,
|
||||
formPath : "forms/",
|
||||
tools : {
|
||||
save : {
|
||||
onclick : function(data) {
|
||||
parent.$.messager.confirm('提示', '您确定保存此工艺设计?', function(r) {
|
||||
if(r){
|
||||
saveModel(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function saveModel(data) {
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:ext.contextPath+"/snaker/process/redeployXml.do",
|
||||
data:"model=" +data+ "&id=${processId}",
|
||||
async: false,
|
||||
globle:false,
|
||||
error: function(){
|
||||
alert('数据处理错误!');
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
if(data=="true"){
|
||||
top.$.messager.alert('提示', "保存成功", 'info',function(){
|
||||
parent.$('#designer').dialog('close');
|
||||
parent.$('#designer').dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
alert('数据处理错误!');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body BACKGROUND='<%=contextPath%>/JS/snaker/images/bg.png'>
|
||||
|
||||
<div id="toolbox" style="position: Fixed; top: 10; left: 10; background-color: #fff; width: 100px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="toolbox_handle" style="text-align: left;background-color: #acd6ff;" class="ui-widget-header">工具集</div>
|
||||
<div class="node" id="save"><img src="<%=contextPath%>/JS/snaker/images/save.gif" /> 保存</div>
|
||||
<div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="node selectable" id="pointer">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/select16.gif" /> 选择
|
||||
</div>
|
||||
<div class="node selectable" id="path">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/16/flow_sequence.png" /> 路线
|
||||
</div>
|
||||
<div>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="node state" id="start" type="start"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/start_event_empty.png" /> 开始</div>
|
||||
<div class="node state" id="end" type="end"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/end_event_terminate.png" /> 结束</div>
|
||||
<div class="node state" id="task" type="task"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 工序</div>
|
||||
<!-- <div class="node state" id="task" type="custom"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 自定义</div> -->
|
||||
<!-- <div class="node state" id="task" type="subprocess"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 子流程</div> -->
|
||||
<div class="node state" id="fork" type="decision"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_exclusive.png" /> 决策点</div>
|
||||
<div class="node state" id="fork" type="fork"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_red.png" /> 分支点</div>
|
||||
<div class="node state" id="join" type="join"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_green.png" /> 汇合点</div>
|
||||
</div>
|
||||
|
||||
<div id="properties" style="position: Fixed; top: 10; right: 10; background-color: #fff; width: 220px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="properties_handle" class="ui-widget-header">属性</div>
|
||||
<table class="properties_all" cellpadding="0" cellspacing="0" width="100%">
|
||||
</table>
|
||||
<div> </div>
|
||||
</div>
|
||||
|
||||
<div id="snakerflow"></div>
|
||||
</body>
|
||||
</html>
|
||||
117
bin/WebRoot/jsp/snaker/processReuse.jsp
Normal file
117
bin/WebRoot/jsp/snaker/processReuse.jsp
Normal file
@ -0,0 +1,117 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程定义</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<link rel="stylesheet" type="text/css" href="<%=contextPath%>/JS/snaker/style.css">
|
||||
<link type="text/css" href="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/css/smoothness/jquery-ui-1.8.4.custom.css" rel="stylesheet" />
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-1.4.2.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/jquery-ui-1.8.4.custom/js/jquery-ui-1.8.4.custom.min.js"></script>
|
||||
<script type="text/javascript" src="<%=contextPath%>/JS/snaker/table.js"></script>
|
||||
<script src="<%=contextPath%>/JS/raphael-min.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.designer.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.model.js" type="text/javascript"></script>
|
||||
<script src="<%=contextPath%>/JS/snaker/snaker.editors.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
var json="${process }";
|
||||
var model;
|
||||
if(json) {
|
||||
model=eval("(" + json + ")");
|
||||
} else {
|
||||
model="";
|
||||
}
|
||||
$('#snakerflow').snakerflow({
|
||||
basePath : ext.contextPath+"/JS/snaker/",
|
||||
ctxPath : ext.contextPath,
|
||||
restore : model,
|
||||
formPath : "forms/",
|
||||
tools : {
|
||||
save : {
|
||||
onclick : function(data) {
|
||||
parent.$.messager.confirm('提示', '您确定重用当前工艺设计?', function(r) {
|
||||
if(r){
|
||||
saveModel(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function saveModel(data) {
|
||||
$.ajax({
|
||||
type:'POST',
|
||||
url:ext.contextPath+"/snaker/process/deployXml.do",
|
||||
data:"model=" +data,
|
||||
async: false,
|
||||
globle:false,
|
||||
error: function(){
|
||||
alert('数据处理错误!');
|
||||
return false;
|
||||
},
|
||||
success: function(data){
|
||||
if(data=="true"){
|
||||
top.$.messager.alert('提示', "保存成功", 'info',function(){
|
||||
parent.$('#designer').dialog('close');
|
||||
parent.$('#designer').dialog('destroy');
|
||||
});
|
||||
}else{
|
||||
alert('数据处理错误!');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body BACKGROUND='<%=contextPath%>/JS/snaker/images/bg.png'>
|
||||
|
||||
<div id="toolbox" style="position: Fixed; top: 10; left: 10; background-color: #fff; width: 100px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="toolbox_handle" style="text-align: left;background-color: #acd6ff;" class="ui-widget-header">工具集</div>
|
||||
<div class="node" id="save"><img src="<%=contextPath%>/JS/snaker/images/save.gif" /> 保存</div>
|
||||
<div>
|
||||
<hr />
|
||||
</div>
|
||||
<div class="node selectable" id="pointer">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/select16.gif" /> 选择
|
||||
</div>
|
||||
<div class="node selectable" id="path">
|
||||
<img src="<%=contextPath%>/JS/snaker/images/16/flow_sequence.png" /> 路线
|
||||
</div>
|
||||
<div>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="node state" id="start" type="start"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/start_event_empty.png" /> 开始</div>
|
||||
<div class="node state" id="end" type="end"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/end_event_terminate.png" /> 结束</div>
|
||||
<div class="node state" id="task" type="task"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 工序</div>
|
||||
<!-- <div class="node state" id="task" type="custom"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 自定义</div> -->
|
||||
<!-- <div class="node state" id="task" type="subprocess"><img -->
|
||||
<!-- src="<%=contextPath%>/JS/snaker/images/16/task_empty.png" /> 子流程</div> -->
|
||||
<div class="node state" id="fork" type="decision"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_exclusive.png" /> 决策点</div>
|
||||
<div class="node state" id="fork" type="fork"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_red.png" /> 分支点</div>
|
||||
<div class="node state" id="join" type="join"><img
|
||||
src="<%=contextPath%>/JS/snaker/images/16/gateway_parallel_green.png" /> 汇合点</div>
|
||||
</div>
|
||||
|
||||
<div id="properties" style="position: Fixed; top: 10; right: 10;background-color: #fff; width: 220px; cursor: default; padding: 5px;" class="ui-widget-content">
|
||||
<div id="properties_handle" class="ui-widget-header">属性</div>
|
||||
<table class="properties_all" cellpadding="0" cellspacing="0" width="100%">
|
||||
</table>
|
||||
<div> </div>
|
||||
</div>
|
||||
|
||||
<div id="snakerflow"></div>
|
||||
</body>
|
||||
</html>
|
||||
116
bin/WebRoot/jsp/snaker/taskList.jsp
Normal file
116
bin/WebRoot/jsp/snaker/taskList.jsp
Normal file
@ -0,0 +1,116 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@ page import="com.sipai.tools.SessionManager"%>
|
||||
<%
|
||||
SessionManager sessionManager = new SessionManager();
|
||||
%>
|
||||
<%String contextPath = request.getContextPath();%>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>流程实例</title>
|
||||
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
||||
<script type="text/javascript">
|
||||
var grid;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/snaker/task/getTasks.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
singleSelect: false,
|
||||
ctrlSelect:true,
|
||||
selectOnCheck: false,
|
||||
checkOnSelect: false,
|
||||
idField : 'id',
|
||||
pageSize : 50,
|
||||
pageList : [ 20, 50, 100],
|
||||
columns : [ [
|
||||
{checkbox:true , field : 'ck'},
|
||||
{width : '20%', title : '任务名称', field : 'taskName', sortable : true, halign:'center'},
|
||||
{width : '30%', title : '任务显示名称', field : 'displayName', sortable : true, halign:'center'},
|
||||
{width : '60', title : '版本号', field : 'version', sortable : true, halign:'center'},
|
||||
{width : '120', title : '创建时间', field : 'createTime', sortable : true, halign:'center', formatter : function(value, row){
|
||||
if(value.length<20){
|
||||
return value;
|
||||
}else{
|
||||
return value.substring(0,19);
|
||||
}
|
||||
}},
|
||||
{title : '操作', field : 'action', width : '120', halign:'center', align:'center', formatter : function(value, row) {
|
||||
var str = '';
|
||||
<%if (sessionManager.havePermission(session,"snaker/task/excute.do")) {%>
|
||||
str += '<img class="iconImg ext-icon-application_go" title="执行" onclick="excuteURL(\''+row.actionUrl+'&taskId='+row.id+'\');"/>';
|
||||
<%}%>
|
||||
return str;
|
||||
}
|
||||
}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var excuteFun = function(id) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '测试查看',
|
||||
url : ext.contextPath + '/snaker/task/showlist.do?id=' + id,
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
var excuteURL = function(urlStr) {
|
||||
var dialog = parent.ext.modalDialog({
|
||||
title : '任务执行',
|
||||
url : ext.contextPath + urlStr,
|
||||
onClose : function(){
|
||||
grid.datagrid('reload');
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<!-- <td><div class="datagrid-btn-separator"></div></td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>任务名称</td>
|
||||
<td><input name="search_name" class="easyui-textbox" /></td>
|
||||
<td>任务显示名称</td>
|
||||
<td><input name="search_displayname" class="easyui-textbox" /></td>
|
||||
<td>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-search',plain:true"
|
||||
onclick="grid.datagrid('load',ext.serializeObject($('#searchForm')));">搜索</a>
|
||||
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true"
|
||||
onclick="$('#searchForm').form('clear');grid.datagrid('load',{});">重置</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div data-options="region:'center',fit:true,border:false">
|
||||
<table id="grid" data-options="fit:true,border:false"></table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user