PUBLIC.vue.ftl 4.8 KB
Newer Older
KK's avatar
KK committed
1 2
<#--  BEGIN:获取导航上下文  -->
<#macro getNavigateContext currentItem>
3
  { <#t>
4 5 6 7 8
  <#if currentItem.getPSNavigateContexts?? && currentItem.getPSNavigateContexts()??>
  <#list currentItem.getPSNavigateContexts() as navContext>
  "${navContext.getKey()?lower_case}": <#if navContext.isRawValue()?? && navContext.isRawValue() == true>"${navContext.getValue()}"<#else>"%${navContext.getValue()}%"</#if><#if navContext_has_next>,</#if> <#t>
  </#list>
  </#if>
9
  } <#t>
KK's avatar
KK committed
10 11 12 13 14
</#macro>
<#--  END:获取导航上下文  -->

<#--  BEGIN:获取导航参数  -->
<#macro getNavigateParams currentItem>
15
  { <#t>
16 17 18 19 20
  <#if currentItem.getPSNavigateParams?? && currentItem.getPSNavigateParams()??>
  <#list currentItem.getPSNavigateParams() as navParam >
  "${navParam.getKey()?lower_case}": <#if navParam.isRawValue()?? && navParam.isRawValue() == true>"${navParam.getValue()}"<#else>"%${navParam.getValue()}%"</#if><#if navParam_has_next>,</#if> <#t>
  </#list>
  </#if>
21
  } <#t>
KK's avatar
KK committed
22
</#macro>
KK's avatar
KK committed
23 24 25 26 27 28 29 30 31
<#--  END:获取导航参数  -->
<#-- 属性值规则 -->
<#macro getDeRule condItem>
                  {
                      type:"<#if condItem.getCondType?? && condItem.getCondType()??>${condItem.getCondType()}</#if>",
                      condOP:"<#if condItem.getCondOp?? && condItem.getCondOp()??>${condItem.getCondOp()}</#if>",
                      ruleInfo:"<#if condItem.getRuleInfo?? && condItem.getRuleInfo()??>${condItem.getRuleInfo()}</#if>", 
                      isKeyCond:<#if condItem.isKeyCond?? && condItem.isKeyCond()??>${condItem.isKeyCond()?c}</#if>,
                      <#if condItem.getParamValue?? && condItem.getParamValue()??>
KK's avatar
KK committed
32
                      paramValue:"${condItem.getParamValue()?lower_case}",
KK's avatar
KK committed
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 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
                      </#if>
                      <#if condItem.getParamType?? && condItem.getParamType()??>
                      paramType:"${condItem.getParamType()}",
                      </#if>
                      <#if condItem.isNotMode?? && condItem.isNotMode()??>
                      isNotMode:${condItem.isNotMode()?c},
                      </#if>
                      <#if condItem.getRegExCode?? && condItem.getRegExCode()??>
                      regExCode:/${condItem.getRegExCode()}/,
                      </#if>
                      <#if condItem.getMaxValue?? && condItem.getMaxValue()??>
                      maxValue:${condItem.getMaxValue()?c},
                      </#if>
                      <#if condItem.getMinValue?? && condItem.getMinValue()??>
                      minValue:${condItem.getMinValue()?c},
                      </#if>
                      <#if condItem.getDEFName?? && condItem.getDEFName()??>
                      deName:"${condItem.getDEFName()?lower_case}",
                      </#if>
                      <#if condItem.isIncludeMaxValue?? && condItem.isIncludeMaxValue()??>
                      isIncludeMaxValue:${condItem.isIncludeMaxValue()?c},
                      </#if>
                      <#if condItem.isIncludeMinValue?? && condItem.isIncludeMinValue()??>
                      isIncludeMinValue:${condItem.isIncludeMinValue()?c},
                      </#if>
                      <#if condItem.getPSSysValueRule?? && condItem.getPSSysValueRule()??>
                      <#assign valRule = condItem.getPSSysValueRule()>
                      sysRule:{
                        ruleType:"<#if valRule.getRuleType?? && valRule.getRuleType()??>${valRule.getRuleType()}</#if>", 
                        ruleInfo:"<#if valRule.getRuleInfo?? && valRule.getRuleInfo()??>${valRule.getRuleInfo()}</#if>",
                        <#if valRule.getRuleType?? && valRule.getRuleType()?? && valRule.getRuleType() == "REG" && valRule.getRegExCode?? && valRule.getRegExCode()?? >
                        regExCode:/${valRule.getRegExCode()}/,
                        </#if>
                      },
                      </#if>
                      <#if condItem.getCondType?? && condItem.getCondType()?? && condItem.getCondType() == 'GROUP'>
                      group:[
                        <#if condItem.getPSDEFVRConditions?? && condItem.getPSDEFVRConditions()??>
                          <#list condItem.getPSDEFVRConditions() as group_item>
                                  <@getDeRule group_item />
                          </#list>
                        </#if>
                        ]
                      </#if>
                  },
78 79 80 81
</#macro>

<#--  BEGIN:ion-icon图标调整  -->
<#macro setIcon item>
82
<#t>
Mosher's avatar
Mosher committed
83
<#if item.getPSSysImage?? && item.getPSSysImage()?? && item.getPSSysImage().getCssClass?? && item.getPSSysImage().getCssClass()??><#if item.getPSSysImage().getCssClass()?starts_with('fa fa-')>${item.getPSSysImage().getCssClass()?keep_after('fa fa-')}<#else>${item.getPSSysImage().getCssClass()}</#if></#if><#t>
84 85
</#macro>
<#--  END:ion-icon图标调整  -->