Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
iBiz-Vue-R7
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
22
议题
22
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBiz-R7前端标准模板
iBiz-Vue-R7
提交
97ad4337
提交
97ad4337
编写于
11月 07, 2022
作者:
Mosher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update:更新
上级
62587604
变更
1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
40 行增加
和
38 行删除
+40
-38
ui-logic-node.txt
APP/src/uiservice/@MACRO/ui-logic-node.txt
+40
-38
未找到文件。
APP/src/uiservice/@MACRO/ui-logic-node.txt
浏览文件 @
97ad4337
...
...
@@ -23,99 +23,101 @@
<#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_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
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_${
param?
index}.reset('${param.getDstFieldName()?lower_case}');
dstParam_${index}.reset('${param.getDstFieldName()?lower_case}');
<#else>
dstParam_${
param?
index}.bind(undefined);
dstParam_${index}.bind(undefined);
</#if>
<#else>
<#if param.getSrcValueType?? && param.getSrcValueType()?? && (param.getSrcValueType() == 'SRCDLPARAM' || param.getSrcValueType() == 'WEBCONTEXT' || param.getSrcValueType() == 'VIEWPARAM')>
<#-- 源逻辑参数、网页请求上下文、当前视图参数 -->
const srcParam_${
param?
index} = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
const result_${
param?index} = srcParam_${param?index}.get('<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>') ? srcParam_${param?
index}.get('<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>') : null;
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_${
param?
index} = actionContext['<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>'];
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_${
param?
index} = '';
const result_${index} = '';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'EXPRESSION'>
<#-- 计算式 -->
// TODO 计算式
const result_${
param?
index} = '';
const result_${index} = '';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'SRCVALUE'>
<#-- 直接值 -->
const result_${
param?
index} = '<#if param.getSrcValue?? && param.getSrcValue()??>${param.getSrcValue()}</#if>';
const result_${index} = '<#if param.getSrcValue?? && param.getSrcValue()??>${param.getSrcValue()}</#if>';
<#elseif param.getSrcValueType?? && param.getSrcValueType()?? && param.getSrcValueType() == 'NULLVALUE'>
<#-- 空值(NULL) -->
const result_${
param?
index} = null;
const result_${index} = null;
<#else>
<#-- 未支持 -->
const result_${
param?
index} = undefined;
const result_${index} = undefined;
</#if>
<#if param.getDstFieldName?? && param.getDstFieldName()??>
const dstParam_${
param?index}.set('${param.getDstFieldName()?lower_case}', result_${param?
index});
const dstParam_${
index}.set('${param.getDstFieldName()?lower_case}', result_${
index});
<#else>
dstParam_${
param?index}.bind(result_${param?
index});
dstParam_${
index}.bind(result_${
index});
</#if>
</#if>
<#else>
throw new Error(`逻辑参数${param.name}源类型参数或者目标逻辑参数缺失`);
</#if>
<#elseif param.getParamAction() == 'RESETPARAM'>
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${
param?
index}.resetAll();
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${index}.resetAll();
<#elseif param.getParamAction() == 'COPYPARAM'>
// 源数据
const srcParam_${
param?
index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
srcParam_${
param?index}.copyTo(dstParam_${param?
index});
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_${
param?
index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const srcFieldName_${
param?
index} = '<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>';
if (srcFieldName_${
param?
index}) {
dstParam_${
param?index}.bind(srcParam_${param?index}.get(srcFieldName_${param?
index}));
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_${
param?index}.bind(srcParam_${param?
index}.getReal());
dstParam_${
index}.bind(srcParam_${
index}.getReal());
}
<#elseif param.getParamAction() == 'RENEWPARAM'>
// 目标数据
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${
param?
index}.renew();
const dstParam_${index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
dstParam_${index}.renew();
<#elseif param.getParamAction() == 'APPENDPARAM'>
// 源数据
const srcParam_${
param?
index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
const srcParam_${index}: any = actionContext.getParam('<#if param.getSrcPSDEUILogicParam?? && param.getSrcPSDEUILogicParam()??>${param.getSrcPSDEUILogicParam().codeName}</#if>');
// 目标数据
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const srcFieldName_${
param?
index} = '<#if param.getSrcFieldName?? && param.getSrcFieldName()??>${param.getSrcFieldName()?lower_case}</#if>';
let objParam_${
param?
index}: any;
if (srcFieldName_${
param?
index}) {
objParam_${
param?index} = srcParam_${param?index}.get(srcFieldName_${param?
index});
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_${
param?index} = srcParam_${param?
index}.getReal();
objParam_${
index} = srcParam_${
index}.getReal();
}
dstParam_${
param?index}.append(${param.getDstIndex()?c}, objParam_${param?
index}, ${param.getSrcIndex()?c}, ${param.getSrcSize()?c});
dstParam_${
index}.append(${param.getDstIndex()?c}, objParam_${
index}, ${param.getSrcIndex()?c}, ${param.getSrcSize()?c});
<#elseif param.getParamAction() == 'SORTPARAM'>
// 目标数据
const dstParam_${
param?
index}: any = actionContext.getParam('<#if param.getDstPSDEUILogicParam?? && param.getDstPSDEUILogicParam()??>${param.getDstPSDEUILogicParam().codeName}</#if>');
const dstFieldName_${
param?
index} = '<#if param.getDstFieldName?? && param.getDstFieldName()??>${param.getDstFieldName()?lower_case}</#if>';
if (!dstFieldName_${
param?
index}) {
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_${
param?index}.sort(dstFieldName_${param?
index}, '${param.getDstSortDir()}');
dstParam_${
index}.sort(dstFieldName_${
index}, '${param.getDstSortDir()}');
}
</#if>
</#if>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录