RuntimeDict.json.ftl 1.4 KB
Newer Older
zhouweidong's avatar
zhouweidong committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<#ibiztemplate>
TARGET=PSSYSTEM
</#ibiztemplate>
<#comment>系统是否包含预定义代码表</#comment>
<#assign hasPredefinedCodeList=false>
<#list sys.getAllPSCodeLists() as codelist>
    <#if codelist.getPredefinedType()?? && codelist.getPredefinedType()=='RUNTIME'>
        <#assign hasPredefinedCodeList=true>
        <#break>
    </#if>
</#list>
<#if hasPredefinedCodeList>
    <#assign isFirstCodeList=true>
[    <#list sys.getAllPSCodeLists() as codelist>
        <#if codelist.getPredefinedType()?? && codelist.getPredefinedType()=='RUNTIME'>
            <#if isFirstCodeList==false>,</#if>
   {
        "name":"${codelist.name}",
zhouweidong's avatar
zhouweidong committed
19
        "code":"${codelist.codeName}",
zhouweidong's avatar
zhouweidong committed
20 21
        "group":"",
        "memo":"",
zhouweidong's avatar
zhouweidong committed
22 23 24 25 26 27 28 29 30 31 32 33
        "enable":"",
        <#if codelist.getAllPSCodeItems()??>
        "items":[<#list codelist.getAllPSCodeItems() as codeItem>
        {
        "catalog_id":"${codelist.codeName}",
        "catalog_name":"${codelist.name}",
        "value_key":"${codelist.codeName}-${codeItem.codeName}",
        "value":"${codeItem.value}",
        "label":"${codeItem.text}",
        "disabled":"",
        "showorder":""
        <#if codeItem.getParentCodeItem?? && codeItem.getParentCodeItem()??>
zhouweidong's avatar
zhouweidong committed
34
        ,"parent":"${codeItem.getParentCodeItem().value}"
zhouweidong's avatar
zhouweidong committed
35 36 37 38 39
        </#if>
        }<#if codeItem_has_next>,</#if>
        </#list>
        ]
        </#if>
zhouweidong's avatar
zhouweidong committed
40
   }
zhouweidong's avatar
zhouweidong committed
41
        <#assign isFirstCodeList=false>
zhouweidong's avatar
zhouweidong committed
42 43 44 45
        </#if>
    </#list>
]
</#if>