global-ui-service-constructor.ts.ftl 1.2 KB
Newer Older
ibizdev's avatar
ibizdev committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import { ServiceConstructorBase } from '@/ibiz-core/service/service-constructor-base';

/**
 * 应用实体服务
 *
 * @export
 * @class GlobalUiServiceConstructor
 * @extends {ServiceConstructorBase}
 */
export default class GlobalUiServiceConstructor extends ServiceConstructorBase {
<#if app.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??>

    /**
     * 初始化
     *
     * @protected
     * @memberof GlobalUiServiceConstructor
     */
    protected init(): void {
<#list app.getAllPSAppDataEntities() as appde>
    <#if appde.getAllPSAppDEUIActions?? && appde.getAllPSAppDEUIActions()??>
    <#list appde.getAllPSAppDEUIActions() as uiAction>
        <#assign exist = true>
        <#if exist??>
        <#break>
        </#if>
    </#list>
    </#if>
    <#if exist?? && exist == true>
    <#if !P.exists("importActionService", appde.getId(), "")>
    <#assign exist = false>
        this.allService.set('${appde.getCodeName()?lower_case}_ui_action', () => import('@/ui-service/${srffilepath2(appde.getCodeName())}/${srffilepath2(appde.getCodeName())}-ui-action'));
    </#if>
    </#if>
</#list>
    }
</#if>

}