提交 e27727d5 编写于 作者: Mosher's avatar Mosher

update:更新

上级 1772df70
......@@ -21,111 +21,7 @@
<#-- START: 准备处理参数节点 -->
<#macro prepareParamNode logicNode>
<#-- <#if logicNode.getPSDEUILogicNodeParams?? && logicNode.getPSDEUILogicNodeParams()??>
try {
<#assign index = 0>
<#list logicNode.getPSDEUILogicNodeParams() as param>
<#assign index = index + 1>
<#if param.getParamAction?? && param.getParamAction()??>
<#if param.getParamAction() == 'SETPARAMVALUE'>
<#if (param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??) || (param.getSrcValueType?? && param.getSrcValueType()??)>
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
// 无值类型
<#if param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'NONEVALUE'>
<#if param.getDstFieldName?? && param.getDstFieldName()??>
dstParam_${index}.reset('${param.getDstFieldName()?lower_case}');
<#else>
dstParam_${index}.bind(undefined);
</#if>
<#else>
<#if param.getSrcValueType?? && param.getSrcValueType()?? && (param.getSrcValueType() == 'SRCDLPARAM' || param.getSrcValueType() == 'WEBCONTEXT' || param.getSrcValueType() == 'VIEWPARAM')>
// 源逻辑参数、网页请求上下文、当前视图参数
const srcParam_${index} = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
const result_${index} = srcParam_${index}.get('<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>') ? srcParam_${index}.get('<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>') : null;
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && (param.getSrcValueType() == 'APPLICATION' || param.getSrcValueType() == 'SESSION' || param.getSrcValueType() == 'APPDATA' || param.getSrcValueType() == 'DATACONTEXT')>
// 系统全局对象、用户全局对象、应用上下文、数据上下文
const result_${index} = actionContext['<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>'];
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'ENVPARAM'>
// 环境参数
// TODO 环境参数
const result_${index} = '';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'EXPRESSION'>
// 计算式
// TODO 计算式
const result_${index} = '';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'SRCVALUE'>
// 直接值
const result_${index} = '<#if param.getSrcValue?? && param.getSrcValue()??>${param.getSrcValue()}</#if>';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'NULLVALUE'>
// 空值(NULL)
const result_${index} = null;
<#else>
// 未支持
const result_${index} = undefined;
</#if>
<#if param.getDstFieldName?? && param.getDstFieldName()??>
const dstParam_${index}.set('${param.getDstFieldName()?lower_case}', result_${index});
<#else>
dstParam_${index}.bind(result_${index});
</#if>
</#if>
<#else>
throw new Error(`逻辑参数${param.name}源类型参数或者目标逻辑参数缺失`);
</#if>
<#elseif param.getParamAction() == 'RESETPARAM'>
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${index}.resetAll();
<#elseif param.getParamAction() == 'COPYPARAM'>
// 源数据
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
srcParam_${index}.copyTo(dstParam_${index});
<#elseif param.getParamAction() == 'BINDPARAM'>
// 源数据
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const srcFieldName_${index} = '<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>';
if (srcFieldName_${index}) {
dstParam_${index}.bind(srcParam_${index}.get(srcFieldName_${index}));
} else {
dstParam_${index}.bind(srcParam_${index}.getReal());
}
<#elseif param.getParamAction() == 'RENEWPARAM'>
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${index}.renew();
<#elseif param.getParamAction() == 'APPENDPARAM'>
// 源数据
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const srcFieldName_${index} = '<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>';
let objParam_${index}: any;
if (srcFieldName_${index}) {
objParam_${index} = srcParam_${index}.get(srcFieldName_${index});
} else {
objParam_${index} = srcParam_${index}.getReal();
}
dstParam_${index}.append(${param.getDstIndex()?c}, objParam_${index}, ${param.getSrcIndex()?c}, ${param.getSrcSize()?c});
<#elseif param.getParamAction() == 'SORTPARAM'>
// 目标数据
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const dstFieldName_${index} = '<#if param.getDstFieldName?? && param.getDstFieldName()??>${param.getDstFieldName()?lower_case}</#if>';
if (!dstFieldName_${index}) {
throw new Error(`逻辑参数${param.name}未指定设置排序属性`);
} else {
dstParam_${index}.sort(dstFieldName_${index}, '${param.getDstSortDir()}');
}
</#if>
</#if>
</#list>
} catch (error: any) {
throw new Error(`逻辑节点 ${logicNode.name} <#noparse>${error ## error.message ? error.message : '发生未知错误!'}`</#noparse>);
}
</#if> -->
</#macro>
<#-- END: 准备处理参数节点 -->
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册