From 8cfa77de373a30482b29cd296a1aaccaffacc15a Mon Sep 17 00:00:00 2001 From: xiaxl Date: Wed, 22 Jun 2022 09:07:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E9=A2=84=E7=BD=AEli?= =?UTF-8?q?st=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/template/index.yaml | 10 +- .../main/resources/static/template/model_list1.ftl | 387 +++++++++++++++++++++ 2 files changed, 392 insertions(+), 5 deletions(-) create mode 100644 smtweb-system/sw-system-bpm/src/main/resources/static/template/model_list1.ftl diff --git a/smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml b/smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml index 55ec5fa..a5134b8 100644 --- a/smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml +++ b/smtweb-system/sw-system-bpm/src/main/resources/static/template/index.yaml @@ -1,6 +1,6 @@ model: - - name: 'model_list' + name: 'model_list1' label: '简单列表' # list/card/view type: 'list' @@ -12,10 +12,10 @@ model: type: 'list' hasGroup: false # 变量 -# param: -# - -# name: 'p1' -# type: 'ds' + param: + - + name: 'queryDs' + type: 'ds' - name: 'model_card' label: '简单卡片' diff --git a/smtweb-system/sw-system-bpm/src/main/resources/static/template/model_list1.ftl b/smtweb-system/sw-system-bpm/src/main/resources/static/template/model_list1.ftl new file mode 100644 index 0000000..93a747d --- /dev/null +++ b/smtweb-system/sw-system-bpm/src/main/resources/static/template/model_list1.ftl @@ -0,0 +1,387 @@ +{ +<#list layout.c1 as group> + "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": "" + }, + "children": [ + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 3, + "name": "query", + "label": "按钮区", + "size": "80", + "shadow": "", + "alignY": "center", + "paddingRight": 10 + }, + "children": [ + + <#if (group.cfilters?size>0)> + <#assign fields = group.cfilters> + <#list fields as filter> + { + "id": "id${newId()}", + "type": "fx-${filter.editor}", + "props": { + "label": "${filter.label}", + "type": "text", + <#if filter.maxlength gt 0> + "maxlength": ${filter.maxlength}, + + "placeholder": "请输入查询内容", + "labelWidth": 100, + "dataset": "${filter.dataset}", + "field": "${filter.id}", + "name": "${filter.name}" + }, + "events": {} + }, + + + + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "clear", + "type": "", + "action": "button:reset", + "dataset": "", + "link": false, + "linkType": "" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "search", + "type": "primary", + "action": "button:search", + "dataset": "${param.queryDs}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "高级筛选", + "leftIcon": "hamburger-button", + "action": "button:link", + "link": true, + "linkType": "drawer", + "fxLink": "dialog:qrueydialog" + }, + "id": "id${newId()}" + } + ] + }, + "layout": { + "col": 1 + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "20", + "backgroundColor": "transparent" + }, + "children": [] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "68", + "label": "查询条件", + "colNum": 2, + "alignY": "center", + "paddingLeft": 32, + "paddingRight": 32, + "shadow": "" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-title", + "props": { + "label": "${title}", + "fontSize": 16, + "color": "#01070D", + "fontWeight": "bold", + "showPrefix": false, + "prefixWidth": 5, + "prefixHeight": 24, + "prefixColor": "#1E90FF" + } + }, + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "新增", + "leftIcon": "plus", + "type": "primary", + "action": "button:add", + "link": false, + "linkType": "", + "fxLink": "", + "dataset": "" + }, + "id": "id${newId()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "", + "label": "列表", + "colNum": 0, + "paddingLeft": 32, + "paddingRight": 32, + "shadow": "" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-table", + "props": { + "label": "表格", + "border": true, + "stripe": true, + "showHeader": true, + "fit": true, + "dataset": "${group.dataset}", + "actionWidth": 150 + }, + "slots": { + <#if (group.fields?size>0)> + <#assign fields = group.fields> + "default": [ + <#list fields as col> + { + "id": "id${newId()}", + "type": "fx-table-column", + "props": { + "field": "${col.id}", + "label": "${col.label}" + } + }<#if col_has_next>, + + ], + + "button": [ + { + "type": "fx-button", + "props": { + "label": "编辑", + "type": "text", + "leftIcon": "edit", + "action": "button:edit", + "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": "" + }, + "id": "id${newId()}" + } + ] + }, + "events": {} + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "24", + "backgroundColor": "transparent" + }, + "children": [] + } + ] + } + }, + { + "page": { + "id": "id${newId()}", + "type": "fx-dialog", + "props": { + "title": "查询条件", + "key": "qrueydialog", + "destroyOnClose": true, + "width": "20%", + "height": "" + }, + "events": { + } + }, + "graph": { + "shape": "panel", + "id": "root_panel", + "type": "fx-split-panel", + "props": { + "horizontal": false, + "shadow": "never" + }, + "children": [ + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 1, + "name": "query", + "label": "查询条件", + "size": "", + "paddingTop": 20, + "scroll": true + }, + "children": [ + <#if (group.sfilters?size>0)> + <#assign fields = group.sfilters> + <#list fields as filter> + { + "id": "id${newId()}", + "type": "fx-${filter.editor}", + "props": { + "label": "${filter.label}", + "type": "text", + <#if filter.maxlength gt 0> + "maxlength": ${filter.maxlength}, + + "placeholder": "请输入查询内容", + "labelWidth": 100, + "dataset": "${filter.dataset}", + "field": "${filter.id}", + "name": "${filter.name}" + }, + "events": {} + } + <#if filter_has_next>, + + + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "56", + "alignY": "center" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "center" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "clear", + "action": "button:return" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "save", + "type": "success", + "action": "button:search", + "dataset": "${param.queryDs}" + }, + "id": "id${newId()}" + } + ] + } + } + ] + } + ] + } + } + ], + +"model": [ +<#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + +], +"option": { +"widgetRef": [${widgetRef}], +"vars": [] +} +} \ No newline at end of file