From 46f80dc6784e9b271a3dc2c89d8a574dc517f8e7 Mon Sep 17 00:00:00 2001 From: xiaxl Date: Thu, 21 Jul 2022 16:05:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=82=B9=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/template/incModel/inc_card_group.ftl | 107 +++++++++++++++++ .../src/main/resources/static/template/index.yaml | 4 +- .../resources/static/template/model_group_card.ftl | 127 +-------------------- .../resources/static/template/model_point_card.ftl | 114 +----------------- 4 files changed, 114 insertions(+), 238 deletions(-) create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl new file mode 100644 index 0000000..b405113 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl @@ -0,0 +1,107 @@ +<#if (group.type == "card")> + { + "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>, + + ] + }, +<#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>, + + ], + "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": {} + } + ] + }, + \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/index.yaml b/smtweb-framework/bpm/src/main/resources/static/template/index.yaml index d3a484f..0603a43 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/index.yaml +++ b/smtweb-framework/bpm/src/main/resources/static/template/index.yaml @@ -58,7 +58,7 @@ model: desc: '请选择弹窗卡片列数(1或2)' - name: 'model_list_list' - label: '双列表(主+副)' + label: '主副列表(含卡片)' # list/card/view type: 'list' # 布局 @@ -125,7 +125,7 @@ model: desc: '请选择附弹窗卡片标题' - name: 'model_tree_list' - label: '左侧树+列表(含卡片)' + label: '树目录列表(含卡片)' # list/card/view type: 'list' # 布局 diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl index 5738034..4788346 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl +++ b/smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl @@ -282,132 +282,7 @@ } ] }, - <#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>, - - ] - }, - <#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>, - - ], - "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": {} - } - ] - }, - + <#include "incModel/inc_card_group.ftl"/> { "id": "${newId()}", "type": "fx-form-panel", diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl index f1a2dcb..b03fd1b 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl +++ b/smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl @@ -231,113 +231,7 @@ } ] }, - <#if (group.type == "card")> - { - "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>, - - ] - }, - <#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>, - - ], - "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": {} - } - ] - }, - + <#include "incModel/inc_card_group.ftl"/> { "id": "${newId()}", @@ -471,7 +365,7 @@ "action": "button:add", "linkType": "curr" }, - "id": "id${newId()}", + "id": "id${newId()}" }, { "type": "fx-button", @@ -481,7 +375,7 @@ "type": "primary", "action": "button:save" }, - "id": "id${newId()}", + "id": "id${newId()}" }, { "type": "fx-button", @@ -491,7 +385,7 @@ "action": "button:return", "type": "primary" }, - "id": "id${newId()}", + "id": "id${newId()}" } ], "dropdown": []