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.
187 lines
5.2 KiB
187 lines
5.2 KiB
1 month ago
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
<%@ page import="org.wdk.WDKConstant"%>
|
||
|
<%@ page import="org.wdk.WDKCore"%>
|
||
|
<%@ page import="org.wdk.WDK"%>
|
||
|
<%@ page import="com.noblelift.imp.platform.module.portal.source.SessionUser"%>
|
||
|
<%
|
||
|
String path = request.getContextPath();
|
||
|
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
|
||
|
String WDK_ROOT = WDKCore.WDK_ROOT;
|
||
|
SessionUser su = (SessionUser) WDK.getSessionUser(request, response);
|
||
|
WDK.writeSessionUser(out, su);
|
||
|
%>
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<title>流程引擎内部测试接口</title>
|
||
|
<base href="<%=basePath%>" target="_self">
|
||
|
<script type="text/javascript" src="<%=WDK_ROOT%>/theme/je/core/js/wdk.js"></script>
|
||
|
<style type="text/css">
|
||
|
</style>
|
||
|
</head>
|
||
|
<script type="text/javascript">
|
||
|
function start2(){
|
||
|
//通过事项的方式启动liuc
|
||
|
var _data ={
|
||
|
_SRVNAME : 'service.bdl.run',
|
||
|
_SRVMETHOD: 'startProcessInstanceByBdl',
|
||
|
_DATA: $.json2str({
|
||
|
bdlCode: $('#bdlcode').val()
|
||
|
,manage_unit_uuid:'00000000000000000000000000000001'//默认为杭州的事项
|
||
|
,bean_start: {
|
||
|
unitid:'unitid'
|
||
|
,operactorid:'personid'
|
||
|
,operdeptuuid:'deptid'
|
||
|
,actors:'yubin,1,deptid'
|
||
|
}
|
||
|
}),
|
||
|
};
|
||
|
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);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function start(){
|
||
|
var _data ={
|
||
|
_SRVNAME : 'service.wdk.wfexecution',
|
||
|
_SRVMETHOD: 'startProcessInstanceExt',
|
||
|
_DATA: $.json2str({
|
||
|
pdname: $('#pdname').val()
|
||
|
,unitId: 'unitid'
|
||
|
,deptId: 'deptid'
|
||
|
,personId: 'personid'
|
||
|
,actors: 'yubin,1,deptid'
|
||
|
}),
|
||
|
};
|
||
|
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);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
function insertworkday(){
|
||
|
var _data ={
|
||
|
_SRVNAME : 'service.wdk.wfexecution',
|
||
|
_SRVMETHOD: 'saveCalendarWorkDays',
|
||
|
_DATA: $.json2str({
|
||
|
workdays:[{
|
||
|
isweekend:'2'
|
||
|
,worktype:'2'
|
||
|
,workday:'20170714'
|
||
|
}]
|
||
|
}),
|
||
|
};
|
||
|
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);
|
||
|
},
|
||
|
error:function(result){
|
||
|
alert('网络错误!result='+result);
|
||
|
$.wait_close();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
//打开办理界面
|
||
|
function process(){
|
||
|
var todoid = $('#todoid').val();
|
||
|
var piid = $('#piid').val();
|
||
|
|
||
|
var dataParam = {
|
||
|
_SRVNAME: 'service.bdl.run',
|
||
|
_SRVMETHOD: 'getTodoItemURL',
|
||
|
_DATA: $.json2str({
|
||
|
todoid: todoid
|
||
|
})
|
||
|
};
|
||
|
|
||
|
$.wait_open();
|
||
|
|
||
|
//初始化数据
|
||
|
$.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();
|
||
|
//返回值字符串转json
|
||
|
var jres = $.str2json(result);
|
||
|
|
||
|
if (jres.code == "1") { //操作成功
|
||
|
var _wid = $.getUUID();
|
||
|
$.openWin({
|
||
|
id:_wid
|
||
|
,title:'业务办理页'
|
||
|
,height:600
|
||
|
,width:860
|
||
|
,modal:true
|
||
|
,url:jres.url
|
||
|
,maximizable:false
|
||
|
,draggable:false
|
||
|
,resizable:false
|
||
|
,onClose:function(){
|
||
|
//btn_query();
|
||
|
}
|
||
|
});
|
||
|
}
|
||
|
},
|
||
|
error: function(result) {
|
||
|
$.wait_close();
|
||
|
alert('网络错误!result=' + result);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//window.open('wdk/pb/wf/demo/business.jsp?_todoid='+todoid+'&_piid='+piid);
|
||
|
}
|
||
|
</script>
|
||
|
<body>
|
||
|
pdname:<input id="pdname" class="easyui-validatebox" style="width:350px;" value="994263142EDEE67791083557D7C6AC06" />
|
||
|
<a id="btn" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="start()">启动流程</a>
|
||
|
<br/>
|
||
|
todoid:<input id="todoid" class="easyui-validatebox" style="width:350px;" value="30B2ED4671A44A39BB2ACFDEDA9CC3F3" />
|
||
|
<a id="btn" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="process()">打开办理界面</a>
|
||
|
<br/>
|
||
|
<div style="height:0px;border:1px dashed #AAA;"></div>
|
||
|
bdlcode:<input id="bdlcode" class="easyui-validatebox" style="width:350px;" value="" />
|
||
|
<a id="btn2" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="start2()">启动流程</a>
|
||
|
<br/>
|
||
|
<a id="insertworkday" href="javascript:void(0);" class="easyui-linkbutton" data-options="iconCls:'icon-search'" onclick="insertworkday()">插入日程</a>
|
||
|
</body>
|
||
|
</html>
|