From 532b614c3740f4089d20bf45b245d0c44f9c0c11 Mon Sep 17 00:00:00 2001 From: zhenggm Date: Fri, 12 Aug 2022 20:56:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9A=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cc/smtweb/system/bpm/util/CodeGenerator.java | 7 +- .../bpm/web/engine/dynPage/DynPageLoadHandler.java | 2 +- .../model/listcard/single/LCSingleService.java | 10 + .../template/default/incModel/inc_card_group.ftl | 107 +++ .../template/default/incModel/inc_filter.ftl | 76 +++ .../static/template/default/incModel/inc_form.ftl | 33 + .../template/default/incModel/inc_grid_opt.ftl | 67 ++ .../template/default/incModel/inc_list_dialog.ftl | 75 +++ .../template/default/incModel/inc_list_query.ftl | 102 +++ .../template/default/incModel/inc_list_table.ftl | 100 +++ .../static/template/default/incModel/inc_model.ftl | 28 + .../default/incModel/inc_query_sfilters.ftl | 106 +++ .../resources/static/template/default/index.yaml | 232 +++++++ .../static/template/default/model_card.ftl | 329 ++++++++++ .../static/template/default/model_card_bak.ftl | 116 ++++ .../static/template/default/model_group_card.ftl | 376 +++++++++++ .../static/template/default/model_list.ftl | 110 ++++ .../static/template/default/model_list_card.ftl | 308 +++++++++ .../static/template/default/model_list_list.ftl | 718 +++++++++++++++++++++ .../static/template/default/model_point_card.ftl | 413 ++++++++++++ .../static/template/default/model_simple.ftl | 45 ++ .../static/template/default/model_step_card.ftl | 414 ++++++++++++ .../static/template/default/model_tree_list.ftl | 433 +++++++++++++ .../static/template/incModel/inc_card_group.ftl | 107 --- .../static/template/incModel/inc_filter.ftl | 76 --- .../static/template/incModel/inc_form.ftl | 33 - .../static/template/incModel/inc_grid_opt.ftl | 67 -- .../static/template/incModel/inc_list_dialog.ftl | 75 --- .../static/template/incModel/inc_list_query.ftl | 102 --- .../static/template/incModel/inc_list_table.ftl | 100 --- .../static/template/incModel/inc_model.ftl | 28 - .../template/incModel/inc_query_sfilters.ftl | 106 --- .../src/main/resources/static/template/index.yaml | 242 ------- .../main/resources/static/template/model_card.ftl | 329 ---------- .../resources/static/template/model_card_bak.ftl | 116 ---- .../resources/static/template/model_group_card.ftl | 376 ----------- .../main/resources/static/template/model_list.ftl | 110 ---- .../resources/static/template/model_list_card.ftl | 308 --------- .../resources/static/template/model_list_list.ftl | 718 --------------------- .../resources/static/template/model_point_card.ftl | 413 ------------ .../resources/static/template/model_simple.ftl | 45 -- .../resources/static/template/model_step_card.ftl | 414 ------------ .../resources/static/template/model_tree_list.ftl | 433 ------------- .../cc/smtweb/framework/core/common/SwConsts.java | 2 + .../cc/smtweb/framework/core/common/SwEnum.java | 14 +- smtweb-framework/core/src/main/resources/demo.json | 704 +++----------------- 46 files changed, 4323 insertions(+), 4802 deletions(-) create mode 100644 smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/single/LCSingleService.java create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_card_group.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_filter.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_form.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_grid_opt.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_dialog.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_model.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/index.yaml create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_card.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_card_bak.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_group_card.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_list.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_point_card.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_simple.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_step_card.ftl create mode 100644 smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_filter.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_dialog.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_query_sfilters.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/index.yaml delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_card_bak.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_step_card.ftl delete mode 100644 smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl diff --git a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java index c8a0fbf..de3f9f9 100644 --- a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/util/CodeGenerator.java @@ -1,5 +1,6 @@ package cc.smtweb.system.bpm.util; +import cc.smtweb.framework.core.common.SwConsts; import cc.smtweb.framework.core.exception.SwException; import cc.smtweb.framework.core.common.SwMap; import cc.smtweb.framework.core.db.DbEngine; @@ -38,7 +39,7 @@ public class CodeGenerator { protected CodeGenerator() { // templatesDir = this.getClass().getResource("/static/template").getPath(); - mapTemplate = YamlUtil.readValue(this.getClass().getResourceAsStream("/static/template/index.yaml"), SwMap.class); + mapTemplate = YamlUtil.readValue(this.getClass().getResourceAsStream("/static/template/" + SwConsts.modelPath + "/index.yaml"), SwMap.class); configuration = new Configuration(Configuration.VERSION_2_3_31); try { configuration.setClassForTemplateLoading(this.getClass(), "/static/template/"); @@ -97,7 +98,7 @@ public class CodeGenerator { public String generate(Map model, String templateName) { StringWriter out = new StringWriter(); - generate(model, templateName + ".ftl", out); + generate(model, SwConsts.modelPath + "/" + templateName + ".ftl", out); return out.getBuffer().toString(); } @@ -195,7 +196,7 @@ public class CodeGenerator { map.put("title", "thisIsATest!"); map.put("newId", new PKGenerator()); - CodeGenerator.getInstance().generate(map, "model_card.ftl", out); + CodeGenerator.getInstance().generate(map, SwConsts.modelPath + "/model_card.ftl", out); System.out.println(out.getBuffer().toString()); } } diff --git a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java index 22ef051..8f9408a 100644 --- a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java @@ -52,7 +52,7 @@ public class DynPageLoadHandler extends AbstractDynPageHandler { SwMap data = new SwMap(); afterAddBean(dataSet, data); mapRet.put(dataSet.name, DynRetBean.createBean(data)); - } else if (!SwEnum.DatasetType.ENUM.value.equals(dataSet.type)) {//非枚举 + } else {//非枚举 if (!SwEnum.DatasetType.ENUM.value.equals(dataSet.type)) SwListData listData = SwListData.create(null, 0); afterAddList(dataSet, listData); mapRet.put(dataSet.name, DynRetBean.createList(listData)); diff --git a/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/single/LCSingleService.java b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/single/LCSingleService.java new file mode 100644 index 0000000..ff9f5f4 --- /dev/null +++ b/smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/model/listcard/single/LCSingleService.java @@ -0,0 +1,10 @@ +package cc.smtweb.system.bpm.web.engine.model.listcard.single; + +import cc.smtweb.system.bpm.web.engine.dynPage.DynPageService; + +/** + * Created by Akmm at 2022-08-12 15:37 + * 单页面简单列表卡片服务类 + */ +public class LCSingleService extends DynPageService { +} diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_card_group.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_card_group.ftl new file mode 100644 index 0000000..b405113 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/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/default/incModel/inc_filter.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_filter.ftl new file mode 100644 index 0000000..f4bb800 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_filter.ftl @@ -0,0 +1,76 @@ +<#assign fields = group.cfilters> + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "paddingY": 5, + "paddingX": 10, + "size": "35", + "colNum": 2 + }, + "children": [ +<#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": [] + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "history-query", + "type": "primary", + "action": "button:search", + "dataset": "${group.dataset}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "重置", + "type": "danger", + "action": "button:reset", + "leftIcon": "figma-reset-instance" + }, + "id": "id${newId()}" + }, + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "新增", + "type": "success", + "leftIcon": "shield-add", + "action": "button:add", + "dataset": "${group.dataset}" + } + } + ] + } + } + ] + }, \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_form.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_form.ftl new file mode 100644 index 0000000..5ef0af9 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_form.ftl @@ -0,0 +1,33 @@ +<#assign fields = group.fields> + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 2, + "paddingX": 5, + "paddingY": 5, + "size": "0" + }, + "children": [ +<#list fields as field> + { + "id": "id${newId()}", + "type": "fx-${field.editor}", + "props": { + "label": "${field.label}", + "type": "text", + <#if field.maxlength gt 0> + "maxlength": ${field.maxlength}, + + "placeholder": "请输入内容", + "labelWidth": 100, + "dataset": "${field.dataset}", + "field": "${field.id}", + "name": "${field.name}" + }, + "events": {} + }<#if field_has_next>, + + ] + } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_grid_opt.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_grid_opt.ftl new file mode 100644 index 0000000..70220b4 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_grid_opt.ftl @@ -0,0 +1,67 @@ +{ + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 0, + "paddingX": 5, + "paddingY": 5, + "align": "full" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-table", + "props": { + "label": "表格", + "border": true, + "stripe": true, + "showHeader": true, + "fit": true, + "dataset": "${group.dataset}", + "actionWidth": 120 + }, + "slots": { +<#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", + "linkType": "dialog", + "dataset": "${group.dataset}" + }, + "id": "id1813718bf36" + }, + { + "type": "fx-button", + "props": { + "label": "删", + "type": "text", + "leftIcon": "delete", + "action": "button:del", + "dataset": "${group.dataset}" + }, + "id": "id${newId()}" + } + ] + }, + "events": {} + } + ] + } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_dialog.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_dialog.ftl new file mode 100644 index 0000000..5c06db7 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_dialog.ftl @@ -0,0 +1,75 @@ +<#assign col1 = col> +{ + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0", + "paddingTop": 15, + "colNum": 2 + }, + "children": [ + <#list dfields as dfield> + { + "id": "id${newId()}", + <#if (dfield.readonly = true)> + "type": "fx-text", + <#else> + "type": "fx-${dfield.editor}", + + "props": { + "label": "${dfield.label}", + "type": "text", + "dataset": "${dfield.dataset}", + "field": "${dfield.id}", + "required": "${field.required}", + <#if dfield.maxlength gt 0> + "maxlength": ${dfield.maxlength}, + + "placeholder": "请输入内容", + <#if (col1 gte 2)> + "tips": "${dfield.desc}", + + "labelWidth": 100, + <#if (dfield.readonly = true)> + "readonly": true, + <#else> + "readonly": false, + + "affixError": true + }, + "events": {} + } + <#if dfield_has_next> + + <#if (col1 lte 1 )> + <#if (dfield.desc != "")> + ,{ + "id": "id${newId()}", + "type": "fx-label", + "props": { + "label": "${dfield.desc}", + "labelWidth": 0, + "affixError": true, + "labelAlign": "left" + } + } + <#else> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + + , + + + + ] +} diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl new file mode 100644 index 0000000..1a8050b --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_query.ftl @@ -0,0 +1,102 @@ +{ + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 3, + "name": "query", + "label": "按钮区", + "size": "50", + "shadow": "", + "alignY": "center", + "paddingRight": 20, + "gridTemplateColumns": "400px 400px 1fr", + "paddingLeft": 20 + }, + "children": [ + <#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": "请输入${filter.label}", + "hideLabel": true, + "labelWidth": 100, + "affixError": false, + "dataset": "${filter.dataset}", + "field": "${filter.id}", + "name": "${filter.name}" + }, + "events": {} + }, + + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "left" + }, + "slots": { + "default": [ + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "clear", + "type": "", + "action": "button:reset", + "dataset": "${param.queryDs}", + "link": false, + "linkType": "" + } + }, + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "search", + "type": "primary", + "action": "button:search", + "dataset": "${param.queryDs}" + } + } + <#if (group.sfilters?size>0)> + ,{ + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "高级筛选", + "leftIcon": "hamburger-button", + "action": "button:link", + "link": true, + "linkType": "drawer", + "fxLink": "dialog:qrueydialog" + } + } + + ] + }, + "layout": { + "col": 1 + } +}] +}, +{ +"id": "id${newId()}", +"type": "fx-form-panel", +"shape": "panel", +"props": { +"size": "15", +"backgroundColor": "transparent" +}, +"children": [] +}, diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl new file mode 100644 index 0000000..0b2cd65 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_list_table.ftl @@ -0,0 +1,100 @@ +<#assign tmpl_Type = tmplType> +{ + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "", + "label": "列表", + "colNum": 0, + "paddingLeft": 20, + "paddingRight": 20, + "shadow": "" + }, + "children": [{ + "id": "id${newId()}", + "type": "fx-table", + "props": { + "label": "表格", + + "border": true, + "stripe": true, + "showHeader": true, + "fit": true, + "dataset": "${param.queryDs}", + "actionWidth": 120 + }, + "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": [ + <#if (tmpl_Type == "model_list")> + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "编辑", + "type": "primary", + "leftIcon": "edit", + "action": "button:edit", + "dataset": "${group.dataset}", + "text": true, + "link": false, + "linkType": "", + "nextAction": "", + "fxLink": "" + } + }, + <#elseif (tmpl_Type == "model_list_card")> + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "编辑", + "type": "primary", + "leftIcon": "edit", + "action": "button:edit", + "link": false, + "text": true, + "linkType": "dialog", + "fxLink": "dialog:editDialog", + "fxLink_text": "${param.editTitle}", + "dataset": "${param.editDs}" + } + }, + + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "删除", + "type": "danger", + "leftIcon": "delete-themes", + "action": "button:remove", + "preAction": "", + "link": false, + "text": true, + "confirm": "", + "nextAction": "button:search", + "dataset": "${param.queryDs}" + } + } + ] +}, +"events": {} +} +] +}, diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_model.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_model.ftl new file mode 100644 index 0000000..49d843c --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_model.ftl @@ -0,0 +1,28 @@ +{ + "dataset": "${dataset.id}", + "label": "${dataset.label}", + "fields": [ + <#list dataset.fields as field> + { + "id": "${field.id}", + "field": "${field.name}"<#if field.widget gt 0>, + "lookup": { + "widgetId": "${field.widget?c}", + "widgetId_text": "${field.widgetText}", + "filters": [] + } + + }<#if field_has_next>, + + ], + "filters": [ + <#list dataset.filters as field> + { + "id": "${field.id}", + "field": "${field.name!0}", + "required": ${field.required?string ("true","false")}, + "type": "input" + }<#if field_has_next>, + + ] + } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl new file mode 100644 index 0000000..da691f8 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/incModel/inc_query_sfilters.ftl @@ -0,0 +1,106 @@ +, +{ + "page": { + "id": "id${newId()}", + "type":"fx-dialog", + "props": { + "title": "查询条件", + "key": "qrueydialog", + "destroyOnClose": true, + "closeOnClickModal": 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": [ + <#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()}" + } + ] + } + } + ] + }] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/index.yaml b/smtweb-framework/bpm/src/main/resources/static/template/default/index.yaml new file mode 100644 index 0000000..9e19b9c --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/index.yaml @@ -0,0 +1,232 @@ +model: + - + name: 'model_list' + label: '简单列表' + # list/card/view + type: 'list' + # 布局 + layout: + - + name: 'c1' + label: '简单列表' + type: 'list' + hasGroup: false + # 变量 + param: + - + name: 'queryDs' + type: 'ds' + label: '列表数据集' + desc: '请选择列表数据集' + - + name: 'model_list_card' + label: '简单列表(含卡片)' + # list/card/view + type: 'list' + # 布局 + layout: + - + name: 'c1' + label: '简单列表' + type: 'list' + hasGroup: false + - name: 'c2' + label: '编辑卡片' + type: 'card' + hasGroup: false + # 变量 + param: + - + name: 'editTitle' + type: 'input' + label: '卡片标题' + desc: '请选择弹窗卡片标题' + - + name: 'col' + type: 'number' + label: '弹窗卡片列数' + desc: '请选择弹窗卡片列数(1或2)' + - + name: 'model_list_list' + label: '主副列表(含卡片)' + # list/card/view + type: 'list' + # 布局 + layout: + - + name: 'c1' + label: '主列表' + type: 'list' + hasGroup: false + - name: 'c2' + label: '副列表' + type: 'list' + hasGroup: false + - name: 'c3' + label: '主编辑卡片' + type: 'card' + hasGroup: false + - name: 'c4' + label: '副编辑卡片' + type: 'card' + hasGroup: false + # 变量 + param: + - + name: 'listDs_main' + type: 'ds' + label: '主列表数据集' + desc: '请选择主列表数据集' + - + name: 'editDs_main' + type: 'ds' + label: '主卡片数据集' + desc: '请选择弹窗主卡片数据集' + - + name: 'main_col' + type: 'number' + label: '主卡片列数' + desc: '请选择弹窗主卡片列数(1或2)' + - + name: 'editDs_main_title' + type: 'input' + label: '主卡片标题' + desc: '请选择主弹窗卡片标题' + is_isolation: 'true' + - + name: 'listDs_assist' + type: 'ds' + label: '副列表数据集' + desc: '请选择附列表数据集' + - + name: 'editDs_assist' + type: 'ds' + label: '副卡片数据集' + desc: '请选择弹窗附列表卡片数据集' + - + name: 'assist_col' + type: 'number' + label: '副卡片列数' + desc: '请选择弹窗附列表卡片列数(1或2)' + - + name: 'editDs_assist_title' + type: 'input' + label: '副卡片标题' + 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)' + - + name: 'model_card' + label: '简单卡片' + # list/card/view + type: 'card' + # 布局 + layout: + - + name: 'c1' + label: '简单卡片' + type: 'card' + hasGroup: false + # 变量 + param: + - + name: 'col' + type: 'number' + label: '列数' + desc: '请选择表单列数' + - + name: 'model_step_card' + label: '步骤卡片' + # list/card/view + type: 'card' + # 布局 + layout: + - + name: 'c1' + label: '步骤卡片' + type: 'card' + hasGroup: false + # 变量 + param: + - + name: 'col' + type: 'number' + label: '列数' + desc: '请选择表单列数(目前只支持1,2,3)' + - + name: 'model_group_card' + label: '分组卡片' + # list/card/view + type: 'card' + # 布局 + layout: + - + name: 'c1' + label: '分组卡片' + type: 'card' + hasGroup: true + param: + - + name: 'mainDs' + type: 'ds' + label: '主卡片数据集' + desc: '请选择主要卡片数据集' + - + name: 'want_point' + type: 'checkbox' + label: '添加步骤条' + desc: '勾选则添加步骤条' + - + name: 'model_point_card' + label: '分组锚点卡片' + # list/card/view + type: 'card' + # 布局 + layout: + - + name: 'c1' + label: '分组卡片' + type: 'card' + hasGroup: true + param: + - + name: 'mainDs' + type: 'ds' + label: '主卡片数据集' + desc: '请选择主要卡片数据集' \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_card.ftl new file mode 100644 index 0000000..07d1386 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_card.ftl @@ -0,0 +1,329 @@ +{ + "version": 6, + "form": [ + { + "page": { + "id": "id${newId()}", + "type": "fx-page", + "props": { + "title": "编辑", + "key": "${newId()}", + "tipsExpand": false + } + }, + "graph": { + "shape": "panel", + "id": "root_panel", + "type": "fx-split-panel", + "props": { + "horizontal": false, + "shadow": "", + "scroll": false, + "size": "", + "name": "s0" + }, + "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":"bgImg-region-title", + "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()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", + "size": "200", +"backgroundImage":"bgImg-region-title", + "paddingLeft": 10 + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-title", + "props": { + "label": "${title}" + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", +"backgroundImage":"bgImg-region-title", + "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" + } + } + ] + } + } + ] + } + ] + }, + { + "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-split-panel", + "shape": "panel", + "props": { + "size": "", + "horizontal": false, + "scroll": true, + "name": "s12" + }, + "children": [ + { + <#list layout.c1 as group> + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0", + <#if param.col lte 1> + "gridTemplateColumns": "1fr 2fr", + <#elseif param.col gte 2> + "gridTemplateColumns": "1fr 1fr 1fr", + + "paddingTop": 32 + }, + <#assign fields = group.fields> + "children": [ + <#list fields as field> + { + "id": "id${newId()}", + <#if (field.readonly = true)> + "type": "fx-text", + <#else> + "type": "fx-${field.editor}", + + "props": { + "label": "${field.label}", + "type": "text", + "dataset": "${field.dataset}", + "required": "${field.required}", + "field": "${field.id}", + <#if field.maxlength gt 0> + "maxlength": ${field.maxlength}, + + "placeholder": "请输入内容", + <#if (param.col = 2)> + "tips": "${field.desc}", + + "labelWidth": 150, + <#if (field.readonly = true)> + "readonly": true, + <#else> + "readonly": false, + + "affixError": true + }, + "events": {} + } + <#if field_has_next> + <#if (param.col lte 1 )> + <#if (field.desc != "")> + ,{ + "id": "id181d83cdb41", + "type": "fx-label", + "props": { + "label": "${field.desc}", + "labelWidth": 0, + "affixError": true, + "labelAlign": "left" + } + } + <#else> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + + <#if (param.col = 2 && ((field_index+1) % 2 = 0 ) )> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + , + + + ] + + }, + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "56", + "alignY": "center", + "paddingLeft": 150 + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-button-group", + "props": { + "menus": [] + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "保存并新增", + "type": "primary", + "action": "button:saveAndAdd", + "linkType": "curr" + }, + "id": "${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "保存", + "leftIcon": "save", + "type": "success", + "action": "button:save" + }, + "id": "${newId()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "name": "d2" + }, + "children": [] + } + ] + } + ] + } + } + ], + "model": [ + <#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_card_bak.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_card_bak.ftl new file mode 100644 index 0000000..713b23f --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_card_bak.ftl @@ -0,0 +1,116 @@ +{ + "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" + }, + "children": [ +<#list layout.c1 as group> + <#if (group.type == "list")> + <#if (group.cfilters?size>0)> + <#include "incModel/inc_filter.ftl"/> + + <#include "incModel/inc_grid_opt.ftl"/> + <#elseif (group.type == "card")> + <#include "incModel/inc_form.ftl"/> + , + +{ + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "paddingY": 3, + "paddingX": 10, + "size": 20 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "center" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "新增", + "leftIcon": "plus", + "type": "primary", + "action": "button:add" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "保存并新增", + "type": "primary", + "action": "button:saveAndAdd" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "保存", + "leftIcon": "save", + "type": "success", + "action": "button:save" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "leftIcon": "delete", + "type": "danger", + "action": "button:remove" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "返回", + "leftIcon": "return", + "action": "button:return" + }, + "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 diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_group_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_group_card.ftl new file mode 100644 index 0000000..4788346 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_group_card.ftl @@ -0,0 +1,376 @@ +{ + "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" + } + } + ] + }, + <#if (param.want_point)> + { + "id": "1821e887b9a", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", + "size": "0", + "paddingTop": 20, + "paddingLeft": 200, + "paddingRight": 200, + "paddingBottom": 20 + }, + "children": [ + { + "id": "id1821e887baf", + "type": "fx-steps", + "w": 3, + "h": 2, + "props": { + "active": 1, + "alignCenter": true + }, + "slots": { + "default": [ + { + "type": "fx-step", + "props": { + "label": "步骤一", + "description": "我是一段描述" + }, + "id": "id1821e887bb0" + }, + { + "type": "fx-step", + "props": { + "label": "步骤二", + "description": "我也是一段描述" + }, + "id": "id1821e887bb1" + }, + { + "type": "fx-step", + "props": { + "label": "步骤三", + "description": "我也也是一段描述" + }, + "id": "id1821e887bb2" + } + ] + }, + "events": {} + } + ] + }, + { + "id": "734718093699321868", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0" + }, + "children": [ + { + "id": "id734718093699321869", + "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" + } + } + ] + }, + <#include "incModel/inc_card_group.ftl"/> + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "10", + "backgroundColor": "transparent" + }, + "children": [] + }<#if group_has_next>, + + ] + }, + { + "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>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list.ftl new file mode 100644 index 0000000..78b51d3 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list.ftl @@ -0,0 +1,110 @@ +{ +<#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": [ + <#if (group.cfilters?size>0)> + <#include "incModel/inc_list_query.ftl"/> + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "50", + "label": "查询条件", + "colNum": 2, + "alignY": "center", + "paddingLeft": 20, + "paddingRight": 20, + "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": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "新增", + "leftIcon": "plus", + "type": "primary", + "action": "button:add", + "link": false, + "linkType": "", + "fxLink": "", + "dataset": "${param.queryDs}" + } + } + ] + } + } + ] + }, + <#include "incModel/inc_list_table.ftl"/> + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "15", + "backgroundColor": "transparent" + }, + "children": [] + } + ] + } + } + <#if (group.sfilters?size>0)> + <#include "incModel/inc_query_sfilters.ftl"/> + + ], + +"model": [ +<#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + +], +"option": { +"widgetRef": [${widgetRef}], +"vars": [] +} +} diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl new file mode 100644 index 0000000..728806e --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_card.ftl @@ -0,0 +1,308 @@ +{ + <#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": [ + <#if (group.cfilters?size>0)> + <#include "incModel/inc_list_query.ftl"/> + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "50", + "label": "查询条件", + "colNum": 2, + "alignY": "center", + "paddingLeft": 20, + "paddingRight": 20, + "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": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "新增", + "leftIcon": "plus", + "type": "primary", + "action": "button:add", + "link": false, + + "linkType": "dialog", + "fxLink": "dialog:editDialog", + <#if (param.editTitle == "")> + "title": "卡片demo", + <#else> + "fxLink_text": "${param.editTitle}", + + + "dataset": "${param.editDs}" + }, + "id": "id${newId()}" + } + ] + } + } + ] + }, + <#include "incModel/inc_list_table.ftl"/> + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "15", + "backgroundColor": "transparent" + }, + "children": [] + } + ] + } + } + <#if (group.sfilters?size>0)> + <#include "incModel/inc_query_sfilters.ftl"/> + + <#list layout.c2 as dialog> + ,{ + "page": { + "id": "id${newId()}", + "type": "fx-dialog", + "props": { + <#if (param.editTitle == "")> + "title": "卡片demo", + <#else> + "title": "${param.editTitle}", + + "key": "editDialog", + "fontSize": 16, + "color": "#313131", + "fontWeight": "bold", + "showPrefix": true, + "prefixWidth": 5, + "prefixHeight": 16, + "prefixColor": "#1E90FF" + }, + "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 + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0", + "paddingTop": 15, + "colNum": 2 + }, + <#assign dfields = dialog.fields> + "children": [ + <#list dfields as dfield> + { + "id": "id${newId()}", + <#if (dfield.readonly = true)> + "type": "fx-text", + <#else> + "type": "fx-${dfield.editor}", + + "props": { + "label": "${dfield.label}", + "type": "text", + "dataset": "${dfield.dataset}", + "field": "${dfield.id}", + "required": "${field.required}", + <#if dfield.maxlength gt 0> + "maxlength": ${dfield.maxlength}, + + "placeholder": "请输入${dfield.label}", + <#if (param.col gte 2)> + "tips": "${dfield.desc}", + + "labelWidth": 100, + <#if (dfield.readonly = true)> + "readonly": true, + <#else> + "readonly": false, + + "affixError": true + }, + "events": {} + } + <#if dfield_has_next> + <#if (param.col lte 1 )> + <#if (dfield.desc != "")> + ,{ + "id": "id${newId()}", + "type": "fx-label", + "props": { + "label": "${dfield.desc}", + "labelWidth": 0, + "affixError": true, + "labelAlign": "left" + } + } + <#else> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + + , + + + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": {}, + "children": [] + } + ] + }, + { + "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": "50", + "alignY": "center", + "paddingRight": 20 + }, + "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", + "action": "button:closeDialog", + "dataset": "${param.queryDs}", + "nextAction": "button:search" + }, + "id": "id${newId()}" + } + ] + } + } + ] + } + ] + } + } + ], + + "model": [ + <#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } + +} diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list.ftl new file mode 100644 index 0000000..9632154 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_list_list.ftl @@ -0,0 +1,718 @@ +{ + "version": 6, + "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": [ + <#list layout.c2 as assist> + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false, + "size": "420" + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "50", + "alignY": "center", + "backgroundImage": "bgImg-region-title", + "paddingLeft": 32, + "colNum": 2, + "gridTemplateColumns": "", + "paddingRight": 32 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-title", + "props": { + "label": "${assist.label}" + } + }, + { + "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", + "linkType": "dialog", + "link": false, + "dataset": "${param.editDs_assist}", + "fxLink": "dialog:editAssistDialog", + "fxLink_text": "${param.editDs_assist_title}" + }, + "id": "id${newId()}" + } + ] + } + } + ] + }, + { + "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": { + "alignY": "center", + "size": "50", + "gridTemplateColumns": "1fr 50px", + "paddingLeft": 32, + "paddingRight": 32 + }, + "children": [ + <#list assist.cfilters as cfilters> + { + "id": "id${newId()}", + "type": "fx-${cfilters.editor}", + "props": { + "label": "${cfilters.label}", + "type": "text", + "maxlength": 50, + "placeholder": "请输入${cfilters.label}", + "labelWidth": 150, + "affixError": false, + "hideLabel": true, + "leftIcon": "", + "dataset": "${cfilters.dataset}", + "field": "${cfilters.id}" + }, + "events": {} + }, + + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "搜索", + "leftIcon": "", + "action": "button:search", + "link": true, + "type": "primary", + "dataset": "${param.listDs_assist}" + }, + "id": "id${newId()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "", + "colNum": 0 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-table", + "props": { + "label": "表格", + "border": true, + "stripe": true, + "showHeader": false, + "fit": true, + "hideOp": false, + "hideNo": true, + "dataset": "${param.listDs_assist}", + "hidePagination": true + }, + "slots": { + "button": [ + { + "type": "fx-button", + "props": { + "label": "编辑", + "type": "primary", + "leftIcon": "edit", + "action": "button:edit", + "linkType": "dialog", + "dataset": "${param.editDs_assist}", + "fxLink": "dialog:editAssistDialog", + "fxLink_text": "${param.editDs_assist_title}", + "link": true + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "type": "primary", + "leftIcon": "delete", + "action": "button:remove", + "link": true, + "text": false, + "dataset": "${param.editDs_assist}", + "confirm": "" + }, + "id": "id${newId()}" + } + ], + "default": [ + <#list assist.fields as field> + { + "id": "id${newId()}", + "type": "fx-table-column", + "props": { + "field": "${field.id}", + "label": "${field.label}" + } + }<#if field_has_next>, + + ] + }, + "events": {} + } + ] + } + ] + }, + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "10", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + <#list layout.c1 as main> + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false + }, + "children": [ + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 3, + "label": "查询条件", + "size": "50", + "alignY": "center" + }, + "children": [ + <#list main.cfilters as cfilters> + { + "id": "id${newId()}", + "type": "fx-${cfilters.editor}", + "props": { + "label": "${cfilters.label}", + "type": "text", + "maxlength": 50, + "placeholder": "请输入${cfilters.label}", + "labelWidth": 100, + "affixError": false + }, + "events": {} + }, + + { + "id": "id${newId()}", + "type": "fx-button-group", + "props": { + "menus": [] + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "查询", + "leftIcon": "search", + "type": "primary", + "action": "button:search", + "linkType": "", + "dataset": "${param.listDs_main}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "clear", + "action": "button:reset" + }, + "id": "id${newId()}" + } + <#if (main.sfilters?size>0)> + ,{ + "id": "id${newId()}", + "type": "fx-button", + "props": { + "label": "高级筛选", + "leftIcon": "hamburger-button", + "action": "button:link", + "link": true, + "linkType": "drawer", + "fxLink": "dialog:qrueydialog" + } + } + + ] + } + } + ] + }, + { + "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": "50", + "backgroundImage": "bgImg-region-title", + "colNum": 2, + "alignY": "center", + "paddingLeft": 32, + "paddingRight": 32 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-title", + "props": { + "label": "${main.label}" + } + }, + { + "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", + "linkType": "dialog", + "dataset": "${param.editDs_main}", + "fxLink": "dialog:editDict", + "fxLink_text": "${param.editDs_main_title}", + "preAction": "" + }, + "id": "id${newId()}" + } + ] + } + } + ] + }, + { + "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.listDs_main}" + }, + "slots": { + "button": [ + { + "type": "fx-button", + "props": { + "label": "编辑", + "type": "primary", + "leftIcon": "edit", + "action": "button:edit", + "link": false, + "text": true, + "dataset": "${param.editDs_main}", + "linkType": "dialog", + "fxLink": "dialog:editDict", + "fxLink_text": "${param.editDs_main_title}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "type": "danger", + "leftIcon": "delete", + "action": "button:remove", + "link": false, + "text": true, + "dataset": "${param.editDs_main}", + "preAction": "" + }, + "id": "id${newId()}" + } + ], + "default": [ + <#list main.fields as field> + { + "id": "id${newId()}", + "type": "fx-table-column", + "props": { + "field": "${field.id}", + "label": "${field.label}" + } + }<#if field_has_next>, + + ] + }, + "events": {} + } + ] + } + ] + } + + ] + }, + { + "shape": "panel", + "id": "fx-form-panel", + "type": "fx-split-panel", + "props": { + "shadow": "", + "size": 24 + }, + "children": [] + } + ] + } + }, + <#list layout.c4 as assist_dialog> + { + "page": { + "id": "id${newId()}", + "type": "fx-dialog", + "props": { + <#if (param.editDs_assist_title == "")> + "title": "副卡片", + <#else> + "title": "${param.editDs_assist_title}", + + "key": "editAssistDialog", + "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 = assist_dialog.fields> + <#assign col = param.assist_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_assist}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "关闭", + "leftIcon": "close", + "type": "", + "action": "button:closeDialog", + "nextAction": "button:search" + }, + "id": "id${newId()}" + } + ] + } + } + ] + } + ] + } + }, + + <#list layout.c3 as main_dialog> + { + "page": { + "id": "id${newId()}", + "type": "fx-dialog", + "props": { + <#if (param.editDs_main_title == "")> + "title": "主卡片", + <#else> + "title": "${param.editDs_main_title}", + + "key": "editDict", + "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.main_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_main}" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "关闭", + "leftIcon": "close", + "type": "", + "action": "button:closeDialog", + "nextAction": "button:search" + }, + "id": "id${newId()}" + } + ] + } + } + ] + } + ] + } + } + + + <#list layout.c1 as main_quy_dialog> + <#assign group = main_quy_dialog > + <#if (group.sfilters?size>0)> + <#include "incModel/inc_query_sfilters.ftl"/> + + + ], + "model": [ + <#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_point_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_point_card.ftl new file mode 100644 index 0000000..b03fd1b --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_point_card.ftl @@ -0,0 +1,413 @@ +{ + "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" + }, + "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": "分组表单" + } + } + ] + }, + { + "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-form-panel", + "shape": "panel", + "props": { + "size": "15", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": true + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false, + "scroll": true + }, + "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" + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-divider", + "props": { + "label": "", + "contentPosition": "center", + "direction": "horizontal" + } + } + ] + }, + <#include "incModel/inc_card_group.ftl"/> + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "minWidth": "2000", + "maxWidth": "2000" + }, + "children": [] + } + ] + }, + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "size": "15", + "horizontal": false + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "backgroundColor": "--color-transparent", + "minWidth": "", + "maxWidth": "" + }, + "children": [] + } + ] + }, + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "size": "180", + "horizontal": false, + "panelHidden": false + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignX": "start", + "size": "0" + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-tabs", + "props": { + "tabPosition": "right" + }, + "slots": { + "default": [ + <#list layout.c1 as group> + { + "type": "fx-tab", + "props": { + "name": "tab1", + "label": "${group.label}" + }, + "id": "${newId()}" + } + <#if group_has_next>, + + ] + }, + "events": {} + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "backgroundColor": "--color-transparent" + }, + "children": [] + } + ] + } + ] + }, + { + "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>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_simple.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_simple.ftl new file mode 100644 index 0000000..7973c99 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_simple.ftl @@ -0,0 +1,45 @@ +{ + "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" + }, + "children": [ +<#list layout.c1 as group> + <#if (group.type == "list")> + <#if (group.cfilters?size>0)> + <#include "incModel/inc_filter.ftl"/> + + <#include "incModel/inc_grid_opt.ftl"/> + <#elseif (group.type == "card")> + <#include "incModel/inc_form.ftl"/> + + <#if group_has_next>, + + ] + } + } + ], + "model": [ +<#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_step_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_step_card.ftl new file mode 100644 index 0000000..521536f --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_step_card.ftl @@ -0,0 +1,414 @@ +{ + "version": 6, + "form": [ + { + "page": { + "id": "id${newId()}", + "type": "fx-page", + "props": { + "title": "编辑", + "key": "${newId()}", + "tipsExpand": false + } + }, + "graph": { + "shape": "panel", + "id": "root_panel", + "type": "fx-split-panel", + "props": { + "horizontal": false, + "shadow": "", + "scroll": false, + "size": "", + "name": "s0" + }, + "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":"bgImg-region-title", + "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()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", + "size": "200", + "backgroundImage":"bgImg-region-title", + "paddingLeft": 10 + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-title", + "props": { + "label": "${title}" + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", + "backgroundImage": "bgImg-region-title", + "paddingRight": 32 + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-button-group", + "props": { + "menus": [], + "textAlign": "right" + }, + "slots": { + "default": [ + { + "id": "${newId()}", + "type": "fx-button", + "props": { + "label": "新增", + "type": "primary", + "linkType": "curr", + "leftIcon": "plus" + } + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "leftIcon": "", + "type": "", + "action": "button:remove" + }, + "id": "${newId()}" + }, + { + "id": "id182152b2a3a", + "type": "fx-button", + "props": { + "label": "停用", + "type": "" + } + } + ], + "dropdown": [] + } + } + ] + } + ] + }, + { + "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-split-panel", + "shape": "panel", + "props": { + "size": "", + "horizontal": false, + "scroll": true, + "name": "s12" + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "alignY": "center", + "size": "0", + "paddingTop": 30, + "paddingLeft": 200, + "paddingRight": 200 + }, + "children": [ + { + "id": "id${newId()}", + "type": "fx-steps", + "w": 3, + "h": 2, + "props": { + "active": 1, + "alignCenter": true + }, + "slots": { + "default": [ + { + "type": "fx-step", + "props": { + "label": "步骤一", + "description": "我是一段描述" + }, + "id": "id${newId()}" + }, + { + "type": "fx-step", + "props": { + "label": "步骤二", + "description": "我也是一段描述" + }, + "id": "id${newId()}" + }, + { + "type": "fx-step", + "props": { + "label": "步骤三", + "description": "我也也是一段描述" + }, + "id": "id${newId()}" + } + ] + }, + "events": {} + } + ] + }, + { + <#list layout.c1 as group> + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "0", + <#if param.col lte 1 || param.col gte 3> + "gridTemplateColumns": "1fr 1fr 1fr", + <#elseif param.col == 2> + "gridTemplateColumns": "1fr 1fr 1fr 1fr", + + "paddingTop": 32 + }, + <#assign fields = group.fields> + "children": [ + <#list fields as field> + <#if (param.col lte 1)> + { + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + }, + <#elseif (param.col = 2 && ((field_index+1) % 2 = 1 ) )> + { + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + }, + + { + "id": "id${newId()}", + <#if (field.readonly = true)> + "type": "fx-text", + <#else> + "type": "fx-${field.editor}", + + "props": { + "label": "${field.label}", + "type": "text", + "dataset": "${field.dataset}", + "required": "${field.required}", + "field": "${field.id}", + <#if field.maxlength gt 0> + "maxlength": ${field.maxlength}, + + "placeholder": "请输入内容", + <#if (param.col gte 2)> + "tips": "${field.desc}", + + "labelWidth": 150, + <#if (field.readonly = true)> + "readonly": true, + <#else> + "readonly": false, + + "affixError": true + }, + "events": {} + } + <#if field_has_next> + <#if (param.col lte 1 )> + <#if (field.desc != "")> + ,{ + "id": "id181d83cdb41", + "type": "fx-label", + "props": { + "label": "${field.desc}", + "labelWidth": 0, + "affixError": true, + "labelAlign": "left" + } + } + <#else> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + + <#if (param.col = 2 && ((field_index+1) % 2 = 0 ) )> + ,{ + "id": "id${newId()}", + "type": "fx-placeholder", + "props": { + "label": "占位" + }, + "layout": { + "row": 1 + } + } + + , + + + ] + + }, + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "size": "56", + "alignY": "center", + "alignX": "center" + }, + "children": [ + { + "id": "${newId()}", + "type": "fx-button-group", + "props": { + "menus": [] + }, + "slots": { + "default": [ + { + "type": "fx-button", + "props": { + "label": "下一步", + "type": "primary", + "action": "button:saveAndAdd", + "linkType": "curr" + }, + "id": "${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "重置", + "leftIcon": "", + "type": "", + "action": "button:save" + }, + "id": "${newId()}" + } + ] + } + } + ] + }, + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "name": "d2" + }, + "children": [] + } + ] + } + ] + } + } + ], + "model": [ + <#list datasets as dataset> + <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, + + ], + "option": { + "widgetRef": [${widgetRef}], + "vars": [] + } +} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list.ftl new file mode 100644 index 0000000..6364a41 --- /dev/null +++ b/smtweb-framework/bpm/src/main/resources/static/template/default/model_tree_list.ftl @@ -0,0 +1,433 @@ +{ + "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": "", + "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": "15", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + { + "id": "${newId()}", + "type": "fx-split-panel", + "shape": "panel", + "props": { + "horizontal": false + }, + "children": [ + + { + "shape": "panel", + "id": "form_panel", + "type": "fx-form-panel", + "props": { + "colNum": 3, + "label": "查询条件", + "size": "50", + "alignY": "center", + "paddingRight": 20, + "gridTemplateColumns": "400px 400px 1fr", + "paddingLeft": 20 + }, + "children": [ + <#list group.cfilters as cfilters> + { + "id": "id${newId()}", + "type": "fx-${cfilters.editor}", + "props": { + "label": "${cfilters.label}", + "type": "text", + "maxlength": 50, + "hideLabel": true, + "placeholder": "请输入${cfilters.label}", + "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": "15", + "backgroundColor": "--color-transparent" + }, + "children": [] + }, + + { + "id": "${newId()}", + "type": "fx-form-panel", + "shape": "panel", + "props": { + "label": "表格标题区", + "size": "50", + "colNum": 2, + "alignY": "center", + "paddingLeft": 20, + "paddingRight": 20 + }, + "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, + "paddingLeft": 20, + "paddingRight": 20 + }, + "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": false, + "text": true, + "dataset": "${param.editDs}", + "linkType": "dialog", + "fxLink": "dialog:editMainDialog", + "fxLink_text": "" + }, + "id": "id${newId()}" + }, + { + "type": "fx-button", + "props": { + "label": "删除", + "type": "danger", + "leftIcon": "delete", + "action": "button:remove", + "link": false, + "text": 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": 15 + }, + "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, + "showPrefix": true + }, + "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": "50", + "paddingRight": 20, + "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": [] + } +} 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 deleted file mode 100644 index b405113..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_card_group.ftl +++ /dev/null @@ -1,107 +0,0 @@ -<#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/incModel/inc_filter.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_filter.ftl deleted file mode 100644 index f4bb800..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_filter.ftl +++ /dev/null @@ -1,76 +0,0 @@ -<#assign fields = group.cfilters> - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "paddingY": 5, - "paddingX": 10, - "size": "35", - "colNum": 2 - }, - "children": [ -<#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": [] - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "查询", - "leftIcon": "history-query", - "type": "primary", - "action": "button:search", - "dataset": "${group.dataset}" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "重置", - "type": "danger", - "action": "button:reset", - "leftIcon": "figma-reset-instance" - }, - "id": "id${newId()}" - }, - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "新增", - "type": "success", - "leftIcon": "shield-add", - "action": "button:add", - "dataset": "${group.dataset}" - } - } - ] - } - } - ] - }, \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl deleted file mode 100644 index 5ef0af9..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_form.ftl +++ /dev/null @@ -1,33 +0,0 @@ -<#assign fields = group.fields> - { - "shape": "panel", - "id": "form_panel", - "type": "fx-form-panel", - "props": { - "colNum": 2, - "paddingX": 5, - "paddingY": 5, - "size": "0" - }, - "children": [ -<#list fields as field> - { - "id": "id${newId()}", - "type": "fx-${field.editor}", - "props": { - "label": "${field.label}", - "type": "text", - <#if field.maxlength gt 0> - "maxlength": ${field.maxlength}, - - "placeholder": "请输入内容", - "labelWidth": 100, - "dataset": "${field.dataset}", - "field": "${field.id}", - "name": "${field.name}" - }, - "events": {} - }<#if field_has_next>, - - ] - } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl deleted file mode 100644 index 70220b4..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_grid_opt.ftl +++ /dev/null @@ -1,67 +0,0 @@ -{ - "shape": "panel", - "id": "form_panel", - "type": "fx-form-panel", - "props": { - "colNum": 0, - "paddingX": 5, - "paddingY": 5, - "align": "full" - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-table", - "props": { - "label": "表格", - "border": true, - "stripe": true, - "showHeader": true, - "fit": true, - "dataset": "${group.dataset}", - "actionWidth": 120 - }, - "slots": { -<#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", - "linkType": "dialog", - "dataset": "${group.dataset}" - }, - "id": "id1813718bf36" - }, - { - "type": "fx-button", - "props": { - "label": "删", - "type": "text", - "leftIcon": "delete", - "action": "button:del", - "dataset": "${group.dataset}" - }, - "id": "id${newId()}" - } - ] - }, - "events": {} - } - ] - } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_dialog.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_dialog.ftl deleted file mode 100644 index 5c06db7..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_dialog.ftl +++ /dev/null @@ -1,75 +0,0 @@ -<#assign col1 = col> -{ - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0", - "paddingTop": 15, - "colNum": 2 - }, - "children": [ - <#list dfields as dfield> - { - "id": "id${newId()}", - <#if (dfield.readonly = true)> - "type": "fx-text", - <#else> - "type": "fx-${dfield.editor}", - - "props": { - "label": "${dfield.label}", - "type": "text", - "dataset": "${dfield.dataset}", - "field": "${dfield.id}", - "required": "${field.required}", - <#if dfield.maxlength gt 0> - "maxlength": ${dfield.maxlength}, - - "placeholder": "请输入内容", - <#if (col1 gte 2)> - "tips": "${dfield.desc}", - - "labelWidth": 100, - <#if (dfield.readonly = true)> - "readonly": true, - <#else> - "readonly": false, - - "affixError": true - }, - "events": {} - } - <#if dfield_has_next> - - <#if (col1 lte 1 )> - <#if (dfield.desc != "")> - ,{ - "id": "id${newId()}", - "type": "fx-label", - "props": { - "label": "${dfield.desc}", - "labelWidth": 0, - "affixError": true, - "labelAlign": "left" - } - } - <#else> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - - , - - - - ] -} 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 deleted file mode 100644 index 1a8050b..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl +++ /dev/null @@ -1,102 +0,0 @@ -{ - "shape": "panel", - "id": "form_panel", - "type": "fx-form-panel", - "props": { - "colNum": 3, - "name": "query", - "label": "按钮区", - "size": "50", - "shadow": "", - "alignY": "center", - "paddingRight": 20, - "gridTemplateColumns": "400px 400px 1fr", - "paddingLeft": 20 - }, - "children": [ - <#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": "请输入${filter.label}", - "hideLabel": true, - "labelWidth": 100, - "affixError": false, - "dataset": "${filter.dataset}", - "field": "${filter.id}", - "name": "${filter.name}" - }, - "events": {} - }, - - { - "id": "id${newId()}", - "type": "fx-button-group", - "props": { - "menus": [], - "textAlign": "left" - }, - "slots": { - "default": [ - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "重置", - "leftIcon": "clear", - "type": "", - "action": "button:reset", - "dataset": "${param.queryDs}", - "link": false, - "linkType": "" - } - }, - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "查询", - "leftIcon": "search", - "type": "primary", - "action": "button:search", - "dataset": "${param.queryDs}" - } - } - <#if (group.sfilters?size>0)> - ,{ - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "高级筛选", - "leftIcon": "hamburger-button", - "action": "button:link", - "link": true, - "linkType": "drawer", - "fxLink": "dialog:qrueydialog" - } - } - - ] - }, - "layout": { - "col": 1 - } -}] -}, -{ -"id": "id${newId()}", -"type": "fx-form-panel", -"shape": "panel", -"props": { -"size": "15", -"backgroundColor": "transparent" -}, -"children": [] -}, diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl deleted file mode 100644 index 0b2cd65..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_table.ftl +++ /dev/null @@ -1,100 +0,0 @@ -<#assign tmpl_Type = tmplType> -{ - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "", - "label": "列表", - "colNum": 0, - "paddingLeft": 20, - "paddingRight": 20, - "shadow": "" - }, - "children": [{ - "id": "id${newId()}", - "type": "fx-table", - "props": { - "label": "表格", - - "border": true, - "stripe": true, - "showHeader": true, - "fit": true, - "dataset": "${param.queryDs}", - "actionWidth": 120 - }, - "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": [ - <#if (tmpl_Type == "model_list")> - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "编辑", - "type": "primary", - "leftIcon": "edit", - "action": "button:edit", - "dataset": "${group.dataset}", - "text": true, - "link": false, - "linkType": "", - "nextAction": "", - "fxLink": "" - } - }, - <#elseif (tmpl_Type == "model_list_card")> - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "编辑", - "type": "primary", - "leftIcon": "edit", - "action": "button:edit", - "link": false, - "text": true, - "linkType": "dialog", - "fxLink": "dialog:editDialog", - "fxLink_text": "${param.editTitle}", - "dataset": "${param.editDs}" - } - }, - - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "删除", - "type": "danger", - "leftIcon": "delete-themes", - "action": "button:remove", - "preAction": "", - "link": false, - "text": true, - "confirm": "", - "nextAction": "button:search", - "dataset": "${param.queryDs}" - } - } - ] -}, -"events": {} -} -] -}, diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl deleted file mode 100644 index 49d843c..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_model.ftl +++ /dev/null @@ -1,28 +0,0 @@ -{ - "dataset": "${dataset.id}", - "label": "${dataset.label}", - "fields": [ - <#list dataset.fields as field> - { - "id": "${field.id}", - "field": "${field.name}"<#if field.widget gt 0>, - "lookup": { - "widgetId": "${field.widget?c}", - "widgetId_text": "${field.widgetText}", - "filters": [] - } - - }<#if field_has_next>, - - ], - "filters": [ - <#list dataset.filters as field> - { - "id": "${field.id}", - "field": "${field.name!0}", - "required": ${field.required?string ("true","false")}, - "type": "input" - }<#if field_has_next>, - - ] - } \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_query_sfilters.ftl b/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_query_sfilters.ftl deleted file mode 100644 index da691f8..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_query_sfilters.ftl +++ /dev/null @@ -1,106 +0,0 @@ -, -{ - "page": { - "id": "id${newId()}", - "type":"fx-dialog", - "props": { - "title": "查询条件", - "key": "qrueydialog", - "destroyOnClose": true, - "closeOnClickModal": 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": [ - <#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()}" - } - ] - } - } - ] - }] - } -} \ 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 deleted file mode 100644 index 0603a43..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/index.yaml +++ /dev/null @@ -1,242 +0,0 @@ -model: - - - name: 'model_list' - label: '简单列表' - # list/card/view - type: 'list' - # 布局 - layout: - - - name: 'c1' - label: '简单列表' - type: 'list' - hasGroup: false - # 变量 - param: - - - name: 'queryDs' - type: 'ds' - label: '列表数据集' - desc: '请选择列表数据集' - - - name: 'model_list_card' - 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)' - - - name: 'model_list_list' - label: '主副列表(含卡片)' - # list/card/view - type: 'list' - # 布局 - layout: - - - name: 'c1' - label: '主列表' - type: 'list' - hasGroup: false - - name: 'c2' - label: '副列表' - type: 'list' - hasGroup: false - - name: 'c3' - label: '主编辑卡片' - type: 'card' - hasGroup: false - - name: 'c4' - label: '副编辑卡片' - type: 'card' - hasGroup: false - # 变量 - param: - - - name: 'listDs_main' - type: 'ds' - label: '主列表数据集' - desc: '请选择主列表数据集' - - - name: 'editDs_main' - type: 'ds' - label: '主卡片数据集' - desc: '请选择弹窗主卡片数据集' - - - name: 'main_col' - type: 'number' - label: '主卡片列数' - desc: '请选择弹窗主卡片列数(1或2)' - - - name: 'editDs_main_title' - type: 'input' - label: '主卡片标题' - desc: '请选择主弹窗卡片标题' - is_isolation: 'true' - - - name: 'listDs_assist' - type: 'ds' - label: '副列表数据集' - desc: '请选择附列表数据集' - - - name: 'editDs_assist' - type: 'ds' - label: '副卡片数据集' - desc: '请选择弹窗附列表卡片数据集' - - - name: 'assist_col' - type: 'number' - label: '副卡片列数' - desc: '请选择弹窗附列表卡片列数(1或2)' - - - name: 'editDs_assist_title' - type: 'input' - label: '副卡片标题' - 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)' - - - name: 'model_card' - label: '简单卡片' - # list/card/view - type: 'card' - # 布局 - layout: - - - name: 'c1' - label: '简单卡片' - type: 'card' - hasGroup: false - # 变量 - param: - - - name: 'col' - type: 'number' - label: '列数' - desc: '请选择表单列数' - - - name: 'model_step_card' - label: '步骤卡片' - # list/card/view - type: 'card' - # 布局 - layout: - - - name: 'c1' - label: '步骤卡片' - type: 'card' - hasGroup: false - # 变量 - param: - - - name: 'col' - type: 'number' - label: '列数' - desc: '请选择表单列数(目前只支持1,2,3)' - - - name: 'model_group_card' - label: '分组卡片' - # list/card/view - type: 'card' - # 布局 - layout: - - - name: 'c1' - label: '分组卡片' - type: 'card' - hasGroup: true - param: - - - name: 'mainDs' - type: 'ds' - label: '主卡片数据集' - desc: '请选择主要卡片数据集' - - - name: 'want_point' - type: 'checkbox' - label: '添加步骤条' - desc: '勾选则添加步骤条' - - - name: 'model_point_card' - label: '分组锚点卡片' - # list/card/view - type: 'card' - # 布局 - layout: - - - name: 'c1' - label: '分组卡片' - type: 'card' - hasGroup: true - param: - - - name: 'mainDs' - type: 'ds' - label: '主卡片数据集' - desc: '请选择主要卡片数据集' \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl deleted file mode 100644 index 07d1386..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_card.ftl +++ /dev/null @@ -1,329 +0,0 @@ -{ - "version": 6, - "form": [ - { - "page": { - "id": "id${newId()}", - "type": "fx-page", - "props": { - "title": "编辑", - "key": "${newId()}", - "tipsExpand": false - } - }, - "graph": { - "shape": "panel", - "id": "root_panel", - "type": "fx-split-panel", - "props": { - "horizontal": false, - "shadow": "", - "scroll": false, - "size": "", - "name": "s0" - }, - "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":"bgImg-region-title", - "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()}" - } - ] - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", - "size": "200", -"backgroundImage":"bgImg-region-title", - "paddingLeft": 10 - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-title", - "props": { - "label": "${title}" - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", -"backgroundImage":"bgImg-region-title", - "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" - } - } - ] - } - } - ] - } - ] - }, - { - "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-split-panel", - "shape": "panel", - "props": { - "size": "", - "horizontal": false, - "scroll": true, - "name": "s12" - }, - "children": [ - { - <#list layout.c1 as group> - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0", - <#if param.col lte 1> - "gridTemplateColumns": "1fr 2fr", - <#elseif param.col gte 2> - "gridTemplateColumns": "1fr 1fr 1fr", - - "paddingTop": 32 - }, - <#assign fields = group.fields> - "children": [ - <#list fields as field> - { - "id": "id${newId()}", - <#if (field.readonly = true)> - "type": "fx-text", - <#else> - "type": "fx-${field.editor}", - - "props": { - "label": "${field.label}", - "type": "text", - "dataset": "${field.dataset}", - "required": "${field.required}", - "field": "${field.id}", - <#if field.maxlength gt 0> - "maxlength": ${field.maxlength}, - - "placeholder": "请输入内容", - <#if (param.col = 2)> - "tips": "${field.desc}", - - "labelWidth": 150, - <#if (field.readonly = true)> - "readonly": true, - <#else> - "readonly": false, - - "affixError": true - }, - "events": {} - } - <#if field_has_next> - <#if (param.col lte 1 )> - <#if (field.desc != "")> - ,{ - "id": "id181d83cdb41", - "type": "fx-label", - "props": { - "label": "${field.desc}", - "labelWidth": 0, - "affixError": true, - "labelAlign": "left" - } - } - <#else> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - - <#if (param.col = 2 && ((field_index+1) % 2 = 0 ) )> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - , - - - ] - - }, - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "56", - "alignY": "center", - "paddingLeft": 150 - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-button-group", - "props": { - "menus": [] - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "保存并新增", - "type": "primary", - "action": "button:saveAndAdd", - "linkType": "curr" - }, - "id": "${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "保存", - "leftIcon": "save", - "type": "success", - "action": "button:save" - }, - "id": "${newId()}" - } - ] - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "name": "d2" - }, - "children": [] - } - ] - } - ] - } - } - ], - "model": [ - <#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_card_bak.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_card_bak.ftl deleted file mode 100644 index 713b23f..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_card_bak.ftl +++ /dev/null @@ -1,116 +0,0 @@ -{ - "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" - }, - "children": [ -<#list layout.c1 as group> - <#if (group.type == "list")> - <#if (group.cfilters?size>0)> - <#include "incModel/inc_filter.ftl"/> - - <#include "incModel/inc_grid_opt.ftl"/> - <#elseif (group.type == "card")> - <#include "incModel/inc_form.ftl"/> - , - -{ - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "paddingY": 3, - "paddingX": 10, - "size": 20 - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-button-group", - "props": { - "menus": [], - "textAlign": "center" - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "新增", - "leftIcon": "plus", - "type": "primary", - "action": "button:add" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "保存并新增", - "type": "primary", - "action": "button:saveAndAdd" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "保存", - "leftIcon": "save", - "type": "success", - "action": "button:save" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "删除", - "leftIcon": "delete", - "type": "danger", - "action": "button:remove" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "返回", - "leftIcon": "return", - "action": "button:return" - }, - "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 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 deleted file mode 100644 index 4788346..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_group_card.ftl +++ /dev/null @@ -1,376 +0,0 @@ -{ - "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" - } - } - ] - }, - <#if (param.want_point)> - { - "id": "1821e887b9a", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", - "size": "0", - "paddingTop": 20, - "paddingLeft": 200, - "paddingRight": 200, - "paddingBottom": 20 - }, - "children": [ - { - "id": "id1821e887baf", - "type": "fx-steps", - "w": 3, - "h": 2, - "props": { - "active": 1, - "alignCenter": true - }, - "slots": { - "default": [ - { - "type": "fx-step", - "props": { - "label": "步骤一", - "description": "我是一段描述" - }, - "id": "id1821e887bb0" - }, - { - "type": "fx-step", - "props": { - "label": "步骤二", - "description": "我也是一段描述" - }, - "id": "id1821e887bb1" - }, - { - "type": "fx-step", - "props": { - "label": "步骤三", - "description": "我也也是一段描述" - }, - "id": "id1821e887bb2" - } - ] - }, - "events": {} - } - ] - }, - { - "id": "734718093699321868", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0" - }, - "children": [ - { - "id": "id734718093699321869", - "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" - } - } - ] - }, - <#include "incModel/inc_card_group.ftl"/> - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "10", - "backgroundColor": "transparent" - }, - "children": [] - }<#if group_has_next>, - - ] - }, - { - "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>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl deleted file mode 100644 index 78b51d3..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_list.ftl +++ /dev/null @@ -1,110 +0,0 @@ -{ -<#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": [ - <#if (group.cfilters?size>0)> - <#include "incModel/inc_list_query.ftl"/> - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "50", - "label": "查询条件", - "colNum": 2, - "alignY": "center", - "paddingLeft": 20, - "paddingRight": 20, - "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": { - "menus": [], - "textAlign": "right" - }, - "slots": { - "default": [ - { - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "新增", - "leftIcon": "plus", - "type": "primary", - "action": "button:add", - "link": false, - "linkType": "", - "fxLink": "", - "dataset": "${param.queryDs}" - } - } - ] - } - } - ] - }, - <#include "incModel/inc_list_table.ftl"/> - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "15", - "backgroundColor": "transparent" - }, - "children": [] - } - ] - } - } - <#if (group.sfilters?size>0)> - <#include "incModel/inc_query_sfilters.ftl"/> - - ], - -"model": [ -<#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - -], -"option": { -"widgetRef": [${widgetRef}], -"vars": [] -} -} diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl deleted file mode 100644 index 728806e..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_list_card.ftl +++ /dev/null @@ -1,308 +0,0 @@ -{ - <#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": [ - <#if (group.cfilters?size>0)> - <#include "incModel/inc_list_query.ftl"/> - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "50", - "label": "查询条件", - "colNum": 2, - "alignY": "center", - "paddingLeft": 20, - "paddingRight": 20, - "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": { - "menus": [], - "textAlign": "right" - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "新增", - "leftIcon": "plus", - "type": "primary", - "action": "button:add", - "link": false, - - "linkType": "dialog", - "fxLink": "dialog:editDialog", - <#if (param.editTitle == "")> - "title": "卡片demo", - <#else> - "fxLink_text": "${param.editTitle}", - - - "dataset": "${param.editDs}" - }, - "id": "id${newId()}" - } - ] - } - } - ] - }, - <#include "incModel/inc_list_table.ftl"/> - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "15", - "backgroundColor": "transparent" - }, - "children": [] - } - ] - } - } - <#if (group.sfilters?size>0)> - <#include "incModel/inc_query_sfilters.ftl"/> - - <#list layout.c2 as dialog> - ,{ - "page": { - "id": "id${newId()}", - "type": "fx-dialog", - "props": { - <#if (param.editTitle == "")> - "title": "卡片demo", - <#else> - "title": "${param.editTitle}", - - "key": "editDialog", - "fontSize": 16, - "color": "#313131", - "fontWeight": "bold", - "showPrefix": true, - "prefixWidth": 5, - "prefixHeight": 16, - "prefixColor": "#1E90FF" - }, - "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 - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0", - "paddingTop": 15, - "colNum": 2 - }, - <#assign dfields = dialog.fields> - "children": [ - <#list dfields as dfield> - { - "id": "id${newId()}", - <#if (dfield.readonly = true)> - "type": "fx-text", - <#else> - "type": "fx-${dfield.editor}", - - "props": { - "label": "${dfield.label}", - "type": "text", - "dataset": "${dfield.dataset}", - "field": "${dfield.id}", - "required": "${field.required}", - <#if dfield.maxlength gt 0> - "maxlength": ${dfield.maxlength}, - - "placeholder": "请输入${dfield.label}", - <#if (param.col gte 2)> - "tips": "${dfield.desc}", - - "labelWidth": 100, - <#if (dfield.readonly = true)> - "readonly": true, - <#else> - "readonly": false, - - "affixError": true - }, - "events": {} - } - <#if dfield_has_next> - <#if (param.col lte 1 )> - <#if (dfield.desc != "")> - ,{ - "id": "id${newId()}", - "type": "fx-label", - "props": { - "label": "${dfield.desc}", - "labelWidth": 0, - "affixError": true, - "labelAlign": "left" - } - } - <#else> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - - , - - - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": {}, - "children": [] - } - ] - }, - { - "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": "50", - "alignY": "center", - "paddingRight": 20 - }, - "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", - "action": "button:closeDialog", - "dataset": "${param.queryDs}", - "nextAction": "button:search" - }, - "id": "id${newId()}" - } - ] - } - } - ] - } - ] - } - } - ], - - "model": [ - <#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } - -} 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 deleted file mode 100644 index 9632154..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_list_list.ftl +++ /dev/null @@ -1,718 +0,0 @@ -{ - "version": 6, - "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": [ - <#list layout.c2 as assist> - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "horizontal": false, - "size": "420" - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "50", - "alignY": "center", - "backgroundImage": "bgImg-region-title", - "paddingLeft": 32, - "colNum": 2, - "gridTemplateColumns": "", - "paddingRight": 32 - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-title", - "props": { - "label": "${assist.label}" - } - }, - { - "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", - "linkType": "dialog", - "link": false, - "dataset": "${param.editDs_assist}", - "fxLink": "dialog:editAssistDialog", - "fxLink_text": "${param.editDs_assist_title}" - }, - "id": "id${newId()}" - } - ] - } - } - ] - }, - { - "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": { - "alignY": "center", - "size": "50", - "gridTemplateColumns": "1fr 50px", - "paddingLeft": 32, - "paddingRight": 32 - }, - "children": [ - <#list assist.cfilters as cfilters> - { - "id": "id${newId()}", - "type": "fx-${cfilters.editor}", - "props": { - "label": "${cfilters.label}", - "type": "text", - "maxlength": 50, - "placeholder": "请输入${cfilters.label}", - "labelWidth": 150, - "affixError": false, - "hideLabel": true, - "leftIcon": "", - "dataset": "${cfilters.dataset}", - "field": "${cfilters.id}" - }, - "events": {} - }, - - { - "id": "id${newId()}", - "type": "fx-button-group", - "props": { - "menus": [], - "textAlign": "right" - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "搜索", - "leftIcon": "", - "action": "button:search", - "link": true, - "type": "primary", - "dataset": "${param.listDs_assist}" - }, - "id": "id${newId()}" - } - ] - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "", - "colNum": 0 - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-table", - "props": { - "label": "表格", - "border": true, - "stripe": true, - "showHeader": false, - "fit": true, - "hideOp": false, - "hideNo": true, - "dataset": "${param.listDs_assist}", - "hidePagination": true - }, - "slots": { - "button": [ - { - "type": "fx-button", - "props": { - "label": "编辑", - "type": "primary", - "leftIcon": "edit", - "action": "button:edit", - "linkType": "dialog", - "dataset": "${param.editDs_assist}", - "fxLink": "dialog:editAssistDialog", - "fxLink_text": "${param.editDs_assist_title}", - "link": true - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "删除", - "type": "primary", - "leftIcon": "delete", - "action": "button:remove", - "link": true, - "text": false, - "dataset": "${param.editDs_assist}", - "confirm": "" - }, - "id": "id${newId()}" - } - ], - "default": [ - <#list assist.fields as field> - { - "id": "id${newId()}", - "type": "fx-table-column", - "props": { - "field": "${field.id}", - "label": "${field.label}" - } - }<#if field_has_next>, - - ] - }, - "events": {} - } - ] - } - ] - }, - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "10", - "backgroundColor": "--color-transparent" - }, - "children": [] - }, - <#list layout.c1 as main> - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "horizontal": false - }, - "children": [ - { - "shape": "panel", - "id": "form_panel", - "type": "fx-form-panel", - "props": { - "colNum": 3, - "label": "查询条件", - "size": "50", - "alignY": "center" - }, - "children": [ - <#list main.cfilters as cfilters> - { - "id": "id${newId()}", - "type": "fx-${cfilters.editor}", - "props": { - "label": "${cfilters.label}", - "type": "text", - "maxlength": 50, - "placeholder": "请输入${cfilters.label}", - "labelWidth": 100, - "affixError": false - }, - "events": {} - }, - - { - "id": "id${newId()}", - "type": "fx-button-group", - "props": { - "menus": [] - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "查询", - "leftIcon": "search", - "type": "primary", - "action": "button:search", - "linkType": "", - "dataset": "${param.listDs_main}" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "重置", - "leftIcon": "clear", - "action": "button:reset" - }, - "id": "id${newId()}" - } - <#if (main.sfilters?size>0)> - ,{ - "id": "id${newId()}", - "type": "fx-button", - "props": { - "label": "高级筛选", - "leftIcon": "hamburger-button", - "action": "button:link", - "link": true, - "linkType": "drawer", - "fxLink": "dialog:qrueydialog" - } - } - - ] - } - } - ] - }, - { - "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": "50", - "backgroundImage": "bgImg-region-title", - "colNum": 2, - "alignY": "center", - "paddingLeft": 32, - "paddingRight": 32 - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-title", - "props": { - "label": "${main.label}" - } - }, - { - "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", - "linkType": "dialog", - "dataset": "${param.editDs_main}", - "fxLink": "dialog:editDict", - "fxLink_text": "${param.editDs_main_title}", - "preAction": "" - }, - "id": "id${newId()}" - } - ] - } - } - ] - }, - { - "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.listDs_main}" - }, - "slots": { - "button": [ - { - "type": "fx-button", - "props": { - "label": "编辑", - "type": "primary", - "leftIcon": "edit", - "action": "button:edit", - "link": false, - "text": true, - "dataset": "${param.editDs_main}", - "linkType": "dialog", - "fxLink": "dialog:editDict", - "fxLink_text": "${param.editDs_main_title}" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "删除", - "type": "danger", - "leftIcon": "delete", - "action": "button:remove", - "link": false, - "text": true, - "dataset": "${param.editDs_main}", - "preAction": "" - }, - "id": "id${newId()}" - } - ], - "default": [ - <#list main.fields as field> - { - "id": "id${newId()}", - "type": "fx-table-column", - "props": { - "field": "${field.id}", - "label": "${field.label}" - } - }<#if field_has_next>, - - ] - }, - "events": {} - } - ] - } - ] - } - - ] - }, - { - "shape": "panel", - "id": "fx-form-panel", - "type": "fx-split-panel", - "props": { - "shadow": "", - "size": 24 - }, - "children": [] - } - ] - } - }, - <#list layout.c4 as assist_dialog> - { - "page": { - "id": "id${newId()}", - "type": "fx-dialog", - "props": { - <#if (param.editDs_assist_title == "")> - "title": "副卡片", - <#else> - "title": "${param.editDs_assist_title}", - - "key": "editAssistDialog", - "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 = assist_dialog.fields> - <#assign col = param.assist_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_assist}" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "关闭", - "leftIcon": "close", - "type": "", - "action": "button:closeDialog", - "nextAction": "button:search" - }, - "id": "id${newId()}" - } - ] - } - } - ] - } - ] - } - }, - - <#list layout.c3 as main_dialog> - { - "page": { - "id": "id${newId()}", - "type": "fx-dialog", - "props": { - <#if (param.editDs_main_title == "")> - "title": "主卡片", - <#else> - "title": "${param.editDs_main_title}", - - "key": "editDict", - "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.main_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_main}" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "关闭", - "leftIcon": "close", - "type": "", - "action": "button:closeDialog", - "nextAction": "button:search" - }, - "id": "id${newId()}" - } - ] - } - } - ] - } - ] - } - } - - - <#list layout.c1 as main_quy_dialog> - <#assign group = main_quy_dialog > - <#if (group.sfilters?size>0)> - <#include "incModel/inc_query_sfilters.ftl"/> - - - ], - "model": [ - <#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ No newline at end of file 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 deleted file mode 100644 index b03fd1b..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_point_card.ftl +++ /dev/null @@ -1,413 +0,0 @@ -{ - "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" - }, - "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": "分组表单" - } - } - ] - }, - { - "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-form-panel", - "shape": "panel", - "props": { - "size": "15", - "backgroundColor": "--color-transparent" - }, - "children": [] - }, - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "horizontal": true - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "horizontal": false, - "scroll": true - }, - "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" - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0" - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-divider", - "props": { - "label": "", - "contentPosition": "center", - "direction": "horizontal" - } - } - ] - }, - <#include "incModel/inc_card_group.ftl"/> - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "minWidth": "2000", - "maxWidth": "2000" - }, - "children": [] - } - ] - }, - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "size": "15", - "horizontal": false - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "backgroundColor": "--color-transparent" - }, - "children": [] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "backgroundColor": "--color-transparent", - "minWidth": "", - "maxWidth": "" - }, - "children": [] - } - ] - }, - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "size": "180", - "horizontal": false, - "panelHidden": false - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignX": "start", - "size": "0" - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-tabs", - "props": { - "tabPosition": "right" - }, - "slots": { - "default": [ - <#list layout.c1 as group> - { - "type": "fx-tab", - "props": { - "name": "tab1", - "label": "${group.label}" - }, - "id": "${newId()}" - } - <#if group_has_next>, - - ] - }, - "events": {} - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "backgroundColor": "--color-transparent" - }, - "children": [] - } - ] - } - ] - }, - { - "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>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl deleted file mode 100644 index 7973c99..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_simple.ftl +++ /dev/null @@ -1,45 +0,0 @@ -{ - "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" - }, - "children": [ -<#list layout.c1 as group> - <#if (group.type == "list")> - <#if (group.cfilters?size>0)> - <#include "incModel/inc_filter.ftl"/> - - <#include "incModel/inc_grid_opt.ftl"/> - <#elseif (group.type == "card")> - <#include "incModel/inc_form.ftl"/> - - <#if group_has_next>, - - ] - } - } - ], - "model": [ -<#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ No newline at end of file diff --git a/smtweb-framework/bpm/src/main/resources/static/template/model_step_card.ftl b/smtweb-framework/bpm/src/main/resources/static/template/model_step_card.ftl deleted file mode 100644 index 521536f..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_step_card.ftl +++ /dev/null @@ -1,414 +0,0 @@ -{ - "version": 6, - "form": [ - { - "page": { - "id": "id${newId()}", - "type": "fx-page", - "props": { - "title": "编辑", - "key": "${newId()}", - "tipsExpand": false - } - }, - "graph": { - "shape": "panel", - "id": "root_panel", - "type": "fx-split-panel", - "props": { - "horizontal": false, - "shadow": "", - "scroll": false, - "size": "", - "name": "s0" - }, - "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":"bgImg-region-title", - "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()}" - } - ] - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", - "size": "200", - "backgroundImage":"bgImg-region-title", - "paddingLeft": 10 - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-title", - "props": { - "label": "${title}" - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", - "backgroundImage": "bgImg-region-title", - "paddingRight": 32 - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-button-group", - "props": { - "menus": [], - "textAlign": "right" - }, - "slots": { - "default": [ - { - "id": "${newId()}", - "type": "fx-button", - "props": { - "label": "新增", - "type": "primary", - "linkType": "curr", - "leftIcon": "plus" - } - }, - { - "type": "fx-button", - "props": { - "label": "删除", - "leftIcon": "", - "type": "", - "action": "button:remove" - }, - "id": "${newId()}" - }, - { - "id": "id182152b2a3a", - "type": "fx-button", - "props": { - "label": "停用", - "type": "" - } - } - ], - "dropdown": [] - } - } - ] - } - ] - }, - { - "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-split-panel", - "shape": "panel", - "props": { - "size": "", - "horizontal": false, - "scroll": true, - "name": "s12" - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "alignY": "center", - "size": "0", - "paddingTop": 30, - "paddingLeft": 200, - "paddingRight": 200 - }, - "children": [ - { - "id": "id${newId()}", - "type": "fx-steps", - "w": 3, - "h": 2, - "props": { - "active": 1, - "alignCenter": true - }, - "slots": { - "default": [ - { - "type": "fx-step", - "props": { - "label": "步骤一", - "description": "我是一段描述" - }, - "id": "id${newId()}" - }, - { - "type": "fx-step", - "props": { - "label": "步骤二", - "description": "我也是一段描述" - }, - "id": "id${newId()}" - }, - { - "type": "fx-step", - "props": { - "label": "步骤三", - "description": "我也也是一段描述" - }, - "id": "id${newId()}" - } - ] - }, - "events": {} - } - ] - }, - { - <#list layout.c1 as group> - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "0", - <#if param.col lte 1 || param.col gte 3> - "gridTemplateColumns": "1fr 1fr 1fr", - <#elseif param.col == 2> - "gridTemplateColumns": "1fr 1fr 1fr 1fr", - - "paddingTop": 32 - }, - <#assign fields = group.fields> - "children": [ - <#list fields as field> - <#if (param.col lte 1)> - { - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - }, - <#elseif (param.col = 2 && ((field_index+1) % 2 = 1 ) )> - { - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - }, - - { - "id": "id${newId()}", - <#if (field.readonly = true)> - "type": "fx-text", - <#else> - "type": "fx-${field.editor}", - - "props": { - "label": "${field.label}", - "type": "text", - "dataset": "${field.dataset}", - "required": "${field.required}", - "field": "${field.id}", - <#if field.maxlength gt 0> - "maxlength": ${field.maxlength}, - - "placeholder": "请输入内容", - <#if (param.col gte 2)> - "tips": "${field.desc}", - - "labelWidth": 150, - <#if (field.readonly = true)> - "readonly": true, - <#else> - "readonly": false, - - "affixError": true - }, - "events": {} - } - <#if field_has_next> - <#if (param.col lte 1 )> - <#if (field.desc != "")> - ,{ - "id": "id181d83cdb41", - "type": "fx-label", - "props": { - "label": "${field.desc}", - "labelWidth": 0, - "affixError": true, - "labelAlign": "left" - } - } - <#else> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - - <#if (param.col = 2 && ((field_index+1) % 2 = 0 ) )> - ,{ - "id": "id${newId()}", - "type": "fx-placeholder", - "props": { - "label": "占位" - }, - "layout": { - "row": 1 - } - } - - , - - - ] - - }, - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "size": "56", - "alignY": "center", - "alignX": "center" - }, - "children": [ - { - "id": "${newId()}", - "type": "fx-button-group", - "props": { - "menus": [] - }, - "slots": { - "default": [ - { - "type": "fx-button", - "props": { - "label": "下一步", - "type": "primary", - "action": "button:saveAndAdd", - "linkType": "curr" - }, - "id": "${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "重置", - "leftIcon": "", - "type": "", - "action": "button:save" - }, - "id": "${newId()}" - } - ] - } - } - ] - }, - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "name": "d2" - }, - "children": [] - } - ] - } - ] - } - } - ], - "model": [ - <#list datasets as dataset> - <#include "incModel/inc_model.ftl"/><#if dataset_has_next>, - - ], - "option": { - "widgetRef": [${widgetRef}], - "vars": [] - } -} \ 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 deleted file mode 100644 index 6364a41..0000000 --- a/smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl +++ /dev/null @@ -1,433 +0,0 @@ -{ - "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": "", - "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": "15", - "backgroundColor": "--color-transparent" - }, - "children": [] - }, - { - "id": "${newId()}", - "type": "fx-split-panel", - "shape": "panel", - "props": { - "horizontal": false - }, - "children": [ - - { - "shape": "panel", - "id": "form_panel", - "type": "fx-form-panel", - "props": { - "colNum": 3, - "label": "查询条件", - "size": "50", - "alignY": "center", - "paddingRight": 20, - "gridTemplateColumns": "400px 400px 1fr", - "paddingLeft": 20 - }, - "children": [ - <#list group.cfilters as cfilters> - { - "id": "id${newId()}", - "type": "fx-${cfilters.editor}", - "props": { - "label": "${cfilters.label}", - "type": "text", - "maxlength": 50, - "hideLabel": true, - "placeholder": "请输入${cfilters.label}", - "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": "15", - "backgroundColor": "--color-transparent" - }, - "children": [] - }, - - { - "id": "${newId()}", - "type": "fx-form-panel", - "shape": "panel", - "props": { - "label": "表格标题区", - "size": "50", - "colNum": 2, - "alignY": "center", - "paddingLeft": 20, - "paddingRight": 20 - }, - "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, - "paddingLeft": 20, - "paddingRight": 20 - }, - "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": false, - "text": true, - "dataset": "${param.editDs}", - "linkType": "dialog", - "fxLink": "dialog:editMainDialog", - "fxLink_text": "" - }, - "id": "id${newId()}" - }, - { - "type": "fx-button", - "props": { - "label": "删除", - "type": "danger", - "leftIcon": "delete", - "action": "button:remove", - "link": false, - "text": 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": 15 - }, - "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, - "showPrefix": true - }, - "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": "50", - "paddingRight": 20, - "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": [] - } -} diff --git a/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java index 8b6e078..7c4ce21 100644 --- a/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java +++ b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwConsts.java @@ -12,6 +12,8 @@ public interface SwConsts { //默认根节点 String DEF_ROOT_ID = "-1"; long DEF_ROOT_ID_LONG = -1; + //模型模板对应的路径,待扩展 + String modelPath = "default"; //列表分页的页码和每页记录数 String PARAM_PAGE = "page"; diff --git a/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java index bd0cfc6..fbb52b2 100644 --- a/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java +++ b/smtweb-framework/core/src/main/java/cc/smtweb/framework/core/common/SwEnum.java @@ -263,11 +263,11 @@ public interface SwEnum { class DatasetType extends StrEnum { public static DatasetType instance = new DatasetType(); - public static StrEnumBean LIST = instance.addEnum("list", "查询列表"); + public static StrEnumBean LIST = instance.addEnum("list", "列表"); public static StrEnumBean FORM = instance.addEnum("form", "表单"); - public static StrEnumBean ITEM = instance.addEnum("item", "子表编辑"); +// public static StrEnumBean ITEM = instance.addEnum("item", "子表编辑"); public static StrEnumBean TREE = instance.addEnum("tree", "树"); - public static StrEnumBean ENUM = instance.addEnum("enum", "枚举"); +// public static StrEnumBean ENUM = instance.addEnum("enum", "枚举"); } /** @@ -322,6 +322,14 @@ public interface SwEnum { } } + /** + * 模型 + */ + class ModelType extends StrEnum { + public static ModelType instance = new ModelType(); + public static StrEnumBean LC_SINGLE = instance.addEnum("LC_SINGLE", "简单列表(含卡片)"); + } + // 权限类型 class MenuRightType extends StrEnum { public static MenuFuncRight instance = new MenuFuncRight(); diff --git a/smtweb-framework/core/src/main/resources/demo.json b/smtweb-framework/core/src/main/resources/demo.json index cd1631e..8234153 100644 --- a/smtweb-framework/core/src/main/resources/demo.json +++ b/smtweb-framework/core/src/main/resources/demo.json @@ -1,602 +1,112 @@ { - "type": "workflow", - "version": 3, - "flows": [ + "fields": [ { - "widget": { - "type": "flow-chart", - "props": { - "title": "并行流程测试" - } - }, - "graph": { - "cells": [ - { - "position": { - "x": 240, - "y": -450 - }, - "size": { - "width": 60, - "height": 50 - }, - "attrs": { - "icon": { - "xlink:href": "/src/assets/images/svg/play.svg" - } - }, - "shape": "flow-end", - "id": "node173c6e891c8", - "data": { - "id": "node173c6e891c8", - "type": "flow-node-begin", - "props": { - "label": "开始" - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 210, - "y": -305.99999999999966 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "text": { - "text": "任务1" - }, - "icon": { - "xlink:href": "/src/assets/images/svg/people.svg" - } - }, - "shape": "flow-action", - "id": "node173c6eb453c", - "data": { - "id": "node173c6eb453c", - "type": "flow-node-manual", - "props": { - "label": "任务1", - "users": [ - { - "type": "userGroup", - "target": { - "ugId": 21222, - "ugName": "部门经理", - "ugCreateAt": "2020-07-26 10:42:43", - "ugUpdateAt": "2020-07-26 10:42:43" - }, - "notNull": true, - "filter": "" - } - ], - "fields": [ - { - "id": "column-172fda7eb90", - "name": "id", - "label": "ID", - "perm": "read", - "notNull": false - }, - { - "id": "col-173284e59df", - "name": "name", - "label": "数据字段", - "perm": "write", - "notNull": false - } - ], - "actionReturn": true, - "actionTransmit": true - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 210, - "y": -174.99999999999966 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "icon": { - "xlink:href": "/src/assets/images/svg/add-one.svg" - } - }, - "shape": "flow-choice", - "id": "node173c6eb4542", - "data": { - "id": "node173c6eb4542", - "type": "flow-node-split", - "props": { - "label": "任务分支" - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 210, - "y": 104 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "icon": { - "xlink:href": "/src/assets/images/svg/reduce.svg" - } - }, - "shape": "flow-choice", - "id": "node173c6eb4545", - "data": { - "id": "node173c6eb4545", - "type": "flow-node-merge", - "props": { - "label": "任务聚合" - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 110, - "y": -29.999999999999716 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "text": { - "text": "任务2-1" - }, - "icon": { - "xlink:href": "/src/assets/images/svg/people.svg" - } - }, - "shape": "flow-action", - "id": "node173c6eb4547", - "data": { - "id": "node173c6eb4547", - "type": "flow-node-manual", - "props": { - "label": "任务2-1", - "fields": [ - { - "id": "column-172fda7eb90", - "name": "id", - "label": "ID", - "perm": "read", - "notNull": false - }, - { - "id": "col-173284e59df", - "name": "name", - "label": "数据字段", - "perm": "write", - "notNull": false - } - ], - "users": [ - { - "type": "userGroup", - "target": { - "ugId": 21222, - "ugName": "部门经理", - "ugCreateAt": "2020-07-26 10:42:43", - "ugUpdateAt": "2020-07-26 10:42:43" - }, - "notNull": true, - "filter": "" - } - ], - "actionReturn": true, - "actionTransmit": true - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 307, - "y": -29.999999999999716 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "text": { - "text": "任务2-2" - }, - "icon": { - "xlink:href": "/src/assets/images/svg/people.svg" - } - }, - "shape": "flow-action", - "id": "node173c6eb454c", - "data": { - "id": "node173c6eb454c", - "type": "flow-node-manual", - "props": { - "label": "任务2-2", - "fields": [ - { - "id": "column-172fda7eb90", - "name": "id", - "label": "ID", - "perm": "write", - "notNull": false - }, - { - "id": "col-173284e59df", - "name": "name", - "label": "数据字段", - "perm": "read", - "notNull": false - } - ], - "users": [ - { - "type": "userGroup", - "target": { - "ugId": 21222, - "ugName": "部门经理", - "ugCreateAt": "2020-07-26 10:42:43", - "ugUpdateAt": "2020-07-26 10:42:43" - }, - "notNull": true, - "filter": "" - } - ], - "actionReturn": true, - "actionTransmit": true - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 210, - "y": 230 - }, - "size": { - "width": 120, - "height": 50 - }, - "attrs": { - "text": { - "text": "任务3" - }, - "icon": { - "xlink:href": "/src/assets/images/svg/people.svg" - } - }, - "shape": "flow-action", - "id": "node173c7c0d14e", - "data": { - "id": "node173c7c0d14e", - "type": "flow-node-manual", - "props": { - "label": "任务3", - "users": [ - { - "type": "userGroup", - "target": { - "ugId": 21222, - "ugName": "部门经理", - "ugCreateAt": "2020-07-26 10:42:43", - "ugUpdateAt": "2020-07-26 10:42:43" - }, - "notNull": true, - "filter": "" - } - ], - "actionReturn": true, - "actionTransmit": true - } - }, - "zIndex": 1 - }, - { - "position": { - "x": 240, - "y": 340 - }, - "size": { - "width": 60, - "height": 50 - }, - "attrs": { - "icon": { - "xlink:href": "/src/assets/images/svg/stop.svg" - } - }, - "shape": "flow-end", - "id": "node173c7dfe36c", - "data": { - "id": "node173c7dfe36c", - "type": "flow-node-end", - "props": { - "label": "结束" - } - }, - "zIndex": 1 - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4541", - "data": { - "id": "conn173c6eb4541", - "type": "flow-edge", - "props": { - "label": "启动" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6e891c8" - }, - "target": { - "cell": "node173c6eb453c" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4544", - "data": { - "id": "conn173c6eb4544", - "type": "flow-edge", - "props": { - "label": "提交" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb453c" - }, - "target": { - "cell": "node173c6eb4542" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4551", - "data": { - "id": "conn173c6eb4551", - "type": "flow-edge", - "props": { - "label": "执行" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb4542" - }, - "target": { - "cell": "node173c6eb4547" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4553", - "data": { - "id": "conn173c6eb4553", - "type": "flow-edge", - "props": { - "label": "执行2" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb4542" - }, - "target": { - "cell": "node173c6eb454c" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c7dfe36b", - "data": { - "id": "conn173c7dfe36b", - "type": "flow-edge", - "props": { - "label": "执行" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb4545" - }, - "target": { - "cell": "node173c7c0d14e" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4555", - "data": { - "id": "conn173c6eb4555", - "type": "flow-edge", - "props": { - "label": "提交" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb4547" - }, - "target": { - "cell": "node173c6eb4545" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c6eb4554", - "data": { - "id": "conn173c6eb4554", - "type": "flow-edge", - "props": { - "label": "提交" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c6eb454c" - }, - "target": { - "cell": "node173c6eb4545" - } - }, - { - "shape": "edge", - "attrs": { - "line": { - "stroke": "#4D5B62", - "strokeWidth": 1 - } - }, - "id": "conn173c7dfe36d", - "data": { - "id": "conn173c7dfe36d", - "type": "flow-edge", - "props": { - "label": "提交" - } - }, - "zIndex": 1, - "source": { - "cell": "node173c7c0d14e" - }, - "target": { - "cell": "node173c7dfe36c" - } - } - ] - } + "locked": 1, + "name": "bp_id", + "title": "主键", + "fieldType": 1, + "dataType": "id", + "null": 1, + "default": -1 + }, + { + "name": "bp_number", + "editor": "num", + "title": "第几届", + "remark": "第几届", + "dataType": "int", + "default": "", + "null": 1 + }, + { + "name": "bp_name", + "editor": "input", + "title": "届别名称", + "dataType": "name", + "default": "", + "remark": "根据第几届自动生成", + "null": 1 + }, + { + "name": "bp_start_time", + "editor": "datetime", + "title": "届别开始时间", + "dataType": "datetime", + "default": "0", + "remark": "届别开始时间", + "null": 1 + }, + { + "name": "bp_end_time", + "editor": "datetime", + "title": "届别结束时间", + "dataType": "datetime", + "default": "0", + "remark": "届别结束时间", + "null": 1 + }, + { + "name": "bp_create_uid", + "editor": "input", + "title": "创建人", + "fieldType": 7, + "dataType": "id", + "default": "", + "remark": "创建人", + "null": 1 + }, + { + "name": "bp_create_time", + "editor": "datetime", + "title": "创建时间", + "fieldType": 8, + "dataType": "datetime", + "default": "", + "remark": "创建时间", + "null": 1 + }, + { + "name": "bp_update_uid", + "editor": "input", + "title": "更新人", + "fieldType": 9, + "dataType": "id", + "default": "", + "remark": "更新人", + "null": 1 + }, + { + "name": "bp_update_time", + "editor": "datetime", + "title": "更新时间", + "fieldType": 10, + "dataType": "datetime", + "default": "", + "remark": "更新时间", + "null": 1 + }, + { + "name": "bp_state", + "editor": "combo", + "title": "状态", + "dataType": "bool", + "default": "0", + "remark": "1启用0无效", + "null": 1 } ], - "model": { - "page": "默认表单定义", - "canEditOther": "bool是否允许编辑非本人单据", - "rejectToMake": "bool True-驳回到制单 False-逐级驳回", - "activities": [ - { - "id": "唯一标识", - "type": "类别:1-开始任务 2-用户任务 3-条件分支 4-并行开始 5-并行结束 6-脚本任务 9-结束任务", - "code": "活动编号,代码可调用", - "label": "活动名称", - "page": "表单定义", - "canEdit": "是否可编辑", - "needSign": "是否需要会签", - "buttons": [ - { - "type": "submit", - "label": "提交", - "valid": "是否允许,bool" - }, - { - "type": "reject", - "label": "驳回", - "valid": "是否允许,bool" - }, - { - "type": "retake", - "label": "取回", - "valid": "是否允许,bool" - }, - { - "type": "cancel", - "label": "作废", - "valid": "是否允许,bool" - }, - { - "type": "delete", - "label": "删除", - "valid": "是否允许,bool" - } - ], - "eidtFields": [ - "可编辑的字段" - ], - "disableFields": [ - "不可查看的字段" - ], - "handler": { - "userGroup": "主办人分组", - "filter": "主办人过滤:制单人所属单位/制单人所属部门/上一步提交人所属单位/上一步提交人所属部门", - "ignore": "主办人过滤:上一步提交人/过滤制单人" - }, - "sign": { - "minSign": "最少会签人数", - "minAgree": "最少会签同意人数", - "minAgreeUnit": "最少会签同意人数单位:0-人数 1-会签同意占比", - "userGroup": "会签人分组", - "filter": "会签人过滤:制单人所属单位/制单人所属部门/上一步提交人所属单位/上一步提交人所属部门", - "ignore": "会签人过滤:上一步提交人/过滤制单人" - } - } - ], - "trans": [ - { - "id": "唯一标识", - "seq": "序号", - "expr": "条件表达式", - "src": "源活动", - "dst": "目标活动", - "desc": "说明" - } - ] - } + "indexes": [ + { + "locked": 1, + "fields": "bp_id", + "type": "P" + } + ], + "caches": [ + { + "name": "n", + "fields": "bp_name", + "type": "M" + } + ] } \ No newline at end of file