diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js b/smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js
index af19fc7..87f0f6e 100644
--- a/smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js
+++ b/smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js
@@ -57,7 +57,7 @@ window.$swEvent.setup("defaultEvent", {
*/
setup(page){
const { $params,$refs, $widgets, $model, $utils, $tabRouter, $api } = page;
- const { $$message, $$http } = $utils;
+ const { $$message, $$http } = $utils || {};
// 示例
const demoFunc = () => {
// 1.从参数中获取p1
diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/index.html b/smtweb-framework/sw-system-bpm/src/main/resources/static/index.html
new file mode 100644
index 0000000..2042999
--- /dev/null
+++ b/smtweb-framework/sw-system-bpm/src/main/resources/static/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+ BPM
+
+
+
+
+
diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml b/smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml
index a5134b8..8e2128e 100644
--- a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml
+++ b/smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml
@@ -1,6 +1,6 @@
model:
-
- name: 'model_list1'
+ name: 'model_list'
label: '简单列表'
# list/card/view
type: 'list'
@@ -8,7 +8,7 @@ model:
layout:
-
name: 'c1'
- label: '客户区'
+ label: '简单列表'
type: 'list'
hasGroup: false
# 变量
@@ -32,4 +32,4 @@ model:
# param:
# -
# name: 'p1'
-# type: 'ds'
\ No newline at end of file
+# type: 'ds'
diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl b/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl
index e88fb9e..1399c2f 100644
--- a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl
+++ b/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl
@@ -1,41 +1,392 @@
{
- "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.cfilters?size>0)>
- <#include "incModel/inc_filter.ftl"/>
+ "form":
+ [
+ {
+ "page": {
+ "id": "p${newId()}",
+ "type": "fx-page",
+ "props": {
+ "title": "${title}",
+ "key": "${newId()}"
+ }
+ },
+ "graph": {
+ "shape": "panel",
+ "id": "root_panel",
+ "type": "fx-split-panel",
+ "props": {
+ "horizontal": false,
+ "shadow": ""
+ },
+ "children": [
+ {
+ "shape": "panel",
+ "id": "form_panel",
+ "type": "fx-form-panel",
+ "props": {
+ "colNum": 3,
+ "name": "query",
+ "label": "按钮区",
+ "size": "80",
+ "shadow": "",
+ "alignY": "center",
+ "paddingRight": 10
+ },
+ "children": [
+
+ <#if (group.cfilters?size>0)>
+ <#assign fields = group.cfilters>
+ <#list fields as filter>
+ {
+ "id": "id${newId()}",
+ "type": "fx-${filter.editor}",
+ "props": {
+ "label": "${filter.label}",
+ "type": "text",
+ <#if filter.maxlength gt 0>
+ "maxlength": ${filter.maxlength},
+ #if>
+ "placeholder": "请输入查询内容",
+ "labelWidth": 100,
+ "dataset": "${filter.dataset}",
+ "field": "${filter.id}",
+ "name": "${filter.name}"
+ },
+ "events": {}
+ },
+ #list>
+ #if>
+
+ {
+ "id": "id${newId()}",
+ "type": "fx-button-group",
+ "props": {
+ "menus": [],
+ "textAlign": "right"
+ },
+ "slots": {
+ "default": [
+ {
+ "type": "fx-button",
+ "props": {
+ "label": "重置",
+ "leftIcon": "clear",
+ "type": "",
+ "action": "button:reset",
+ "dataset": "",
+ "link": false,
+ "linkType": ""
+ },
+ "id": "id${newId()}"
+ },
+ {
+ "type": "fx-button",
+ "props": {
+ "label": "查询",
+ "leftIcon": "search",
+ "type": "primary",
+ "action": "button:search",
+ "dataset": "${param.queryDs}"
+ },
+ "id": "id${newId()}"
+ }
+ <#if (group.sfilters?size>0)>
+ ,{
+ "type": "fx-button",
+ "props": {
+ "label": "高级筛选",
+ "leftIcon": "hamburger-button",
+ "action": "button:link",
+ "link": true,
+ "linkType": "drawer",
+ "fxLink": "dialog:qrueydialog"
+ },
+ "id": "id${newId()}"
+ }
+ #if>
+ ]
+ },
+ "layout": {
+ "col": 1
+ }
+ }
+ ]
+ },
+ {
+ "id": "${newId()}",
+ "type": "fx-form-panel",
+ "shape": "panel",
+ "props": {
+ "size": "20",
+ "backgroundColor": "transparent"
+ },
+ "children": []
+ },
+ {
+ "id": "${newId()}",
+ "type": "fx-form-panel",
+ "shape": "panel",
+ "props": {
+ "size": "68",
+ "label": "查询条件",
+ "colNum": 2,
+ "alignY": "center",
+ "paddingLeft": 32,
+ "paddingRight": 32,
+ "shadow": ""
+ },
+ "children": [
+ {
+ "id": "id${newId()}",
+ "type": "fx-title",
+ "props": {
+ "label": "${title}",
+ "fontSize": 16,
+ "color": "#01070D",
+ "fontWeight": "bold",
+ "showPrefix": false,
+ "prefixWidth": 5,
+ "prefixHeight": 24,
+ "prefixColor": "#1E90FF"
+ }
+ },
+ {
+ "id": "id${newId()}",
+ "type": "fx-button-group",
+ "props": {
+ "menus": [],
+ "textAlign": "right"
+ },
+ "slots": {
+ "default": [
+ {
+ "type": "fx-button",
+ "props": {
+ "label": "新增",
+ "leftIcon": "plus",
+ "type": "primary",
+ "action": "button:add",
+ "link": false,
+ "linkType": "",
+ "fxLink": "",
+ "dataset": ""
+ },
+ "id": "id${newId()}"
+ }
+ ]
+ }
+ }
+ ]
+ },
+ {
+ "id": "${newId()}",
+ "type": "fx-form-panel",
+ "shape": "panel",
+ "props": {
+ "size": "",
+ "label": "列表",
+ "colNum": 0,
+ "paddingLeft": 32,
+ "paddingRight": 32,
+ "shadow": ""
+ },
+ "children": [
+ {
+ "id": "id${newId()}",
+ "type": "fx-table",
+ "props": {
+ "label": "表格",
+ "border": true,
+ "stripe": true,
+ "showHeader": true,
+ "fit": true,
+ "dataset": "${group.dataset}",
+ "actionWidth": 150
+ },
+ "slots": {
+ <#if (group.fields?size>0)>
+ <#assign fields = group.fields>
+ "default": [
+ <#list fields as col>
+ {
+ "id": "id${newId()}",
+ "type": "fx-table-column",
+ "props": {
+ "field": "${col.id}",
+ "label": "${col.label}"
+ }
+ }<#if col_has_next>,#if>
+ #list>
+ ],
+ #if>
+ "button": [
+ {
+ "type": "fx-button",
+ "props": {
+ "label": "编辑",
+ "type": "text",
+ "leftIcon": "edit",
+ "action": "button:edit",
+ "dataset": "",
+ "link": true,
+ "linkType": "",
+ "nextAction": "",
+ "fxLink": ""
+ },
+ "id": "id${newId()}"
+ },
+ {
+ "type": "fx-button",
+ "props": {
+ "label": "删除",
+ "type": "text",
+ "leftIcon": "delete-themes",
+ "action": "button:remove",
+ "preAction": "",
+ "link": true,
+ "confirm": ""
+ },
+ "id": "id${newId()}"
+ }
+ ]
+ },
+ "events": {}
+ }
+ ]
+ },
+ {
+ "id": "${newId()}",
+ "type": "fx-form-panel",
+ "shape": "panel",
+ "props": {
+ "size": "24",
+ "backgroundColor": "transparent"
+ },
+ "children": []
+ }
+ ]
+ }
+ },
+ {
+ "page": {
+ "id": "id${newId()}",
+ "type": "fx-dialog",
+ "props": {
+ "title": "查询条件",
+ "key": "qrueydialog",
+ "destroyOnClose": true,
+ "closeOnClickModal": true,
+ "width": "20%",
+ "height": ""
+ },
+ "events": {
+ }
+ }
+ <#if (group.sfilters?size>0)>
+ ,"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},
+ #if>
+ "placeholder": "请输入查询内容",
+ "labelWidth": 100,
+ "dataset": "${filter.dataset}",
+ "field": "${filter.id}",
+ "name": "${filter.name}"
+ },
+ "events": {}
+ }
+ <#if filter_has_next>,#if>
+ #list>
+
+ ]
+ },
+ {
+ "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()}"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ]
+ }
#if>
- <#include "incModel/inc_grid_opt.ftl"/>
- <#if group_has_next>,#if>
+ }
+ ],
#list>
- ]
- }
- }
- ],
- "model": [
+"model": [
<#list datasets as dataset>
- <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,#if>
+ <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,#if>
#list>
- ],
- "option": {
- "widgetRef": [${widgetRef}],
- "vars": []
- }
-}
\ No newline at end of file
+],
+"option": {
+"widgetRef": [${widgetRef}],
+"vars": []
+}
+}
diff --git a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list1.ftl b/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list1.ftl
deleted file mode 100644
index bcba6d5..0000000
--- a/smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list1.ftl
+++ /dev/null
@@ -1,391 +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": [
- {
- "shape": "panel",
- "id": "form_panel",
- "type": "fx-form-panel",
- "props": {
- "colNum": 3,
- "name": "query",
- "label": "按钮区",
- "size": "80",
- "shadow": "",
- "alignY": "center",
- "paddingRight": 10
- },
- "children": [
-
- <#if (group.cfilters?size>0)>
- <#assign fields = group.cfilters>
- <#list fields as filter>
- {
- "id": "id${newId()}",
- "type": "fx-${filter.editor}",
- "props": {
- "label": "${filter.label}",
- "type": "text",
- <#if filter.maxlength gt 0>
- "maxlength": ${filter.maxlength},
- #if>
- "placeholder": "请输入查询内容",
- "labelWidth": 100,
- "dataset": "${filter.dataset}",
- "field": "${filter.id}",
- "name": "${filter.name}"
- },
- "events": {}
- },
- #list>
- #if>
-
- {
- "id": "id${newId()}",
- "type": "fx-button-group",
- "props": {
- "menus": [],
- "textAlign": "right"
- },
- "slots": {
- "default": [
- {
- "type": "fx-button",
- "props": {
- "label": "重置",
- "leftIcon": "clear",
- "type": "",
- "action": "button:reset",
- "dataset": "",
- "link": false,
- "linkType": ""
- },
- "id": "id${newId()}"
- },
- {
- "type": "fx-button",
- "props": {
- "label": "查询",
- "leftIcon": "search",
- "type": "primary",
- "action": "button:search",
- "dataset": "${param.queryDs}"
- },
- "id": "id${newId()}"
- }
- <#if (group.sfilters?size>0)>
- ,{
- "type": "fx-button",
- "props": {
- "label": "高级筛选",
- "leftIcon": "hamburger-button",
- "action": "button:link",
- "link": true,
- "linkType": "drawer",
- "fxLink": "dialog:qrueydialog"
- },
- "id": "id${newId()}"
- }
- #if>
- ]
- },
- "layout": {
- "col": 1
- }
- }
- ]
- },
- {
- "id": "${newId()}",
- "type": "fx-form-panel",
- "shape": "panel",
- "props": {
- "size": "20",
- "backgroundColor": "transparent"
- },
- "children": []
- },
- {
- "id": "${newId()}",
- "type": "fx-form-panel",
- "shape": "panel",
- "props": {
- "size": "68",
- "label": "查询条件",
- "colNum": 2,
- "alignY": "center",
- "paddingLeft": 32,
- "paddingRight": 32,
- "shadow": ""
- },
- "children": [
- {
- "id": "id${newId()}",
- "type": "fx-title",
- "props": {
- "label": "${title}",
- "fontSize": 16,
- "color": "#01070D",
- "fontWeight": "bold",
- "showPrefix": false,
- "prefixWidth": 5,
- "prefixHeight": 24,
- "prefixColor": "#1E90FF"
- }
- },
- {
- "id": "id${newId()}",
- "type": "fx-button-group",
- "props": {
- "menus": [],
- "textAlign": "right"
- },
- "slots": {
- "default": [
- {
- "type": "fx-button",
- "props": {
- "label": "新增",
- "leftIcon": "plus",
- "type": "primary",
- "action": "button:add",
- "link": false,
- "linkType": "",
- "fxLink": "",
- "dataset": ""
- },
- "id": "id${newId()}"
- }
- ]
- }
- }
- ]
- },
- {
- "id": "${newId()}",
- "type": "fx-form-panel",
- "shape": "panel",
- "props": {
- "size": "",
- "label": "列表",
- "colNum": 0,
- "paddingLeft": 32,
- "paddingRight": 32,
- "shadow": ""
- },
- "children": [
- {
- "id": "id${newId()}",
- "type": "fx-table",
- "props": {
- "label": "表格",
- "border": true,
- "stripe": true,
- "showHeader": true,
- "fit": true,
- "dataset": "${group.dataset}",
- "actionWidth": 150
- },
- "slots": {
- <#if (group.fields?size>0)>
- <#assign fields = group.fields>
- "default": [
- <#list fields as col>
- {
- "id": "id${newId()}",
- "type": "fx-table-column",
- "props": {
- "field": "${col.id}",
- "label": "${col.label}"
- }
- }<#if col_has_next>,#if>
- #list>
- ],
- #if>
- "button": [
- {
- "type": "fx-button",
- "props": {
- "label": "编辑",
- "type": "text",
- "leftIcon": "edit",
- "action": "button:edit",
- "dataset": "",
- "link": true,
- "linkType": "",
- "nextAction": "",
- "fxLink": ""
- },
- "id": "id${newId()}"
- },
- {
- "type": "fx-button",
- "props": {
- "label": "删除",
- "type": "text",
- "leftIcon": "delete-themes",
- "action": "button:remove",
- "preAction": "",
- "link": true,
- "confirm": ""
- },
- "id": "id${newId()}"
- }
- ]
- },
- "events": {}
- }
- ]
- },
- {
- "id": "${newId()}",
- "type": "fx-form-panel",
- "shape": "panel",
- "props": {
- "size": "24",
- "backgroundColor": "transparent"
- },
- "children": []
- }
- ]
- }
- },
- {
- "page": {
- "id": "id${newId()}",
- "type": "fx-dialog",
- "props": {
- "title": "查询条件",
- "key": "qrueydialog",
- "destroyOnClose": true,
- "width": "20%",
- "height": ""
- },
- "events": {
- }
- }
- <#if (group.sfilters?size>0)>
- ,"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},
- #if>
- "placeholder": "请输入查询内容",
- "labelWidth": 100,
- "dataset": "${filter.dataset}",
- "field": "${filter.id}",
- "name": "${filter.name}"
- },
- "events": {}
- }
- <#if filter_has_next>,#if>
- #list>
-
- ]
- },
- {
- "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()}"
- }
- ]
- }
- }
- ]
- }
- ]
- }
- #if>
- }
- ],
-#list>
-"model": [
-<#list datasets as dataset>
- <#include "incModel/inc_model.ftl"/><#if dataset_has_next>,#if>
-#list>
-],
-"option": {
-"widgetRef": [${widgetRef}],
-"vars": []
-}
-}
\ No newline at end of file