MODEL.ts.ftl 820 字节
Newer Older
1
<#ibizinclude>
tony001's avatar
tony001 committed
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
../@MACRO/MODEL/MODEL_HEADER.ts.ftl
</#ibizinclude>

  /**
    * 获取数据项集合
    *
    * @returns {any[]}
    * @memberof ${srfclassname('${ctrl.codeName}')}Model
    */
  public getDataItems(): any[] {
    return [
<#--  主实体所有属性  -->
<#if ctrl.getAllPSPanelFields()??>
    <#list ctrl.getAllPSPanelFields() as datafield>
      {
        name: '${datafield.getName()?lower_case}',
        <#if datafield.getPSCodeList()??>
        <#assign codelist = datafield.getPSCodeList() />
        codelist:{tag:'${codelist.codeName}',codelistType:'${codelist.getCodeListType()}'},
        </#if>
        prop: '${datafield.getViewFieldName()?lower_case}'
      }<#if datafield_has_next>,</#if>
    </#list>
</#if>
    ]
  }
<#ibizinclude>
../@MACRO/MODEL/MODEL_BOTTOM.ts.ftl
30
</#ibizinclude>