Commit 4f538d7e by 张蕴鹏

添加例子

parent 7fa2b67a
Showing with 45 additions and 17 deletions
......@@ -136,4 +136,22 @@ class CityChange {
def workflow = context.workflowContext
return WorkflowHandleContext.success(new WorkflowUser(1000, "李冬梅"))
}
def tree_type_updator(Host host, InputParameter parameter, DataList dataList, EnvDataObject envDataObject,
Map params, String sender) {
def model = host.getDataModel("city")
def treeType = params.get("tree_type")
if (treeType == null) {
return [
"type": "hidden"
]
} else {
return [
"treeModelName": "province",
"treeRootNode": treeType,
"type":"tree"
]
}
}
}
\ No newline at end of file
......@@ -873,28 +873,20 @@
"type": "text"
},
{
"property": "tree_type",
"label": "树类型",
"type": "mapping",
"mapping": "treeMapping",
"is_param": true
},
{
"type": "tree",
"property": "province_id",
"label": "省份ID",
"treeModelName": "province",
"treeRootNode": "1",
"required": true
}
],
"detailsss": [
{
"name": "province",
"label": "付款项目(必填)",
"relatedId": "id",
"controls": [
{
"property": "id",
"label": "类型",
"type": "tree",
"treeModelName": "province",
"required": true
}
]
"required": true,
"updator": "tree_type_updator"
}
]
},
......@@ -1064,6 +1056,23 @@
"value": "D:既不紧急也不重要"
}
]
},
{
"name": "treeMapping",
"mapping_values": [
{
"key": "1",
"value": "父节点1"
},
{
"key": "2",
"value": "父节点2"
},
{
"key": "3",
"value": "父节点3"
}
]
}
],
"joint_defs": [
......
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