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

update:更新

上级 3596c41f
......@@ -432,7 +432,9 @@
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=16>
${afterMountedBlock}
</@ibizindent>
});
<#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
......@@ -440,6 +442,9 @@
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=20>
${afterMountedBlock}
</@ibizindent>
${afterMountedBlock}
});
})
......@@ -449,7 +454,9 @@
</#list>
</#if>
<#if !hasLogic>
<@ibizindent blank=8>
${afterMountedBlock}
</@ibizindent>
</#if>
})
<#else>
......@@ -476,7 +483,9 @@
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=16>
${afterMountedBlock}
</@ibizindent>
});
<#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
......@@ -484,7 +493,9 @@
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=20>
${afterMountedBlock}
</@ibizindent>
});
})
</#if>
......@@ -493,7 +504,9 @@
</#list>
</#if>
<#if !hasLogic>
<@ibizindent blank=8>
${afterMountedBlock}
</@ibizindent>
</#if>
</#if>
}
......@@ -594,7 +607,8 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
* @memberof ${srfclassname('${view.name}')}Base
*/
public afterDestroyed(){
if(this.viewDefaultUsage){
<#assign afterDestroyedBlock>
if (this.viewDefaultUsage) {
let localStoreLength = Object.keys(localStorage);
if(localStoreLength.length > 0){
localStoreLength.forEach((item:string) =>{
......@@ -625,6 +639,45 @@ ${P.getLogicCode(uiAction, "LOGIC.vue").code}
this.formDruipartEvent.unsubscribe();
}
this.viewState.complete();
</#assign>
<#assign hasLogic = false>
<#if view.getPSAppViewLogics?? && view.getPSAppViewLogics()??>
<#list view.getPSAppViewLogics() as logic>
<#if logic.getLogicTrigger?? && logic.getLogicTrigger()?? && logic.getLogicTrigger() == 'VIEWEVENT' && logic.getEventNames?? && logic.getEventNames()?? && logic.getEventNames()?index_of("onViewDestroyed") != -1>
<#-- 暂时只支持实体界面逻辑 -->
<#if logic.getLogicType() == 'DEUILOGIC' && logic.getPSAppDEUILogic?? && logic.getPSAppDEUILogic()??>
<#assign hasLogic = true>
<#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().codeName == logic.getPSAppDEUILogic().getPSAppDataEntity().codeName>
this.appUIService.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=12>
${afterDestroyedBlock}
</@ibizindent>
});
<#else>
window.uiServiceRegister.getService('${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((service: any) => {
service.executeUILogic('${logic.getPSAppDEUILogic().codeName}', [], Util.deepCopy(this.context), Util.deepCopy(this.viewparams), {}, {}, this, '${logic.getPSAppDEUILogic().getPSAppDataEntity().codeName}').then((result: any) => {
if (result && result.hasOwnProperty('srfret') && !result.srfret) {
return;
}
<@ibizindent blank=16>
${afterDestroyedBlock}
</@ibizindent>
${afterDestroyedBlock}
});
});
</#if>
</#if>
</#if>
</#list>
</#if>
<#if !hasLogic>
<@ibizindent blank=8>
${afterDestroyedBlock}
</@ibizindent>
</#if>
}
</#if>
</#if>
......
......@@ -424,11 +424,11 @@ export default class ${srfclassname('${item.getCodeName()}')}UIServiceBase exten
* @param {string} [srfParentDeName]
* @memberof UIService
*/
public executeUILogic(name: string, args: any[], context?: any, params?: any, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string | undefined): void {
public async executeUILogic(name: string, args: any[], context?: any, params?: any, $event?: any, xData?: any, actionContext?: any, srfParentDeName?: string | undefined): Promise<any> {
<#if item.getAllPSAppDEUILogics?? && item.getAllPSAppDEUILogics()??>
<#list item.getAllPSAppDEUILogics() as uiLogic>
if (name === '${uiLogic.codeName}') {
${srfclassname('${uiLogic.getCodeName()}')}UILogic.getInstance().execute(args, context, params, $event, xData, actionContext, srfParentDeName);
return await ${srfclassname('${uiLogic.getCodeName()}')}UILogic.getInstance().execute(args, context, params, $event, xData, actionContext, srfParentDeName);
}
</#list>
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册