Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
uniplat-example
/
intent-example
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4f538d7e
authored
May 23, 2022
by
张蕴鹏
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加例子
parent
7fa2b67a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
17 deletions
models/city.groovy
models/city.json
models/city.groovy
View file @
4f538d7e
...
@@ -136,4 +136,22 @@ class CityChange {
...
@@ -136,4 +136,22 @@ class CityChange {
def
workflow
=
context
.
workflowContext
def
workflow
=
context
.
workflowContext
return
WorkflowHandleContext
.
success
(
new
WorkflowUser
(
1000
,
"李冬梅"
))
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
models/city.json
View file @
4f538d7e
...
@@ -873,28 +873,20 @@
...
@@ -873,28 +873,20 @@
"type"
:
"text"
"type"
:
"text"
},
},
{
{
"property"
:
"tree_type"
,
"label"
:
"树类型"
,
"type"
:
"mapping"
,
"mapping"
:
"treeMapping"
,
"is_param"
:
true
},
{
"type"
:
"tree"
,
"type"
:
"tree"
,
"property"
:
"province_id"
,
"property"
:
"province_id"
,
"label"
:
"省份ID"
,
"label"
:
"省份ID"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province"
,
"treeRootNode"
:
"1"
,
"treeRootNode"
:
"1"
,
"required"
:
true
"required"
:
true
,
}
"updator"
:
"tree_type_updator"
],
"detailsss"
:
[
{
"name"
:
"province"
,
"label"
:
"付款项目(必填)"
,
"relatedId"
:
"id"
,
"controls"
:
[
{
"property"
:
"id"
,
"label"
:
"类型"
,
"type"
:
"tree"
,
"treeModelName"
:
"province"
,
"required"
:
true
}
]
}
}
]
]
},
},
...
@@ -1064,6 +1056,23 @@
...
@@ -1064,6 +1056,23 @@
"value"
:
"D:既不紧急也不重要"
"value"
:
"D:既不紧急也不重要"
}
}
]
]
},
{
"name"
:
"treeMapping"
,
"mapping_values"
:
[
{
"key"
:
"1"
,
"value"
:
"父节点1"
},
{
"key"
:
"2"
,
"value"
:
"父节点2"
},
{
"key"
:
"3"
,
"value"
:
"父节点3"
}
]
}
}
],
],
"joint_defs"
:
[
"joint_defs"
:
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment