提交 4752c00c 编写于 作者: tony001's avatar tony001

zpc --- 补充内嵌应用工作流接口

上级 102ebf69
......@@ -628,13 +628,18 @@ export default class EntityService {
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isEmbeddedApp]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async WFStart(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const requestData:any = {};
Object.assign(requestData,{wfdata:data});
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/wfstart`,requestData,isloading);
public async WFStart(context: any = {},data: any = {}, isloading?: boolean,isEmbeddedApp?:boolean): Promise<any> {
if(isEmbeddedApp){
return Http.getInstance().post(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/process-instances`,data,isloading);
}else{
const requestData:any = {};
Object.assign(requestData,{wfdata:data});
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/wfstart`,requestData,isloading);
}
}
......@@ -717,27 +722,72 @@ export default class EntityService {
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/wfreassign`,data,isloading);
}
/**
* WFGetWorkFlow接口方法(获取工作流定义)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async WFGetWorkFlow(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/process-definitions`);
}
/**
* WFGetWFStep接口方法(根据系统实体查找当前适配的工作流模型步骤)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async WFGetWFStep(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/process-definitions-nodes`);
}
/**
* GetWFLink接口方法(根据业务主键和当前步骤获取操作路径)
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async GetWFLink(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
return Http.getInstance().get(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/usertasks/${data['taskDefinitionKey']}/ways`);
}
/**
* WFSubmit接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @param {boolean} [isEmbeddedApp]
* @returns {Promise<any>}
* @memberof EntityService
*/
public async WFSubmit(context: any = {},data: any = {}, isloading?: boolean): Promise<any> {
const requestData:any = {};
if(data.srfwfmemo){
requestData.srfwfmemo = JSON.parse(JSON.stringify(data)).srfwfmemo;
delete data.srfwfmemo;
}
if(data.viewparams){
delete data.viewparams;
public async WFSubmit(context: any = {},data: any = {}, isloading?: boolean,isEmbeddedApp?:boolean): Promise<any> {
if(isEmbeddedApp){
return Http.getInstance().post(`/wfcore/${this.SYSTEMNAME}-app-${this.APPNAME}/${this.APPDENAME}/${data[this.APPDEKEY]}/tasks/${data['taskId']}`);
}else{
const requestData:any = {};
if(data.srfwfmemo){
requestData.srfwfmemo = JSON.parse(JSON.stringify(data)).srfwfmemo;
delete data.srfwfmemo;
}
if(data.viewparams){
delete data.viewparams;
}
Object.assign(requestData,{wfdata:data});
Object.assign(requestData,{opdata:{srfwfiatag:context.srfwfiatag,srfwfstep:context.srfwfstep}});
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/wfsubmit`,requestData,isloading);
}
Object.assign(requestData,{wfdata:data});
Object.assign(requestData,{opdata:{srfwfiatag:context.srfwfiatag,srfwfstep:context.srfwfstep}});
return Http.getInstance().post(`/${this.APPDENAME}/${data[this.APPDEKEY]}/wfsubmit`,requestData,isloading);
}
/**
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册