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

update:更新工作流启动参数传递问题

上级 082f2143
......@@ -1556,8 +1556,8 @@ import { Environment } from '@/environments/environment';
public async wfstart(data: any,localdata?:any): Promise<any> {
return new Promise((resolve: any, reject: any) => {
const _this: any = this;
const copyData:any = data && Array.isArray(data) ?Util.deepCopy(data)[0]: {};
const formData:any = this.getData();
const copyData:any = Util.deepCopy(formData);
const post: Promise<any> = Object.is(formData.srfuf, '1')?this.service.update(this.updateAction, JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true):this.service.add(this.createAction,JSON.parse(JSON.stringify(this.context)),formData, this.showBusyIndicator,true);
post.then((response:any) =>{
const responseData:any = response.data;
......@@ -1568,13 +1568,11 @@ import { Environment } from '@/environments/environment';
this.onFormLoad(arg,'save');
this.$emit('save', arg);
<#if ctrl.getControlType() == 'FORM'>
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:data});
AppCenterService.notifyMessage({name:"${ctrl.getPSAppDataEntity().getCodeName()}",action:'appRefresh',data:arg});
</#if>
this.$nextTick(() => {
this.formState.next({ type: 'save', data: arg });
});
// 准备工作流数据,填充未存库数据
Object.assign(arg,copyData);
// 准备提交参数
if(this.viewparams){
let copyViewParams:any = Util.deepCopy(this.viewparams);
......@@ -1583,7 +1581,17 @@ import { Environment } from '@/environments/environment';
}
Object.assign(responseData,copyViewParams);
}
// 准备工作流操作视图参数
if(copyData && Object.keys(copyData).length >0){
Object.keys(copyData).forEach((key:string) =>{
if(!arg.hasOwnProperty(key)){
Object.assign(responseData,{[key]:copyData[key]});
}
})
}
Object.assign(arg,{viewparams:responseData});
// 准备工作流数据,填充未存库数据
Object.assign(arg,copyData);
// 强制补充srfwfmemo
if(this.srfwfmemo){
Object.assign(arg,{srfwfmemo:this.srfwfmemo});
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册