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
4fb2b661
authored
May 23, 2022
by
张蕴鹏
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加例子
parent
4f538d7e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
34 deletions
models/city.groovy
models/city.json → models/city_example.json
models/province.groovy → models/province_example.groovy
models/province.json → models/province_example.json
models/city.groovy
View file @
4fb2b661
...
...
@@ -12,7 +12,7 @@ import com.qinqinxiaobao.report.uniplat.workflow.engine.WorkflowDao
import
com.qinqinxiaobao.report.uniplat.workflow.params.StartPlanTaskParam
class
CityChange
{
def
model_name
=
"city"
def
model_name
=
"city
_example
"
def
multiCascadeInput
(
ActionBehaviorContext
context
)
{
// 测试树
...
...
@@ -139,7 +139,6 @@ class CityChange {
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
[
...
...
@@ -147,7 +146,7 @@ class CityChange {
]
}
else
{
return
[
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"treeRootNode"
:
treeType
,
"type"
:
"tree"
]
...
...
models/city.json
→
models/city
_example
.json
View file @
4fb2b661
...
...
@@ -15,7 +15,7 @@
"multi"
:
true
,
"mapping"
:
"product_type_mapping"
,
"label"
:
"产品类型"
,
"default_value"
:
"{{host.invokeModelFunc(
\"
city
\"
,
\"
getMultiCascadeList
\"
,object)}}"
"default_value"
:
"{{host.invokeModelFunc(
\"
city
_example
\"
,
\"
getMultiCascadeList
\"
,object)}}"
},
"behavior"
:
"multiCascadeInput"
},
...
...
@@ -100,7 +100,7 @@
{
"property"
:
"tree_id"
,
"type"
:
"tree_cascader"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"treePrefilters"
:
[
{
"property"
:
"type"
,
...
...
@@ -130,7 +130,7 @@
"multi"
:
true
,
"mapping"
:
"product_type_mapping"
,
"label"
:
"产品类型"
,
"default_value"
:
"{{host.invokeModelFunc(
\"
city
\"
,
\"
getMultiCascadeList
\"
,object)}}"
"default_value"
:
"{{host.invokeModelFunc(
\"
city
_example
\"
,
\"
getMultiCascadeList
\"
,object)}}"
}
]
}
...
...
@@ -883,7 +883,7 @@
"type"
:
"tree"
,
"property"
:
"province_id"
,
"label"
:
"省份ID"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"treeRootNode"
:
"1"
,
"required"
:
true
,
"updator"
:
"tree_type_updator"
...
...
@@ -917,7 +917,7 @@
"type"
:
"tree_cascader"
,
"property"
:
"province_id"
,
"label"
:
"省份ID"
,
"treeModelName"
:
"province"
"treeModelName"
:
"province
_example
"
}
]
},
...
...
@@ -949,7 +949,7 @@
"label"
:
"省份ID"
,
"default_value"
:
"object.province_id.value"
,
"type"
:
"tree_cascader"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"readonly"
:
true
,
"treeShowAllPath"
:
false
}
...
...
@@ -1119,7 +1119,7 @@
"name"
:
"openSideWorkflowDetail"
,
"label"
:
"工作流详情"
,
"action"
:
"openWorkflowDetail"
,
"model"
:
"city"
,
"model"
:
"city
_example
"
,
"when"
:
"1"
,
"enabled"
:
"1"
,
"parameters"
:
{
...
...
@@ -1143,7 +1143,7 @@
"name"
:
"showSidebarDetail"
,
"label"
:
"intent-插入"
,
"action"
:
"execute"
,
"model"
:
"city"
,
"model"
:
"city
_example
"
,
"container"
:
"dialog"
,
"when"
:
"1"
,
"enabled"
:
"1"
,
...
...
@@ -1166,7 +1166,7 @@
"type"
:
"tree"
,
"property"
:
"province_id"
,
"label"
:
"省份ID"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"required"
:
false
}
]
...
...
@@ -1177,7 +1177,7 @@
"name"
:
"testCascader"
,
"label"
:
"intent-测试onObject"
,
"action"
:
"execute"
,
"model"
:
"city"
,
"model"
:
"city
_example
"
,
"container"
:
"dialog"
,
"when"
:
"1"
,
"enabled"
:
"1"
,
...
...
@@ -1257,7 +1257,7 @@
"label"
:
"树测试"
,
"type"
:
"tree"
,
"field"
:
"province_id"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"width"
:
450
},
{
...
...
@@ -1319,23 +1319,9 @@
"log_action_visible"
:
false
,
"tree"
:
{
"field"
:
"province_id"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"treeRootNode"
:
"env.user_id.value"
,
"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"
:
{
...
...
@@ -1393,7 +1379,7 @@
"field_groups"
:
[
{
"label"
:
"描述"
,
"template"
:
"{{host.getDataModel(
\"
city
\"
).getModelDescription()}}"
"template"
:
"{{host.getDataModel(
\"
city
_example
\"
).getModelDescription()}}"
},
{
"label"
:
"id"
,
...
...
@@ -1410,7 +1396,7 @@
{
"label"
:
"省份"
,
"_template"
:
"{province_id#province_joint.name}"
,
"template"
:
"{{object.getTreeDisplay(object.province_id.value, 'province')}}"
"template"
:
"{{object.getTreeDisplay(object.province_id.value, 'province
_example
')}}"
}
],
"actions"
:
[
...
...
@@ -1467,7 +1453,7 @@
],
"sections"
:
[],
"workflow_list"
:
{
"name"
:
"city"
,
"name"
:
"city
_example
"
,
"prefilters"
:
[]
}
},
...
...
@@ -1502,7 +1488,7 @@
"property"
:
"province_id"
,
"type"
:
"tree"
,
"label"
:
"省份"
,
"treeModelName"
:
"province"
,
"treeModelName"
:
"province
_example
"
,
"treeGroupLevel"
:
[
"省"
,
"市"
,
...
...
models/province.groovy
→
models/province
_example
.groovy
View file @
4fb2b661
...
...
@@ -7,7 +7,7 @@ import com.qinqinxiaobao.report.uniplat.list.ListDef
import
com.qinqinxiaobao.report.uniplat.models.meta.DataModel
class
province
{
def
model_name
=
"province"
def
model_name
=
"province
_example
"
def
methodTest
(
Host
host
,
String
a
,
int
b
,
Long
c
,
ListDef
pureDataObject
)
{
return
0
...
...
models/province.json
→
models/province
_example
.json
View file @
4fb2b661
File moved
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