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

update:更新

上级 7dc92c4d
...@@ -29,7 +29,8 @@ ${front_block} ...@@ -29,7 +29,8 @@ ${front_block}
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName>
return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName);
<#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??> <#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??>
return window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}').executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}');
return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName);
</#if> </#if>
<#else> <#else>
<#-- BEGIN: 数据目标: 单项数据 --> <#-- BEGIN: 数据目标: 单项数据 -->
......
...@@ -28,7 +28,8 @@ ${backend_block} ...@@ -28,7 +28,8 @@ ${backend_block}
<#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName> <#if item.getPSAppDataEntity?? && item.getPSAppDataEntity()?? && item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()?? && item.getPSAppDataEntity().codeName == item.getPSAppDEUILogic().getPSAppDataEntity().codeName>
return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); return this.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName);
<#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??> <#elseif item.getPSAppDEUILogic().getPSAppDataEntity?? && item.getPSAppDEUILogic().getPSAppDataEntity()??>
return window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}').executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName); const uiService = await window.uiServiceRegister.getService('${item.getPSAppDEUILogic().getPSAppDataEntity().codeName}');
return uiService.executeUILogic('${item.getPSAppDEUILogic().codeName}', args, context, params, $event, xData, actionContext, srfParentDeName);
</#if> </#if>
<#else> <#else>
<#-- BEGIN: 自定义确认 --> <#-- BEGIN: 自定义确认 -->
......
...@@ -8,6 +8,17 @@ import { UIActionContext } from "@/logic/ui-logic"; ...@@ -8,6 +8,17 @@ import { UIActionContext } from "@/logic/ui-logic";
import { LogicReturnType } from "@/logic/const/logic-return-type"; import { LogicReturnType } from "@/logic/const/logic-return-type";
import { UILogicParamType } from "@/logic/const/ui-logic-param-type"; import { UILogicParamType } from "@/logic/const/ui-logic-param-type";
import { Util } from "@/utils"; import { Util } from "@/utils";
<#if item.getPSDEUILogicNodes?? && item.getPSDEUILogicNodes()??>
<#list item.getPSDEUILogicNodes() as logicNode>
<#if logicNode.getLogicNodeType() == 'DELOGIC' && logicNode.getDstPSAppDELogic?? && logicNode.getDstPSAppDELogic()?? && logicNode.getDstPSAppDELogic().getDstPSAppDataEntity?? && logicNode.getDstPSAppDELogic().getDstPSAppDataEntity()??>
<#if logicNode.getDstPSAppDELogic().getLogicHolder() == 2 || logicNode.getDstPSAppDELogic().getLogicHolder() == 3>
<#if !P.exists("importService", logicNode.getDstPSAppDELogic().codeName, "")>
import ${srfclassname('${logicNode.getDstPSAppDELogic().getCodeName()}')}Logic from '@/service/${srffilepath2(logicNode.getDstPSAppDELogic().getPSAppDataEntity().getCodeName())}/${srffilepath2(logicNode.getDstPSAppDELogic().getCodeName())}-logic';
</#if>
</#if>
</#if>
</#list>
</#if>
/** /**
* ${item.name} * ${item.name}
* *
......
...@@ -215,7 +215,7 @@ ...@@ -215,7 +215,7 @@
<#if logicNode.getDstPSAppDataEntity?? && logicNode.getDstPSAppDataEntity()?? && logicNode.getDstPSAppDEAction?? && logicNode.getDstPSAppDEAction()??> <#if logicNode.getDstPSAppDataEntity?? && logicNode.getDstPSAppDataEntity()?? && logicNode.getDstPSAppDEAction?? && logicNode.getDstPSAppDEAction()??>
if (dstParam) { if (dstParam) {
try { try {
const service: any = window.entityServiceRegister.getService('${logicNode.getDstPSAppDataEntity().getCodeName()?lower_case}'); const service: any = await window.entityServiceRegister.getService('${logicNode.getDstPSAppDataEntity().getCodeName()?lower_case}');
const getTempContext = (data: any) => { const getTempContext = (data: any) => {
const tempContext = Util.deepCopy(actionContext.context); const tempContext = Util.deepCopy(actionContext.context);
if (data) { if (data) {
...@@ -287,7 +287,6 @@ ...@@ -287,7 +287,6 @@
const retParam = actionContext.getParam('<#if logicNode.getDstPSDEUILogicParam?? && logicNode.getDstPSDEUILogicParam()??>${logicNode.getDstPSDEUILogicParam().codeName}</#if>'); const retParam = actionContext.getParam('<#if logicNode.getDstPSDEUILogicParam?? && logicNode.getDstPSDEUILogicParam()??>${logicNode.getDstPSDEUILogicParam().codeName}</#if>');
if (dstParam) { if (dstParam) {
try { try {
const service: any = window.entityServiceRegister.getService('${logicNode.getDstPSAppDataEntity().getCodeName()?lower_case}');
const deLogic: ${srfclassname('${logicNode.getDstPSAppDELogic().getCodeName()}')}Logic = new ${srfclassname('${logicNode.getDstPSAppDELogic().getCodeName()}')}Logic({ context: actionContext.context, data: dstParam.getReal() ? dstParam.getReal() : {} }); const deLogic: ${srfclassname('${logicNode.getDstPSAppDELogic().getCodeName()}')}Logic = new ${srfclassname('${logicNode.getDstPSAppDELogic().getCodeName()}')}Logic({ context: actionContext.context, data: dstParam.getReal() ? dstParam.getReal() : {} });
const result = await deLogic.onExecute(actionContext.context, dstParam.getReal() ? dstParam.getReal() : {}, false); const result = await deLogic.onExecute(actionContext.context, dstParam.getReal() ? dstParam.getReal() : {}, false);
if (result) { if (result) {
...@@ -318,7 +317,7 @@ ...@@ -318,7 +317,7 @@
throw new Error(`传入参数 <#if logicNode.getDstPSDEUILogicParam?? && logicNode.getDstPSDEUILogicParam()??>${logicNode.getDstPSDEUILogicParam().codeName}</#if> 类型不正确,必须为过滤器对象`); throw new Error(`传入参数 <#if logicNode.getDstPSDEUILogicParam?? && logicNode.getDstPSDEUILogicParam()??>${logicNode.getDstPSDEUILogicParam().codeName}</#if> 类型不正确,必须为过滤器对象`);
} }
try { try {
const service: any = new ${srfclassname('${logicNode.getDstPSAppDataEntity().getCodeName()}')}Service(); const service: any = await window.entityServiceRegister.getService('${logicNode.getDstPSAppDataEntity().getCodeName()?lower_case}');
const res = await service['${logicNode.getDstPSAppDEDataSet().codeName}'](actionContext.context, dstParam.getReal() ? dstParam.getReal() : {}); const res = await service['${logicNode.getDstPSAppDEDataSet().codeName}'](actionContext.context, dstParam.getReal() ? dstParam.getReal() : {});
if (res && res.ok && res.data) { if (res && res.ok && res.data) {
// 返回值绑定逻辑参数对象 // 返回值绑定逻辑参数对象
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册