MACRO.ftl 1.8 KB
Newer Older
1
<#macro badge item>
2 3 4
  <#if item.getPSUIAction?? && item.getPSUIAction()?? && item.getPSUIAction().getPSAppCounter?? && item.getPSUIAction().getPSAppCounter()??>
    <#assign uiaction = item.getPSUIAction() />
    <#assign counter = uiaction.getPSAppCounter() />
5
<Badge type="primary" :count="${srfclassname('${counter.getCodeName()}')}counterservice.counterData.<#if uiaction.getCounterId()??>${uiaction.getCounterId()}</#if>">
6 7 8 9 10
<#nested>
</Badge>
  <#else>
<#nested>
  </#if>
tony001's avatar
tony001 committed
11 12 13 14 15 16 17 18 19 20 21 22
</#macro>

<#macro getQuickSearchPlaceholder view>
  <#assign isdrawcComma = false />
  <#if view.getPSAppDataEntity?? && view.getPSAppDataEntity()?? && view.getPSAppDataEntity().getAllPSAppDEFields?? && view.getPSAppDataEntity().getAllPSAppDEFields()??>
    <#list view.getPSAppDataEntity().getAllPSAppDEFields() as field>
      <#if field.isEnableQuickSearch()>
        <#if isdrawcComma>,<#else><#assign isdrawcComma = true /></#if><#t>
        ${field.getPSDEField().getLogicName()}<#t>
      </#if>
    </#list>
  </#if>
tony001's avatar
tony001 committed
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
</#macro>

<#-- 获取导航上下文 -->
<#macro getNavigateContext currentItem>
{<#t>
  <#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
  <#list currentItem.getPSNavigateContexts() as navContext>
  ${navContext.getKey()}:<#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if><#t>
  </#list>
  </#if>
}<#t>
</#macro>

<#-- 获取导航参数 -->
<#macro getNavigateParams currentItem>
{<#t>
<#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
<#list currentItem.getPSNavigateParams() as navParam >
${navParam.getKey()}:<#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if><#t>
</#list>
</#if>
}<#t>
45
</#macro>