amis-saas-5329 [Feature] 「feat」服务调用配置升级

Change-Id: Ie6d56075d7143c7d3bc293b18886ea78396c846a
This commit is contained in:
RickCole21 2022-08-12 14:55:35 +08:00
parent df9255614e
commit bd427d3d7f
2 changed files with 41 additions and 19 deletions

View File

@ -329,6 +329,8 @@ export class FileControlPlugin extends BasePlugin {
'文件接收器',
'默认不填写将上传到 bos可以在系统配置中设置为自己的 bos 地址。'
),
className: 'inputFile-apiControl',
renderLabel: true,
value: '/api/upload/file',
__isUpload: true,
visibleOn:

View File

@ -413,7 +413,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
innerArgs: ['api', 'options'],
descDetail: (info: any) => {
let apiInfo = info?.args?.api;
if (typeof apiInfo === 'string'){
if (typeof apiInfo === 'string') {
apiInfo = normalizeApi(apiInfo);
}
return (
@ -429,7 +429,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
},
schema: {
type: 'wrapper',
className: "p-none",
className: 'p-none',
body: [
getArgsWrapper(
[
@ -438,6 +438,8 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
label: '配置请求',
mode: 'horizontal',
size: 'lg',
inputClassName: 'm-b-none',
renderLabel: true,
required: true
}),
{
@ -456,21 +458,27 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
remark: {
className: 'ae-BaseRemark',
icon: 'fa fa-question-circle',
shape: "circle",
placement: "left",
content: '勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
shape: 'circle',
placement: 'left',
content:
'勾选后,服务请求将以静默模式发送,即不会弹出成功或报错提示。'
}
}
]
}
]
],
false,
{
className: 'action-apiControl'
}
),
{
name: 'outputVar',
type: 'input-text',
label: '存储结果',
placeholder: '请输入存储请求结果的变量名称',
description: '如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
description:
'如需执行多次发送请求,可以修改此变量名用于区分不同请求返回的结果',
mode: 'horizontal',
size: 'lg',
value: 'responseResult',
@ -513,8 +521,13 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
label: '配置请求',
mode: 'horizontal',
size: 'lg',
renderLabel: 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: [
...renderCmptSelect('选择组件', true),
{
@ -656,7 +673,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
</div>
);
},
supportComponents: 'byComponent',
supportComponents: [],
schema: renderCmptSelect('选择组件', true)
},
{
@ -681,7 +698,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
</div>
);
},
supportComponents: 'byComponent',
supportComponents: [],
schema: [
...renderCmptActionSelect('选择组件', true),
getArgsWrapper({
@ -702,10 +719,15 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
},
{
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('value', []);
form.setValueByName('__valueInput', undefined);
@ -740,7 +762,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
labelField: 'label',
valueField: 'value',
required: true,
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`,
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`
},
{
name: 'key',
@ -794,7 +816,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
labelField: 'label',
valueField: 'name',
required: true,
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`,
visibleOn: `data.__rendererName && ${SHOW_SELECT_PROP}`
},
{
name: 'key',
@ -927,9 +949,7 @@ const ACTION_TYPE_TREE = (manager: any): RendererPluginAction[] => {
return (
<div>
<span className="variable-left">
{info?.args?.content}
</span>
<span className="variable-left">{info?.args?.content}</span>
</div>
);
},
@ -1048,4 +1068,4 @@ doAction({
];
};
export default ACTION_TYPE_TREE;
export default ACTION_TYPE_TREE;