You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
282 lines
7.8 KiB
282 lines
7.8 KiB
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<title>流程模板管理</title>
|
|
<%@include file="/wdk/theme/je/module/public/common.jsp"%>
|
|
<script type="text/javascript">
|
|
<% if(null==su){%>
|
|
$.timeout();
|
|
<%}%>
|
|
|
|
var _gridcode = "pf.workflow.designer";
|
|
var _gridid = $.getUUID();
|
|
|
|
//页面初始化
|
|
$(function() {
|
|
var datas = [{id:'9',text:'未设计'},{id:'0',text:'未部署'},
|
|
{id:'1',text:'已部署'}];
|
|
$.combobox({
|
|
id:'isdepoly'
|
|
,data:datas
|
|
,editable:false
|
|
,multiple:false
|
|
,panelHeight:150
|
|
,idField:'id'
|
|
,textField:'text'
|
|
,defaultOption:'===全部==='
|
|
});
|
|
|
|
|
|
//查询grid数据
|
|
var dataParam = getGridQueryParam();
|
|
var gridid = $.grid({
|
|
id : _gridid,
|
|
containerid : 'layout_grid',
|
|
gridcode : _gridcode,
|
|
checkbox : false,
|
|
checkOnSelect : false,
|
|
selectOnCheck : false,
|
|
url : 'wdk?action=wdk.pub&method=call_service&ajaxparam='+ new Date().getTime(),
|
|
queryParams : dataParam,
|
|
idField : 'id',
|
|
fitColumns:true, //是否自动填充满
|
|
nowrap:false, //自动换行
|
|
pagination:true,
|
|
formatter:{
|
|
command:'formatter_command'
|
|
}
|
|
});
|
|
//$.addListener("uum_user_edit","opt_query");
|
|
});
|
|
|
|
|
|
//获取grid查询参数
|
|
function getGridQueryParam(){
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.wf.frame'
|
|
,_SRVMETHOD:'queryWorkflowDefineList'
|
|
,_DATA:$.json2str({
|
|
app_uuid:$.getSessionUser().appuuid
|
|
,manage_unit_uuid: $.getSessionUser().manageunituuid
|
|
,enname:$('#enname').val()
|
|
,cnname:$('#cnname').val()
|
|
,isdepoly:$.combobox_getValue({id:'isdepoly'})
|
|
})
|
|
,_RSTYPE:'grid'
|
|
,_RSFIELD:'result'
|
|
,_RSPARAM:$.json2str({pagequery:'1'})
|
|
,orderbyfield:'display_order'
|
|
};
|
|
return dataParam;
|
|
}
|
|
//查询
|
|
function opt_query() {
|
|
//组织参数
|
|
var dataParam = getGridQueryParam();
|
|
$.grid_reload({
|
|
id:_gridid,
|
|
queryParams:dataParam
|
|
});
|
|
}
|
|
|
|
// 新增流程模板
|
|
function opt_add(){
|
|
var _wid = $.getUUID();
|
|
$.openWin({
|
|
id:_wid
|
|
,title:'新增流程模板'
|
|
,height:500
|
|
,width:800
|
|
,modal:true
|
|
,url:'platform/wf/wf_designer_edit.jsp?actionflag=1'
|
|
,maximizable:false
|
|
,draggable:false
|
|
,resizable:false
|
|
,onClose:function(){
|
|
opt_query();
|
|
}
|
|
});
|
|
};
|
|
// 修改流程模板
|
|
function opt_modify(){
|
|
var rows = $.grid_getSelections({
|
|
id:_gridid
|
|
});
|
|
if(rows.length!=1){
|
|
alert('请选择要编辑的数据行!');
|
|
return;
|
|
}
|
|
var _wid = $.getUUID();
|
|
$.openWin({
|
|
id:_wid
|
|
,title:'修改流程模板'
|
|
,height:500
|
|
,width:800
|
|
,modal:true
|
|
,url:'platform/wf/wf_designer_edit.jsp?actionflag=2&id='+rows[0].id
|
|
,maximizable:false
|
|
,draggable:false
|
|
,resizable:false
|
|
,onClose:function(){
|
|
opt_query();
|
|
}
|
|
});
|
|
};
|
|
|
|
//删除流程模板
|
|
function opt_delete() {
|
|
var rows = $.grid_getSelections({id:_gridid});
|
|
if(!rows || rows.length == 0){
|
|
alert('请选择要删除的行');
|
|
return;
|
|
}
|
|
|
|
|
|
confirmDialog("是否确认删除?",function(){
|
|
//打开旋转
|
|
$.wait_open();
|
|
|
|
//组织参数
|
|
var dataParam = {
|
|
_SRVNAME:'service.wf.frame'
|
|
,_SRVMETHOD:'removeWorkflowDefine'
|
|
,_DATA:$.json2str({
|
|
id:rows[0].id
|
|
})
|
|
};
|
|
|
|
//加载数据
|
|
$.cuajax({
|
|
url:'wdk?action=wdk.pub&method=call_service&ajaxparam='+new Date().getTime()
|
|
,method:"post"
|
|
,timeout:WDK_Timeout
|
|
,data:dataParam
|
|
,success:function(result) {
|
|
//关闭旋转
|
|
$.wait_close();
|
|
var jres = $.str2json(result);
|
|
if (jres.code == "1") { //操作成功
|
|
alert(jres.desc);
|
|
//删除后重新请求
|
|
opt_query();
|
|
}else{
|
|
alert(jres.desc);
|
|
}
|
|
},
|
|
error:function(result){
|
|
$.wait_close();
|
|
alert('网络错误!result='+result);
|
|
}
|
|
});
|
|
});
|
|
|
|
}
|
|
function opt_designer(){
|
|
var rows = $.grid_getSelections({
|
|
id:_gridid
|
|
});
|
|
if(rows.length>1){
|
|
alert('请选择一行需要编辑的记录');
|
|
}else if(rows.length==0){
|
|
alert('请选择需要编辑的记录');
|
|
}else{
|
|
var pdid = rows[0]['id'];
|
|
var scope = rows[0]['scope'];
|
|
window.open('<%=basePath%>wdk/theme/je/module/designer/flexdesigner.jsp?pdid='+pdid+'&scope='+scope);
|
|
}
|
|
}
|
|
//部署流程模板到服务端去
|
|
function opt_depoly(){
|
|
//获取被选择的行
|
|
var rows = $.grid_getSelections({
|
|
id:_gridid
|
|
});
|
|
if(rows.length>1){
|
|
alert('请选择一行需要部署的记录');
|
|
}else if(rows.length==0){
|
|
alert('请选择需要部署的记录');
|
|
}else{
|
|
if(rows[0]['isdeploy']=='9'){
|
|
alert('流程未设计,还不能部署!');
|
|
return;
|
|
}
|
|
$.wait_open();
|
|
var pdid = rows[0]['id'];
|
|
var _data ={
|
|
_SRVNAME : 'service.wdk.wfrepository',
|
|
_SRVMETHOD: 'createDeployment',
|
|
_DATA: $.json2str({
|
|
designerId: pdid
|
|
}),
|
|
};
|
|
var url = "wdk?action=wdk.pub&method=call_service";
|
|
$.cuajax({
|
|
url:url+"&ajaxparam="+new Date().getTime(),
|
|
method:"post",
|
|
timeout:WDK_Timeout,
|
|
data:_data,
|
|
success:function(result) {
|
|
var jres = $.str2json(result);
|
|
alert(jres.desc);
|
|
opt_query();
|
|
$.wait_close();
|
|
},
|
|
error:function(result){
|
|
alert('网络错误!result='+result);
|
|
$.wait_close();
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
|
<div class="page-toolbar">
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-plus'" onclick="opt_add()">新增</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-edit'" onclick="opt_modify()">修改</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-remove'" onclick="opt_delete()">删除</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-sitemap'" onclick="opt_designer()">设计</a>
|
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-tasks'" onclick="opt_depoly()">部署</a>
|
|
</div>
|
|
</div>
|
|
<div data-options="region:'center',border:false,collapsed:false" >
|
|
<div class="easyui-layout" data-options="fit:true">
|
|
<div data-options="region:'north',border:false,collapsed:false" class="row-1" style="padding:0 10px;overflow:hidden;" >
|
|
<form id="search_form" >
|
|
<div class="h_layout">
|
|
<div>
|
|
<div class="inputgroup" >
|
|
<label>流程英文名</label>
|
|
<div>
|
|
<input id="enname" name="enname"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>流程中文名</label>
|
|
<div>
|
|
<input id="cnname" name="cnname"/>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup">
|
|
<label>是否已部署</label>
|
|
<div>
|
|
<input style="width: 150px;" type="text" id="isdepoly" name="isdeploy"></input>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:125px;">
|
|
<a class="eapbutton" style="float:right;" onclick="opt_query()"><i class="fa fa-search" aria-hidden="true"></i><span><span>查询</span></span></a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="padding:0px 10px;" >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|