first commit
This commit is contained in:
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
103
WebRoot/jsp/activiti/processForSelect.jsp
Normal file
@ -0,0 +1,103 @@
|
||||
<%@ 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;
|
||||
$(function() {
|
||||
grid = $('#grid').datagrid({
|
||||
title : '',
|
||||
url : ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do',
|
||||
striped : true,
|
||||
rownumbers : true,
|
||||
pagination : true,
|
||||
selectOnCheck: true,
|
||||
checkOnSelect: true,
|
||||
singleSelect: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;
|
||||
}}
|
||||
] ],
|
||||
toolbar : '#toolbar',
|
||||
onLoadSuccess : function(data) {
|
||||
$('.iconImg').attr('src', ext.pixel_0);
|
||||
}
|
||||
});
|
||||
});
|
||||
function selectOK() {
|
||||
//以json格式返回数据
|
||||
var jsonstr = "";
|
||||
var idstr = "";
|
||||
var idname = "";
|
||||
var rows = $('#grid').datagrid('getSelections');
|
||||
for(var i=0; i<rows.length; i++){
|
||||
idstr += rows[i].processDefinition.id+",";
|
||||
idname+= rows[i].processDefinition.name+",";
|
||||
}
|
||||
if(idstr.length>0){
|
||||
idstr = idstr.substring(0,idstr.length-1);
|
||||
idname = idname.substring(0,idname.length-1);
|
||||
}
|
||||
jsonstr = '{"id":"'+idstr+'","name":"'+idname+'"}';
|
||||
var dataset = $.parseJSON(jsonstr);
|
||||
return dataset;
|
||||
}
|
||||
function datagridload() {
|
||||
$('#searchForm').serialize() // alert(弹出提示框)
|
||||
grid.datagrid('load',ext.contextPath + '/activiti/workflow/getProcessDefinitionListForSelect.do?'+$('#searchForm').serialize());
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body class="easyui-layout" data-options="fit:true,border:false">
|
||||
<div id="toolbar" style="display: none;">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<form id="searchForm">
|
||||
<table class="tooltable">
|
||||
<tr>
|
||||
<td>流程名称</td>
|
||||
<td><input id="search_name" 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="datagridload();">搜索</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