portlet.ts.ftl 3.4 KB
Newer Older
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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
import { MockAdapter } from '../mock-adapter';
const mock = MockAdapter.getInstance();

import Mock from 'mockjs'
const Random = Mock.Random;

// 获取全部数组
mock.onGet('./assets/json/portlet-data.json').reply((config: any) => {
    let status = MockAdapter.mockStatus(config);
    return [status,
    [
    <#if app.getAllPSAppDataEntities?? && app.getAllPSAppDataEntities()??>
    <#list app.getAllPSAppDataEntities() as appDataEntity>
    <#if appDataEntity.getAllPSAppPortlets?? && appDataEntity.getAllPSAppPortlets()??>
    <#list appDataEntity.getAllPSAppPortlets() as appdePortlet>
    <#if appdePortlet.isEnableAppDashboard?? && appdePortlet.isEnableAppDashboard()?? && appdePortlet.isEnableDEDashboard() == true>
    {"type":"appde",
    "appCodeName":"${appDataEntity.getCodeName()}",
    "appName":"${appDataEntity.getLogicName()}",
    "portletCodeName": "${appdePortlet.getCodeName()}",
    "portletName": "${appdePortlet.getName()}",
    "groupCodeName":"<#if appdePortlet.getPSAppPortletCat()??>${appdePortlet.getPSAppPortletCat().getCodeName()}</#if>",
    "groupName":"<#if appdePortlet.getPSAppPortletCat()??>${appdePortlet.getPSAppPortletCat().getName()}</#if>",
    <#if appdePortlet.getPSSysPortlet?? && appdePortlet.getPSSysPortlet()??>"portletTYpe":"${appdePortlet.getPSSysPortlet().getPortletType()}","componentName":"${srffilepath2(appDataEntity.getCodeName())}-${srffilepath2(appdePortlet.getPSSysPortlet().getCodeName())}-portlet"</#if>},
    </#if>
    </#list>
    </#if>
    </#list>
    </#if>
    <#if app.getAllPSAppPortlets?? && app.getAllPSAppPortlets()??>
    <#list app.getAllPSAppPortlets() as appPortlet>
    <#if appPortlet.isEnableAppDashboard?? && appPortlet.isEnableAppDashboard()?? && appPortlet.isEnableAppDashboard() == true>
    <#if appPortlet.getPSAppDataEntity?? && appPortlet.getPSAppDataEntity()??>
    <#assign appDataEntity = appPortlet.getPSAppDataEntity() />
    {"type":"app",
    "appCodeName":"${appDataEntity.getCodeName()}",
    "appName":"${appDataEntity.getLogicName()}",
    "portletCodeName": "${appPortlet.getCodeName()}",
    "portletName": "${appPortlet.getName()}",
    "groupCodeName":"<#if appPortlet.getPSAppPortletCat()??>${appPortlet.getPSAppPortletCat().getCodeName()}</#if>",
    "groupName":"<#if appPortlet.getPSAppPortletCat()??>${appPortlet.getPSAppPortletCat().getName()}</#if>",
    <#if appPortlet.getPSSysPortlet?? && appPortlet.getPSSysPortlet()??>"portletTYpe":"${appPortlet.getPSSysPortlet().getPortletType()}","componentName":"app-${srffilepath2(appDataEntity.getCodeName())}-${srffilepath2(appPortlet.getPSSysPortlet().getCodeName())}-portlet"</#if>}<#if appPortlet_has_next>,</#if>
    <#else>
    {"type":"app",
    "appCodeName":"${app.getPKGCodeName()}",
    "appName":"${app.getName()}",
    "portletCodeName": "${appPortlet.getCodeName()}",
    "portletName": "${appPortlet.getName()}",
    "groupCodeName":"<#if appPortlet.getPSAppPortletCat()??>${appPortlet.getPSAppPortletCat().getCodeName()}</#if>",
    "groupName":"<#if appPortlet.getPSAppPortletCat()??>${appPortlet.getPSAppPortletCat().getName()}</#if>",
    <#if appPortlet.getPSSysPortlet?? && appPortlet.getPSSysPortlet()??>"portletTYpe":"${appPortlet.getPSSysPortlet().getPortletType()}","componentName":"app-${srffilepath2(appPortlet.getPSSysPortlet().getCodeName())}-portlet"</#if>}<#if appPortlet_has_next>,</#if>
    </#if>
    </#if>
    </#list>
    </#if>
    ]];
});