文档
测试

p2组件-值替换

POST

请求参数

参数名
类型
描述
必填
id
int
组件id
必填
code
string
preparation_value_replace
必填
parents
string
父组件 多个逗号隔开
必填
children
string
子组件多个 逗号隔开
必填
value
object
组件具体参数
必填
operation
list
处理数据数组
必填
field
list
字段选择
必填
opt_type
string
替换类型,str(单值替换),map(关系表替换)
必填
old_str
string
原字符串(替换规则)
可选
offset
int
检索位置 0:开头,-1:结尾, 其他值或不存在:任意
可选
new_str
string
新字符串
可选
is_special_char
int
是否是特殊字符 1是 0否
可选
component_id
int
映射数据对应组件id
可选
relation_field
string
替换关联字段
可选
replace_field
string
替换值字段
可选
is_regular
int
是否启用正则-
可选
new_is_special
int
新字符串 是否特殊字符 1是 0否
可选
new_str_select
bool
是否是字段
可选
main_component_id
int
原表组件id
必填
name
string
组件名称,组件说明的描述字段
必填

说明 / 示例

``` operation为数组: 必填字段: field:操作字段 opt_type:替换类型,"str"字符串替换,"map"关系表替换 opt_type=="str": "is_regular":是否启用正则 "old_str":原字符串(替换规则) "new_str":新字符串 "offset":替换位置 0:开头,-1:结尾, 其他值或不存在:任意 "is_special_char":是否特殊字符;1是 0否 opt_type=="map": "map_id":映射数据对应组件id "relation_field":替换关联字段 "replace_field":替换值字段 { "id":, "parents":"1", "children":"", "code": "preparation_value_replace", "value":{ "operation": [ { "field": "a.b", "type": "str", "opt_type": "str",(替换类别 字符串替换) "is_regular":1 (是否启用正则) "old_str":"成都市",(原始字符串) "new_str":"成都",(新字符串) "offset":0 (替换位置 0:开头,-1:结尾, 其他值或不存在:任意) }, { "field": "c", "type": "int" "opt_type": "map",(替换类别 映射表替换) "map_id":1 (映射表组件id) "relation_field":"data.c", (替换关联字段) "replace_field":"data.m"(替换值字段) ] } } ```