{
  "version": 6,
  "form": [
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-page",
        "props": {
          "title": "${title}",
          "key": "${newId()}",
          "tipsExpand": false
        }
      },
      "graph": {
        "shape": "panel",
        "id": "root_panel",
        "type": "fx-split-panel",
        "props": {
          "horizontal": false,
          "shadow": "",
          "scroll": false,
          "size": "",
          "name": "s0"
        },
        "children": [
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "size": "56",
              "horizontal": true,
              "scroll": false,
              "name": "s11"
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "alignY": "center",
                  "size": "400",
                  "paddingLeft": 16
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-title",
                    "props": {
                      "label": "${title}"
                    }
                  }
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "alignY": "center",
                  "paddingRight": 16
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-button-group",
                    "props": {
                      "menus": [],
                      "textAlign": "right"
                    },
                    "slots": {
                      "default": [

                      ],
                      "dropdown": []
                    }
                  }
                ]
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-form-panel",
            "shape": "panel",
            "props": {
              "size": "0"
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-divider",
                "props": {
                  "label": "",
                  "contentPosition": "center",
                  "direction": "horizontal"
                }
              }
            ]
          },
          {
            "id": "${newId()}",
            "type": "fx-split-panel",
            "shape": "panel",
            "props": {
              "size": "",
              "horizontal": false,
              "scroll": true,
              "name": "s12"
            },
            "children": [
              {
                <#list layout.card as group>
                  "id": "${newId()}",
                  "type": "fx-form-panel",
                  "shape": "panel",
                  "props": {
                    "size": "0",
                    <#if param.col lte 1 || param.col gte 3>
                      "gridTemplateColumns": "1fr 1fr 1fr",
                    <#elseif param.col == 2>
                      "gridTemplateColumns": "1fr 1fr 1fr 1fr",
                    </#if>
                    "paddingTop": 32
                  },
                  "children": [
                    <#list group.fields as field>
                    <#if (param.col lte 1)>
                    {
                      "id": "id${newId()}",
                      "type": "fx-placeholder",
                      "props": {
                        "label": "占位"
                      },
                      "layout": {
                        "row": 1
                      }
                    },
                    <#elseif (param.col = 2 && ((field_index+1) % 2 = 1 ) )>
                      {
                      "id": "id${newId()}",
                      "type": "fx-placeholder",
                      "props": {
                        "label": "占位"
                      },
                      "layout": {
                        "row": 1
                      }
                    },
                    </#if>
                    {
                      "id": "id${newId()}",
                      <#if (field.readonly = true)>
                        "type": "fx-text",
                        "disabled": true,
                      <#else>
                        "type": "${field.editor}",
                      </#if>
                      "props": {
                        "label": "${field.label}",
                        "dataset": "${field.dataset}",
                        "required": "${field.required}",
                        "field": "${field.id}",
                        <#if field.lookup??>
                          "lookup": {
                            <#list field.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 field.maxlength gt 0>
                            "maxlength": ${field.maxlength},
                        </#if>
                        "placeholder": "请输入内容",
                        <#if (param.col gte 2)>
                            "tips": "${field.desc}",
                        </#if>
                        "labelWidth": 150,
                        <#if (field.readonly = true)>
                            "readonly": true,
                        <#else>
                            "readonly": false,
                        </#if>
                        "affixError": true
                      },
                      "events": {}
                    }
                    <#if field_has_next>
                      <#if (param.col lte 1 )>
                        ,{
                            "id": "id${newId()}",
                            "type": "fx-placeholder",
                            "props": {
                              "label": "占位"
                            },
                            "layout": {
                              "row": 1
                            }
                        }

                      </#if>
                      <#if (param.col = 2 && ((field_index+1) % 2 = 0 ) )>
                        ,{
                          "id": "id${newId()}",
                          "type": "fx-placeholder",
                          "props": {
                            "label": "占位"
                          },
                          "layout": {
                            "row": 1
                          }
                        }
                      </#if>
                      ,
                    </#if>
                    </#list>
                ]
                </#list>
              },

              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "size": "56",
                  "alignY": "center",
                  "alignX": "center"
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-button-group",
                    "props": {
                      "menus": []
                    },
                    "slots": {
                      "default": [
                        {
                          "type": "fx-button",
                          "props": {
                            "label": "保存",
                            "leftIcon": "save",
                            "type": "success",
                            "action": "button:saveCard"
                          },
                          "id": "${newId()}",
                          "events": {}
                        },
                        {
                          "type": "fx-button",
                          "props": {
                            "label": "删除",
                            "leftIcon": "delete",
                            "type": "danger",
                            "action": "button:delCard"
                          },
                          "id": "${newId()}",
                          "events": {}
                        },
                        {
                          "type": "fx-button",
                          "props": {
                            "label": "返回",
                            "leftIcon": "return",
                            "action": "button:backList"
                          },
                          "id": "${newId()}",
                          "events": {}
                        }
                      ]
                    }
                  }
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "name": "d2"
                },
                "children": []
              }
            ]
          }
        ]
      }
    }
  ],
  "model": [
    <#list datasets as dataset>
    <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
}
