259 lines
8.8 KiB
Plaintext
259 lines
8.8 KiB
Plaintext
<%@page import="org.apache.poi.ss.usermodel.Row"%>
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.sipai.tools.SessionManager"%>
|
|
|
|
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
|
|
<%
|
|
SessionManager sessionManager = new SessionManager();
|
|
%>
|
|
<%String contextPath = request.getContextPath();%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title></title>
|
|
<jsp:include page="/jsp/inc.jsp"></jsp:include>
|
|
<script src="<%=contextPath%>/JS/activiti/workflow.js" type="text/javascript"></script>
|
|
<script src="<%=contextPath%>/JS/qtip/jquery.qtip.min.js" type="text/javascript"></script>
|
|
<%-- 引入CSS --%>
|
|
<link rel="stylesheet" href="<%=contextPath%>/JS/qtip/jquery.qtip.min.css" type="text/css">
|
|
<link rel="stylesheet" href="<%=contextPath%>/CSS/style-activiti.css" type="text/css">
|
|
<script type="text/javascript">
|
|
var grid;
|
|
var addFun = function() {
|
|
$.post(ext.contextPath + '/activiti/auto/autoCreat.do', {} , function(data) {
|
|
if(data>0){
|
|
parent.$.messager.alert('提示','自动导入成功','info',function(){
|
|
grid.datagrid('reload');
|
|
grid.datagrid('clearChecked');
|
|
});
|
|
}else{
|
|
parent.$.messager.alert('提示','自动导入失败','info');
|
|
}
|
|
});
|
|
};
|
|
var editFun = function(id) {
|
|
var dialog = parent.ext.modalDialog({
|
|
iframeId:'iframeedit',
|
|
title : '编辑班组',
|
|
url : ext.contextPath + '/work/group/edit.do?iframeId=iframeedit&id=' + id,
|
|
buttons : [ {
|
|
text : '保存',
|
|
handler : function() {
|
|
dialog.find('iframe').get(0).contentWindow.dosave(dialog, grid);
|
|
}
|
|
} ]
|
|
});
|
|
};
|
|
var viewFun = function(ppid) {
|
|
/* var dialog = parent.ext.modalDialog({
|
|
title : '查看用户信息',
|
|
url : ext.contextPath + '/work/group/view.do?id=' + id
|
|
}); */
|
|
//alert(pid+","+ppid);
|
|
graphTrace("",ppid,"");
|
|
};
|
|
var viewTechnicsFun = function(id) {
|
|
var dialog = parent.ext.modalDialog({
|
|
iframeId:'iframeedit',
|
|
title : '模型管控',
|
|
url : ext.contextPath + '/activiti/workflow/model/showProcessTechnicsList.do?processid=' + id,
|
|
buttons : [ {
|
|
text : '关闭',
|
|
handler : function() {
|
|
//grid.datagrid('reload');
|
|
dialog.dialog('destroy');
|
|
}
|
|
} ]
|
|
});
|
|
};
|
|
var deleteFun = function(id) {
|
|
parent.$.messager.confirm('提示', '删除此记录会将该流程关联的所有记录删除,您确定要删除此记录?', function(r) {
|
|
if (r) {
|
|
$.post(ext.contextPath + '/activiti/workflow/process/delete.do', {deploymentId : id}, function(data) {
|
|
if(data==1){
|
|
parent.$.messager.alert('提示','删除成功','info',function(){
|
|
grid.datagrid('reload');
|
|
grid.datagrid('clearChecked');
|
|
});
|
|
}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 + '/work/group/deletes.do', {ids:datas} , function(data) {
|
|
if(data>0){
|
|
parent.$.messager.alert('提示','成功删除'+data+'条记录','info',function(){
|
|
grid.datagrid('reload');
|
|
grid.datagrid('clearChecked');
|
|
});
|
|
}else{
|
|
parent.$.messager.alert('提示','删除失败','info');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
}; */
|
|
var suspendFun = function(id,status) {
|
|
var tip="";
|
|
if(status=="active"){
|
|
tip="激活";
|
|
}else{
|
|
tip="挂起";
|
|
}
|
|
parent.$.messager.confirm('提示', '您确定要'+tip+'此记录?', function(r) {
|
|
if (r) {
|
|
$.post(ext.contextPath + '/activiti/workflow/processdefinition/update.do', {processDefinitionId : id,state:status}, function(data) {
|
|
if(data==1){
|
|
parent.$.messager.alert('提示',tip+'成功','info',function(){
|
|
grid.datagrid('reload');
|
|
});
|
|
}else{
|
|
parent.$.messager.alert('提示',tip+'失败','info');
|
|
}
|
|
});
|
|
}
|
|
});
|
|
};
|
|
$(function() {
|
|
grid = $('#grid').datagrid({
|
|
title : '',
|
|
url : ext.contextPath + '/activiti/workflow/getProcessList.do',
|
|
striped : true,
|
|
rownumbers : true,
|
|
pagination : true,
|
|
singleSelect: false,
|
|
selectOnCheck: true,
|
|
checkOnSelect: true,
|
|
idField : 'id',
|
|
pageSize : 50,
|
|
pageList : [ 20, 50, 100],
|
|
columns : [ [
|
|
{checkbox:true , field : 'ck'},
|
|
{width : '100', title : '工艺名称', field : 'name', sortable : true, halign:'center',formatter:function(value, row){
|
|
return row.processDefinition.name;
|
|
}},
|
|
{width : '180', title : '工艺描述', field : 'description', sortable : true, halign:'center',formatter:function(value, row){
|
|
return row.processDefinition.description;
|
|
}},
|
|
{width : '180', title : '工艺ID', field : 'id', sortable : false, halign:'center',formatter:function(value, row){
|
|
return row.processDefinition.id;
|
|
}},
|
|
{width : '180', title : '部署时间', field : 'deploymentTime', sortable : true, halign:'center',formatter:function(value, row){
|
|
return row.deployment.deploymentTime;
|
|
}},
|
|
{width : '100', title : '版本号', field : 'revision', sortable : true, halign:'center',formatter:function(value, row){
|
|
return row.processDefinition.revision;
|
|
}},
|
|
{title : '操作', field : 'action', width : '160', halign:'center', align:'center', formatter : function(value, row) {
|
|
var str = '';
|
|
|
|
<%if (sessionManager.havePermission(session,"activiti/workflow/showlist.do?scope=all")) {%>
|
|
str += '<img class="iconImg ext-icon-table" title="查看" onclick="viewFun(\''+row.processDefinition.id+'\');"/>';
|
|
str += '<img class="iconImg ext-icon-table_sort" title="查看管控内容" onclick="viewTechnicsFun(\''+row.processDefinition.id+'\');"/>';
|
|
<%}%>
|
|
<%if (sessionManager.havePermission(session,"activiti/workflow/edit.do")) {%>
|
|
if(row.processDefinition.suspended=="2")
|
|
str += '<img class="iconImg ext-icon-table_lightning" title="激活" onclick="suspendFun(\''+row.processDefinition.id+'\',\'active\');"/>';
|
|
else
|
|
str += '<img class="iconImg ext-icon-table_link" title="挂起" onclick="suspendFun(\''+row.processDefinition.id+'\',\'suspend\');"/>';
|
|
<%}%>
|
|
<%if (sessionManager.havePermission(session,"activiti/workflow/delete.do")) {%>
|
|
str += '<img class="iconImg ext-icon-table_delete" title="删除" onclick="deleteFun(\''+row.processDefinition.deploymentId+'\');"/>';
|
|
<%}%>
|
|
return str;
|
|
}
|
|
}
|
|
] ],
|
|
toolbar : '#toolbar',
|
|
onLoadSuccess : function(data) {
|
|
$('.iconImg').attr('src', ext.pixel_0);
|
|
}
|
|
});
|
|
|
|
|
|
});
|
|
var importFun = function() {
|
|
var dialog = parent.ext.modalDialog({
|
|
title : '选择文件',
|
|
width: 600,
|
|
height:300,
|
|
closeOnEscape:true,
|
|
url : ext.contextPath + '/activiti/auto/doimport.do',
|
|
buttons : [ {
|
|
text : '上传',
|
|
handler : function() {
|
|
dialog.find('iframe').get(0).contentWindow.doimport(dialog, grid);
|
|
}
|
|
} ]
|
|
});
|
|
|
|
|
|
};
|
|
</script>
|
|
</head>
|
|
<body class="easyui-layout" data-options="fit:true,border:false">
|
|
<div id="toolbar" style="display: none;">
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<table>
|
|
<tr>
|
|
<br/>请从模型“配置界面”部署工艺路线
|
|
<!--
|
|
<td>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'ext-icon-table_add',plain:true"
|
|
onclick="importFun();">自动添加</a>
|
|
</td> -->
|
|
<%--
|
|
<%if (sessionManager.havePermission(session,"work/group/delete.do")) {%>
|
|
<td>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true"
|
|
onclick="deletesFun();">删除</a>
|
|
</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>工艺ID</td>
|
|
<td><input id="search_code" name="search_code" 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> |