郑根木 2 jaren geleden
bovenliggende
commit
9e5b59cbb9
5 gewijzigde bestanden met toevoegingen van 404 en 430 verwijderingen
  1. +1
    -1
      smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js
  2. +14
    -0
      smtweb-framework/sw-system-bpm/src/main/resources/static/index.html
  3. +3
    -3
      smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml
  4. +386
    -35
      smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl
  5. +0
    -391
      smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list1.ftl

+ 1
- 1
smtweb-framework/sw-system-bpm/src/main/resources/static/event/defaultEvent.js Bestand weergeven

@@ -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


+ 14
- 0
smtweb-framework/sw-system-bpm/src/main/resources/static/index.html Bestand weergeven

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>BPM</title>
</head>
<body>
<script type="text/javascript">
window.location.href='/static/design/ui/index.html';
</script>
</body>
</html>

+ 3
- 3
smtweb-framework/sw-system-bpm/src/main/resources/static/template/index.yaml Bestand weergeven

@@ -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'
# type: 'ds'

+ 386
- 35
smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list.ftl Bestand weergeven

@@ -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": []
}
}
],
"option": {
"widgetRef": [${widgetRef}],
"vars": []
}
}

+ 0
- 391
smtweb-framework/sw-system-bpm/src/main/resources/static/template/model_list1.ftl Bestand weergeven

@@ -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": []
}
}

Laden…
Annuleren
Opslaan