Sfoglia il codice sorgente

添加一个树加列表的模板

master
xiaxl 2 anni fa
parent
commit
cb40118027
3 ha cambiato i file con 507 aggiunte e 1 eliminazioni
  1. +1
    -0
      smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl
  2. +39
    -1
      smtweb-framework/bpm/src/main/resources/static/template/index.yaml
  3. +467
    -0
      smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl

+ 1
- 0
smtweb-framework/bpm/src/main/resources/static/template/incModel/inc_list_query.ftl Vedi File

@@ -25,6 +25,7 @@
</#if>
"placeholder": "请输入查询内容",
"labelWidth": 100,
"affixError": false,
"dataset": "${filter.dataset}",
"field": "${filter.id}",
"name": "${filter.name}"


+ 39
- 1
smtweb-framework/bpm/src/main/resources/static/template/index.yaml Vedi File

@@ -141,4 +141,42 @@ model:
name: 'editDs_assist_title'
type: 'input'
label: '副卡片标题'
desc: '请选择附弹窗卡片标题'
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)'

+ 467
- 0
smtweb-framework/bpm/src/main/resources/static/template/model_tree_list.ftl Vedi File

@@ -0,0 +1,467 @@
{
"version": 6,
<#list layout.c1 as group>
"form": [
{
"page": {
"id": "id${newId()}",
"type": "fx-page",
"props": {
"title": "${title}",
"key": "${newId()}"
}
},
"graph": {
"shape": "panel",
"id": "root_panel",
"type": "fx-split-panel",
"props": {
"shadow": ""
},
"children": [
{
"shape": "panel",
"id": "root_panel",
"type": "fx-split-panel",
"props": {
"horizontal": true,
"shadow": ""
},
"children": [
{
"id": "${newId()}",
"type": "fx-split-panel",
"shape": "panel",
"props": {
"horizontal": false,
"size": "300"
},
"children": [
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "56",
"alignY": "center",
"backgroundImage": "bgImg-region-title",
"paddingLeft": 32,
"colNum": 2,
"gridTemplateColumns": "",
"paddingRight": 32
},
"children": [
{
"id": "id${newId()}",
"type": "fx-title",
"props": {
"label": "苹果树"
}
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "0"
},
"children": [
{
"id": "${newId()}",
"type": "fx-divider",
"props": {
"label": "",
"contentPosition": "center",
"direction": "horizontal"
}
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "",
"colNum": 0,
"align": "full",
"paddingTop": 10,
"paddingLeft": 10,
"paddingRight": 10
},
"children": [
{
"id": "id${newId()}",
"type": "fx-tree",
"props": {
"defaultExpandAll": true,
"expandOnClickNode": false,
"filterShow": true,
"filterPlaceholder": "查询",
"dataset": "ds_18210085a45",
"field": "fid18210085a51",

"label": "编码"
},
"events": {}
}
]
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "10",
"backgroundColor": "--color-transparent"
},
"children": []
},
{
"id": "${newId()}",
"type": "fx-split-panel",
"shape": "panel",
"props": {
"horizontal": false
},
"children": [
<#list group.cfilters as cfilters>
{
"shape": "panel",
"id": "form_panel",
"type": "fx-form-panel",
"props": {
"colNum": 3,
"label": "查询条件",
"size": "80",
"alignY": "center"
},
"children": [

{
"id": "id${newId()}",
"type": "fx-${cfilters.editor}",
"props": {
"label": "${cfilters.label}",
"type": "text",
"maxlength": 50,
"placeholder": "请输入内容",
"labelWidth": 100,
"affixError": false
},
"events": {}
},

{
"id": "${newId()}",
"type": "fx-button-group",
"props": {
"menus": [],
"showDropdown": false
},
"slots": {
"default": [
{
"type": "fx-button",
"props": {
"label": "查询",
"leftIcon": "search",
"type": "primary",
"action": "button:search",
"linkType": "",
"dataset": "${param.queryDs}"
},
"id": "id${newId()}"
},
{
"type": "fx-button",
"props": {
"label": "重置",
"leftIcon": "clear",
"action": "button:reset"
},
"id": "id${newId()}"
}
],
"dropdown": []
}
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"label": "间隔",
"size": "10",
"backgroundColor": "--color-transparent"
},
"children": []
},
</#list>
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"label": "表格标题区",
"size": "68",
"backgroundImage": "bgImg-region-title",
"colNum": 2,
"alignY": "center",
"paddingLeft": 32,
"paddingRight": 32
},
"children": [
{
"id": "id${newId()}",
"type": "fx-title",
"props": {
"label": "${group.label}"
}
},
{
"id": "id${newId()}",
"type": "fx-button-group",
"props": {
"menus": [],
"textAlign": "right",
"showDropdown": false
},
"slots": {
"default": [
{
"type": "fx-button",
"props": {
"label": "新增",
"leftIcon": "plus",
"type": "primary",
"action": "button:add",
"linkType": "dialog",
"dataset": "",
"fxLink": "dialog:editMainDialog",
"fxLink_text": "卡片一号",
"preAction": ""
},
"id": "id${newId()}"
}
],
"dropdown": []
}
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"label": "表格区",
"colNum": 0
},
"children": [
{
"id": "id${newId()}",
"type": "fx-table",
"props": {
"label": "表格",
"border": true,
"stripe": true,
"showHeader": true,
"fit": true,
"dataset": "${param.queryDs}",
"actionWidth": 150
},
"slots": {
"button": [
{
"type": "fx-button",
"props": {
"label": "编辑",
"type": "primary",
"leftIcon": "edit",
"action": "button:edit",
"link": true,
"dataset": "${param.editDs}",
"linkType": "dialog",
"fxLink": "dialog:editMainDialog",
"fxLink_text": ""
},
"id": "id${newId()}"
},
{
"type": "fx-button",
"props": {
"label": "删除",
"type": "primary",
"leftIcon": "delete",
"action": "button:remove",
"link": true,
"dataset": "${param.editDs}",
"preAction": ""
},
"id": "id${newId()}"
}
],
"default": [
<#if (group.fields?size>0)>
<#list group.fields as col>
{
"id": "id${newId()}",
"type": "fx-table-column",
"props": {
"field": "${col.id}",
"label": "${col.label}"
}
}<#if col_has_next>,</#if>
</#list>
</#if>
]
},
"events": {}
}
]
}
]
}
]
},
{
"shape": "panel",
"id": "fx-form-panel",
"type": "fx-split-panel",
"props": {
"shadow": "",
"size": 24
},
"children": []
}
]
}
},
<#list layout.c2 as main_dialog>
{
"page": {
"id": "id${newId()}",
"type": "fx-dialog",
"props": {
<#if (param.editTitle == "")>
"title": "卡片一号",
<#else>
"title": "${param.editTitle}",
</#if>
"key": "editMainDialog",
"closeOnClickModal": false
},
"events": {}
},
"graph": {
"shape": "panel",
"id": "root_panel",
"type": "fx-split-panel",
"props": {
"horizontal": false,
"shadow": "never"
},
"children": [
{
"id": "${newId()}",
"type": "fx-split-panel",
"shape": "panel",
"props": {
"horizontal": false,
"scroll": true,
"backgroundColor": "--color-white"
},
"children": [
<#assign dfields = main_dialog.fields>
<#assign col = param.col>
<#include "incModel/inc_list_dialog.ftl"/>
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "0"
},
"children": [
{
"id": "id${newId()}",
"type": "fx-divider",
"props": {
"label": "",
"contentPosition": "center",
"direction": "horizontal"
}
}
]
},
{
"id": "${newId()}",
"type": "fx-form-panel",
"shape": "panel",
"props": {
"size": "56",
"paddingRight": 10,
"alignY": "center"
},
"children": [
{
"id": "id${newId()}",
"type": "fx-button-group",
"props": {
"menus": [],
"textAlign": "right"
},
"slots": {
"default": [
{
"type": "fx-button",
"props": {
"label": "保存",
"leftIcon": "save",
"type": "success",
"action": "button:save",
"dataset": "${param.editDs}"
},
"id": "id${newId()}"
},
{
"type": "fx-button",
"props": {
"label": "关闭",
"leftIcon": "close",
"type": "",
"action": "button:closeDialog",
"nextAction": "button:search"
},
"id": "id${newId()}"
}
]
}
}
]
}
]
}
}
</#list>
],
</#list>
"model": [
<#list datasets as dataset>
<#include "incModel/inc_model.ftl"/><#if dataset_has_next>,</#if>
</#list>
],
"option": {
"widgetRef": [${widgetRef}],
"vars": []
}
}

Caricamento…
Annulla
Salva