From e5ad1f548fa6ca83c064ee1f0f3b81d59d611fe5 Mon Sep 17 00:00:00 2001 From: xiaxl Date: Mon, 18 Jul 2022 10:13:51 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=BC=B9=E5=87=BA=E6=A1=86=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bpm/src/main/resources/static/template/index.yaml | 13 +++++++------ .../src/main/resources/static/template/model_list_list.ftl | 8 ++++---- 2 files changed, 11 insertions(+), 10 deletions(-) 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 95d5c5b..add91d8 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/index.yaml +++ b/smtweb-framework/bpm/src/main/resources/static/template/index.yaml @@ -88,7 +88,7 @@ model: type: 'list' hasGroup: false - name: 'c2' - label: '附列表' + label: '副列表' type: 'list' hasGroup: false - name: 'c3' @@ -96,7 +96,7 @@ model: type: 'card' hasGroup: false - name: 'c4' - label: '附编辑卡片' + label: '副编辑卡片' type: 'card' hasGroup: false # 变量 @@ -121,23 +121,24 @@ model: type: 'input' label: '主卡片标题' desc: '请选择主弹窗卡片标题' + is_isolation: 'true' - name: 'listDs_assist' type: 'ds' - label: '附列表数据集' + label: '副列表数据集' desc: '请选择附列表数据集' - name: 'editDs_assist' type: 'ds' - label: '附卡片数据集' + label: '副卡片数据集' desc: '请选择弹窗附列表卡片数据集' - name: 'assist_col' type: 'number' - label: '附卡片列数' + label: '副卡片列数' desc: '请选择弹窗附列表卡片列数(1或2)' - name: 'editDs_assist_title' type: 'input' - label: '附卡片标题' + label: '副卡片标题' desc: '请选择附弹窗卡片标题' \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl index b45816a..7978d5f 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl +++ b/smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl @@ -486,8 +486,8 @@ "id": "id${newId()}", "type": "fx-dialog", "props": { - <#if (assist_dialog.label == "")> - "title": "附卡片", + <#if (param.editDs_assist_title == "")> + "title": "副卡片", <#else> "title": "${param.editDs_assist_title}", @@ -595,8 +595,8 @@ "id": "id${newId()}", "type": "fx-dialog", "props": { - <#if (main_dialog.label == "")> - "title": "附卡片", + <#if (param.editDs_main_title == "")> + "title": "主卡片", <#else> "title": "${param.editDs_main_title}", From cb4011802723da5b9b7a13d0f5ef486672243923 Mon Sep 17 00:00:00 2001 From: xiaxl Date: Mon, 18 Jul 2022 17:48:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E4=B8=AA?= =?UTF-8?q?=E6=A0=91=E5=8A=A0=E5=88=97=E8=A1=A8=E7=9A=84=E6=A8=A1=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../static/template/incModel/inc_list_query.ftl | 1 + .../src/main/resources/static/template/index.yaml | 40 +- .../resources/static/template/model_tree_list.ftl | 467 +++++++++++++++++++++ 3 files changed, 507 insertions(+), 1 deletion(-) create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl index 65df06e..0b046f8 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl +++ b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl @@ -25,6 +25,7 @@ "placeholder": "请输入查询内容", "labelWidth": 100, + "affixError": false, "dataset": "${filter.dataset}", "field": "${filter.id}", "name": "${filter.name}" 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 add91d8..a9b4bcb 100644 --- a/smtweb-framework/bpm/src/main/resources/static/template/index.yaml +++ b/smtweb-framework/bpm/src/main/resources/static/template/index.yaml @@ -141,4 +141,42 @@ model: name: 'editDs_assist_title' type: 'input' label: '副卡片标题' - desc: '请选择附弹窗卡片标题' \ No newline at end of file + desc: '请选择附弹窗卡片标题' + - + name: 'model_tree_list' + label: '左侧树+列表(含卡片)' + # list/card/view + type: 'list' + # 布局 + layout: + - + name: 'c1' + label: '简单列表' + type: 'list' + hasGroup: false + - name: 'c2' + label: '编辑卡片' + type: 'card' + hasGroup: false + # 变量 + param: + - + name: 'queryDs' + type: 'ds' + label: '列表数据集' + desc: '请选择列表数据集' + - + name: 'editDs' + type: 'ds' + label: '卡片数据集' + desc: '请选择弹窗卡片数据集' + - + name: 'editTitle' + type: 'input' + label: '卡片标题' + desc: '请选择弹窗卡片标题' + - + name: 'col' + type: 'number' + label: '弹窗卡片列数' + desc: '请选择弹窗卡片列数(1或2)' \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl new file mode 100644 index 0000000..d151420 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl @@ -0,0 +1,467 @@ +{ + "version": 6, + <#list layout.c1 as group> + "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": [ + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false, + "size": "300" + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "56", + "alignY": "center", + "backgroundImage": "bgImg-region-title", + "paddingLeft": 32, + "colNum": 2, + "gridTemplateColumns": "", + "paddingRight": 32 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-title", + "props": { + "label": "苹果树" + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0" + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-divider", + "props": { + "label": "", + "contentPosition": "center", + "direction": "horizontal" + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "", + "colNum": 0, + "align": "full", + "paddingTop": 10, + "paddingLeft": 10, + "paddingRight": 10 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-tree", + "props": { + "defaultExpandAll": true, + "expandOnClickNode": false, + "filterShow": true, + "filterPlaceholder": "查询", + "dataset": "ds_18210085a45", + "field": "fid18210085a51", + + "label": "编码" + }, + "events": {} + } + ] + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "10", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false + }, + "children": [ + <#list group.cfilters as cfilters> + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 3, + "label": "查询条件", + "size": "80", + "alignY": "center" + }, + "children": [ + + { + "id": "id${newId()}", + "type": "fx-${cfilters.editor}", + "props": { + "label": "${cfilters.label}", + "type": "text", + "maxlength": 50, + "placeholder": "请输入内容", + "labelWidth": 100, + "affixError": false + }, + "events": {} + }, + + { + "id": "${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "showDropdown": false + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "search", + "type": "primary", + "action": "button:search", + "linkType": "", + "dataset": "${param.queryDs}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "clear", + "action": "button:reset" + }, + "id": "id${newId()}" + } + ], + "dropdown": [] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "label": "间隔", + "size": "10", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "label": "表格标题区", + "size": "68", + "backgroundImage": "bgImg-region-title", + "colNum": 2, + "alignY": "center", + "paddingLeft": 32, + "paddingRight": 32 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-title", + "props": { + "label": "${group.label}" + } + }, + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "right", + "showDropdown": false + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "新增", + "leftIcon": "plus", + "type": "primary", + "action": "button:add", + "linkType": "dialog", + "dataset": "", + "fxLink": "dialog:editMainDialog", + "fxLink_text": "卡片一号", + "preAction": "" + }, + "id": "id${newId()}" + } + ], + "dropdown": [] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "label": "表格区", + "colNum": 0 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-table", + "props": { + "label": "表格", + "border": true, + "stripe": true, + "showHeader": true, + "fit": true, + "dataset": "${param.queryDs}", + "actionWidth": 150 + }, + "slots": { + "button": [ + { + "type": "fx-button", + "props": { + "label": "编辑", + "type": "primary", + "leftIcon": "edit", + "action": "button:edit", + "link": true, + "dataset": "${param.editDs}", + "linkType": "dialog", + "fxLink": "dialog:editMainDialog", + "fxLink_text": "" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "type": "primary", + "leftIcon": "delete", + "action": "button:remove", + "link": true, + "dataset": "${param.editDs}", + "preAction": "" + }, + "id": "id${newId()}" + } + ], + "default": [ + <#if (group.fields?size>0)> + <#list group.fields as col> + { + "id": "id${newId()}", + "type": "fx-table-column", + "props": { + "field": "${col.id}", + "label": "${col.label}" + } + }<#if col_has_next>, + + + ] + }, + "events": {} + } + ] + } + ] + } + ] + }, + { + "shape": "panel", + "id": "fx-form-panel", + "type": "fx-split-panel", + "props": { + "shadow": "", + "size": 24 + }, + "children": [] + } + ] + } + }, + <#list layout.c2 as main_dialog> + { + "page": { + "id": "id${newId()}", + "type": "fx-dialog", + "props": { + <#if (param.editTitle == "")> + "title": "卡片一号", + <#else> + "title": "${param.editTitle}", + + "key": "editMainDialog", + "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 = main_dialog.fields> + <#assign col = param.col> + <#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" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "保存", + "leftIcon": "save", + "type": "success", + "action": "button:save", + "dataset": "${param.editDs}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "关闭", + "leftIcon": "close", + "type": "", + "action": "button:closeDialog", + "nextAction": "button:search" + }, + "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