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
77c93fbf
authored
Apr 13, 2022
by
张蕴鹏
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
feat(bigAction): bigAction 改造
parent
1627d82a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
431 additions
and
0 deletions
models/Example1.json
models/province.groovy
models/province.json
models/Example1.json
View file @
77c93fbf
...
...
@@ -157,6 +157,20 @@
],
"intentDefs"
:
[
{
"name"
:
"otherAction"
,
"label"
:
"调用其他模型"
,
"container"
:
"dialog"
,
"model"
:
"example_url"
,
"action"
:
"execute"
,
"parameters"
:
{
"actionName"
:
"insert"
,
"parameters"
:
{
"inputs"
:[
]
}
}
},
{
"name"
:
"executeActionOther1"
,
"label"
:
"intent-更新-调用本身"
,
"container"
:
"dialog"
,
...
...
@@ -787,6 +801,19 @@
],
"intents"
:
[
"executeActionOther"
]
},
"sections"
:
[
{
"label"
:
"section"
,
"field_groups"
:
[
{
"label"
:
"id"
,
"template"
:
"{id}"
,
"intents"
:
[
"otherAction"
,
"executeActionOther"
]
}
],
"actions"
:
[]
}
],
"pages"
:
[
{
"name"
:
"detail_page_1"
,
...
...
@@ -845,6 +872,7 @@
"delete"
],
"intents"
:
[
"executeActionOther"
,
"showList"
,
"showWorkflowList"
,
"exportTargetList"
,
...
...
models/province.groovy
0 → 100644
View file @
77c93fbf
import
com.qinqinxiaobao.report.uniplat.engine.DO.EnvDataObject
import
com.qinqinxiaobao.report.uniplat.engine.DO.PureDataObject
import
com.qinqinxiaobao.report.uniplat.engine.DataList
import
com.qinqinxiaobao.report.uniplat.executor.InputParameter
import
com.qinqinxiaobao.report.uniplat.host.Host
import
com.qinqinxiaobao.report.uniplat.models.meta.DataModel
class
province
{
def
model_name
=
"province"
def
up
(
Host
host
,
DataModel
dataModel
,
DataList
dataList
,
PureDataObject
inputsObj
,
EnvDataObject
envObj
)
{
def
object
=
dataList
.
fetchOne
();
dataModel
.
getTableTree
().
orderUpOrDown
(
object
.
getKeyValue
(),
true
);
def
list
=
dataModel
.
getTableTree
().
queryNodeAllDescendant
(
1
,
false
)
def
filter
=
[
"type"
:
1
]
def
parent
=
dataModel
.
getTableTree
().
getParentId
(
4
)
def
filterList
=
dataModel
.
getTableTree
().
queryNodeDirectDescendant
(-
1
,
filter
,
false
)
def
siblings
=
dataModel
.
getTableTree
().
queryNodeSiblings
(
1
,
null
,
false
)
return
[
"result"
:
0
,
"id"
:
1
,
"msg"
:
"处理成功!"
]
}
def
down
(
Host
host
,
DataModel
dataModel
,
DataList
dataList
,
PureDataObject
inputsObj
,
EnvDataObject
envObj
)
{
def
object
=
dataList
.
fetchOne
();
dataModel
.
getTableTree
().
orderUpOrDown
(
object
.
getKeyValue
(),
false
);
return
[
"result"
:
0
,
"id"
:
1
,
"msg"
:
"处理成功!"
]
}
def
tree_updator
(
Host
host
,
InputParameter
inputParameter
,
DataList
dataList
,
EnvDataObject
envDataObject
,
Map
params
,
String
sender
)
{
def
tree
=
params
.
get
(
"parent_tree_node"
);
if
(
tree
==
null
)
{
return
[
"default_value"
:
8
]
}
def
temp
=
14
;
return
[
"default_value"
:
temp
]
}
def
sort_updator
(
Host
host
,
InputParameter
inputParameter
,
DataList
dataList
,
EnvDataObject
envDataObject
,
Map
params
,
String
sender
)
{
def
sort
=
params
.
get
(
"sort"
);
if
(
sort
==
null
)
{
return
[
"default_value"
:
100
]
}
return
[
"default_value"
:
sort
+
1
]
}
}
\ No newline at end of file
models/province.json
0 → 100644
View file @
77c93fbf
{
"table"
:
"province"
,
"database"
:
"intent_example"
,
"key_field"
:
"id"
,
"action_defs"
:
[
{
"name"
:
"up"
,
"when"
:
"1"
,
"label"
:
"上移"
,
"prompt"
:
"执行删除之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
{
"property"
:
"uid"
,
"result"
:
"env.user_id.value"
}
],
"inputs"
:
[]
},
"behavior"
:
"uniplatTreeUp"
,
"forward"
:
""
},
{
"name"
:
"down"
,
"when"
:
"1"
,
"label"
:
"下移"
,
"prompt"
:
"执行删除之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
{
"property"
:
"uid"
,
"result"
:
"env.user_id.value"
}
],
"inputs"
:
[]
},
"behavior"
:
"uniplatTreeDown"
,
"forward"
:
""
},
{
"name"
:
"insert"
,
"when"
:
"1"
,
"label"
:
"新增"
,
"prompt"
:
"执行新增之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
{
"property"
:
"uid"
,
"result"
:
"env.user_id.value"
}
],
"inputs"
:
[
{
"property"
:
"name"
,
"label"
:
"名称"
,
"type"
:
"text"
,
"is_param"
:
true
},
{
"property"
:
"sort"
,
"label"
:
"排序"
,
"type"
:
"number"
},
{
"type"
:
"tree"
,
"property"
:
"parent_tree_node"
,
"label"
:
"父节点"
}
]
},
"behavior"
:
"insert"
,
"forward"
:
""
},
{
"name"
:
"update"
,
"when"
:
"1"
,
"label"
:
"修改"
,
"prompt"
:
"执行修改之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
{
"property"
:
"uid"
,
"result"
:
"env.user_id.value"
}
],
"inputs"
:
[
{
"property"
:
"name"
,
"label"
:
"名称"
,
"default_value"
:
"object.name.value"
,
"type"
:
"text"
},
{
"property"
:
"sort"
,
"label"
:
"排序"
,
"default_value"
:
"object.sort.value"
,
"type"
:
"number"
},
{
"type"
:
"tree"
,
"property"
:
"parent_tree_node"
,
"label"
:
"父节点"
,
"default_value"
:
"object.id.value"
}
]
},
"behavior"
:
"update"
,
"forward"
:
""
},
{
"name"
:
"update_name"
,
"when"
:
"1"
,
"on"
:
"each"
,
"label"
:
"修改名称"
,
"prompt"
:
"执行修改之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
],
"inputs"
:
[
{
"property"
:
"name"
,
"label"
:
"名称"
,
"default_value"
:
"object.name.value"
,
"type"
:
"text"
}
]
},
"behavior"
:
"update"
,
"forward"
:
""
},
{
"name"
:
"delete"
,
"when"
:
"1"
,
"label"
:
"删除"
,
"prompt"
:
"执行删除之提示"
,
"container"
:
"dialog"
,
"parameters"
:
{
"server"
:
[
{
"property"
:
"uid"
,
"result"
:
"env.user_id.value"
}
],
"inputs"
:
[]
},
"behavior"
:
"delete"
,
"forward"
:
"close"
}
],
"intentDefs"
:
[
{
"name"
:
"addRemark"
,
"label"
:
"intent-添加备注"
,
"action"
:
"addMemo"
,
"model"
:
"不填写就是当前,填写了就是制定的数据模型"
,
"when"
:
"1"
,
"enabled"
:
"1"
,
"parameters"
:
{
"enableRemarkType"
:
true
,
"enableAttachments"
:
true
}
}
],
"mapping_defs"
:
[],
"joint_defs"
:
[],
"field_defs"
:
[
{
"property"
:
"id"
,
"type"
:
"number"
,
"label"
:
"id"
,
"format"
:
"0"
},
{
"property"
:
"type"
,
"type"
:
"number"
,
"label"
:
"type"
,
"format"
:
"0"
},
{
"property"
:
"name"
,
"type"
:
"text"
,
"label"
:
"名称"
,
"format"
:
""
},
{
"property"
:
"sort"
,
"type"
:
"number"
,
"label"
:
"排序"
,
"format"
:
""
},
{
"property"
:
"is_del"
,
"type"
:
"number"
,
"label"
:
"逻辑删除"
,
"format"
:
""
}
],
"calculator_defs"
:
[],
"group_sums"
:
[],
"list"
:
{
"label"
:
"省"
,
"filters"
:
[
{
"label"
:
"文本搜索"
,
"type"
:
"combo_text"
,
"hint"
:
"名称"
,
"fields"
:
[
"name"
],
"width"
:
450
}
],
"actions"
:
[
"insert"
],
"field_groups"
:
[
{
"label"
:
"id"
,
"template"
:
"{id}"
},
{
"label"
:
"名称"
,
"template"
:
"{name}"
},
{
"label"
:
"排序"
,
"template"
:
"{sort}"
}
],
"row_actions"
:
[
"update"
,
"up"
,
"down"
],
"detail_action_visible"
:
true
,
"log_action_visible"
:
false
},
"lists"
:
[
{
"name"
:
"abc"
,
"label"
:
"省"
,
"filters"
:
[
{
"label"
:
"文本搜索"
,
"type"
:
"combo_text"
,
"hint"
:
"名称"
,
"fields"
:
[
"name"
],
"width"
:
450
}
],
"actions"
:
[
"insert"
],
"field_groups"
:
[
{
"label"
:
"id"
,
"template"
:
"{id}"
},
{
"label"
:
"名称"
,
"template"
:
"{name}"
},
{
"label"
:
"排序"
,
"template"
:
"{sort}"
}
],
"row_actions"
:
[
"up"
,
"down"
],
"detail_action_visible"
:
true
,
"log_action_visible"
:
false
}
],
"detail"
:
{
"label"
:
"省"
,
"title_template"
:
""
,
"actions"
:
[
"up"
,
"down"
,
"delete"
],
"header"
:
{
"field_groups"
:
[
{
"label"
:
"id"
,
"template"
:
"{id}"
},
{
"label"
:
"名称"
,
"template"
:
"{name}"
},
{
"label"
:
"排序"
,
"template"
:
"{sort}"
}
],
"actions"
:
[
"update"
]
},
"pages"
:
[
{
"name"
:
"detail_page_1"
,
"label"
:
"数据明细页1"
,
"sections"
:
[
{
"label"
:
"块头标题"
,
"field_groups"
:
[
{
"label"
:
"id"
,
"template"
:
"{id}"
},
{
"label"
:
"名称"
,
"template"
:
"{name}"
}
],
"page_groups"
:
[],
"actions"
:
[
"update"
,
"delete"
]
}
]
}
]
},
"treeDef"
:
{
"orderField"
:
"sort"
,
"type"
:
"closureTable"
,
"display"
:
"name"
,
"actions"
:
[
"update_name"
,
"insert"
],
"prefilters"
:
[
]
}
}
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