|
|
@@ -0,0 +1,426 @@ |
|
|
|
{ |
|
|
|
"version": 6, |
|
|
|
"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": "never", |
|
|
|
"size": "1200" |
|
|
|
}, |
|
|
|
"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", |
|
|
|
"backgroundImage": "", |
|
|
|
"size": "50" |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-button-group", |
|
|
|
"props": { |
|
|
|
"menus": [] |
|
|
|
}, |
|
|
|
"slots": { |
|
|
|
"default": [ |
|
|
|
{ |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "返回", |
|
|
|
"leftIcon": "left", |
|
|
|
"action": "button:return", |
|
|
|
"text": false, |
|
|
|
"link": true, |
|
|
|
"type": "primary", |
|
|
|
"size": "large" |
|
|
|
}, |
|
|
|
"id": "${newId()}" |
|
|
|
} |
|
|
|
], |
|
|
|
"dropdown": [] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"alignY": "center", |
|
|
|
"size": "200", |
|
|
|
"backgroundImage": "", |
|
|
|
"paddingLeft": 10 |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-title", |
|
|
|
"props": { |
|
|
|
"label": "${title}" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"alignY": "center", |
|
|
|
"backgroundImage": "", |
|
|
|
"paddingRight": 32 |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-button-group", |
|
|
|
"props": { |
|
|
|
"menus": [], |
|
|
|
"textAlign": "right" |
|
|
|
}, |
|
|
|
"slots": { |
|
|
|
"default": [ |
|
|
|
{ |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "删除", |
|
|
|
"leftIcon": "delete", |
|
|
|
"type": "", |
|
|
|
"action": "button:remove" |
|
|
|
}, |
|
|
|
"id": "${newId()}" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "新增", |
|
|
|
"type": "primary", |
|
|
|
"linkType": "curr", |
|
|
|
"leftIcon": "plus" |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
"dropdown": [] |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"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-split-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"horizontal": false, |
|
|
|
"scroll": true, |
|
|
|
"tab": false |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"size": "10", |
|
|
|
"backgroundColor": "--color-transparent" |
|
|
|
}, |
|
|
|
"children": [] |
|
|
|
}, |
|
|
|
<#list layout.c1 as group> |
|
|
|
|
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"size": "48", |
|
|
|
"label": "${group.label}", |
|
|
|
"colNum": 2, |
|
|
|
"alignY": "center", |
|
|
|
"paddingLeft": 32, |
|
|
|
"paddingRight": 32, |
|
|
|
"shadow": "", |
|
|
|
"backgroundImage": "bgImg-region-title" |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-title", |
|
|
|
"props": { |
|
|
|
"label": "${group.label}", |
|
|
|
"fontSize": 16, |
|
|
|
"color": "#01070D", |
|
|
|
"fontWeight": "bold", |
|
|
|
"showPrefix": false, |
|
|
|
"prefixWidth": 5, |
|
|
|
"prefixHeight": 24, |
|
|
|
"prefixColor": "#1E90FF" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
<#if (group.type == "card")> |
|
|
|
{ |
|
|
|
"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": "0", |
|
|
|
"gridTemplateColumns": "1fr 1fr 1fr", |
|
|
|
"paddingTop": 32 |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
<#list group.fields as field> |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-${field.editor}", |
|
|
|
"props": { |
|
|
|
"label": "${field.label}", |
|
|
|
"type": "text", |
|
|
|
"dataset": "${field.dataset}", |
|
|
|
"required": "${field.required}", |
|
|
|
"field": "${field.id}", |
|
|
|
"placeholder": "请输入内容", |
|
|
|
"labelWidth": 150, |
|
|
|
"readonly": "${field.readonly}", |
|
|
|
"affixError": true |
|
|
|
}, |
|
|
|
"events": {} |
|
|
|
}<#if field_has_next>,</#if> |
|
|
|
</#list> |
|
|
|
] |
|
|
|
}, |
|
|
|
<#elseif (group.type == "list")> |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"size": "400", |
|
|
|
"label": "列表", |
|
|
|
"colNum": 0, |
|
|
|
"paddingLeft": 20, |
|
|
|
"paddingRight": 20, |
|
|
|
"shadow": "", |
|
|
|
"paddingTop": 0 |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-table", |
|
|
|
"props": { |
|
|
|
"label": "表格", |
|
|
|
"border": true, |
|
|
|
"stripe": true, |
|
|
|
"showHeader": true, |
|
|
|
"fit": true, |
|
|
|
"dataset": "${group.dataset}", |
|
|
|
"actionWidth": 150 |
|
|
|
}, |
|
|
|
"slots": { |
|
|
|
"default": [ |
|
|
|
<#list group.fields as field> |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-table-column", |
|
|
|
"props": { |
|
|
|
"field": "${field.id}", |
|
|
|
"label": "${field.label}" |
|
|
|
} |
|
|
|
}<#if field_has_next>,</#if> |
|
|
|
</#list> |
|
|
|
], |
|
|
|
"button": [ |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "编辑", |
|
|
|
"type": "text", |
|
|
|
"leftIcon": "edit", |
|
|
|
"action": "button:edit", |
|
|
|
"dataset": "${group.dataset}", |
|
|
|
"link": true, |
|
|
|
"linkType": "", |
|
|
|
"nextAction": "", |
|
|
|
"fxLink": "" |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "删除", |
|
|
|
"type": "text", |
|
|
|
"leftIcon": "delete-themes", |
|
|
|
"action": "button:remove", |
|
|
|
"preAction": "", |
|
|
|
"link": true, |
|
|
|
"confirm": "" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
"events": {} |
|
|
|
} |
|
|
|
] |
|
|
|
}, |
|
|
|
</#if> |
|
|
|
{ |
|
|
|
"id": "${newId()}", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"shape": "panel", |
|
|
|
"props": { |
|
|
|
"size": "10", |
|
|
|
"backgroundColor": "transparent" |
|
|
|
}, |
|
|
|
"children": [] |
|
|
|
}<#if group_has_next>,</#if> |
|
|
|
</#list> |
|
|
|
] |
|
|
|
}, |
|
|
|
{ |
|
|
|
"shape": "panel", |
|
|
|
"id": "form_panel", |
|
|
|
"type": "fx-form-panel", |
|
|
|
"props": { |
|
|
|
"colNum": 3, |
|
|
|
"paddingX": 5, |
|
|
|
"paddingY": 5, |
|
|
|
"size": "56", |
|
|
|
"alignX": "", |
|
|
|
"alignY": "center", |
|
|
|
"shadow": "always" |
|
|
|
}, |
|
|
|
"children": [ |
|
|
|
{ |
|
|
|
"id": "id${newId()}", |
|
|
|
"type": "fx-button-group", |
|
|
|
"props": { |
|
|
|
"showDropdown": false, |
|
|
|
"textAlign": "center" |
|
|
|
}, |
|
|
|
"slots": { |
|
|
|
"default": [ |
|
|
|
{ |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "重置", |
|
|
|
"leftIcon": "", |
|
|
|
"type": "", |
|
|
|
"action": "button:add", |
|
|
|
"linkType": "curr" |
|
|
|
}, |
|
|
|
"id": "id${newId()}" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "保存", |
|
|
|
"leftIcon": "", |
|
|
|
"type": "primary", |
|
|
|
"action": "button:save" |
|
|
|
}, |
|
|
|
"id": "id${newId()}" |
|
|
|
}, |
|
|
|
{ |
|
|
|
"type": "fx-button", |
|
|
|
"props": { |
|
|
|
"label": "保存并新增", |
|
|
|
"leftIcon": "", |
|
|
|
"action": "button:return", |
|
|
|
"type": "primary" |
|
|
|
}, |
|
|
|
"id": "id${newId()}" |
|
|
|
} |
|
|
|
], |
|
|
|
"dropdown": [] |
|
|
|
}, |
|
|
|
"layout": { |
|
|
|
"row": 3, |
|
|
|
"col": 3 |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
], |
|
|
|
"model": [ |
|
|
|
<#list datasets as dataset> |
|
|
|
<#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if> |
|
|
|
</#list> |
|
|
|
], |
|
|
|
"option": { |
|
|
|
"widgetRef": [${widgetRef}], |
|
|
|
"vars": [] |
|
|
|
} |
|
|
|
} |