{
  <#list layout.list as group>
  "form":
  [
    {
      "page": {
        "id": "p${newId()}",
        "type": "fx-page",
        "props": {
          "title": "${title}",
          "key": "${newId()}"
        }
      },
      "graph": {
        "shape": "panel",
        "id": "root_panel",
        "type": "fx-split-panel",
        "props": {
          "horizontal": false,
          "shadow": ""
        },
        "children": [
          <#if (group.cfilters?size>0)>
            <#include "incModel/inc_list_query.ftl"/>
          </#if>
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "50",
              "label": "查询条件",
              "colNum": 2,
              "alignY": "center",
              "paddingLeft": 16,
              "paddingRight": 16,
              "shadow": ""
            },
            "children": [
              {
                "id": "id${newId()}",
                "type": "fx-title",
                "props": {
                  "label": "${title}",
                  "fontSize": 15,
                  "color": "#313131",
                  "fontWeight": "bold",
                  "showPrefix": true,
                  "prefixWidth": 5,
                  "prefixHeight": 15,
                  "prefixColor": "#1E90FF"
                }
              },
              {
                "id": "id${newId()}",
                "type": "fx-button-group",
                "props": {
                  "menus": [],
                  "textAlign": "right"
                },
                "slots": {
                  "default": [
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "新增",
                        "leftIcon": "plus",
                        "type": "primary",
                        "action": "button:addCard",
                        "link": false,
                        "linkType": "dialog",
                        "fxLink": "dialog:cardDialog",
    <#if (param.cardTitle == "")>
      "title": "卡片"
    <#else>
      "fxLink_text": "${param.cardTitle}"
    </#if>
                      },
                      "id": "id${newId()}"
                    }
                  ]
                }
              }
            ]
          },
          <#include "incModel/inc_list_table.ftl"/>
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "15",
              "backgroundColor": "transparent"
            },
            "children": []
          }
        ]
      }
    }
    <#if (group.sfilters?size>0)>
      <#include "incModel/inc_query_sfilters.ftl"/>
    </#if>
    <#list layout.card as dialog>
    ,{
      "page": {
        "id": "id${newId()}",
        "type": "fx-dialog",
        "props": {
      <#if (param.cardTitle == "")>
        "title": "卡片",
      <#else>
        "title": "${param.cardTitle}",
      </#if>
          "key": "cardDialog",
          "fontSize": 16,
          "color": "#313131",
          "fontWeight": "bold",
          "showPrefix": true,
          "prefixWidth": 5,
          "prefixHeight": 16,
          "prefixColor": "#1E90FF"
        },
        "events": {}
      },
      "graph": {
        "shape": "panel",
        "id": "root_panel",
        "type": "fx-split-panel",
        "props": {
          "horizontal": false,
          "shadow": "never"
        },
        "children": [
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "horizontal": false,
              "scroll": true
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "size": "0",
                  "paddingTop": 15,
                  "colNum": 2
                },
                <#assign dfields = dialog.fields>
                "children": [
                  <#list dfields as dfield>
                    {
                      "id": "id${newId()}",
                      <#if (dfield.readonly = true)>
                        "type": "fx-text",
                        "disabled": true,
                      <#else>
                        "type": "${dfield.editor}",
                      </#if>
                      "props": {
                        "label": "${dfield.label}",
                        "dataset": "${dfield.dataset}",
                        "field": "${dfield.id}",
                        "required": "${dfield.required}",
                       <#if dfield.lookup??>
                          "lookup": {
                            <#list dfield.lookup as k, v>
                              <#if v?is_enumerable>
                                "${k}": [
                                <#list v as v1>
                                  {
                                  <#list v1 as vk1, vv1>
                                    "${vk1}": "${vv1}"<#if vk1_has_next>,</#if>
                                  </#list>
                                  }
                                  <#if v1_has_next>,</#if>
                                </#list>
                                ]
                              <#else>
                                "${k}": "${v}"
                              </#if>
                              <#if k_has_next>,</#if>
                            </#list>
                           },
                        </#if>
                        <#if dfield.maxlength gt 0>
                          "maxlength": ${dfield.maxlength},
                        </#if>
                        "placeholder": "请输入${dfield.label}",
                        <#if (param.col gte 2)>
                          "tips": "${dfield.desc}",
                        </#if>
                      "labelWidth": 100,
                      <#if (dfield.readonly = true)>
                        "readonly": true,
                      <#else>
                        "readonly": false,
                      </#if>
                      "affixError": true
                      },
                    "events": {}
                  }
        <#if dfield_has_next>
          <#if (param.col lte 1 )>
            <#if (dfield.desc != "")>
              ,{
              "id": "id${newId()}",
              "type": "fx-label",
              "props": {
              "label": "${dfield.desc}",
              "labelWidth": 0,
              "affixError": true,
              "labelAlign": "left"
              }
              }
            <#else>
              ,{
              "id": "id${newId()}",
              "type": "fx-placeholder",
              "props": {
              "label": "占位"
              },
              "layout": {
              "row": 1
              }
              }
            </#if>
          </#if>
          ,
        </#if>
      </#list>
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {},
                "children": []
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "0"
            },
            "children": [
              {
                "id": "id${newId()}",
                "type": "fx-divider",
                "props": {
                  "label": "",
                  "contentPosition": "center",
                  "direction": "horizontal"
                }
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "50",
              "alignY": "center",
              "paddingRight": 20
            },
            "children": [
              {
                "id": "id${newId()}",
                "type": "fx-button-group",
                "props": {
                  "menus": [],
                  "textAlign": "right"
                },
                "slots": {
                  "default": [
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "保存",
                        "leftIcon": "save",
                        "type": "success",
                        "action": "button:saveCard"
                      },
                      "id": "id${newId()}"
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "关闭",
                        "leftIcon": "close",
                        "action": "button:closeDialog"
                      },
                      "id": "id${newId()}"
                    }
                  ]
                }
              }
            ]
          }
        ]
      }
    }
  ],
  </#list>
  "model": [
    <#list datasets as dataset>
    <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
</#list>
}
