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

优化前端实体处理逻辑 --- fix8

上级 0ae33b93
......@@ -19,14 +19,6 @@ import { Verify } from '@/utils/verify/verify';
<#macro setParam logicNode>
<#if logicNode.getPSDELogicNodeParams()??>
<#list logicNode.getPSDELogicNodeParams() as logicparam>
<#-- <#if logicparam.getSrcFieldName()?? && logicparam.getDstFieldName()??>
Object.assign(params,{${logicparam.getDstFieldName()?lower_case}:<#if logicparam.getSrcFieldName()?? && logicparam.getSrcFieldName() != "">params.${logicparam.getSrcFieldName()?lower_case}<#else>params.${logicparam.getDstFieldName()?lower_case}</#if>});
<#if logicparam.getDstPSDELogicParam?? && logicparam.getDstPSDELogicParam()?? && logicparam.getDstPSDELogicParam().getParamPSAppDataEntity()??>
<#if logicparam.getSrcFieldName()?lower_case?contains("id") >
Object.assign(context,{${logicparam.getDstPSDELogicParam().getParamPSAppDataEntity().getCodeName()?lower_case}:params.${logicparam.getSrcFieldName()?lower_case} ? params.${logicparam.getSrcFieldName()?lower_case} : null});
</#if>
</#if>
</#if> -->
<#if logicparam.getDstPSDELogicParam()?? && logicparam.getDstFieldName()?? && logicparam.getSrcValueType()??>
<#-- 源参数 -->
<#if logicparam.getSrcPSDELogicParam()??><#assign srcParam = logicparam.getSrcPSDELogicParam() /></#if>
......@@ -87,7 +79,7 @@ import { Verify } from '@/utils/verify/verify';
</#if>
</#list>
<#else>
return params;
return this.paramsMap.get(this.defaultParamName).data;
</#if>
</#macro>
......@@ -221,12 +213,17 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
<#assign targetEntity = delogicNode.getDstPSAppDataEntity() />
<#assign deAction = delogicNode.getDstPSAppDEAction() />
let result: any;
<#if delogicNode.getDstPSDELogicParam()??>
let actionParam:any = this.paramsMap.get('${delogicNode.getDstPSDELogicParam().getCodeName()}');
<#else>
let actionParam:any = this.paramsMap.get(this.defaultParamName);
</#if>
const targetService:${srfclassname('${targetEntity.getCodeName()}')}Service = new ${srfclassname('${targetEntity.getCodeName()}')}Service();
if (targetService['${deAction.getCodeName()}'] && targetService['${deAction.getCodeName()}'] instanceof Function) {
result = await targetService['${deAction.getCodeName()}'](context,params, false);
result = await targetService['${deAction.getCodeName()}'](actionParam.context,actionParam.data, false);
}
if(result && result.status == 200){
Object.assign(params,result.data);
Object.assign(actionParam.data,result.data);
<@executeNext delogicNode />
}
</#if>
......@@ -254,7 +251,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 开始流程节点
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#-- 异常捕获节点 -->
<#elseif delogicNode.getLogicNodeType()?? && delogicNode.getLogicNodeType() == "THROWEXCEPTION">
......@@ -266,7 +263,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 异常捕获节点
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#-- 前端插件 -->
<#elseif delogicNode.getLogicNodeType()?? && delogicNode.getLogicNodeType() == "PFPLUGIN">
......@@ -278,7 +275,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
*/
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// 前端插件
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
<#else>
/**
......@@ -290,7 +287,7 @@ export default class ${srfclassname('${item.getCodeName()}')}LogicBase {
private async execute${delogicNode.codeName}(context:any,params:any,isloading:boolean){
// ${delogicNode.getLogicNodeType()}暂未支持
console.log("${delogicNode.getLogicNodeType()}暂未支持");
return params;
return this.paramsMap.get(this.defaultParamName).data;
}
</#if>
</#list>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册