{
<#list layout.list as group>
  "form": [
    {
        "page": {
            "id": "${newId()}",
            "type": "fx-page",
            "props": {
                "title": "${title}",
                "key": "${newId()}"
            }
        },
        "graph": {
            "shape": "panel",
            "id": "root_panel",
            "type": "fx-split-panel",
            "props": {
                "horizontal": true,
                "shadow": ""
            },
            "children": [
                {
                    "id": "${newId()}",
                    "type": "fx-split-panel",
                    "shape": "panel",
                    "props": {
                        "size": "300",
                        "horizontal": false,
                        "shadow": ""
                    },
                    "children": [
                        {
                            "id": "${newId()}",
                            "type": "fx-split-panel",
                            "shape": "panel",
                            "props": {
                                "size": "",
                                "horizontal": false,
                                "name": "left"
                            },
                            "children": [
                                {
                                    "id": "${newId()}",
                                    "type": "fx-form-panel",
                                    "shape": "panel",
                                    "props": {
                                        "size": "",
                                        "colNum": 0,
                                        "paddingTop": 10,
                                        "paddingLeft": 10,
                                        "paddingRight": 10,
                                        "scroll": true
                                    },
                                    "children": [
                                        {
                                            "id": "${newId()}",
                                            "type": "fx-tree",
                                            "props": {
                                                "defaultExpandAll": false,
                                                "expandOnClickNode": false,
                                                "filterShow": true,
                                                "filterPlaceholder": "查询",
                                                "createVirtualRoot": false,
                                                "virtualRootLabel": "顶级虚拟节点",
                                                "dataset": "${group.dataset}"
                                            },
                                            "events": {}
                                        }
                                    ]
                                }
                            ]
                        },
                        {
                            "id": "${newId()}",
                            "type": "fx-form-panel",
                            "shape": "panel",
                            "props": {
                                "size": "15",
                                "backgroundColor": "--color-transparent"
                            },
                            "children": []
                        }
                    ]
                },
                {
                    "id": "${newId()}",
                    "type": "fx-form-panel",
                    "shape": "panel",
                    "props": {
                        "size": "16",
                        "backgroundColor": "--color-transparent"
                    },
                    "children": []
                },
                {
                    "id": "${newId()}",
                    "type": "fx-split-panel",
                    "shape": "panel",
                    "props": {
                        "horizontal": false,
                        "name": "right"
                    },
                    "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": {
                                        "showDropdown": false,
                                        "dataset": "${group.dataset}",
                                        "textAlign": "right"
                                    },
                                    "slots": {
                                        "default": [
                                            {
                                                "type": "fx-button",
                                                "props": {
                                                    "label": "新增",
                                                    "leftIcon": "plus",
                                                    "type": "primary",
                                                    "action": "button:addCard",
                                                    "link": false,
                                                    "linkType": "curr",
                                                    <#if name?has_content && name?ends_with("List")>
                                                        "fxLink": "bpm.${name?replace("List","Card")}",
                                                    <#else>
                                                        "fxLink": "",
                                                    </#if>
                                                    "fxLink_text": "编辑卡片"
                                                    },
                                                "id": "id${newId()}",
                                                "events": {}
                                            }
                                        ],
                                        "dropdown": []
                                    }
                                }
                            ]
                        },
                        <#include "incModel/inc_list_table.ftl"/>
                        {
                            "id": "${newId()}",
                            "type": "fx-form-panel",
                            "shape": "panel",
                            "props": {
                                "size": "16",
                                "backgroundColor": "transparent"
                            },
                            "children": []
                        }
                    ]
                }
            ]
        }
    }
    <#if (group.sfilters?size>0)>
        <#include "incModel/inc_query_sfilters.ftl"/>
    </#if>
  ],
  "model": [
    <#list datasets as dataset>
        <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
    </#list>
  ],
  "option": {
    "widgetRef": [${widgetRef}],
    "vars": []
  }
</#list>
}
