{
  "version": 6,
  "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": [
              <#list layout.lList as assist>
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "horizontal": false,
                  "size": "420"
                },
                "children": [
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "56",
                      "alignY": "center",
                      "paddingLeft": 16,
                      "colNum": 2,
                      "gridTemplateColumns": "",
                      "paddingRight": 16
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-title",
                        "props": {
                          "label": "${param.lListTitle}"
                        }
                      },
                      {
                        "id": "id${newId()}",
                        "type": "fx-button-group",
                        "props": {
                          "menus": [],
                          "textAlign": "right",
                          "dataset": "${assist.dataset}"
                        },
                        "slots": {
                          "default": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "新增",
                                "leftIcon": "plus",
                                "type": "primary",
                                "action": "button:addCard",
                                "linkType": "dialog",
                                "link": false,
                                "fxLink": "dialog:lCardDialog",
                                "fxLink_text": "${param.lCardTitle}"
                              },
                              "id": "id${newId()}"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "id":"${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "0"
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-divider",
                        "props": {
                          "label": "",
                          "contentPosition": "center",
                          "direction": "horizontal"
                        }
                      }
                    ]
                  },
                  <#if (assist.cfilters?size>0)>
                    {
                      "id": "${newId()}",
                      "type": "fx-form-panel",
                      "shape": "panel",
                      "props": {
                        "alignY": "center",
                        "size": "50",
                        "gridTemplateColumns": "1fr 50px",
                        "paddingLeft": 16,
                        "paddingRight": 16
                      },
                      "children": [
                      <#list assist.cfilters as cfilters>
                        {
                          "id": "id${newId()}",
                          "type": "${cfilters.editor}",
                          "props": {
                            "label": "${cfilters.label}",
                            "maxlength": 50,
                            "placeholder": "请输入${cfilters.label}",
                            "labelWidth": 150,
                            "affixError": false,
                            "hideLabel": true,
                            "leftIcon": "",
                            "dataset": "${cfilters.dataset}",
                            "field": "${cfilters.id}"
                          },
                          "events": {}
                        },
                      </#list>
                        {
                          "id": "id${newId()}",
                          "type": "fx-button-group",
                          "props": {
                            "menus": [],
                            "textAlign": "right",
                            "dataset": "${assist.dataset}"
                          },
                          "slots": {
                            "default": [
                              {
                                "type": "fx-button",
                                "props": {
                                  "label": "查询",
                                  "leftIcon": "",
                                  "action": "button:loadList",
                                  "link": false,
                                  "type": "primary"
                                },
                                "id": "id${newId()}"
                              }
                            ]
                          }
                        }
                      ]
                    },
                  </#if>
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "size": "",
                      "colNum": 0,
                      "paddingLeft": 16,
                      "paddingRight": 16
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-table",
                        "props": {
                          "label": "${param.lListTitle}",
                          "border": true,
                          "stripe": true,
                          "showHeader": false,
                          "fit": true,
                          "hideOp": false,
                          "hideNo": true,
                          "dataset": "${assist.dataset}",
                          "hidePagination": true,
                          "name":"leftTb"
                        },
                        "slots": {
                          "button": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "编辑",
                                "type": "primary",
                                "leftIcon": "edit",
                                "action": "button:editCard",
                                "linkType": "dialog",
                                "dataset": "${assist.dataset}",
                                "fxLink": "dialog:lCardDialog",
                                "fxLink_text": "${param.lCardTitle}",
                                "link": true
                              },
                              "id": "id${newId()}"
                            },
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "删除",
                                "type": "primary",
                                "leftIcon": "delete",
                                "action": "button:delCard",
                                "link": true,
                                "text": false,
                                "dataset": "${assist.dataset}",
                                "confirm": ""
                              },
                              "id": "id${newId()}"
                            }
                          ],
                          "default": [
                            <#list assist.fields as field>
                            {
                              "id": "id${newId()}",
                              "type": "fx-table-column",
                              "props": {
                                "field": "${field.id}",
                                "label": "${field.label}"
                              }
                            }<#if field_has_next>,</#if>
                            </#list>
                          ]
                        },
                        "events": {},
                        "vars": {
                          "$ref": "$ref"
                        }
                      }
                    ]
                  }
                ]
              },
              </#list>
              {
                "id": "${newId()}",
                "type": "fx-form-panel",
                "shape": "panel",
                "props": {
                  "size": "16",
                  "backgroundColor": "--color-transparent"
                },
                "children": []
              },
              <#list layout.rList as main>
              {
                "id": "${newId()}",
                "type": "fx-split-panel",
                "shape": "panel",
                "props": {
                  "horizontal": false
                },
                "children": [
                  <#if (main.cfilters?size>0)>
                    {
                      "shape": "panel",
                      "id": "form_panel",
                      "type": "fx-form-panel",
                      "props": {
                        "colNum": 3,
                        "label": "查询条件",
                        "paddingLeft": 16,
                        "paddingRight": 16,
                        "size": "56",
                        "alignY": "center"
                      },
                      "children": [
                      <#list main.cfilters as cfilters>
                        {
                          "id": "id${newId()}",
                          "type": "${cfilters.editor}",
                          "props": {
                            "label": "${cfilters.label}",
                            "maxlength": 50,
                            "placeholder": "请输入${cfilters.label}",
                            "labelWidth": 100,
                            "affixError": false
                          },
                          "events": {}
                        },
                      </#list>
                        {
                          "id": "id${newId()}",
                          "type": "fx-button-group",
                          "props": {
                            "menus": [],
                            "dataset": "${main.dataset}"
                          },
                          "slots": {
                            "default": [
                              {
                                "type": "fx-button",
                                "props": {
                                  "label": "重置",
                                  "leftIcon": "clear",
                                  "action": "button:reset"
                                },
                                "id": "id${newId()}"
                              },
                              {
                                "type": "fx-button",
                                "props": {
                                  "label": "查询",
                                  "leftIcon": "search",
                                  "type": "primary",
                                  "action": "button:loadList",
                                  "linkType": ""
                                },
                                "id": "id${newId()}"
                              }
                              <#if (main.sfilters?size>0)>
                                ,{
                                  "id": "id${newId()}",
                                  "type": "fx-button",
                                  "props": {
                                    "label": "高级筛选",
                                    "leftIcon": "hamburger-button",
                                    "action": "button:link",
                                    "link": true,
                                    "linkType": "drawer",
                                    "fxLink": "dialog:rQueryDialog"
                                  }
                                }
                              </#if>
                            ]
                          }
                        }
                      ]
                    },
                    {
                      "id": "${newId()}",
                      "type": "fx-form-panel",
                      "shape": "panel",
                      "props": {
                        "label": "间隔",
                        "size": "16",
                        "backgroundColor": "--color-transparent"
                      },
                      "children": []
                    },
                  </#if>
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "label": "${param.rListTitle}",
                      "size": "50",
                      "colNum": 2,
                      "alignY": "center",
                      "paddingLeft": 16,
                      "paddingRight": 16
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-title",
                        "props": {
                          "label": "${param.rListTitle}"
                        }
                      },
                      {
                        "id": "id${newId()}",
                        "type": "fx-button-group",
                        "props": {
                          "menus": [],
                          "textAlign": "right",
                          "dataset": "${main.dataset}"
                        },
                        "slots": {
                          "default": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "新增",
                                "leftIcon": "plus",
                                "type": "primary",
                                "action": "button:addCard",
                                "linkType": "dialog",
                                "fxLink": "dialog:rCardDialog",
                                "fxLink_text": "${param.rCardTitle}",
                                "preAction": ""
                              },
                              "id": "id${newId()}"
                            }
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                      "label": "表格区",
                      "colNum": 0,
                      "paddingLeft": 16,
                      "paddingRight": 16
                    },
                    "children": [
                      {
                        "id": "id${newId()}",
                        "type": "fx-table",
                        "props": {
                          "label": "表格",
                          "border": true,
                          "stripe": true,
                          "showHeader": true,
                          "fit": true,
                          "dataset": "${main.dataset}"
                        },
                        "slots": {
                          "button": [
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "编辑",
                                "type": "primary",
                                "leftIcon": "edit",
                                "action": "button:editCard",
                                "link": false,
                                "text": true,
                                "linkType": "dialog",
                                "fxLink": "dialog:rCardDialog",
                                "fxLink_text": "${param.rCardTitle}"
                              },
                              "id": "id${newId()}"
                            },
                            {
                              "type": "fx-button",
                              "props": {
                                "label": "删除",
                                "type": "danger",
                                "leftIcon": "delete",
                                "action": "button:delCard",
                                "link": false,
                                "text": true,
                                "preAction": ""
                              },
                              "id": "id${newId()}"
                            }
                          ],
                          "default": [
                            <#list main.fields as field>
                            {
                              "id": "id${newId()}",
                              "type": "fx-table-column",
                              "props": {
                                "field": "${field.id}",
                                "label": "${field.label}"
                              }
                            }<#if field_has_next>,</#if>
                            </#list>
                          ]
                        },
                        "events": {}
                      }
                    ]
                  }
                ]
              }
              </#list>
            ]
          },
          {
            "shape": "panel",
            "id": "fx-form-panel",
            "type": "fx-split-panel",
            "props": {
              "shadow": "",
              "size": 24
            },
            "children": []
          }
        ]
      }
    },
    <#list layout.lCard as lDialog>
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-dialog",
        "props": {
      <#if (param.lCardTitle == "")>
          "title": "左表卡片",
      <#else>
          "title": "${param.lCardTitle}",
      </#if>
          "key": "lCardDialog",
          "closeOnClickModal": false
        },
        "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 = lDialog.fields>
              <#assign col = param.lCardCol>
              <#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": "56",
              "paddingRight": 10,
              "alignY": "center"
            },
            "children": [
              {
                "id": "id${newId()}",
                "type": "fx-button-group",
                "props": {
                  "menus": [],
                  "textAlign": "right",
                  "dataset": "${lDialog.dataset}"
                },
                "slots": {
                  "default": [
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "保存",
                        "leftIcon": "save",
                        "type": "success",
                        "action": "button:saveCard"
                      },
                      "id": "id${newId()}"
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "关闭",
                        "leftIcon": "close",
                        "type": "",
                        "action": "button:closeDialog"
                      },
                      "id": "id${newId()}"
                    }
                  ]
                }
              }
            ]
          }
        ]
      }
    },
    </#list>
    <#list layout.rCard as rDialog>
    {
      "page": {
        "id": "id${newId()}",
        "type": "fx-dialog",
        "props": {
          <#if (param.rCardTitle == "")>
            "title": "右表卡片",
          <#else>
            "title": "${param.rCardTitle}",
          </#if>
          "key": "rCardDialog",
          "closeOnClickModal": false
        },
        "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 = rDialog.fields>
              <#assign col = param.rCardCol>
              <#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": "56",
              "paddingRight": 10,
              "alignY": "center"
            },
            "children": [
              {
                "id": "id${newId()}",
                "type": "fx-button-group",
                "props": {
                  "menus": [],
                  "textAlign": "right",
                  "dataset": "${rDialog.dataset}"
                },
                "slots": {
                  "default": [
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "保存",
                        "leftIcon": "save",
                        "type": "success",
                        "action": "button:saveCard"
                      },
                      "id": "id${newId()}"
                    },
                    {
                      "type": "fx-button",
                      "props": {
                        "label": "关闭",
                        "leftIcon": "close",
                        "type": "",
                        "action": "button:closeDialog"
                      },
                      "id": "id${newId()}"
                    }
                  ]
                }
              }
            ]
          }
        ]
      }
    }
    </#list>
    <#list layout.lList as lQDialog>
      <#assign group = lQDialog >
      <#assign dialogKey = "lQueryDialog">
      <#assign dialogTitle = "左列表高级筛选">
      <#if (group.sfilters?size>0)>
        <#include "incModel/inc_query_sfilters.ftl"/>
      </#if>
    </#list>
    <#list layout.rList as rQDialog>
      <#assign group = rQDialog >
      <#assign dialogKey = "rQueryDialog">
      <#assign dialogTitle = "右列表高级筛选">
      <#if (group.sfilters?size>0)>
        <#include "incModel/inc_query_sfilters.ftl"/>
      </#if>
    </#list>
  ],
  "model": [
    <#list datasets as dataset>
    <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
}
