Commit 4fb2b661 by 张蕴鹏

添加例子

parent 4f538d7e
...@@ -12,7 +12,7 @@ import com.qinqinxiaobao.report.uniplat.workflow.engine.WorkflowDao ...@@ -12,7 +12,7 @@ import com.qinqinxiaobao.report.uniplat.workflow.engine.WorkflowDao
import com.qinqinxiaobao.report.uniplat.workflow.params.StartPlanTaskParam import com.qinqinxiaobao.report.uniplat.workflow.params.StartPlanTaskParam
class CityChange { class CityChange {
def model_name = "city" def model_name = "city_example"
def multiCascadeInput(ActionBehaviorContext context) { def multiCascadeInput(ActionBehaviorContext context) {
// 测试树 // 测试树
...@@ -139,7 +139,6 @@ class CityChange { ...@@ -139,7 +139,6 @@ class CityChange {
def tree_type_updator(Host host, InputParameter parameter, DataList dataList, EnvDataObject envDataObject, def tree_type_updator(Host host, InputParameter parameter, DataList dataList, EnvDataObject envDataObject,
Map params, String sender) { Map params, String sender) {
def model = host.getDataModel("city")
def treeType = params.get("tree_type") def treeType = params.get("tree_type")
if (treeType == null) { if (treeType == null) {
return [ return [
...@@ -147,7 +146,7 @@ class CityChange { ...@@ -147,7 +146,7 @@ class CityChange {
] ]
} else { } else {
return [ return [
"treeModelName": "province", "treeModelName": "province_example",
"treeRootNode": treeType, "treeRootNode": treeType,
"type":"tree" "type":"tree"
] ]
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"multi": true, "multi": true,
"mapping": "product_type_mapping", "mapping": "product_type_mapping",
"label": "产品类型", "label": "产品类型",
"default_value": "{{host.invokeModelFunc(\"city\",\"getMultiCascadeList\",object)}}" "default_value": "{{host.invokeModelFunc(\"city_example\",\"getMultiCascadeList\",object)}}"
}, },
"behavior": "multiCascadeInput" "behavior": "multiCascadeInput"
}, },
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
{ {
"property": "tree_id", "property": "tree_id",
"type": "tree_cascader", "type": "tree_cascader",
"treeModelName": "province", "treeModelName": "province_example",
"treePrefilters": [ "treePrefilters": [
{ {
"property": "type", "property": "type",
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
"multi": true, "multi": true,
"mapping": "product_type_mapping", "mapping": "product_type_mapping",
"label": "产品类型", "label": "产品类型",
"default_value": "{{host.invokeModelFunc(\"city\",\"getMultiCascadeList\",object)}}" "default_value": "{{host.invokeModelFunc(\"city_example\",\"getMultiCascadeList\",object)}}"
} }
] ]
} }
...@@ -883,7 +883,7 @@ ...@@ -883,7 +883,7 @@
"type": "tree", "type": "tree",
"property": "province_id", "property": "province_id",
"label": "省份ID", "label": "省份ID",
"treeModelName": "province", "treeModelName": "province_example",
"treeRootNode": "1", "treeRootNode": "1",
"required": true, "required": true,
"updator": "tree_type_updator" "updator": "tree_type_updator"
...@@ -917,7 +917,7 @@ ...@@ -917,7 +917,7 @@
"type": "tree_cascader", "type": "tree_cascader",
"property": "province_id", "property": "province_id",
"label": "省份ID", "label": "省份ID",
"treeModelName": "province" "treeModelName": "province_example"
} }
] ]
}, },
...@@ -949,7 +949,7 @@ ...@@ -949,7 +949,7 @@
"label": "省份ID", "label": "省份ID",
"default_value": "object.province_id.value", "default_value": "object.province_id.value",
"type": "tree_cascader", "type": "tree_cascader",
"treeModelName": "province", "treeModelName": "province_example",
"readonly": true, "readonly": true,
"treeShowAllPath": false "treeShowAllPath": false
} }
...@@ -1119,7 +1119,7 @@ ...@@ -1119,7 +1119,7 @@
"name": "openSideWorkflowDetail", "name": "openSideWorkflowDetail",
"label": "工作流详情", "label": "工作流详情",
"action": "openWorkflowDetail", "action": "openWorkflowDetail",
"model": "city", "model": "city_example",
"when": "1", "when": "1",
"enabled": "1", "enabled": "1",
"parameters": { "parameters": {
...@@ -1143,7 +1143,7 @@ ...@@ -1143,7 +1143,7 @@
"name": "showSidebarDetail", "name": "showSidebarDetail",
"label": "intent-插入", "label": "intent-插入",
"action": "execute", "action": "execute",
"model": "city", "model": "city_example",
"container": "dialog", "container": "dialog",
"when": "1", "when": "1",
"enabled": "1", "enabled": "1",
...@@ -1166,7 +1166,7 @@ ...@@ -1166,7 +1166,7 @@
"type": "tree", "type": "tree",
"property": "province_id", "property": "province_id",
"label": "省份ID", "label": "省份ID",
"treeModelName": "province", "treeModelName": "province_example",
"required": false "required": false
} }
] ]
...@@ -1177,7 +1177,7 @@ ...@@ -1177,7 +1177,7 @@
"name": "testCascader", "name": "testCascader",
"label": "intent-测试onObject", "label": "intent-测试onObject",
"action": "execute", "action": "execute",
"model": "city", "model": "city_example",
"container": "dialog", "container": "dialog",
"when": "1", "when": "1",
"enabled": "1", "enabled": "1",
...@@ -1257,7 +1257,7 @@ ...@@ -1257,7 +1257,7 @@
"label": "树测试", "label": "树测试",
"type": "tree", "type": "tree",
"field": "province_id", "field": "province_id",
"treeModelName": "province", "treeModelName": "province_example",
"width": 450 "width": 450
}, },
{ {
...@@ -1319,23 +1319,9 @@ ...@@ -1319,23 +1319,9 @@
"log_action_visible": false, "log_action_visible": false,
"tree": { "tree": {
"field": "province_id", "field": "province_id",
"treeModelName": "province", "treeModelName": "province_example",
"treeRootNode": "env.user_id.value", "treeRootNode": "env.user_id.value",
"cancelButtonLabel": "取消" "cancelButtonLabel": "取消"
},
"_tree_with_data": {
"treeModelName": "province",
"template": "{name}",
"dataModelName": "city",
"foreignKey": "id",
"treeForeignKey": "province_id",
"treeForeignField": "province#joint.id",
"cancelButtonLabel": "测试1",
"fields": [
"id",
"name",
"province_id"
]
} }
}, },
"detail": { "detail": {
...@@ -1393,7 +1379,7 @@ ...@@ -1393,7 +1379,7 @@
"field_groups": [ "field_groups": [
{ {
"label": "描述", "label": "描述",
"template": "{{host.getDataModel(\"city\").getModelDescription()}}" "template": "{{host.getDataModel(\"city_example\").getModelDescription()}}"
}, },
{ {
"label": "id", "label": "id",
...@@ -1410,7 +1396,7 @@ ...@@ -1410,7 +1396,7 @@
{ {
"label": "省份", "label": "省份",
"_template": "{province_id#province_joint.name}", "_template": "{province_id#province_joint.name}",
"template": "{{object.getTreeDisplay(object.province_id.value, 'province')}}" "template": "{{object.getTreeDisplay(object.province_id.value, 'province_example')}}"
} }
], ],
"actions": [ "actions": [
...@@ -1467,7 +1453,7 @@ ...@@ -1467,7 +1453,7 @@
], ],
"sections": [], "sections": [],
"workflow_list": { "workflow_list": {
"name": "city", "name": "city_example",
"prefilters": [] "prefilters": []
} }
}, },
...@@ -1502,7 +1488,7 @@ ...@@ -1502,7 +1488,7 @@
"property": "province_id", "property": "province_id",
"type": "tree", "type": "tree",
"label": "省份", "label": "省份",
"treeModelName": "province", "treeModelName": "province_example",
"treeGroupLevel": [ "treeGroupLevel": [
"省", "省",
"市", "市",
......
...@@ -7,7 +7,7 @@ import com.qinqinxiaobao.report.uniplat.list.ListDef ...@@ -7,7 +7,7 @@ import com.qinqinxiaobao.report.uniplat.list.ListDef
import com.qinqinxiaobao.report.uniplat.models.meta.DataModel import com.qinqinxiaobao.report.uniplat.models.meta.DataModel
class province { class province {
def model_name = "province" def model_name = "province_example"
def methodTest(Host host, String a, int b, Long c, ListDef pureDataObject) { def methodTest(Host host, String a, int b, Long c, ListDef pureDataObject) {
return 0 return 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment