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.
312 lines
9.4 KiB
312 lines
9.4 KiB
1 month ago
|
<%@ 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" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.datatable.js"></script> --%>
|
||
|
<script type="text/javascript">
|
||
|
|
||
|
var _gridcode = "wdk.module.wf.designergrid";
|
||
|
var _gridid = $.getUUID();
|
||
|
window.onload = function(){
|
||
|
_gridid = $.grid({
|
||
|
id:_gridid,
|
||
|
containerid:'layout_grid',
|
||
|
gridcode:_gridcode,
|
||
|
url:'wdk?action=wf.console&method=designer_list&ajaxparam='+new Date().getTime(),
|
||
|
idField:'pdid',
|
||
|
singleSelect:true, //是否单选
|
||
|
// pagination:true, //分页控件
|
||
|
rownumbers:true //行号
|
||
|
});
|
||
|
};
|
||
|
|
||
|
//新增流程
|
||
|
function add(){
|
||
|
window.open('<%=basePath%>/wdk/theme/je/module/designer/flexdesigner.jsp?pdid=');
|
||
|
}
|
||
|
//编辑流程
|
||
|
function edit(){
|
||
|
var rows = $.grid_getSelections({
|
||
|
id:_gridid
|
||
|
});
|
||
|
if(rows.length>1){
|
||
|
alert('请选择一行需要编辑的记录');
|
||
|
}else if(rows.length==0){
|
||
|
alert('请选择需要编辑的记录');
|
||
|
}else{
|
||
|
var pdid = rows[0]['pdid'];
|
||
|
window.open('<%=basePath%>/wdk/theme/je/module/designer/flexdesigner.jsp?pdid='+pdid);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//部署
|
||
|
function deploy(){
|
||
|
$.wait_open();
|
||
|
|
||
|
//获取被选择的行
|
||
|
var rows = $.grid_getSelections({
|
||
|
id:_gridid
|
||
|
});
|
||
|
if(rows.length>1){
|
||
|
alert('请选择一行需要部署的记录');
|
||
|
}else if(rows.length==0){
|
||
|
alert('请选择需要部署的记录');
|
||
|
}else{
|
||
|
var pdid = rows[0]['pdid'];
|
||
|
var _data ={
|
||
|
pdid:pdid
|
||
|
};
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wf.console&method=designer_deploy&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:_data,
|
||
|
success:function(result) {
|
||
|
var jres = $.str2json(result);
|
||
|
alert(jres.desc);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
$.wait_close();
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
//删除
|
||
|
function remove(){
|
||
|
//获取被选择的行
|
||
|
var rows = $.grid_getSelections({
|
||
|
id:_gridid
|
||
|
});
|
||
|
if(rows.length==0){
|
||
|
alert('请选择需要删除的记录');
|
||
|
}else{
|
||
|
if(confirm('是否确认删除?')){
|
||
|
var pdidarr = [];//row['pdid'];
|
||
|
for(var i=0;i<rows.length;i++){
|
||
|
pdidarr.push(rows[i]['pdid']);
|
||
|
}
|
||
|
var _data ={
|
||
|
pdids:pdidarr.join(',')
|
||
|
};
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wf.console&method=designer_remove&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:_data,
|
||
|
success:function(result) {
|
||
|
var jres = $.str2json(result);
|
||
|
alert(jres.desc);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//grid表格里的点击
|
||
|
function _handler_click(method,jparam){
|
||
|
var pdid = jparam.pdid;
|
||
|
switch(method){
|
||
|
case 'newinst':
|
||
|
var _wid = $.getUUID();
|
||
|
$.openDialog({
|
||
|
id:_wid
|
||
|
,title:'新建流程'
|
||
|
,height:300
|
||
|
,width:600
|
||
|
,modal:true
|
||
|
,url:'<%=WDK_ROOT%>/theme/je/module/wf/pi_new.jsp'
|
||
|
,queryParams:{pdid:pdid}
|
||
|
,maximizable:true
|
||
|
,maximized:true
|
||
|
,draggable:false
|
||
|
,resizable:false
|
||
|
,onSubmit:function(jres){ //点击确定按钮
|
||
|
//alert('提交');
|
||
|
}
|
||
|
});
|
||
|
break;
|
||
|
case 'instlist': //查看活动流程
|
||
|
$.tab_addTop({
|
||
|
menucode: 'instlist'+pdid
|
||
|
,title:jparam.cnname+'-活动流程'
|
||
|
,closable:true
|
||
|
,url:'<%=WDK_ROOT%>/theme/je/module/wf/pi.jsp?pdid='+pdid
|
||
|
});
|
||
|
break;
|
||
|
case 'history': //查看历史流程
|
||
|
$.tab_addTop({
|
||
|
menucode: 'pihistory'+pdid
|
||
|
,title:cnname+'历史流程'
|
||
|
,closable:true
|
||
|
,url:'<%=WDK_ROOT%>/theme/je/module/wf/pi_history.jsp?pdid='+pdid+'&pdname='+pdname
|
||
|
});
|
||
|
break;
|
||
|
case 'enable':
|
||
|
break;
|
||
|
case 'disable':
|
||
|
break;
|
||
|
case 'download':
|
||
|
break;
|
||
|
case 'remove':
|
||
|
if(confirm('该操作将删除当前流程模板,是否继续?')){
|
||
|
_pd_remove(pdid,'0');
|
||
|
}
|
||
|
break;
|
||
|
case 'removecascade':
|
||
|
if(confirm('级联删除将删除所有关联的运行实例,是否继续?')){
|
||
|
_pd_remove(pdid,'1');
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
break;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
///////////////////////////////////////////////////
|
||
|
//
|
||
|
// 上传流程模板
|
||
|
//
|
||
|
////////////////////////////////////////////////
|
||
|
|
||
|
//流程模板上传窗口显示
|
||
|
function _pd_upload(id,cnname){
|
||
|
$('#pd_cnname').val('');
|
||
|
$('#dlg_pd_upload').dialog('open').dialog('setTitle','上传流程模板');
|
||
|
}
|
||
|
|
||
|
//保存流程模板中文名字并打开上传窗口
|
||
|
function _pd_upload_save(){
|
||
|
var _cnname = $('#pd_cnname').val();
|
||
|
$('#dlg_pd_upload').dialog('close');
|
||
|
$.upload({
|
||
|
upload_url:'wdk?action=wf.console&method=pd_upload&cnname='+encodeURI(encodeURI(encodeURI(_cnname)))+'&ajaxparam='+new Date().getTime(),
|
||
|
file_types :'*.zip',
|
||
|
callback:_pd_upload_save_callback
|
||
|
});
|
||
|
}
|
||
|
|
||
|
//上传成功后的回调
|
||
|
function _pd_upload_save_callback(jparam){
|
||
|
$.grid_reload({id:_gridid});
|
||
|
alert(jparam.fieldids);
|
||
|
}
|
||
|
|
||
|
|
||
|
///////////////////////////////////////////////////
|
||
|
//
|
||
|
// 流程模板管理
|
||
|
//
|
||
|
////////////////////////////////////////////////
|
||
|
|
||
|
//删除 isCascade:是否级联删除关联实例?
|
||
|
function _pd_remove(pdid,isCascade){
|
||
|
var _data ={
|
||
|
pdid:pdid
|
||
|
,iscascade:isCascade
|
||
|
};
|
||
|
$.cuajax({
|
||
|
url:'wdk?action=wf.console&method=pd_remove&ajaxparam='+new Date().getTime(),
|
||
|
method:"post",
|
||
|
timeout:WDK_Timeout,
|
||
|
data:_data,
|
||
|
success:function(result) {
|
||
|
var jparam = $.str2json(result);
|
||
|
$.grid_reload({id:_gridid});
|
||
|
alert(jparam.desc);
|
||
|
return;
|
||
|
if("1"==jparam.code){
|
||
|
$.grid_reload({id:_gridid});
|
||
|
}else{
|
||
|
alert(jparam.desc);
|
||
|
}
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
</script>
|
||
|
</head>
|
||
|
<body class="easyui-layout" data-options="fit:true">
|
||
|
<!-- <div data-options="region:'north',border:false,collapsed:false" style="height:30px;overflow:hidden;border-bottom:1px solid #d4a375;text-align:left;" > -->
|
||
|
<!-- <a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="add()">新建</a> -->
|
||
|
<!-- <a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="edit()">编辑</a> -->
|
||
|
<!-- <a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="deploy()">部署</a> -->
|
||
|
<!-- <a id="_btnaddledger" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" href="javascript:void(0)" onclick="remove()">删除</a> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- <div id="layout_grid" data-options="region:'center',border:false,collapsed:false" style="overflow:hidden;border:0px solid #d4a375;" ></div> -->
|
||
|
<div data-options="region:'north',border:false,collapsed:false" class="page-title" style="overflow:hidden">
|
||
|
<div class="page-toolbar" style="padding-bottom: 5px;">
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="add()" >新建</a>
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="edit()" >编辑</a>
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="deploy()" >部署</a>
|
||
|
<a href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'fa fa-info-circle'" onclick="remove()" >删除</a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div id="layout_grid" 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;height:120px;" > -->
|
||
|
<!-- <form id="search_form" > -->
|
||
|
<!-- <div class="h_layout"> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- <div class="inputgroup"> -->
|
||
|
<!-- <label>缓存表:</label> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- <input id="tbname" name="tbname" style="width:300px;"/> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- <div class="inputgroup"> -->
|
||
|
<!-- <label>缓存键:</label> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- <input id="cache_key" name="cache_key" placeholder="请输入缓存键,复合键以逗号分隔"/> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- <div class="h_layout"> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- <div class="inputgroup"> -->
|
||
|
<!-- <label></label> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- <div class="inputgroup"> -->
|
||
|
<!-- <label></label> -->
|
||
|
<!-- <div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- </div> -->
|
||
|
<!-- <div style="width:125px;" > -->
|
||
|
<!-- <a class="eapbutton" style="float:right;" onclick="btn_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>
|