{
  "version": 6,
  <#list layout.c1 as group>
  "form": [
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-page",
        "props": {
          "title": "${title}",
          "key": "${newId()}"
        }
      },
      "graph": {
        "shape": "panel",
        "id": "root_panel",
        "type": "fx-split-panel",
        "props": {
          "shadow": ""
        },
        "children": [
          {
            "shape": "panel",
            "id": "root_panel",
            "type": "fx-split-panel",
            "props": {
              "horizontal": true,
              "shadow": ""
            },
            "children": [
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "horizontal": false,
                  "size": "300"
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "",
                      "colNum": 0,
                      "align": "full",
                      "paddingTop": 10,
                      "paddingLeft": 10,
                      "paddingRight": 10
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-tree",
                        "props": {
                          "defaultExpandAll": true,
                          "expandOnClickNode": false,
                          "filterShow": true,
                          "filterPlaceholder": "查询",
                          "dataset": "ds_18210085a45",
                          "field": "fid18210085a51",

                          "label": "编码"
                        },
                        "events": {}
                      }
                    ]
                  }
                ]
              },
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "size": "15",
                  "backgroundColor": "--color-transparent"
                },
                "children": []
              },
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "horizontal": false
                },
                "children": [

                  {
                    "shape": "panel",
                    "id": "form_panel",
                    "type": "fx-form-panel",
                    "props": {
                      "colNum": 3,
                      "label": "查询条件",
                      "size": "50",
                      "alignY": "center",
                      "paddingRight": 20,
                      "gridTemplateColumns": "400px 400px 1fr",
                      "paddingLeft": 20
                    },
                    "children": [
                      <#list group.cfilters as cfilters>
                      {
                        "id": "id${newId()}",
                        "type": "fx-${cfilters.editor}",
                        "props": {
                          "label": "${cfilters.label}",
                          "maxlength": 50,
                          "hideLabel": true,
                          "placeholder": "请输入${cfilters.label}",
                          "labelWidth": 100,
                          "affixError": false
                        },
                        "events": {}
                      },
                      </#list>
                      {
                        "id": "${newId()}",
                        "type": "fx-button-group",
                        "props": {
                          "menus": [],
                          "showDropdown": false
                        },
                        "slots": {
                          "default": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "查询",
                                "leftIcon": "search",
                                "type": "primary",
                                "action": "button:search",
                                "linkType": "",
                                "dataset": "${param.queryDs}"
                              },
                              "id": "id${newId()}"
                            },
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "重置",
                                "leftIcon": "clear",
                                "action": "button:reset"
                              },
                              "id": "id${newId()}"
                            }
                          ],
                          "dropdown": []
                        }
                      }
                    ]
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                    "label": "间隔",
                    "size": "15",
                    "backgroundColor": "--color-transparent"
                    },
                    "children": []
                  },

                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "label": "表格标题区",
                      "size": "50",
                      "colNum": 2,
                      "alignY": "center",
                      "paddingLeft": 20,
                      "paddingRight": 20
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-title",
                        "props": {
                          "label": "${group.label}"
                        }
                      },
                      {
                        "id": "id${newId()}",
                        "type": "fx-button-group",
                        "props": {
                          "menus": [],
                          "textAlign": "right",
                          "showDropdown": false
                        },
                        "slots": {
                          "default": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "新增",
                                "leftIcon": "plus",
                                "type": "primary",
                                "action": "button:add",
                                "linkType": "dialog",
                                "dataset": "",
                                "fxLink": "dialog:editMainDialog",
                                "fxLink_text": "卡片一号",
                                "preAction": ""
                              },
                              "id": "id${newId()}"
                            }
                          ],
                          "dropdown": []
                        }
                      }
                    ]
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "label": "表格区",
                      "colNum": 0,
                      "paddingLeft": 20,
                      "paddingRight": 20
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-table",
                        "props": {
                          "label": "表格",
                          "border": true,
                          "stripe": true,
                          "showHeader": true,
                          "fit": true,
                          "dataset": "${param.queryDs}",
                          "actionWidth": 150
                        },
                        "slots": {
                          "button": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "编辑",
                                "type": "primary",
                                "leftIcon": "edit",
                                "action": "button:edit",
                                "link": false,
                                "text": true,
                                "dataset": "${param.editDs}",
                                "linkType": "dialog",
                                "fxLink": "dialog:editMainDialog",
                                "fxLink_text": ""
                              },
                              "id": "id${newId()}"
                            },
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "删除",
                                "type": "danger",
                                "leftIcon": "delete",
                                "action": "button:remove",
                                "link": false,
                                "text": true,
                                "dataset": "${param.editDs}",
                                "preAction": ""
                              },
                              "id": "id${newId()}"
                            }
                          ],
                          "default": [
                            <#if (group.fields?size>0)>
                            <#list group.fields as col>
                            {
                              "id": "id${newId()}",
                              "type": "fx-table-column",
                              "props": {
                                "field": "${col.id}",
                                "label": "${col.label}"
                              }
                            }<#if col_has_next>,</#if>
                            </#list>
                            </#if>
                          ]
                        },
                        "events": {}
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "shape": "panel",
            "id": "fx-form-panel",
            "type": "fx-split-panel",
            "props": {
              "shadow": "",
              "size": 15
            },
            "children": []
          }
        ]
      }
    },
    <#list layout.c2 as main_dialog>
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-dialog",
        "props": {
          <#if (param.editTitle == "")>
          "title": "卡片一号",
          <#else>
          "title": "${param.editTitle}",
          </#if>
          "key": "editMainDialog",
          "closeOnClickModal": false,
          "showPrefix": true
        },
        "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,
              "backgroundColor": "--color-white"
            },
            "children": [
              <#assign dfields = main_dialog.fields>
              <#assign col = param.col>
              <#include "incModel/inc_list_dialog.ftl"/>
            ]
          },
          {
            "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",
              "paddingRight": 20,
              "alignY": "center"
            },
            "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:save",
                        "dataset": "${param.editDs}"
                      },
                      "id": "id${newId()}"
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "关闭",
                        "leftIcon": "close",
                        "type": "",
                        "action": "button:closeDialog",
                        "nextAction": "button:search"
                      },
                      "id": "id${newId()}"
                    }
                  ]
                }
              }
            ]
          }
        ]
      }
    }
    </#list>
  ],
  </#list>
  "model": [
    <#list datasets as dataset>
    <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
}
