mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-15 17:31:18 +08:00
amis-saas-5329 [Feature] 「feat」服务调用配置升级
Change-Id: Ie6d56075d7143c7d3bc293b18886ea78396c846a
This commit is contained in:
parent
df9255614e
commit
bd427d3d7f
@ -329,6 +329,8 @@ export class FileControlPlugin extends BasePlugin {
|
|||||||
'文件接收器',
|
'文件接收器',
|
||||||
'默认不填写将上传到 bos,可以在系统配置中设置为自己的 bos 地址。'
|
'默认不填写将上传到 bos,可以在系统配置中设置为自己的 bos 地址。'
|
||||||
),
|
),
|
||||||
|
className: 'inputFile-apiControl',
|
||||||
|
renderLabel: true,
|
||||||
value: '/api/upload/file',
|
value: '/api/upload/file',
|
||||||
__isUpload: true,
|
__isUpload: true,
|
||||||
visibleOn:
|
visibleOn:
|
||||||
|
@ -413,7 +413,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
innerArgs: ['api', 'options'],
|
innerArgs: ['api', 'options'],
|
||||||
descDetail: (info: any) => {
|
descDetail: (info: any) => {
|
||||||
let apiInfo = info?.args?.api;
|
let apiInfo = info?.args?.api;
|
||||||
if (typeof apiInfo === 'string'){
|
if (typeof apiInfo === 'string') {
|
||||||
apiInfo = normalizeApi(apiInfo);
|
apiInfo = normalizeApi(apiInfo);
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
@ -429,7 +429,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
},
|
},
|
||||||
schema: {
|
schema: {
|
||||||
type: 'wrapper',
|
type: 'wrapper',
|
||||||
className: "p-none",
|
className: 'p-none',
|
||||||
body: [
|
body: [
|
||||||
getArgsWrapper(
|
getArgsWrapper(
|
||||||
[
|
[
|
||||||
@ -438,6 +438,8 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
label: '配置请求',
|
label: '配置请求',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
size: 'lg',
|
size: 'lg',
|
||||||
|
inputClassName: 'm-b-none',
|
||||||
|
renderLabel: true,
|
||||||
required: true
|
required: true
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
@ -456,21 +458,27 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
remark: {
|
remark: {
|
||||||
className: 'ae-BaseRemark',
|
className: 'ae-BaseRemark',
|
||||||
icon: 'fa fa-question-circle',
|
icon: 'fa fa-question-circle',
|
||||||
shape: "circle",
|
shape: 'circle',
|
||||||
placement: "left",
|
placement: 'left',
|
||||||
content: '勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
|
content:
|
||||||
|
'勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
false,
|
||||||
|
{
|
||||||
|
className: 'action-apiControl'
|
||||||
|
}
|
||||||
),
|
),
|
||||||
{
|
{
|
||||||
name: 'outputVar',
|
name: 'outputVar',
|
||||||
type: 'input-text',
|
type: 'input-text',
|
||||||
label: '存储结果',
|
label: '存储结果',
|
||||||
placeholder: '请输入存储请求结果的变量名称',
|
placeholder: '请输入存储请求结果的变量名称',
|
||||||
description: '如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
|
description:
|
||||||
|
'如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
size: 'lg',
|
size: 'lg',
|
||||||
value: 'responseResult',
|
value: 'responseResult',
|
||||||
@ -513,8 +521,13 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
label: '配置请求',
|
label: '配置请求',
|
||||||
mode: 'horizontal',
|
mode: 'horizontal',
|
||||||
size: 'lg',
|
size: 'lg',
|
||||||
|
renderLabel: true,
|
||||||
required: true
|
required: true
|
||||||
})
|
}),
|
||||||
|
false,
|
||||||
|
{
|
||||||
|
className: 'action-apiControl'
|
||||||
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -617,7 +630,11 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
supportComponents: ['form', ...FORMITEM_CMPTS, ...SUPPORT_DISABLED_CMPTS],
|
supportComponents: [
|
||||||
|
'form',
|
||||||
|
...FORMITEM_CMPTS,
|
||||||
|
...SUPPORT_DISABLED_CMPTS
|
||||||
|
],
|
||||||
schema: [
|
schema: [
|
||||||
...renderCmptSelect('选择组件', true),
|
...renderCmptSelect('选择组件', true),
|
||||||
{
|
{
|
||||||
@ -656,7 +673,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
supportComponents: 'byComponent',
|
supportComponents: [],
|
||||||
schema: renderCmptSelect('选择组件', true)
|
schema: renderCmptSelect('选择组件', true)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -681,7 +698,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
supportComponents: 'byComponent',
|
supportComponents: [],
|
||||||
schema: [
|
schema: [
|
||||||
...renderCmptActionSelect('选择组件', true),
|
...renderCmptActionSelect('选择组件', true),
|
||||||
getArgsWrapper({
|
getArgsWrapper({
|
||||||
@ -702,10 +719,15 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '指定序号',
|
label: '指定序号',
|
||||||
value: 'appoint',
|
value: 'appoint'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
onChange: (value: string, oldVal: any, data: any, form: any) => {
|
onChange: (
|
||||||
|
value: string,
|
||||||
|
oldVal: any,
|
||||||
|
data: any,
|
||||||
|
form: any
|
||||||
|
) => {
|
||||||
form.setValueByName('index', undefined);
|
form.setValueByName('index', undefined);
|
||||||
form.setValueByName('value', []);
|
form.setValueByName('value', []);
|
||||||
form.setValueByName('__valueInput', undefined);
|
form.setValueByName('__valueInput', undefined);
|
||||||
@ -740,7 +762,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
labelField: 'label',
|
labelField: 'label',
|
||||||
valueField: 'value',
|
valueField: 'value',
|
||||||
required: true,
|
required: true,
|
||||||
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`,
|
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'key',
|
name: 'key',
|
||||||
@ -794,7 +816,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
labelField: 'label',
|
labelField: 'label',
|
||||||
valueField: 'name',
|
valueField: 'name',
|
||||||
required: true,
|
required: true,
|
||||||
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`,
|
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'key',
|
name: 'key',
|
||||||
@ -927,9 +949,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
复制内容:
|
复制内容:
|
||||||
<span className="variable-left">
|
<span className="variable-left">{info?.args?.content}</span>
|
||||||
{info?.args?.content}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
@ -1048,4 +1068,4 @@ doAction({
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ACTION_TYPE_TREE;
|
export default ACTION_TYPE_TREE;
|
||||||
|
Loading…
Reference in New Issue
Block a user